This git outlines how to setup a Prysm chain for local development and testing multiclient interop.
Requirements:
- A modern Unix operating system
- The latest release (2.1.1 onwards) of Bazel installed
- The
cmake
package installed - The
git
package installed
git clone git@github.com:prysmaticlabs/prysm.git && cd prysm && git checkout v0.12
bazel build //beacon-chain:beacon-chain
bazel build //validator:validator
bazel run //tools/genesis-state-gen --define=ssz=mainnet -- \
--num-validators=64 \
--output-ssz=/tmp/genesis.ssz \
--mainnet-config
This defaults to a genesis time of the current unix timestamp. You can pass in a custom unix timestamp using the --genesis-time
flag.
We start a beacon node in interop mode by telling it to load a genesis state from disk, mock eth1 data votes, and provide an empty value for the eth1 provider flags.
bazel run //beacon-chain --define ssz=mainnet -- \
--config-file=/path/to/node1.config.yaml \
--bootstrap-node=""
We run a validator in interop mode by specifying --keymanager=interop
and 64 keys.
bazel run //validator --define=ssz=mainnet -- \
--config-file=/path/to/validator.config.yaml
We would recommend waiting until at least epoch 1 to try this. First navigate to http://localhost:8080/p2p and copy the node's ENR and add it to your env vars:
export NODE_ENR=enr:-LK4QNNTee6XKFrTDjE1ZpXK0-1_E5h4a0t-Bn0IWhd9RAawNqYlGu2sI0kquI4-dmC7_9IOhYFso_zvX8...
Next up, launch a second node with the first being its bootstrap:
bazel run //beacon-chain --define ssz=mainnet -- \
--config-file=/path/to/node2.config.yaml \
--bootstrap-node=${NODE_ENR}
It works when you set
min-sync-peers: 1
to1
instead of0