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.
Always review the release notes before updating. There may be changes requiring your attention.
🔥 Pro tip: Plan your update to overlap with the longest attestation gap. Learn how here.
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.gzStop the services.
sudo systemctl stop consensus validatorRemove 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 validatorOption 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
makecommand 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.