The following steps align with our mainnet guide. You may need to adjust file names and directory locations where appropriate. The core concepts remain the same.
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 git logs with command git logor 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.
Select your consensus client.
Review release notes and check for breaking changes/features.
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$)"
echoDownloadingURL: $BINARIES_URLcd $HOME# Downloadwget-Olighthouse.tar.gz $BINARIES_URL# Untartar-xzvflighthouse.tar.gz-C $HOME# Cleanuprmlighthouse.tar.gz# Stop the services.sudosystemctlstopbeacon-chainvalidator# Remove old binaries, install new binaries, display version and restart the services.sudorm-r $HOME/.cargo/bin/lighthousesudomv $HOME/lighthouse $HOME/.cargo/bin$HOME/.cargo/bin/lighthouse --versionsudosystemctlrestartbeacon-chainvalidator
Option 2: Build from source
Pull the latest source and build it.
cd $HOME/git/lighthousegitfetch--all&&gitcheckoutstable&&gitpullmake
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
In case of compilation errors, update Rust with the following sequence.
rustup update
cargo clean
make
Verify the build completed by checking the new version number.
lighthouse--version
Restart beacon chain and validator as per normal operating procedures.
Review release notes and check for breaking changes/features.
If you encounter an error fetching the latest release TAG, install jq with following:
sudo apt-get install jq -y
Option 1: Download binaries
RELEASE_URL="https://api.github.com/repos/ConsenSys/teku/releases/latest"LATEST_TAG="$(curl-s $RELEASE_URL |jq-r ".tag_name")"BINARIES_URL="https://artifacts.consensys.net/public/teku/raw/names/teku.tar.gz/versions/${LATEST_TAG}/teku-${LATEST_TAG}.tar.gz"
echoDownloadingURL: $BINARIES_URLcd $HOME# Downloadwget-Oteku.tar.gz $BINARIES_URL# Untartar-xzvfteku.tar.gz-C $HOME# Rename foldermvteku-*teku# Cleanuprmteku.tar.gz# Stop the services.sudosystemctlstopbeacon-chain# Remove old binaries, install new binaries, display version and restart the services.sudorm-rf/usr/bin/tekusudomv $HOME/teku/usr/bin/teku/usr/bin/teku/bin/teku--versionsudosystemctlrestartbeacon-chain
Option 2: Build from source
Pull the latest release's tag and build it.
cd $HOME/git/tekugitfetch--allRELEASETAG=$(curl-shttps://api.github.com/repos/ConsenSys/teku/releases/latest|jq-r.tag_name)gitcheckouttags/$RELEASETAGecho"Updating to version: $RELEASETAG"./gradlewdistTarinstallDist
Verify the build completed by checking the new version number.
cd $HOME/git/teku/build/install/teku/bin./teku--version
Restart beacon chain and validator as per normal operating procedures.