Ethereum Staker Migration Guide — Migrating from Prysm to Nimbus

Acknowledgements

Disclaimer

Assumptions

$ df -h

Support

Overview

Gather Staking Data

$ cd $HOME/eth2deposit-cli/validator_keys
$ ls

Migrate from Prysm to Nimbus

Summary

Step 1 — Prepare the Migration

$ sudo ufw allow 9000
$ sudo ufw status
$ cd ~
$ sudo apt install curl
$ curl -LO https://github.com/status-im/nimbus-eth2/releases/download/v22.4.0/nimbus-eth2_Linux_amd64_22.4.0_039bece9.tar.gz
$ tar xvf nimbus-eth2_Linux_amd64_22.4.0_039bece9.tar.gz
$ cd nimbus-eth2_Linux_amd64_22.4.0_039bece9
$ sudo cp build/nimbus_beacon_node /usr/local/bin
$ cd ~
$ sudo rm nimbus-eth2_Linux_amd64_22.4.0_039bece9.tar.gz
$ sudo rm -r nimbus-eth2_Linux_amd64_22.4.0_039bece9

Step 2 — Sync the Nimbus Beacon Chain

$ sudo mkdir -p /var/lib/nimbus
$ sudo chmod 700 /var/lib/nimbus
$ sudo nano /etc/systemd/system/prysmbeacon.service
--enable-debug-rpc-endpoints --grpc-max-msg-size=65568081
[Unit]
Description=Prysm Eth2 Client Beacon Node
Wants=network-online.target
After=network-online.target
[Service]
User=prysmbeacon
Group=prysmbeacon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/beacon-chain --datadir=/var/lib/prysm/beacon --http-web3provider=http://127.0.0.1:8545 --accept-terms-of-use --enable-debug-rpc-endpoints --grpc-max-msg-size=65568081
[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl restart prysmbeacon
$ sudo systemctl status prysmbeacon
$ cd /usr/local/bin
$ sudo nimbus_beacon_node trustedNodeSync --network=mainnet --data-dir=/var/lib/nimbus --trusted-node-url=http://localhost:3500
$ cd /usr/local/bin
$ sudo nimbus_beacon_node trustedNodeSync --network=mainnet --data-dir=/var/lib/nimbus --trusted-node-url=InfuraProjectUrl --backfill=false
$ sudo nimbus_beacon_node trustedNodeSync --network=mainnet --data-dir=/var/lib/nimbus --trusted-node-url=https://272GSCR2NRpg5n55qsSc4y5sMD8:4c9e4d691e34ge523456bb29f3e0332f@eth2-beacon-mainnet.infura.io --backfill=false

Step 3 — Configure the Nimbus Service

$ sudo useradd --no-create-home --shell /bin/false nimbus
$ sudo chown -R nimbus:nimbus /var/lib/nimbus
$ sudo nano /etc/systemd/system/nimbus.service
[Unit]
Description=Nimbus Eth2 Client
Wants=network-online.target
After=network-online.target
[Service]
User=nimbus
Group=nimbus
Type=simple
Restart=always
RestartSec=5
WorkingDirectory=/var/lib/nimbus
Environment="ClientIP=$(curl -s v4.ident.me)"
ExecStart=/bin/bash -c '/usr/local/bin/nimbus_beacon_node --network=mainnet --data-dir=/var/lib/nimbus --web3-url=ws://127.0.0.1:8546 --nat=extip:${ClientIP} --graffiti="<yourgraffiti>" --log-level=INFO --log-file=/var/lib/nimbus/beacon_node.log'
[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl start nimbus
$ sudo systemctl status nimbus
$ sudo systemctl enable nimbus
$ sudo journalctl -fu nimbus.service
slot=3461864 epoch=108183 sync="21h14m (0.03%)

Step 4 — Migrate the Client

$ sudo systemctl stop prysmvalidator
$ sudo systemctl disable prysmvalidator.service
$ sudo systemctl status prysmvalidator
$ sudo systemctl stop prysmbeacon
$ sudo systemctl disable prysmbeacon.service
$ sudo systemctl status prysmbeacon
$ sudo systemctl stop nimbus
$ sudo systemctl status nimbus
$ sudo chown -R <yourusername>:<yourusername> /var/lib/prysm
$ sudo chown -R <yourusername>:<yourusername> /var/lib/nimbus
$ cd /usr/local/bin
$ validator slashing-protection-history export --datadir=/var/lib/prysm/validator --slashing-protection-export-dir=/var/lib/prysm
$ sudo nimbus_beacon_node slashingdb import /var/lib/prysm/slashing_protection.json
$ cd /usr/local/bin
$ nimbus_beacon_node deposits import --data-dir=/var/lib/nimbus $HOME/eth2deposit-cli/validator_keys
$ sudo chown -R nimbus:nimbus /var/lib/nimbus
$ ls -dl /var/lib/nimbus
$ sudo systemctl start nimbus
$ sudo systemctl status nimbus
$ sudo journalctl -fu nimbus.service
...Syncing in progress; skipping validator duties for now...
...Doppelganger detection active - skipping validator duties while observing activity on the network...
...Attestation sent...

Step 5— Post Migration Clean Up

$ cd /usr/local/bin
$ sudo rm beacon-chain && sudo rm validator
$ cd ~
$ sudo rm /etc/systemd/system/prysmbeacon.service
$ sudo rm /etc/systemd/system/prysmvalidator.service
$ sudo rm -r /var/lib/prysm
$ sudo ufw delete allow 13000/tcp
$ sudo ufw delete allow 12000/udp
$ sudo deluser prysmbeacon
$ sudo deluser prysmvalidator

Client Analysis

Server Specs

CPU

Prysm 7 Day CPU Usage
Nimbus 7 Day CPU Usage

Load

Prysm 7 Day Load
Nimbus 7 Day Load

Memory

Prysm 7 Day Memory Usage
Nimbus 7 Day Memory Usage

Disk I/O

Prysm 7 Day Disk I/O
Nimbus 7 Day Disk I/O

Disk Usage

Prysm 7 Day Disk Usage
Nimbus 7 Day Disk Usage

Bandwidth

Prysm 7 Day Bandwidth Usage
Nimbus 7 Day Bandwidth Usage

Closing Remarks

Appendix A — Emergency Rollback

$ sudo systemctl stop nimbus
$ sudo systemctl disable nimbus.service
$ sudo systemctl status nimbus
$ sudo rm /usr/local/bin/nimbus_beacon_node
$ sudo rm /etc/systemd/system/nimbus.service
$ sudo rm -r /var/lib/nimbus
$ sudo ufw deny 9000
$ sudo ufw status
$ sudo deluser nimbus
$ sudo chown -R prysmbeacon:prysmbeacon /var/lib/prysm/beacon
$ sudo chmod 700 /var/lib/prysm/beacon
$ sudo chown -R prysmvalidator:prysmvalidator /var/lib/prysm/validator
$ sudo chmod 700 /var/lib/prysm/validator
$ sudo systemctl enable prysmbeacon.service
$ sudo systemctl daemon-reload
$ sudo systemctl start prysmbeacon
$ sudo systemctl status prysmbeacon
$ sudo systemctl enable prysmvalidator.service
$ sudo systemctl daemon-reload
$ sudo systemctl start prysmvalidator
$ sudo systemctl status prysmvalidator
$ sudo journalctl -fu prysmbeacon.service
$ sudo journalctl -fu prysmvalidator.service

Appendix B — Regenerate Staking Data

./deposit existing-mnemonic --validator_start_index <ValidatorStartIndex> --num_validators <NumberOfValidators> --chain mainnet
deposit.exe existing-mnemonic --validator_start_index <ValidatorStartIndex> --num_validators <NumberOfValidators> --chain mainnet
./deposit existing-mnemonic --validator_start_index 0 --num_validators 1 --chain mainnet./deposit existing-mnemonic --validator_start_index 1 --num_validators 1 --chain mainnet
deposit.exe existing-mnemonic --validator_start_index 0 --num_validators 1 --chain mainnetdeposit.exe existing-mnemonic --validator_start_index 1 --num_validators 1 --chain mainnet

Full Disclaimer

--

--

--

Passionate about Ethereum and decentralized technology.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Somer Esat

Somer Esat

Passionate about Ethereum and decentralized technology.

More from Medium

The Future of Cross-Chain Bridge

Globaldce reinvents eBay in decentralized way with its own native cryptocurrency

COIN POTENTIAL IN 2022 $DOT POLKADOT

Smart contracts are a ticking time bomb.