Skip to content

Commit

Permalink
fix(zetacored): use json upgrade proposal to workaround legacy propos…
Browse files Browse the repository at this point in the history
…al panic (#2122)
  • Loading branch information
gartnera authored May 7, 2024
1 parent 39b607e commit b460556
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion contrib/localnet/scripts/start-zetacored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CHAINID="athens_101-1"
KEYRING="test"
HOSTNAME=$(hostname)
INDEX=${HOSTNAME:0-1}
UPGRADE_AUTHORITY_ACCOUNT="zeta10d07y265gmmuvt4z0w9aw880jnsr700jvxasvr"

# Environment variables used for upgrade testing
export DAEMON_HOME=$HOME/.zetacored
Expand Down Expand Up @@ -217,7 +218,28 @@ else
# If this is the first node, create a governance proposal for upgrade
if [ $HOSTNAME = "zetacore0" ]
then
/root/.zetacored/cosmovisor/genesis/bin/zetacored tx gov submit-legacy-proposal software-upgrade $UpgradeName --from operator --deposit 100000000azeta --upgrade-height "$UPGRADE_HEIGHT" --title $UpgradeName --description $UpgradeName --keyring-backend test --chain-id $CHAINID --yes --no-validate --fees=2000000000000000azeta --broadcast-mode block
cat > upgrade.json <<EOF
{
"messages": [
{
"@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
"plan": {
"height": "${UPGRADE_HEIGHT}",
"info": "",
"name": "${UpgradeName}",
"time": "0001-01-01T00:00:00Z",
"upgraded_client_state": null
},
"authority": "${UPGRADE_AUTHORITY_ACCOUNT}"
}
],
"metadata": "",
"deposit": "100000000azeta",
"title": "${UpgradeName}",
"summary": "${UpgradeName}"
}
EOF
/root/.zetacored/cosmovisor/genesis/bin/zetacored tx gov submit-proposal upgrade.json --from operator --keyring-backend test --chain-id $CHAINID --yes --fees 2000000000000000azeta
fi

# Wait for the proposal to be voted on
Expand Down

0 comments on commit b460556

Please sign in to comment.