From 4cbed9fd8bae1a8a97ccbc899e22fe60b7eba3c5 Mon Sep 17 00:00:00 2001 From: yakud Date: Fri, 5 Apr 2024 20:11:34 +0300 Subject: [PATCH] Update upgrade README.md --- app/upgrades/v0_1_2/README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/app/upgrades/v0_1_2/README.md b/app/upgrades/v0_1_2/README.md index facaeda..177393c 100644 --- a/app/upgrades/v0_1_2/README.md +++ b/app/upgrades/v0_1_2/README.md @@ -3,16 +3,17 @@ ## Guide for Upgrading from v0.1.1 to v0.1.2 1. Halt the currently running `galacticad` process. -2. Fetch the latest updates from the repository and switch to the `v0.1.2` tag. +2. **!!! Backup the data directory.** !!! +3. Fetch the latest updates from the repository and switch to the `v0.1.2` tag. ```bash git fetch --all --tags git checkout v0.1.2 ``` -3. Build the updated source code. +4. Build the updated source code. ```bash make install ``` -4. Execute the upgrade script located at ./scripts/upgrade_v0_1_2.sh +5. Execute the upgrade script located at ./scripts/upgrade_v0_1_2.sh ```bash ./scripts/upgrade_v0_1_2.sh ``` @@ -21,6 +22,15 @@ The script executes the following operations: - Updates the node storage to version v0.1.2. - - Reverts the state of the latest block. - - Creates a backup of the current priv_validator_state.json and replaces it with a new version with default settings. -5. Restart the `galacticad` node. + - Roll back the state of the most recent block. + - Backup of the current priv_validator_state.json and replaces it with a new version with default settings. + + Alternatively, these steps can be performed manually: + ```bash + galacticad --home $GALACTICA_HOME rollback --hard + echo '{"height":"0","round":0,"step":0}' > $GALACTICA_HOME/data/priv_validator_state.json + ``` + Executing the rollback command will also automatically execute the storage upgrade. + +6. Restart the `galacticad` node. +