Rollback
Last updated
In rare cases where a chain upgrade fails or causes consensus issues, validators may need to roll back to a previous BitNet version.
The process involves restoring a valid database state and the signing state file to resume operations without triggering double-signing penalties.
To perform a successful rollback, ensure you have the following:
A backup of the node’s data directory Usually located at:
~/.bitnetd/dataA copy of priv_validator_state.json
This file tracks the last signed block and is essential for avoiding double-signing.
If priv_validator_state.json is missing, your validator risks signing the same block twice after rollback — leading to slashing.
1. Stop Your Node
Gracefully halt your BitNet validator:
bitnetd stop2. Restore from Backup
Assuming you have a full backup in a folder named backup/bitnetd/:
Also ensure priv_validator_state.json is restored:
3. Install Previous BitNet Version
From your BitNet source directory:
Confirm the version:
4. Restart the Node
Once the old binary and valid state are in place:
The node will now resume operations from the last valid height prior to the failed upgrade.
If your validator lacks a data backup:
Request a snapshot from another validator or trusted peer.
Validate the database hash.
Use the provided priv_validator_state.json if you can trust its accuracy.
Last updated
rm -rf ~/.bitnetd/data
cp -r backup/bitnetd/data ~/.bitnetd/cp backup/bitnetd/data/priv_validator_state.json ~/.bitnetd/data/git fetch --all
git checkout <previous_version>
make installbitnetd version --longbitnetd start