Guide | Besu + Lodestar | Most Viable Diverse Client | Staking Ethereum on Kiln testnet
Become a validator, start staking and help secure Ethereum, a proof-of-stake blockchain. Anyone with 32 ETH can join.
Your Mission - #TestingTheMerge
To participate in the public testnet known as Kiln, the first concentrated public effort to test Ethereum’s upgrade to proof-of-stake with a hardfork called "Paris-Bellatrix" or affectionly called “The Merge”.
Within the Ethereum network of nodes, you want to maximize Ethereum's client diversity by being the Most Viable Diverse Client with execution and consensus clients, Besu and Lodestar aka Bestar.


Prerequisites
This guide was written for aspiring Ethereum stakers who have basic familiarity with command line tools and it was tested against Ubuntu 20.04.1 LTS client. You’ll need a cloud VPS or local desktop/server/laptop running Ubuntu preferably. Commands are to be run in a terminal window or ssh terminal.
If using a VPS or remote server, install and start the SSH client for your operating system:
Windows: PuTTY
MacOS and Linux: from the Terminal, use the native command:
ssh YourUserName@YourServersIPMinimum Hardware Requirements
Operating system: 64-bit Linux (i.e. Ubuntu 20.04 LTS Server or Desktop)
Processor: Dual core CPU, Intel Core i5–760 or AMD FX-8100 or better
Memory: 8GB RAM
Storage: 30GB SSD
Recommended Hardware Requirements
Operating system: 64-bit Linux (i.e. Ubuntu 20.04 LTS Server or Desktop)
Processor: Intel i5 or AMD Ryzen 5 or better.
Memory: 32GB RAM
Storage: 2TB SSD or NVME
Network: 100 Mbit or faster connection with at least 2TB per month data plan
Pro Staking Tip: Highly recommend you begin with a brand new instance of an OS, VM, and/or machine. Avoid headaches by NOT reusing testnet keys, wallets, or databases for your validator.
How to participate with Kiln
1. Install dependencies and updates
Install packages and update OS
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install git ufw curl -yReboot your machine to update installation.
sudo reboot2. Configure Firewall
Initialize the firewall with Ethereum’s p2p ports and ssh.
# By default, deny all incoming and outgoing traffic
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow SSH access
sudo ufw allow ssh
# Allow execution client port
sudo ufw allow 30303/tcp
# Allow consensus client port
sudo ufw allow 9000/tcp
sudo ufw allow 9000/udp
# Enable UFW
sudo ufw enableConfirm the settings are in effect.
sudo ufw status numberedExample output:
Status: active
To Action From
-- ------ ----
[ 1] 9000/udp ALLOW IN Anywhere
[ 2] 22/tcp ALLOW IN Anywhere
[ 3] 30303/tcp ALLOW IN Anywhere
[ 4] 9000/tcp ALLOW IN Anywhere
[ 5] 9000/udp (v6) ALLOW IN Anywhere (v6)
[ 6] 22/tcp (v6) ALLOW IN Anywhere (v6)
[ 7] 30303/tcp (v6) ALLOW IN Anywhere (v6)
[ 8] 9000/tcp (v6) ALLOW IN Anywhere (v6)3. Synchronize Time with Chrony
Install Chrony with the following.
sudo apt-get install chrony -yWait a few seconds, then verify that Chrony is syncing time.
chronyc tracking4. Download Kiln configuration files
#Setup git directory
mkdir ~/git && cd ~/git
#Clone the testnet config files
git clone https://github.com/eth-clients/merge-testnets.git
#Kiln config files found here
cd merge-testnets/kiln && ls5. Setup Execution Layer Client
Setup your execution layer client, Besu.
Install dependencies.
sudo apt install openjdk-18-jdk libsodium23 libnss3 -yBuild the binaries.
cd $HOME/git
git clone https://github.com/hyperledger/besu.git
cd besu
./gradlew installDistVerify Besu was properly built by viewing the help menu.
cd build/install/besu
./bin/besu --helpCreate a service user for the execution service, as this improves security, then create data directories.
sudo adduser --system --no-create-home --group execution
sudo mkdir -p /var/lib/besuGenerate the JWT secret, a file used by both the execution and consensus client, add read access privileges for the consensus client and setup ownership permissions
openssl rand -hex 32 | tr -d "\n" | sudo tee "/var/lib/besu/jwtsecret"
sudo chmod +r /var/lib/besu/jwtsecret
sudo chown -R execution:execution /var/lib/besuConfigure systemd by running the following to define your execution.service configuration. Simply copy and paste.
cat > $HOME/execution.service << EOF
[Unit]
Description = Besu Execution Layer Client service
Wants = network-online.target
After = network-online.target
[Service]
User = execution
Restart = on-failure
RestartSec = 3
KillSignal = SIGINT
TimeoutStopSec = 300
ExecStart = $HOME/git/besu/build/install/besu/bin/besu \
--network=kiln \
--rpc-http-host="127.0.0.1" \
--rpc-http-cors-origins="*" \
--rpc-ws-enabled=true \
--rpc-http-enabled=true \
--rpc-ws-host="127.0.0.1" \
--host-allowlist="*" \
--Xmerge-support=true \
--engine-host-allowlist="*" \
--engine-jwt-enabled=true \
--engine-rpc-ws-port=8550 \
--engine-rpc-http-port=8551 \
--engine-jwt-secret="/var/lib/besu/jwtsecret" \
--metrics-enabled=true \
--metrics-host="127.0.0.1" \
--data-storage-format=BONSAI \
--data-path="/var/lib/besu"
[Install]
WantedBy = multi-user.target
EOFMove the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/execution.service /etc/systemd/system/execution.servicesudo chmod 644 /etc/systemd/system/execution.serviceRun the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable executionFinally, start your execution layer client, Besu and check it's status.
sudo systemctl start execution
sudo systemctl status executionPress Ctrl + C to exit the status.
6. Setup Consensus Layer Client
Set up your consensus layer client, Lodestar.
Install dependencies.
#install dependencies
sudo apt-get install gcc g++ make git curl -yInstall yarn.
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn -yInstall nodejs.
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejsBuild the binaries.
cd $HOME/git
git clone https://github.com/chainsafe/lodestar.git
cd lodestar
yarn install --ignore-optional
yarn run buildVerify Lodestar was installed properly by displaying the help menu.
./lodestar --helpCreate a service user for the consensus service, as this improves security, then create data directories.
sudo adduser --system --no-create-home --group consensus
sudo mkdir -p /var/lib/lodestarCopy Kiln testnet configuration files.
sudo cp $HOME/git/merge-testnets/kiln/config.yaml /var/lib/lodestar
sudo cp $HOME/git/merge-testnets/kiln/boot_enr.yaml /var/lib/lodestar
sudo cp $HOME/git/merge-testnets/kiln/genesis.ssz /var/lib/lodestarSetup ownership permissions.
sudo chown -R consensus:consensus /var/lib/lodestarConfigure systemd by running the following to define your consensus.service configuration. Simply copy and paste.
cat > $HOME/consensus.service << EOF
# Lodestar consensus layer client service
# file: /etc/systemd/system/consensus.service
[Unit]
Description = Lodestar Consensus Layer Client service
Wants = network-online.target
After = network-online.target
[Service]
User = consensus
Restart = on-failure
RestartSec = 3
KillSignal = SIGINT
TimeoutStopSec = 300
WorkingDirectory= $HOME/git/lodestar
ExecStart = $HOME/git/lodestar/lodestar beacon \
--rootDir="/var/lib/lodestar" \
--paramsFile="/var/lib/lodestar/config.yaml" \
--genesisStateFile="/var/lib/lodestar/genesis.ssz" \
--eth1.providerUrls=http://127.0.0.1:8545 \
--execution.urls="http://127.0.0.1:8550" \
--jwt-secret="/var/lib/besu/jwtsecret" \
--bootnodesFile="/var/lib/lodestar/boot_enr.yaml" \
--network.discv5.bootEnrs="enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk" \
--network.connectToDiscv5Bootnodes \
--network.discv5.enabled=true \
--eth1.depositContractDeployBlock=0 \
--eth1.enabled \
--api.rest.enabled \
--api.rest.host 0.0.0.0 \
--api.rest.api '*' \
--metrics.enabled true \
--metrics.serverPort 8008
[Install]
WantedBy = multi-user.target
EOFMove the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/consensus.service /etc/systemd/system/consensus.servicesudo chmod 644 /etc/systemd/system/consensus.serviceRun the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable consensusFinally, start your consensus layer client, Lodestar and check it's status.
sudo systemctl start consensus
sudo systemctl status consensusPress Ctrl + C to exit the status.
Check your logs to confirm that the execution and consensus clients are up and syncing.
journalctl -fu executionjournalctl -fu consensusA properly functioning Besu execution client will indicate "Fork-Choice-Updates". For example,
2022-03-19 04:09:36.315+00:00 | vert.x-worker-thread-0 | INFO | EngineForkchoiceUpdated | Consensus fork-choice-update: head: 0xcd2a_8b32..., finalized: 0xfa22_1142...
2022-03-19 04:09:48.328+00:00 | vert.x-worker-thread-0 | INFO | EngineForkchoiceUpdated | Consensus fork-choice-update: head: 0xff1a_f12a..., finalized: 0xfa22_1142...Within Besu's logs, you might see a false warning. In reality, Lodestar consensus client is working fine and no cause for concern.
WARN | EngineExchangeTransitionConfiguration | not called in 120 seconds, consensus client may not be connected
A properly functioning Lodestar consensus client will indicate "info: Synced". For example,
Mar-19 04:09:49.000 info: Synced - slot: 3338 - head: 3355 0x5abb_ac30 - execution: valid(0x1a3c_2ca5) - finalized: 0xfa22_1142:3421 - peers: 25
Mar-19 04:09:52.000 info: Synced - slot: 3339 - head: 3356 0xcd2a_8b32 - execution: valid(0xab34_fa32) - finalized: 0xfa22_1142:3421 - peers: 25
Mar-19 04:09:04.000 info: Synced - slot: 3340 - head: 3357 0xff1a_f12a - execution: valid(0xfaf1_b35f) - finalized: 0xfa22_1142:3421 - peers: 25Press Ctrl + C to exit the logs.
7. Configure MetaMask and Using the Testnet Faucet
Configure your MetaMask to point to the Kiln testnet. Visit the https://kiln.themerge.dev/ website and hit the "Add Network to MetaMask" button.
For security and privacy reasons, it is best practice to use a brand new unused ETH address for these testnet activities. Do not re-use any of your existing mainnet ETH addresses.
Use the Kiln Testnet faucet to acquire some testnet ETH. It may take a few moments, sometimes up to an hour, for the funds to appear in your wallet.
8. Generate Validator Keys
With two easy methods, your can setup your mnemonic keys with either:
staking-deposit-cli - the original command line based key generator
For the command line method,
cd $HOME
wget https://github.com/ethereum/staking-deposit-cli/releases/download/v2.1.0/staking_deposit-cli-ce8cbb6-linux-amd64.tar.gz
tar xvf staking_deposit-cli-ce8cbb6-linux-amd64.tar.gz
cd staking_deposit-cli-ce8cbb6-linux-amd64
./deposit new-mnemonic --num_validators 1 --chain kiln9. Sign up to be a Validator at the Launchpad
After running the staking deposit tool, you will have a deposit_data-##########.json file which you'll upload to the Kiln Launchpad.
Your deposit_data file is located in the following location:
ls $HOME/staking_deposit-cli-ce8cbb6-linux-amd64/validator_keysEnsure your MetaMask is switched to the Kiln Testnet network.
Follow along the instructions at the Kiln Launchpad. You'll complete this process when you've uploaded your deposit_data-##########.json file and sent the corresponding 32 Kiln testnet ETH deposit to the Kiln staking deposit address.
Verify your deposit was completed on a block explorer.
10. Setup Validator Client
Create a service user for the validator service, as this improves security, then create data directories.
sudo adduser --system --no-create-home --group validator
sudo mkdir -p /var/lib/lodestar/validatorImport your validator keys by importing your keystore file. Be sure to enter your keystore password correctly.
cd $HOME/git/lodestar
sudo ./lodestar account validator import \
--network kiln \
--rootDir="/var/lib/lodestar/validator" \
--directory $HOME/staking_deposit-cli-ce8cbb6-linux-amd64/validator_keysSetup ownership permissions, including hardening the access to this directory.
sudo chown -R validator:validator /var/lib/lodestar/validator
sudo chmod 700 /var/lib/lodestar/validatorVerify that your keystore file was imported successfully.
sudo ./lodestar account validator list --network kiln --rootDir="/var/lib/lodestar/validator"Once successful, you will be shown your validator's public key.
For example, 0x8d9138fcf5676e2031dc4eae30a2c92e3306903eeec83ca83f4f851afbd4cb3b33f710e6f4ac516b4598697b30b04302
Configure systemd by running the following to define your validator.service configuration. Simply copy and paste.
cat > $HOME/validator.service << EOF
# Lodestar validator client service
# file: /etc/systemd/system/validator.service
[Unit]
Description = Lodestar validator Client service
Wants = network-online.target
After = network-online.target
[Service]
User = validator
Restart = on-failure
RestartSec = 3
KillSignal = SIGINT
TimeoutStopSec = 300
WorkingDirectory= $HOME/git/lodestar
ExecStart = $HOME/git/lodestar/lodestar validator \
--network kiln \
--rootDir="/var/lib/lodestar/validator" \
--graffiti=""
[Install]
WantedBy = multi-user.target
EOFMove the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/validator.service /etc/systemd/system/validator.servicesudo chmod 644 /etc/systemd/system/validator.serviceRun the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable validatorFinally, start your validator client and check it's status.
sudo systemctl start validator
sudo systemctl status validatorCheck your logs to confirm that the validator clients are up and functioning.
journalctl -fu validatorA properly functioning Lodestar validator will indicate publishing of attestations. For example,
Mar-19 03:33:30.228 info: Published aggregateAndProofs slot=2662, index=13, count=1
Mar-19 03:37:48.393 info: Published attestations slot=2699, index=20, count=1
Mar-19 03:46:36.450 info: Published attestations slot=2713, index=2, count=1
Mar-19 03:53:48.944 info: Published attestations slot=2765, index=21, count=1
Mar-19 04:01:48.812 info: Published attestations slot=2809, index=17, count=1Press Ctrl + C to exit the logs.
🎉Congrats on setting up your Kiln “Merge” staking node!
11. Next Steps
As a newly minted Ethereum Staker,
#TestingTheMerge has a comprehensive list of things-to-test
Monitor your validator's earnings and performance at https://beaconchain.kiln.themerge.dev/ by entering your validator's public key.
Learn to connect your MetaMask wallet to your own execution layer node
If node is remote then establish a ssh tunnel. Configure MetaMask with these settings.

Additional Information
Stopping the execution, consensus and validator clients
sudo systemctl stop execution
sudo systemctl stop consensus
sudo systemctl stop validator Viewing logs / troubleshooting
#View Besu
journalctl -fu execution
#View Lodestar Beacon Chain
journalctl -fu consensus
#View Lodestar Validator
journalctl -fu validatorRemoving your validator from staking duties: Perform a Voluntary Exit
#Stop validator first
sudo systemctl stop validator
#Perform a voluntary exit, follow the prompts and confirm your choices
sudo ./lodestar account validator voluntary-exit --rootDir /var/lib/lodestar/validator --network kiln
#Restart validator.
sudo systemctl start validator
#Finally in 1/2 day, your validator will exit and no longer have staking duties.
sudo systemctl stop validator
sudo systemctl disable validatorReference Material
Support and Community
Last updated