githubEdit

Step 5: Installing consensus client

Pick a consensus client

circle-info

To strengthen Ethereum's resilience against potential attacks or consensus bugs, it's best practice to run a minority client in order to increase client diversity. Find the latest distribution of consensus clients here: https://clientdiversity.orgarrow-up-right

πŸ›‘οΈ Recommendation πŸ›‘οΈ: Lodestar

circle-exclamation

Your choice of Lighthousearrow-up-right, Nimbusarrow-up-right, Tekuarrow-up-right, Prysmarrow-up-right or Lodestararrow-up-right.

circle-info

Lighthousearrow-up-right is an Eth client with a heavy focus on speed and security. The team behind it, Sigma Primearrow-up-right, is an information security and software engineering firm who have funded Lighthouse along with the Ethereum Foundation, Consensys, and private individuals. Lighthouse is built in Rust and offered under an Apache 2.0 License.

βš™οΈ 4.1. Install rust dependency

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Enter '1' to proceed with the default install.

Update your environment variables.

echo export PATH="$HOME/.cargo/bin:$PATH" >> ~/.bashrc
source ~/.bashrc

Install rust dependencies.

sudo apt-get update
sudo apt install -y git gcc g++ make cmake pkg-config libssl-dev libclang-dev clang protobuf-compiler

πŸ’‘ 4.2. Build Lighthouse from source

mkdir ~/git
cd ~/git
git clone -b stable https://github.com/sigp/lighthouse.git
cd lighthouse
make

circle-info

Improve some Lighthouse benchmarks by around 20% at the expense of increased compile time? Use maxperf profile. To compile with maxperf, replace the above make command with

PROFILE=maxperf make

circle-info

In case of compilation errors, run the following sequence.

circle-info

This build process may take a few minutes.

Verify lighthouse was installed properly by checking the version number.

🎩 4.3. Import validator key

circle-info

When you import your keys into Lighthouse, your validator signing key(s) are stored in the $HOME/.lighthouse/mainnet/validators folder.

Run the following command to import your validator keys from the eth2deposit-cli tool directory.

Enter your keystore password to import accounts.

Verify the accounts were imported successfully.

triangle-exclamation

πŸ”₯ 4.4. Configure port forwarding and/or firewall

Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.

  • Lighthouse consensus client requires port 9000 for tcp and udp

  • Execution client requires port 30303 for tcp and udp

⛓️ 4.5. Start the beacon chain

Create a systemd unit file to define yourbeacon-chain.service configuration.

Paste the following configuration into the file.

circle-info

Checkpoint Sync: allows consensus layer to start within minutes instead of days.

  • Refer to https://eth-clients.github.io/checkpoint-sync-endpoints/arrow-up-right and feel free to pick one of the random state providers from the list, instead of the above endpointhttps://beaconstate.info

  • Do not trust any single checkpoint provider. Verify the state root and block root against multiple checkpoints to ensure you're on the correct chain.

To exit and save, press Ctrl + X, then Y, thenEnter.

Update file permissions.

Run the following to enable auto-start at boot time and then start your beacon node service.

circle-check

🧬 4.6. Start the validator

Create a systemd unit file to define your validator.service configuration.

Paste the following configuration into the file.

  • Replace0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS with your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.

To exit and save, press Ctrl + X, then Y, thenEnter.

Update file permissions.

Run the following to enable auto-start at boot time and then start your validator.

circle-check

πŸ› οΈ Helpful Consensus Client systemd commands

πŸ—„ Viewing and filtering logs

πŸ”Ž View the status of the beacon chain

πŸ”„ Restarting the beacon chain

πŸ›‘ Stopping the beacon chain

⏭️ Next Steps

circle-info

Sync Timeline: Syncing the consensus client is instantaneous with checkpoint sync but the execution client can take up to 1 week. On high-end machines with gigabit internet, expect your node to be fully syncing to take less than a day.

circle-exclamation
circle-info

Activation Queue: Once your EL+CL is synced, validator up and running, you just wait for activation. This process can take 24+ hours. Only 900 new validators can join per day. Check the queue length: https://wenmerge.com arrow-up-right

Activated: When you're activated, your validator will begin creating and voting on blocks while earning staking rewards.

Quick monitoring: Use https://beaconcha.in/arrow-up-right to create alerts and track your validator's performance.

circle-check

🏁 Optional Steps

☎️ Need extra live support?

πŸ’Ÿ Like these guides?

Last Words

I stand upon the shoulders of giants and as such, invite you to stand upon mine. Use my work with or without attribution; I make no claim of "intellectual property." My ideas are the result of countless millenia of evolution - they belong to humanity.

This is Leslie, the official mascot of Eth Staking

Last updated