Fast, one-click, seeded devnet for Cardano
Pegasus is a thin wrapper around a cardano-node
to get Cardano developers off the ground in a single command:
pegasus
TODO: insert gif here
Pegasus, the flying horse from greek mythology should get you off the ground quickly .. literally.
When developing applications and tools for Cardano, the need for a fast and deterministic sandbox environment in which to experiment with transactions running on-chain validators or run fast integration tests for off- and on-chain code arises quickly.
The principles and goals of this project are:
- Fast startup & teardown (< 1 second)
- Single binary installation on all platforms (< 5 min setup)
- Usable from the terminal and any application framework (command line options + files as interfaces)
-
cardano-node
directly, when you don't want to bother with configuring and seeding a local node manually. Pegasus can also be used to scaffold a fullcardano-node
configuration and seeded network which can later be used by any compatiblecardano-node
. -
plutip
: if you prefer downloading a single binary over usingnix
. -
yaci-devkit
, when you need faster startup or not want docker containers but plain sub-processes.
Pre-built binaries are available for Linux x86_64 and MacOS arm64:
curl TODO | unzip
./pegasus --help
By default, pegasus
starts a block-producing cardano-node
in a temporary directory.
Inspired by anvil
of the Foundry development kit (TODO add link), this was created from glue code previously built for hydra
, which now uses pegasus
to setup devnets for end-to-end testing.
To build and run using nix:
nix run
Or install GHC
and cabal
(e.g. using GHCup) and:
cabal run
- Similar like other devnet tools,
pegasus
sets up a local cluster ofcardano-node
s - A key difference is, that it comes with a
cardano-node
binary embedded - Both
pegasus
and the includedcardano-node
are statically linked and have no or minimal dependencies- TBD: avoid
cardano-api
et al?
- TBD: avoid
- Embed
cardano-node
at build time mechanism - Embed config and start a devnet
- Generate and seed keys
- Redistributable executable (static libs)
- Pre-built binaries and "curl install"
- Reduce size of binaries
- Full static exeutable (?)
- Fill TODOs in readme
- Configurable block time
--block-time 0.1
- Use provided cardano-node
--use-cardano-node <path-to-exe>
- Configurable era, e.g.
--babbage
- Use and keep state directory when asked with
--directory <dir>