Updating Consensus Client

Scenario: In discord, you see an alert that your consensus client just announced a new release. How best to update?

⏩ Quick steps guide

When a new release is cut, you will want to update to the latest stable release. The following shows you how to update your beacon chain and validator.

Step 1: Select your consensus client.

Lighthouse

Option 1 - Download binaries

Run the following to automatically download the latest linux release, un-tar and cleanup.

RELEASE_URL="https://api.github.com/repos/sigp/lighthouse/releases/latest"
BINARIES_URL="$(curl -s $RELEASE_URL | jq -r ".assets[] | select(.name) | .browser_download_url" | grep x86_64-unknown-linux-gnu.tar.gz$)"

echo Downloading URL: $BINARIES_URL

cd $HOME
# Download
wget -O lighthouse.tar.gz $BINARIES_URL
# Untar
tar -xzvf lighthouse.tar.gz -C $HOME
# Cleanup
rm lighthouse.tar.gz

Stop the services.

sudo systemctl stop consensus validator

Remove old binaries, install new binaries and restart the services.

sudo rm /usr/local/bin/lighthouse
sudo mv $HOME/lighthouse /usr/local/bin/lighthouse
sudo systemctl start consensus validator
Option 2 - Build from source code

Build the binaries.

πŸ’‘Tip: 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

In case of compilation errors, run the following sequence.

Verify lighthouse was built properly by checking the version number.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Lodestar

Option 1 - Build from source code

Pull the latest source and build Lodestar.

Verify Lodestar was installed properly by displaying the version.

Sample output of a compatible version.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Teku

Option 1 - Download binaries

Run the following to automatically download the latest linux release, un-tar and cleanup.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Option 2 - Build from source code

Fetch the latest tags and build the binaries.

Verify Teku was built properly by displaying the version.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Nimbus

Option 1 - Download binaries

Run the following to automatically download the latest linux release, un-tar and cleanup.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Option 2 - Build from source code

Pull the latest source code and build the binary.

Verify Nimbus was built properly by displaying the version.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Prysm

Option 1 - Download binaries

Run the following to automatically download the latest binaries.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Option 2 - Build from source code

Install Bazel

Pull the latest source code and build the binaries.

Verify Prysm was built properly by displaying the help menu.

Stop the services.

Remove old binaries, install new binaries and restart the services.

Step 2: Verify services and logs are working properly

Step 3: Optional - Verify your validator's attestations on public block explorer

1) Visit https://goerli.beaconcha.in/

2) Enter your validator's pubkey into the search bar and look for successful attestations.

Last updated