Awesome
Builder Playground
The builder playground is a tool to deploy an end-to-end environment to locally test an Ethereum L1 builder. It deploys:
- A beacon node + validator client (lighthouse).
- An execution client (reth).
- An in-memory mev-boost-relay.
Usage
Clone the repository and run the following command:
$ go run main.go
The playground performs the following steps:
- It attempts to download the
lighthouse
andreth
binaries from the GitHub releases page if they are not found locally. - It generates the genesis artifacts for the chain.
- 100 validators with 32 ETH each.
- 10 prefunded accounts with 100 ETH each, generated with the mnemonic
test test test test test test test test test test test junk
. - It enables the Deneb fork at startup.
- It deploys the chain services and the relay.
Reth
node.Lighthouse
beacon node.Lighthouse
validator client.Mev-boost-relay
.
To stop the playground, press Ctrl+C
.
Options:
--output
(string): The directory where the chain data and artifacts are stored. It defaults to$HOME/.playground/devnet
.--continue
(bool): Whether to restart the chain from a previous run if the output folder is not empty. It defaults tofalse
.--use-bin-path
(bool): Whether to use the binaries from the local path instead of downloading them. It defaults tofalse
.--genesis-delay
(int): The delay in seconds before the genesis block is created. It is used to account for the delay between the creation of the artifacts and the running of the services. It defaults to5
seconds.--watch-payloads
(bool): If enabled, it logs whenever a builder builds a valid block through the relay. It defaults tofalse
.
Unless the --continue
flag is set, the playground will delete the output directory and start a new chain from scratch on every run.