Skip to main content

Rollback

If a chain upgrade fails, find out how to roll back the chain version.

The following information needs to be retrieved by validators in order to restore an earlier chain version:

  • the database that stores the state of the previous chain (in ~/.humansd/data by default)
  • the priv_validator_state.json file of the validator (also in ~/.humansd/data by default)

Another validator should share a copy of the database if validators don't have access to their own database data. Before starting their node, validators will be able to get a copy of the data and check it. Validators won't have double-sign protection on their initial block if they don't have the backup priv_validator_state.json file.

Restoring State Procedure

  1. First, stop your node.

  2. Then, move the data directory's contents back to the HUMANS_HOME/data directory (which, by default, should be ~/.humansd/data).

# Assumes backup is stored in "backup" directory
rm -rf ~/.humansd/data
mv backup/.humansd/data ~/.humansd/data
  1. Install Humans.ai's previous version next.
# from humans directory
git checkout <prev_version>
make install
## verify version
humansd version --long
  1. Finally, start the node.
humansd start