- Stash all changes in the current version
git stash
- Checkout to older version
git checkout v1.0.0
- Create a log folder if it does not exist
mkdir .log/
- Build and serve chain with reset state option
ignite chain build
ignite chain serve -f --path <appDir> -v $@ 2>><appDir>/.log/log.txt
- Wait unit blochain start producing block
- Prepare proposal from alice account
c4ed tx gov submit-proposal software-upgrade <migrationName> --upgrade-height <upgradeHeight> --title <title> --description <description> --from <accName> --chain-id <chainId>
- Deposit to proposal
c4ed tx gov deposit 1 100000000000uc4e --from alice --chain-id c4echain
- Vote for proposal
c4ed tx gov vote 1 yes --from alice --chain-id c4echain
- Wait until blochain halt on 75 height and stop the chain
- Stash changes
git stash
- Switch to newest blochain version
git switch -
- Build project once again
ignite chain build
- Copy app state (backup)
cp -r .data/ .backup_data_block_74/
- Start chain with actual data without force
ignite chain serve --path <appDir> -v $@ 2>><appDir>/.log/log.txt &
All logs from migration are stored .log/log.txt &
If, after starting the new version of the application, ignite displays information about resetting the application state, stop the chain and copy the previously saved backup to data
rm -rf .data/
cp -r .backup_data_block_74/ .data/