rollback
📣 Tip: $install_path
is used to indicate the path where you installed the stcd
binary
Learn how to rollback a chain version if a chain upgrade fails.
In order to restore a previous chain version, a validator must restore the following data:
- A database containing the state of the previous chain (by default in
$install_path/.stcd/data
) - Validator's
priv_validator_state.json
file (also in$install_path/.stcd/data
by default)
If a validator does not own their database data, another validator should share a copy of the database. Validators will be able to download a copy of the data and validate it before launching their nodes.
If validators do not have a backup priv_validator_state.json
file, then those validators will not have double-signature protection on their first block.
restore status program
-
First, stop your node.
-
Then, copy the contents of the backup data directory back to the
$DAODST_HOME/data
directory (should be$install_path/.stcd/data
by default)
# Assumes backup is stored in "backup" directory
rm -rf $install_path/.stcd/data
mv backup/.stcd/data $install_path/.stcd/data
- Next, install the previous version of Daodst.
# from Daodst directory
git checkout <prev_version>
make install
## verify version
stcd version --long
- Finally, start the node.
stcd daemon