Skip to content
Leo Arias edited this page Jul 8, 2022 · 75 revisions

All of these steps are for Ubuntu 22.04.

If you want to contribute with guides and testing, please open an issue.

Make sure that you are only using test ether, test accounts and test passwords. Do not reuse anything from your real accounts. When in doubt, please ask.

Let's start...

Make a workspace directory:

mkdir -p ~/workspace/
cd ~/workspace/
sudo apt install git

Get the testnet configuration:

git clone https://github.com/eth-clients/merge-testnets

Generate a secret:

openssl rand -hex 32 | tr -d "\n" > ~/workspace/secret

Get the key generator:

cd ~/workspace
wget https://github.com/ethereum/staking-deposit-cli/releases/download/v2.2.0/staking_deposit-cli-9ab0b05-linux-amd64.tar.gz
tar xvf staking_deposit-cli-9ab0b05-linux-amd64.tar.gz

Install metamask.

Register as a validator

In kiln

  1. Get kiln ether from the faucet. When the funds are low, this requires an ENS domain. If you don't have one, ask us for some test ether opening an issue.

  2. Add the kiln network to metamask with the following parameters:

  1. Create your validator keys:
cd ~/workspace/staking_deposit-cli-9ab0b05-linux-amd64/
./deposit new-mnemonic --num_validators 1 --chain kiln
mv validator_keys validator_keys-kiln
  1. Go to the kiln launchpad and follow the instructions to become a validator: https://kiln.launchpad.ethereum.org/en/

In ropsten

  1. Get ropsten ether from the faucet. If you don't have a twitter account, ask us for some test ether opening an issue.

  2. Connect your metamast to the ropsten network.

  3. Create your validator keys:

cd ~/workspace/staking_deposit-cli-9ab0b05-linux-amd64/
./deposit new-mnemonic --num_validators 1 --chain ropsten
mv validator_keys validator_keys-ropsten
  1. Go to the ropsten launchpad and follow the instructions to become a validator: https://ropsten.launchpad.ethereum.org/en/

mev-boost

Last verified: 2022-07-02

Install go.

Install development tools:

sudo apt install make gcc

Get the source code and compile:

cd ~/workspace
git clone https://github.com/flashbots/mev-boost
cd mev-boost
make build

Run in kiln:

./mev-boost -kiln -relays https://0xb5246e299aeb782fbc7c91b41b3284245b1ed5206134b0028b81dfb974e5900616c67847c2354479934fc4bb75519ee1@builder-relay-kiln.flashbots.net

Run in ropsten:

 ./mev-boost -ropsten -relays https://0xb124d80a00b80815397b4e7f1f05377ccc83aeeceb6be87963ba3649f1e6efa32ca870a88845917ec3f26a8e2aa25c77@builder-relay-ropsten.flashbots.net

Run an execution client

mev-boost is independent of the execution client. You can run anyone.

Nethermind

Last verified: 2022-07-02

Known issues:

Install dotnet:

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install apt-transport-https
sudo apt update
sudo apt install dotnet-sdk-6.0

Install development libraries:

sudo apt install libsnappy-dev libc6-dev libc6
sudo ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so

Get the source code and compile:

mkdir -p ~/workspace/kiln
cd ~/workspace/kiln
git clone --recursive -b kiln https://github.com/NethermindEth/nethermind
cd nethermind/src/Nethermind
dotnet build Nethermind.sln -c Release

Make sure that you have opened the TCP and UDP port 30303.

Run in kiln:

cd ~/workspace/nethermind/src/Nethermind/Nethermind.Runner
dotnet run -c Release -- --config kiln --JsonRpc.Host=0.0.0.0 --JsonRpc.Enabled true --JsonRpc.JwtSecretFile=/home/$USER/workspace/secret 

Run in ropsten:

cd ~/workspace/nethermind/src/Nethermind/Nethermind.Runner
dotnet run -c Release -- --config ropsten --JsonRpc.Host=0.0.0.0 --JsonRpc.Enabled true --JsonRpc.JwtSecretFile=/home/$USER/workspace/secret --Merge.TerminalTotalDifficulty 100000000000000000000000 

Run a consensus client

We will add instructions for more consensus clients as they complete the Builder API implementation. Look at the consensus clients implementation status.

