# How to run a node on the Zhejiang testnet? ## Who is this guide for? This guide is meant to be a starting point and provides a mid-level summary of the required steps. It is not intended to be a beginner's guide, so copying and running commands from here may not work without some tweaking. The testnet is meant to mimic a chain that is post-merge. Therefore, the genesis state will be in a merged state. The chain will have to go through a fork on both EL and CL at the same time. This fork is called Shanghai on the EL side and Capella on the CL side. These two events will be triggered simultaneously. This is achieved by EL forking at a specific time rather than at a block number, and CL forking at a specific epoch. ## What is in the Zhejiang testnet? The Zhejiang testnet aims to test the following features: - [EIP-3651](https://eips.ethereum.org/EIPS/eip-3651): Warm COINBASE - [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): PUSH0 instruction - [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860): Limit and meter initcode - [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895): Beacon chain push withdrawals as operations - [EIP-6049](https://eips.ethereum.org/EIPS/eip-6049): Deprecate SELFDESTRUCT - [EIP-6122](https://eips.ethereum.org/EIPS/eip-6122): Forkid checks based on timestamps - [v1.3.0-rc.2](https://github.com/ethereum/consensus-specs/releases/tag/v1.3.0-rc.2) @ 67c2...44e1 Conensus layer specs A Zhejiang testnet will be launched on the 1st of Feb at 15:00 UTC 2023 that implements all the final Shanghai EIPs. The shanghai-capella (shapella) fork will take place exactly 6 days later, on the 7th of Feb at 15:00 UTC 2023. This is timestamp 1675782000 / epoch 1350. To verify, this timestamp, you can verify the timestamp with [this](https://www.epochconverter.com) tool. More details about these other changes can be found [here](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md#eips-considered-for-inclusion) The JSON-RPC endpoint, faucet, and other tooling URLs can be found on https://zhejiang.ethpandaops.io/ ### Feature explanation: #### Withdrawals The partial withdrawals feature will be automatically triggered on all addresses that already have `0x01` withdrawal credentials set. For those that use `0x00` (legacy BLS credentials), they will need to first change their credentials from `0x00` to `0x01` before this feature can be tested. #### BLS to Execution Changes Changing `0x00` to `0x01` credential is currently only supported by a single tool [ethdo](https://github.com/wealdtech/ethdo/blob/master/docs/changingwithdrawalcredentials.md). Hopefully, over time there will be multiple different tools that offer this functionality. A detailed description of how to convert your address and trigger a full exit is described in another guide (all instructions done with docker!) that can be found [here](https://notes.ethereum.org/@launchpad/withdrawals-guide). # Which version/branch do I use? #### Consensus layer | Client Name | Git Branch | Docker image | |--- |--- |--- | | Lighthouse | [capella](https://github.com/sigp/lighthouse/tree/capella) | sigp/lighthouse:capella | | Teku | [master](https://github.com/Consensys/teku/) | consensys/teku:develop | | Lodestar | [unstable](https://github.com/chainsafe/lodestar/tree/unstable) | chainsafe/lodestar:next | | Prysm | [develop](https://github.com/prysmaticlabs/prysm) | gcr.io/prysmaticlabs/prysm/beacon-chain:latest gcr.io/prysmaticlabs/prysm/validator:latest | | Nimbus | [unstable](https://github.com/status-im/nimbus-eth2/tree/unstable) | ethpandaops/nimbus:unstable | #### Execution layer | Client Name | Git Branch | Docker image | |--- |--- |--- | | Geth | [master](https://github.com/ethereum/go-ethereum) | ethpandaops/geth:master | | Nethermind | [master](https://github.com/NethermindEth/nethermind/) | nethermindeth/nethermind:withdrawals | | Besu | [main](https://github.com/hyperledger/besu) | hyperledger/besu:develop | | EthereumJS | [master](https://github.com/ethereumjs/ethereumjs-monorepo) | g11tech/ethereumjs:latest | | Erigon | [devel](https://github.com/ledgerwatch/erigon/tree/devel) | thorax/erigon:devel | ## Preparation Download the configs from https://github.com/ethpandaops/withdrawals-testnet/tree/master/zhejiang-testnet/custom_config_data. ```shell= git clone https://github.com/ethpandaops/withdrawals-testnet.git cd withdrawals-testnet/zhejiang-testnet/custom_config_data ``` Generate the JWT secret with openssl ```shell= openssl rand -hex 32 | tr -d "\n" > "/tmp/jwtsecret" ``` This file needs to be passed to both the Execution Client and the Consensus Client. If you do not specify a JWT secret, then the execution and/or consensus layer client will automatically generate one for you. You will then have to specify this secret in the Consensus Layer client. # Run an Execution Layer Client ## Geth Pre-requisites: `git, make, go, gcc`. Clone and build the `master` branch of [Geth](https://github.com/ethereum/go-ethereum) ```shell= git clone https://github.com/ethereum/go-ethereum.git cd go-ethereum make geth cd .. ``` From the `custom_config_data` folder start the client ```shell= # Initalize database ./go-ethereum/build/bin/geth --datadir "geth-datadir" init genesis.json # Run geth ./go-ethereum/build/bin/geth \ --datadir "geth-datadir" \ --http --http.api="engine,eth,web3,net,debug" \ --ws --ws.api="engine,eth,web3,net,debug" \ --http.corsdomain "*" \ --networkid=1337803 \ --syncmode=full \ --authrpc.jwtsecret=/tmp/jwtsecret \ --bootnodes "enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303" ``` ## Nethermind Pre-requisites: `git, dotnet` Please ensure you have Node 12.x+ installed. Clone and build the `master` branch of [Nethermind](https://github.com/NethermindEth/nethermind/) ```shell= git clone https://github.com/NethermindEth/nethermind.git cd nethermind/src/Nethermind dotnet build Nethermind.sln -c Release ``` From the `custom_config_data/nethermind/src/Nethermind/` folder start the client ```shell= cd Nethermind.Runner dotnet run -c Release -- \ --config withdrawals_devnet \ --datadir="../../../../nethermind-datadir" \ --JsonRpc.Host=0.0.0.0 \ --JsonRpc.JwtSecretFile=/tmp/jwtsecret \ --Init.ChainSpecPath="../../../../chainspec.json" \ --Discovery.Bootnodes="enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303" ``` ## Besu Pre-requisites: `git, jvm` Clone and build the `master` branch of [Besu](https://github.com/hyperledger/besu) ```shell= git clone --recursive https://github.com/hyperledger/besu cd besu ./gradlew installDist cd .. ``` From the `custom_config_data` folder start the client ```shell= besu/build/install/besu/bin/besu \ --network-id=1337803 \ --data-path="besu-datadir" \ --genesis-file="besu.json" \ --rpc-http-enabled=true \ --rpc-http-host="0.0.0.0" \ --rpc-http-cors-origins="*"\ --rpc-ws-enabled=true \ --rpc-ws-host="0.0.0.0" \ --host-allowlist="*" \ --engine-host-allowlist="*"\ --engine-jwt-enabled=true \ --engine-jwt-secret=/tmp/jwtsecret \ --bootnodes="enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303" ``` ## EthereumJS Pre-requisites: `git, node, npm` Please ensure you have [Node 18.x+](https://github.com/nodesource/distributions/blob/master/README.md) installed. Clone and build from source ```shell= git clone --depth 1 --branch master https://github.com/ethereumjs/ethereumjs-monorepo.git cd ethereumjs-monorepo npm i ``` From the `custom_config_data` folder start the client ```shell= cd packages/client npm run client:start -- \ --datadir ../../../ethereumjs-datadir \ --gethGenesis ../../../genesis.json \ --saveReceipts \ --rpc --rpcport=8545 \ --ws \ --jwt-secret=/tmp/jwtsecret \ --rpcEngine --rpcEnginePort=8551 \ --bootnodes="enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303" ``` This will create a secret in ethereumjs-datadir/jwtsecret, you will need to provide this secret to the CL client. ## Erigon Pre-requisites: `git, go` Clone and build from source develop branch of [Erigon](https://github.com/ledgerwatch/erigon) ```shell= git clone https://github.com/ledgerwatch/erigon cd erigon make erigon rpcdaemon cd .. ``` From the `custom_config_data` folder start the client ```shell= # Initialize database ./erigon/build/bin/erigon init \ --datadir=erigon-datadir genesis.json # Run Erigon ./erigon/build/bin/erigon \ --datadir erigon-datadir \ --externalcl \ --networkid=1337803 \ --authrpc.jwtsecret=/tmp/jwtsecret \ --http --http.api=engine,net,eth \ --bootnodes="enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303" ``` # Execution layer conclusions After starting the client, you will be able to interact with the client using the following ports: * localhost:8545: Web3 json rpc * localhost:8550: Engine json rpc * localhost:8551: Engine json rpc with json rpc authentication * jwt.hex in the repository where you ran the rpcdaemon: verification key for JWT authentication # Run a Consensus Layer Client and Validators ## Lighthouse Pre-requisites: `git, rust` Please ensure you have [RustC 1.59.x+](https://rustup.rs) installed. Clone and build from source ```shell= git clone -b capella https://github.com/sigp/lighthouse.git cd lighthouse make cd .. ``` From the `custom_config_data` folder start the client ```shell= lighthouse \ --testnet-dir="." \ bn \ --datadir=lighthouse-datadir \ --eth1 \ --http \ --http-allow-sync-stalled \ --execution-endpoints=http://127.0.0.1:8551 \ --enr-udp-port=9000 \ --enr-tcp-port=9000 \ --discovery-port=9000 \ --jwt-secrets="/tmp/jwtsecret" \ --boot-nodes="enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk,enr:-Ly4QOS00hvPDddEcCpwA1cMykWNdJUK50AjbRgbLZ9FLPyBa78i0NwsQZLSV67elpJU71L1Pt9yqVmE1C6XeSI-LV8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhEDhTgGJc2VjcDI1NmsxoQIgMUMFvJGlr8dI1TEQy-K78u2TJE2rWvah9nGqLQCEGohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MK4QMlRAwM7E8YBo6fqP7M2IWrjFHP35uC4pWIttUioZWOiaTl5zgZF2OwSxswTQwpiVCnj4n56bhy4NJVHSe682VWGAYYDHkp4h2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhJK-7tSJc2VjcDI1NmsxoQLDq7LlsXIXAoJXPt7rqf6CES1Q40xPw2yW0RQ-Ly5S1YhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MS4QCgiQisRxtzXKlBqq_LN1CRUSGIpDKO4e2hLQsffp0BrC3A7-8F6kxHYtATnzcrsVOr8gnwmBnHYTFvE9UmT-0EHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhKXoVKCJc2VjcDI1NmsxoQK6J-uvOXMf44iIlilx1uPWGRrrTntjLEFR2u-lHcHofIhzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo,enr:-LK4QOQd-elgl_-dcSoUyHDbxBFNgQ687lzcKJiSBtpCyPQ0DinWSd2PKdJ4FHMkVLWD-oOquXPKSMtyoKpI0-Wo_38Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo,enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA" \ --suggested-fee-recipient=<enter-eth-address-here> #If validators enabled ``` To import validator keys to a validator client from `custom_config_data`: ```shell= lighthouse \ account validator import \ --datadir=lighthouse-datadir/validator-data \ --directory=<path/to/validator_keys> ``` To start the validator client from `custom_config_data` ```shell= lighthouse \ vc \ --testnet-dir="." \ --datadir=lighthouse-datadir/validator-data \ --suggested-fee-recipient=<enter-eth-address-here> ``` ## Lodestar Pre-requisites: `git, nodejs, yarn` More info about how to install dependencies can be found [here](https://chainsafe.github.io/lodestar/install/source/) Clone and build the client ```shell= git clone -b unstable https://github.com/chainsafe/lodestar.git cd lodestar yarn install --ignore-optional yarn run build ``` From the `custom_config_data/lodestar` folder start the client ```shell= ./lodestar beacon \ --dataDir="../lodestar-datadir" \ --paramsFile="../config.yaml" \ --genesisStateFile="../genesis.ssz" \ --execution.urls="http://127.0.0.1:8551" \ --jwt-secret="/tmp/jwtsecret" \ --eth1.depositContractDeployBlock=0 \ --bootnodes="enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk,enr:-Ly4QOS00hvPDddEcCpwA1cMykWNdJUK50AjbRgbLZ9FLPyBa78i0NwsQZLSV67elpJU71L1Pt9yqVmE1C6XeSI-LV8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhEDhTgGJc2VjcDI1NmsxoQIgMUMFvJGlr8dI1TEQy-K78u2TJE2rWvah9nGqLQCEGohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MK4QMlRAwM7E8YBo6fqP7M2IWrjFHP35uC4pWIttUioZWOiaTl5zgZF2OwSxswTQwpiVCnj4n56bhy4NJVHSe682VWGAYYDHkp4h2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhJK-7tSJc2VjcDI1NmsxoQLDq7LlsXIXAoJXPt7rqf6CES1Q40xPw2yW0RQ-Ly5S1YhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MS4QCgiQisRxtzXKlBqq_LN1CRUSGIpDKO4e2hLQsffp0BrC3A7-8F6kxHYtATnzcrsVOr8gnwmBnHYTFvE9UmT-0EHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhKXoVKCJc2VjcDI1NmsxoQK6J-uvOXMf44iIlilx1uPWGRrrTntjLEFR2u-lHcHofIhzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo,enr:-LK4QOQd-elgl_-dcSoUyHDbxBFNgQ687lzcKJiSBtpCyPQ0DinWSd2PKdJ4FHMkVLWD-oOquXPKSMtyoKpI0-Wo_38Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo,enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA" \ --suggestedFeeRecipient=<enter-eth-address-here> #If validators enabled ``` To import the validator keys from `custom_config_data/lodestar` and enter the password you used to generate the keystore file: ```shell= ./lodestar validator import \ --dataDir="../lodestar-datadir/validator-data" \ --importKeystores="<path/to/validator_keys>" ``` To run a validator: ```shell= ./lodestar validator \ --paramsFile="../config.yaml" \ --dataDir="../lodestar-datadir/validator-data" \ --keystoresDir="../lodestar-datadir/validator-data/keystores" \ --secretsDir="../lodestar-datadir/validator-data/secrets" \ --suggestedFeeRecipient=<enter-eth-address-here> ``` ## Teku Pre-requisites: `git, java` Ensure Java 11 or above is installed (Ubuntu: sudo apt install default-jre). ```shell= git clone https://github.com/ConsenSys/teku.git cd teku ./gradlew installDist cd .. ``` The teku executable is now available in ./teku/build/install/teku/bin/teku. You can also use the pre-built distribution or the consensys/teku:develop docker image. From the `custom_config_data` folder start the client ```shell= ./teku/build/install/teku/bin/teku \ --data-path="teku-datadir" \ --network="config.yaml" \ --initial-state="genesis.ssz" \ --ee-endpoint="http://localhost:8551" \ --ee-jwt-secret-file="/tmp/jwtsecret" \ --p2p-discovery-bootnodes="enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk,enr:-Ly4QOS00hvPDddEcCpwA1cMykWNdJUK50AjbRgbLZ9FLPyBa78i0NwsQZLSV67elpJU71L1Pt9yqVmE1C6XeSI-LV8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhEDhTgGJc2VjcDI1NmsxoQIgMUMFvJGlr8dI1TEQy-K78u2TJE2rWvah9nGqLQCEGohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MK4QMlRAwM7E8YBo6fqP7M2IWrjFHP35uC4pWIttUioZWOiaTl5zgZF2OwSxswTQwpiVCnj4n56bhy4NJVHSe682VWGAYYDHkp4h2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhJK-7tSJc2VjcDI1NmsxoQLDq7LlsXIXAoJXPt7rqf6CES1Q40xPw2yW0RQ-Ly5S1YhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-MS4QCgiQisRxtzXKlBqq_LN1CRUSGIpDKO4e2hLQsffp0BrC3A7-8F6kxHYtATnzcrsVOr8gnwmBnHYTFvE9UmT-0EHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhKXoVKCJc2VjcDI1NmsxoQK6J-uvOXMf44iIlilx1uPWGRrrTntjLEFR2u-lHcHofIhzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo,enr:-LK4QOQd-elgl_-dcSoUyHDbxBFNgQ687lzcKJiSBtpCyPQ0DinWSd2PKdJ4FHMkVLWD-oOquXPKSMtyoKpI0-Wo_38Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo,enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA" \ --p2p-static-peers="/ip4/64.225.78.1/tcp/9000/p2p/16Uiu2HAkwbLbPXhPua835ErpoywHmgog4oydobcj3uKtww8UmW3b,/ip4/146.190.238.212/tcp/9000/p2p/16Uiu2HAm8bVLELrPczXQesjUYF8EetaKokgrdgZKj8814ZiGNggk,/ip4/165.232.84.160/tcp/9000/p2p/16Uiu2HAm7xM7nYVz3U9iWGH6NwExZTWtJGGeZ7ejQrcuUFUwtQmH,/ip4/68.183.13.170/udp/9000/p2p/16Uiu2HAmHXzTmWAtVexas5YskEpbcyDQ5Qck3jdLgErWumjKExUx" \ --validator-keys="<path/to/validator/keys>:</path/to/validator/secrets>" \ #If validators enabled --validators-proposer-default-fee-recipient=<Enter-eth-address-here> #If validators enabled ``` ## Prysm Pre-requisites: `git, bazel` Ensure bazel 5.3.+ is [installed](https://docs.prylabs.network/docs/install/install-with-bazel#install-bazel-using-bazelisk). ```shell= mkdir -p prysm-dir export genesis=$PWD/genesis.ssz export prysmdir=$PWD/prysm-datadir export config=$PWD/config.yaml git clone https://github.com/prysmaticlabs/prysm.git cd prysm bazel build //cmd/beacon-chain:beacon-chain ``` From the `custom_config_data/prysm` folder start the beaconchain client ```shell= bazel run //cmd/beacon-chain -- \ --accept-terms-of-use=true \ --genesis-state=$genesis \ --datadir=$prysmdir \ --chain-config-file=$config \ --execution-endpoint=http://localhost:8551 \ --jwt-secret=/tmp/jwtsecret \ --contract-deployment-block=0 \ --bootstrap-node=enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk \ --bootstrap-node=enr:-Ly4QOS00hvPDddEcCpwA1cMykWNdJUK50AjbRgbLZ9FLPyBa78i0NwsQZLSV67elpJU71L1Pt9yqVmE1C6XeSI-LV8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhEDhTgGJc2VjcDI1NmsxoQIgMUMFvJGlr8dI1TEQy-K78u2TJE2rWvah9nGqLQCEGohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA \ --bootstrap-node=enr:-MK4QMlRAwM7E8YBo6fqP7M2IWrjFHP35uC4pWIttUioZWOiaTl5zgZF2OwSxswTQwpiVCnj4n56bhy4NJVHSe682VWGAYYDHkp4h2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhJK-7tSJc2VjcDI1NmsxoQLDq7LlsXIXAoJXPt7rqf6CES1Q40xPw2yW0RQ-Ly5S1YhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA \ --bootstrap-node=enr:-MS4QCgiQisRxtzXKlBqq_LN1CRUSGIpDKO4e2hLQsffp0BrC3A7-8F6kxHYtATnzcrsVOr8gnwmBnHYTFvE9UmT-0EHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhKXoVKCJc2VjcDI1NmsxoQK6J-uvOXMf44iIlilx1uPWGRrrTntjLEFR2u-lHcHofIhzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo \ --bootstrap-node=enr:-LK4QOQd-elgl_-dcSoUyHDbxBFNgQ687lzcKJiSBtpCyPQ0DinWSd2PKdJ4FHMkVLWD-oOquXPKSMtyoKpI0-Wo_38Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo \ --bootstrap-node=enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA \ --suggested-fee-recipient=<Enter-eth-address-here> #If validators enabled ``` To import validator keys: ```shell= bazel run //validator:validator -- accounts import \ --accept-terms-of-use \ --wallet-dir=$prysmdir/validator-data \ --keys-dir=<path/to/validator/keys> ``` To start the validator client, make sure you have created a secret file (containing with your secret info in) and call it `prysm-dir/validator-data/secret.txt`. Then it will not prompt you at each startup. ```shell= bazel run //cmd/validator -- \ --accept-terms-of-use=true \ --datadir=$prysmdir \ --chain-config-file=$config \ --beacon-rpc-provider=http://localhost:4000 \ --wallet-dir=$prysmdir/validator-data \ --wallet-password-file=$prysmdir/validator-data/secret.txt \ --suggested-fee-recipient=<Enter-eth-address-here> ``` ## Nimbus Pre-requisites: `git, make, gcc` Ensure that the websocket related flags (--ws) are present on your EL (e.g: Geth). Nethermind enables websockets by default. Nimbus can use either http or ws. Clone and build from source (use branch unstable) ```shell= git clone --branch=unstable https://github.com/status-im/nimbus-eth2.git cd nimbus-eth2 make update make -j4 nimbus_beacon_node cd .. ``` Start the beaconchain client ```shell= nimbus-eth2/build/nimbus_beacon_node \ --data-dir=./nimbus-datadir\ --jwt-secret=/tmp/jwtsecret \ --web3-url=http://127.0.0.1:8551 \ --rest \ --network="."\ --bootstrap-node=enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk \ --bootstrap-node=enr:-Ly4QOS00hvPDddEcCpwA1cMykWNdJUK50AjbRgbLZ9FLPyBa78i0NwsQZLSV67elpJU71L1Pt9yqVmE1C6XeSI-LV8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhEDhTgGJc2VjcDI1NmsxoQIgMUMFvJGlr8dI1TEQy-K78u2TJE2rWvah9nGqLQCEGohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA \ --bootstrap-node=enr:-MK4QMlRAwM7E8YBo6fqP7M2IWrjFHP35uC4pWIttUioZWOiaTl5zgZF2OwSxswTQwpiVCnj4n56bhy4NJVHSe682VWGAYYDHkp4h2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhJK-7tSJc2VjcDI1NmsxoQLDq7LlsXIXAoJXPt7rqf6CES1Q40xPw2yW0RQ-Ly5S1YhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA \ --bootstrap-node=enr:-MS4QCgiQisRxtzXKlBqq_LN1CRUSGIpDKO4e2hLQsffp0BrC3A7-8F6kxHYtATnzcrsVOr8gnwmBnHYTFvE9UmT-0EHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhKXoVKCJc2VjcDI1NmsxoQK6J-uvOXMf44iIlilx1uPWGRrrTntjLEFR2u-lHcHofIhzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo \ --bootstrap-node=enr:-LK4QOQd-elgl_-dcSoUyHDbxBFNgQ687lzcKJiSBtpCyPQ0DinWSd2PKdJ4FHMkVLWD-oOquXPKSMtyoKpI0-Wo_38Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDuKNezAAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo \ --bootstrap-node=enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA \ --suggested-fee-recipient=<Enter-eth-address-here> #If validators enabled ``` Import your validator keys: ```shell= nimbus-eth2/build/nimbus_beacon_node deposits import \ --data-dir=nimbus-datadir \ <path/to/validator/keys> ``` Now restart your nimbus with the same command as when you first time started, and the validator keys will be loaded up already. It is also possible to have a separate validator process for nimbus. More info on how to do this can be found [here](https://nimbus.guide/validator-client.html). {%hackmd theme-dark %} <style> .markdown-body pre {background-color: #1E1E1E;border: 1px solid #555 !important;color: #73BCE0;border-radius:8px;/*border-radius:0px;*/ } .markdown-body pre .htmlembedded {color: #C8D4C8 !important; } .markdown-body pre .hljs-tag {color: #6D726E; } .markdown-body pre .token.keyword {color: #C586C0; } .markdown-body pre .token.string, .markdown-body pre .hljs-string {color: #C68362; } .markdown-body pre .hljs-comment, .markdown-body pre .token.comment {color: #6A9955; } .markdown-body pre .hljs-attr {color: #73BCE0; } .markdown-body pre .hljs-name {color:#569CD6; } .markdown-body pre .token.operator {color:#C8D4C8;background:transparent; } .markdown-body pre .token.property {color: #73BCE0; } .markdown-body pre .token.function {color: #DCDCAA; } .markdown-body pre .token.builtin {color: #34B294; } .markdown-body pre .token.number {color: #B5CEA8; } .markdown-body pre .token.constant {color: #3BC1FF; } .markdown-body pre .hljs-addition {color: #96D47D;background: #373D29; } .markdown-body pre .hljs-deletion {color: #E76A6A;background: #4B1818; } .markdown-body pre .hljs-selector-class {color: #D7BA5F; } .markdown-body pre .hljs-attribute {color: #9CDCFE; } .markdown-body pre .hljs-number {color: #C68362; } .markdown-body pre .hljs-meta {color: #2C7CD6; } </style>