Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Local (merge) devnet setup

Mateusz Morusiewicz edited this page Oct 11, 2022 · 1 revision

Hey folks, this is a guide to set up a local devnet.
If someone knows how to make a PoS-native one please tell us.

Source: https://rauljordan.com/2022/08/21/how-to-setup-a-proof-of-stake-devnet.html

Configure the devnet

CONFIG_NAME: interop
PRESET_BASE: interop
GENESIS_FORK_VERSION: 0x20000089
ALTAIR_FORK_EPOCH: 2
ALTAIR_FORK_VERSION: 0x20000090
BELLATRIX_FORK_EPOCH: 4
BELLATRIX_FORK_VERSION: 0x20000091
TERMINAL_TOTAL_DIFFICULTY: 51
SECONDS_PER_SLOT: 8
SLOTS_PER_EPOCH: 32
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

geth(-boost-builder)

  • Clone this repo
  • make geth

prysm

bazelisk build //cmd/beacon-chain:beacon-chain
bazelisk build //cmd/validator:validator
bazelisk build //cmd/prysmctl:prysmctl

configure the el and cl

// in geth
./geth --datadir=devnet/gethdata init devnet/genesis.json
./geth --datadir=devnet/gethdata account import devnet/sk.json
// in prysm
./generate-genesis --num-validators=64 --output-ssz=devnet/genesis.ssz --chain-config-file=devnet/config.yml

run

./geth --http --http.api "eth,builder,flashbots,engine" --datadir=devnet/gethdata --allow-insecure-unlock --unlock="0x123463a4b065722e99115d6c222f267d9cabb524" --password="" --nodiscover console --syncmode=full --mine --builder --builder.local_relay --builder.beacon_endpoint="http://127.0.0.1:3500" --builder.bellatrix_fork_version="0x20000091" --builder.genesis_fork_version="0x20000089" --builder.genesis_validators_root="0x0000000000000000000000000000000000000000000000000000000000000000"
bazelisk run //cmd/beacon-chain -- --datadir=devnet/beacondata --min-sync-peers=0 --interop-genesis-state=devnet/genesis.ssz --interop-eth1data-votes --bootstrap-node= --chain-config-file=devnet/config.yml --config-file=devnet/config.yml --chain-id=32382 --execution-endpoint=http://localhost:8551 --accept-terms-of-use --jwt-secret=devnet/gethdata/geth/jwtsecret --contract-deployment-block 0
bazelisk run //cmd/validator -- --datadir=devnet/validatordata --accept-terms-of-use --interop-num-validators=64 --interop-start-index=0 --force-clear-db --chain-config-file=devnet/config.yml --config-file=devnet/config.yml
Clone this wiki locally