Teku

Status: https://github.com/flashbots/mev-boost/issues/156

Known issues:

Install java:

sudo apt install default-jre

Get the source code and compile:

cd ~/workspace
git clone https://github.com/ConsenSys/teku
cd teku
./gradlew installDist

Prepare the validator keys. These are the keys created when you registered your validator. Teku requires you to put the password to the validator keys in a .txt file with the same name as the keystore. And then, to pass the paths as parameters as shown below, replacing <path-to-keystore.json>:<path-to-password.txt> with your paths.

More details: https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/#validator-keys

Also note to replace with the address of your test account, to earn test rewards.

Run the validator and beacon nodes in kiln:

./build/install/teku/bin/teku \
  --data-path "datadir-teku-kiln" \
  --network kiln \
  --p2p-discovery-bootnodes "enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk" \
  --ee-endpoint http://localhost:8551 \
  --Xee-version kilnv2 \
  --ee-jwt-secret-file "/home/$USER/workspace/secret" \
  --log-destination console \
  --validator-keys=<path-to-keystore.json>:<path-to-password.txt> \
  --validators-proposer-default-fee-recipient=<fee-recepient-eth-address> \
  --Xvalidators-registration-default-enabled=true \
  --Xeb-endpoint="http://127.0.0.1:18550"

Run the validator and beacon nodes in ropsten:

./build/install/teku/bin/teku \
  --data-path "datadir-teku-ropsten" \
  --network ropsten \
  --ee-endpoint http://localhost:8551 \
  --ee-jwt-secret-file "/home/$USER/workspace/secret" \
  --log-destination console \
  --validator-keys=<path-to-keystore.json>:<path-to-password.txt> \
  --validators-proposer-default-fee-recipient=<fee-recepient-eth-address> \
  --Xvalidators-registration-default-enabled=true \
  --Xeb-endpoint="http://127.0.0.1:18550" \
  --Xnetwork-total-terminal-difficulty-override=100000000000000000000000

Prysm

Last verified: 2022-07-06

Status: https://github.com/flashbots/mev-boost/issues/158

Known issues:

Install go.

Install libraries and development tools:

sudo apt install cmake libssl-dev libgmp-dev libtinfo5 libprotoc-dev g++
export PATH=$PATH:~/go/bin

Get the source code:

cd ~/workspace
git clone -b develop https://github.com/prysmaticlabs/prysm.git
cd prysm

Run in kiln

(note to replace with the address of your test account, to earn test rewards)

Run a beacon node:

go run ./cmd/beacon-chain/... \
  --genesis-state=/home/$USER/workspace/merge-testnets/kiln/genesis.ssz \
  --datadir=datadir-prysm-kiln  \
  --http-web3provider=http://localhost:8551  \
  --chain-config-file=/home/$USER/workspace/merge-testnets/kiln/config.yaml \
  --bootstrap-node=enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk \
  --jwt-secret=/home/$USER/workspace/secret \
  --suggested-fee-recipient=<fee-recepient-eth-address> \
  --http-mev-relay=http://127.0.0.1:18550

To do: run a validator. See https://github.com/prysmaticlabs/prysm/issues/11001

Run in ropsten

(note to replace with the address of your test account, to earn test rewards)

Run a beacon node:

go run ./cmd/beacon-chain/... \
  --ropsten \
  --genesis-state=/home/$USER/workspace/merge-testnets/ropsten-beacon-chain/genesis.ssz \
  --datadir=datadir-prysm-ropsten  \
  --http-web3provider=http://localhost:8551  \
  --jwt-secret=/home/$USER/workspace/secret \
  --suggested-fee-recipient=<fee-recepient-eth-address> \
  --http-mev-relay=http://127.0.0.1:18550

Import the validator keys:

go run ./cmd/validator/... accounts import --keys-dir=/home/$USER/workspace/staking_deposit-cli-9ab0b05-linux-amd64/validator_keys-ropsten --ropsten

Run a validator node:

go run ./cmd/validator/... \
  --ropsten \
  --enable-validator-registration \
  --suggested-fee-recipient=<fee-recepient-eth-address>

Common requirements

Go

For prysm and mev-boost.

Install go:

wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go 
sudo tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

References

Clone this wiki locally