Created
July 25, 2024 11:40
-
-
Save potuz/56d3c05163e7ce24ddba4f7a452a325a to your computer and use it in GitHub Desktop.
Running Kurtosis with Prysm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#kurtosis | |
Resources: | |
- [Devnet-1 landing page](https://pectra-devnet-1.ethpandaops.io/) | |
- [Pectra cross team devnet-1 tracker](https://notes.ethereum.org/@ethpandaops/pectra-devnet-1) | |
- [Prysm TODO](https://www.notion.so/arbitrum/Electra-Devnet-1-TODO-1435a623c2444a2484fead331eba680a) | |
- [v1.5.0-alpha.3 release issue](https://github.com/ethereum/consensus-specs/pull/3786) | |
- [Pari's progress thread on discord](https://discord.com/channels/595666850260713488/1252277408044683294/1253349990760321168) | |
Pectra devnet-1 is based on v1.5.0-alpha.3 of the consensus spec. | |
# Kurtosis Testing | |
Build local images and load into docker. This is how to build and run minimal config. | |
``` | |
bazel build //cmd/beacon-chain:oci_image_tarball --config=release --config=minimal && \ | |
docker rmi gcr.io/prysmaticlabs/prysm/beacon-chain || true && \ | |
docker load -i bazel-bin/cmd/beacon-chain/oci_image_tarball/tarball.tar && \ | |
bazel build //cmd/validator:oci_image_tarball --config=release --config=minimal && \ | |
docker rmi gcr.io/prysmaticlabs/prysm/validator || true && \ | |
docker load -i bazel-bin/cmd/validator/oci_image_tarball/tarball.tar | |
``` | |
Write the following config to `/tmp/electra.yaml` | |
```yaml | |
participants: | |
- el_type: nethermind | |
el_image: nethermindeth/nethermind:pectra | |
cl_type: prysm | |
cl_extra_params: [--minimal-config=true] | |
cl_image: gcr.io/prysmaticlabs/prysm/beacon-chain:latest | |
vc_type: prysm | |
vc_extra_params: [--minimal-config=true] | |
vc_image: gcr.io/prysmaticlabs/prysm/validator:latest | |
count: 2 | |
network_params: | |
electra_fork_epoch: 1 | |
preset: minimal | |
additional_services: | |
- dora | |
keymanager_enabled: true | |
``` | |
Run Kurtosis | |
``` | |
kurtosis clean -a && kurtosis run github.com/ethpandaops/ethereum-package --args-file=/tmp/electra.yaml | |
``` | |
## Multiclient | |
Using the following config, written to `/tmp/electra.yaml` with mainnet build config. | |
```yaml | |
participants_matrix: | |
el: | |
- el_type: nethermind | |
el_image: nethermindeth/nethermind:pectra | |
- el_type: geth | |
el_image: ethpandaops/geth:lightclient-prague-devnet-1 | |
- el_type: ethereumjs | |
el_image: ethpandaops/ethereumjs:master | |
cl: | |
- cl_type: teku | |
cl_image: ethpandaops/teku:master | |
- cl_type: nimbus | |
cl_image: ethpandaops/nimbus-eth2:unstable | |
- cl_type: lodestar | |
cl_image: ethpandaops/lodestar:electra-fork | |
- cl_type: grandine | |
cl_image: ethpandaops/grandine:electra | |
- cl_type: prysm | |
cl_image: gcr.io/prysmaticlabs/prysm/beacon-chain:latest | |
vc_type: prysm | |
vc_image: gcr.io/prysmaticlabs/prysm/validator:latest | |
network_params: | |
electra_fork_epoch: 1 | |
min_validator_withdrawability_delay: 1 | |
shard_committee_period: 1 | |
additional_services: | |
- dora | |
- apache | |
- assertoor | |
snooper_enabled: true | |
assertoor_params: | |
run_stability_check: false | |
run_block_proposal_check: false | |
tests: | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait1", config: { slot: 34 }} | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/bls-changes.yaml", config: { validatorCount: 300 }} | |
# EIP-6110 | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait2", config: { slot: 38 }} | |
- https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/massive-deposit-0x02.yaml | |
# EIP-2935 | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait3", config: { slot: 42 }} | |
- https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/blockhash-test.yaml | |
# EIP-7002 | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait4", config: { slot: 46 }} | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/voluntary-exits.yaml", config: { validatorCount: 10 }} | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait5", config: { slot: 50 }} | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/el-triggered-exit.yaml", config: { validatorIndex: 20 }} | |
# EIP-7251 | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/wait-for-slot.yaml", id: "wait6", config: { slot: 54 }} | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/pectra-dev/el-triggered-consolidation.yaml", config: { sourceValidatorIndex: 21, targetValidatorIndex: 25 }} | |
# Final check | |
- { file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/block-proposal-check.yaml" } | |
``` | |
# Connecting to a running devnet-1 | |
1 - Download devnets repo | |
``` | |
gh repo clone ethpandaops/pectra-devnets /tmp/pectra-devnets | |
``` | |
2 - Checkout and build geth | |
``` | |
cd /tmp && \ | |
gh repo clone lightclient/go-ethereum && \ | |
cd go-ethereum && \ | |
git checkout prague-devnet-1 && \ | |
make geth | |
``` | |
3 - Initialize geth | |
``` | |
./build/bin/geth init --datadir=/tmp/devnet-1_geth_data /tmp/pectra-devnets/network-configs/devnet-1/metadata/genesis.json | |
``` | |
4 - Start geth | |
``` | |
./build/bin/geth \ | |
--datadir=/tmp/devnet-1_geth_data \ | |
--http --http.addr=0.0.0.0 --http.vhosts='*' --http.api eth,net,engine,admin \ | |
--authrpc.addr=0.0.0.0 --authrpc.jwtsecret=/tmp/pectra_devnet_1_jwt.hex \ | |
--syncmode=full \ | |
--bootnodes=$(cat /tmp/pectra-devnets/network-configs/devnet-1/metadata/bootstrap_nodes.txt | tr '\n' ',' | sed 's/,$/\n/') | |
``` | |
5 - Build and run prysm | |
``` | |
bazel run //cmd/beacon-chain --config=release -- \ | |
--datadir=/tmp/devnet-1_prysm_data \ | |
--bootstrap-node=/tmp/pectra-devnets/network-configs/devnet-1/metadata/bootstrap_nodes.yaml \ | |
--chain-config-file=/tmp/pectra-devnets/network-configs/devnet-1/metadata/config.yaml \ | |
--accept-terms-of-use \ | |
--jwt-secret=/tmp/pectra_devnet_1_jwt.hex \ | |
--chain-id=7011893081 \ | |
--genesis-state=/tmp/pectra-devnets/network-configs/devnet-1/metadata/genesis.ssz \ | |
--min-sync-peers=1 \ | |
--save-full-execution-payloads \ | |
--rpc-port=4001 --p2p-udp-port=12001 --grpc-gateway-port=3501 --monitoring-port=9090 --verbosity=debug --pprof | |
``` | |
Note: `--save-full-execution-payloads` is required for Electra at this time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment