Switching / Migrating Consensus Client
🛑 1 Stop old consensus and old validator.
In order to export the slashing database, the validator needs to be stopped.
sudo systemctl stop consensus validatorsudo systemctl stop consensus💽 2 Export slashing database (Optional)
Update the export .json file location and name.
sudo -u consensus /usr/local/bin/lighthouse account validator slashing-protection export <lighthouse_interchange.json>sudo -u consensus /usr/local/bin/nimbus_beacon_node slashingdb export slashing-protection.json
sudo -u consensus /usr/local/bin/teku/bin/teku slashing-protection export --to=<FILE>sudo -u validator /usr/local/bin/validator slashing-protection export --datadir=/path/to/your/wallet --slashing-protection-export-dir=/path/to/desired/outputdirsudo -u validator /usr/local/bin/lodestar/lodestar validator slashing-protection export --network mainnet --file interchange.json🚧 3 Setup and install new validator / consensus client
Now you need to setup/install your new validator but do not start running the systemd processes. Be sure to thoroughly follow your new consensus client and validator in steps 4 and 5. You will need to build/install the client, configure port forwarding/firewalls, and new systemd unit files.
✨ Pro Tip: During the process of re-importing validator keys, wait at least 13 minutes or two epochs to prevent slashing penalties. You must avoid running two consensus clients with same validator keys at the same time.
🛑 Critical Step: Do not start any systemd processes until either you have imported the slashing database or you have waited at least 13 minutes or two epochs.
📂 4 Import slashing database (Optional)
Using your new consensus client, run the following command and update the relevant path to import your slashing database from 2 steps ago.
sudo -u consensus /usr/local/bin/lighthouse account validator slashing-protection import <my_interchange.json>sudo -u consensus /usr/local/bin/nimbus_beacon_node slashingdb import path/to/export_dir/slashing-protection.jsonsudo -u consensus /usr/local/bin/teku/bin/teku slashing-protection import --from=<FILE>sudo -u validator /usr/local/bin/validator slashing-protection import --datadir=/path/to/your/wallet --slashing-protection-json-file=/path/to/desiredimportfilesudo -u validator /usr/local/bin/lodestar/lodestar validator slashing-protection import --network mainnet --file interchange.json🌠 5 Start new validator and new beacon chain
sudo systemctl start consensus validatorsudo systemctl start consensus🔥 6 Verify functionality
Check the logs to verify the services are working properly and ensure there are no errors.
sudo systemctl status consensus validatorsudo systemctl status consensusFinally, verify your validator's attestations are working with public block explorer such as
Enter your validator's pubkey to view its status.
🧯 7 Update Monitoring with Prometheus and Grafana
Review section 6 and change your prometheus.yml. Ensure prometheus is connected to your new consensus client's metrics port. You will also want to import your new consensus client's dashboard.
Last updated