Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
Last active December 3, 2020 13:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yorickdowne/8b5ef803690a04d3d48fb6f13cd3bce5 to your computer and use it in GitHub Desktop.
Save yorickdowne/8b5ef803690a04d3d48fb6f13cd3bce5 to your computer and use it in GitHub Desktop.
Switch Rocketpool to newer client version

Emergency procedure

Only do this in emergencies, such as when eth2 is not syncing or RAM/CPU use is spiking. This procedure can be used for Prysm or Lighthouse.

The specific client versions mentioned here are for RocketPool 0.0.8. They will not work in prior versions of RP.

Edit config.yml:

cd ~/.rocketpool
cp config.yml config.yml.original
nano config.yml

Prysm

For Prysm you need the debug image so that sh is present.

Find the new image you wish to use at docker hub for beacon and validator

Change eth2 prysm section to use new image, for example:

      - id: prysm
        name: Prysm
        beaconImage: prysmaticlabs/prysm-beacon-chain:HEAD-b150ac-debug #v1.0.2
        validatorImage: prysmaticlabs/prysm-validator:HEAD-fc7c67-debug #v1.0.3
        desc: made by Prysmatic Labs
        link: https://prysmaticlabs.com/

Courtesy of @Mentor, you can use this command to make the change for you:

cp ~/.rocketpool/config.yml ~/.rocketpool/config-before-manual-prysm-update.yml.bak && \
sed -i 's/\(prysm-beacon-chain:\).*$/\1HEAD-b150ac-debug # MANUAL OVERRIDE/g' ~/.rocketpool/config.yml && \
sed -i 's/\(prysm-validator:\).*$/\1HEAD-fc7c67-debug # MANUAL OVERRIDE/g' ~/.rocketpool/config.yml

Lighthouse

You can use a newer release tag from the docker hub image.

Change lighthouse prysm section to use new image, for example:

      - id: lighthouse
        name: Lighthouse
        desc: made by Sigma Prime
        image: sigp/lighthouse:latest
        link: https://sigmaprime.io/

If you are coming from a version prior to v1.0.0, you'll need to edit ~/.rocketpool/chains/eth2/start-beacon.sh as well as ~/.rocketpool/chains/eth2/start-validator.sh and replace --testnet pyrmont with --network pyrmont

Activate new client

If using Lighthouse latest, force docker to pull it: docker image pull sigp/lighthouse:latest

Pause and start rocketpool, you expect to see it pulling the new image if using Prysm:

rocketpool service pause && rocketpool service start

Follow eth1 logs:

rocketpool service logs eth1

Once eth1 is synced follow eth2 logs and see whether it syncs:

rocketpool service logs eth2
@Ap0ll0517
Copy link

This helped so much! My CPU usage dropped dramatically!!

@JamesCh45
Copy link

Yeah this was a great help,all green and no missed att for the last 6 hours

@Neozaru
Copy link

Neozaru commented Nov 11, 2020

Thanks a lot for this post.
I had to add --accept-terms-of-use as an extra argument for the Prysm commands (otherwise the process will be stuck on the prompt where the user has to type "accept").

To do that + enable --blst, the command becomes :

# Run prysm in efficient mode
sed -i 's/binary/binary --blst --accept-terms-of-use /g' ~/.rocketpool/chains/eth2/start-beacon.sh && \
sed -i 's/binary/binary --blst --accept-terms-of-use /g' ~/.rocketpool/chains/eth2/start-validator.sh

@yorickdowne
Copy link
Author

@Neozaru, if your start-beacon.sh does not have --accept-terms-of-use, you are on an old version of RocketPool. I do not recommend using this procedure to update your client image unless there is a dire emergency, such as "old client won't sync and RPool haven't updated yet". Instead, update RocketPool to the current version. You can then absolutely add --blst for faster sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment