Skip to content

Latest commit

 

History

History
95 lines (63 loc) · 1.58 KB

how_to_test_migration.md

File metadata and controls

95 lines (63 loc) · 1.58 KB

How to test if migration works


  1. Stash all changes in the current version
git stash
  1. Checkout to older version
git checkout v1.0.0
  1. Create a log folder if it does not exist
mkdir .log/
  1. Build and serve chain with reset state option
ignite chain build
ignite chain serve -f --path <appDir> -v $@ 2>><appDir>/.log/log.txt
  1. Wait unit blochain start producing block

  1. 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>
  1. Deposit to proposal
c4ed tx gov deposit 1 100000000000uc4e --from alice --chain-id c4echain
  1. Vote for proposal
c4ed tx gov vote 1 yes --from alice --chain-id c4echain
  1. Wait until blochain halt on 75 height and stop the chain

  1. Stash changes
git stash
  1. Switch to newest blochain version
git switch -
  1. Build project once again
ignite chain build
  1. Copy app state (backup)
cp -r .data/ .backup_data_block_74/ 
  1. 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 &

Troubleshoting

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/