Skip to content

Commit

Permalink
Update testnet scripts to support builder testing and update README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmygchen committed Sep 7, 2023
1 parent 99d2137 commit e6ce74f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions scripts/local_testnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,16 @@ Update the genesis time to now using:

> Note: you probably want to just rerun `./start_local_testnet.sh` to start over
> but this is another option.
### Testing builder flow

1. Add builder URL to `BN_ARGS` in `./var.env`, e.g. `--builder http://localhost:8650`. Some mock builder server options:
- [`mock-relay`](https://github.com/realbigsean/mock-relay)
- [`dummy-builder`](https://github.com/michaelsproul/dummy_builder)
2. (Optional) Add `--always-prefer-builder-payload` to `BN_ARGS`.
3. The above mock builders do not support non mainnet presets as of now, and will require setting `SECONDS_PER_SLOT` and `SECONDS_PER_ETH1_BLOCK` to `12` in `./vars.env`.
4. Start the testnet with the following command (the `-p` flag enables the validator client `--builder-proposals` flag:
```bash
./start_local_testnet -p genesis.json
```
5. Block production using builder flow will start at epoch 4.
3 changes: 2 additions & 1 deletion scripts/local_testnet/beacon_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ exec $lighthouse_binary \
--disable-packet-filter \
--target-peers $((BN_COUNT - 1)) \
--execution-endpoint $execution_endpoint \
--execution-jwt $execution_jwt
--execution-jwt $execution_jwt \
$BN_ARGS
2 changes: 1 addition & 1 deletion scripts/local_testnet/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ lcli \
insecure-validators \
--count $VALIDATOR_COUNT \
--base-dir $DATADIR \
--node-count $BN_COUNT
--node-count $VC_COUNT

echo Validators generated with keystore passwords at $DATADIR.
3 changes: 3 additions & 0 deletions scripts/local_testnet/vars.env
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,8 @@ SECONDS_PER_ETH1_BLOCK=1
# Proposer score boost percentage
PROPOSER_SCORE_BOOST=40

# Command line arguments for beacon node client
BN_ARGS=""

# Command line arguments for validator client
VC_ARGS=""

0 comments on commit e6ce74f

Please sign in to comment.