Last active
September 9, 2022 23:21
-
-
Save julienrbrt/951b2c89d840733e28afc5d922c49efa to your computer and use it in GitHub Desktop.
Revisions
-
julienrbrt revised this gist
Sep 9, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,11 +27,11 @@ echo "prepare upgrade" mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin cp $SIMD_NEW_BIN $DAEMON_HOME/cosmovisor/upgrades/test1/bin/simd echo "submit upgrade tx" $SIMD_BIN tx gov submit-proposal software-upgrade test1 --title upgrade --description upgrade --upgrade-height 15 --from alice --yes sleep 5 $SIMD_BIN tx gov deposit 1 10000000stake --from alice --yes sleep 5 $SIMD_BIN tx gov vote 1 yes --from alice --yes sleep 60 echo "verify correct binary" cosmovisor version -
julienrbrt created this gist
Sep 9, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ #!/bin/bash # Usage SIMD_BIN=$(which simd) SIMD_NEW_BIN=<path to new binary> ./migrate_simapp.sh go install https://github.com/cosmos/cosmos-sdk/cosmosvisor/cmd/cosmovisor@latest if [[ -z $SIMD_BIN || -z $SIMD_NEW_BIN ]]; then echo "SIMD_BIN and SIMD_NEW_BIN must be set." exit 1 fi echo "init simapp" ./init_simapp.sh echo "setup cosmovisor" export DAEMON_NAME=simd export DAEMON_HOME=$HOME/.simapp export DAEMON_RESTART_AFTER_UPGRADE=false cosmovisor init $SIMD_BIN echo "reduce voting period to 20s" cat <<< $(jq '.app_state.gov.voting_params.voting_period = "20s"' $HOME/.simapp/config/genesis.json) > $HOME/.simapp/config/genesis.json echo "print cosmovisor version" cosmovisor version echo "start chain" cosmovisor run start & sleep 10 echo "prepare upgrade" mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin cp $SIMD_NEW_BIN $DAEMON_HOME/cosmovisor/upgrades/test1/bin/simd echo "submit upgrade tx" $SIMD_BIN tx gov submit-proposal software-upgrade test1 --title upgrade --description upgrade --upgrade-height 12 --from alice --yes sleep 5 $SIMD_BIN tx gov deposit 1 10000000stake --from alice --yes sleep 5 $SIMD_BIN tx gov vote 1 yes --from alice --yes sleep 30 echo "verify correct binary" cosmovisor version