Skip to content

Commit

Permalink
handle upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Jun 24, 2024
1 parent c530b53 commit 17cb1f1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
15 changes: 8 additions & 7 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,19 +332,20 @@ steps:
- http://osmosis:26657
- http://icad:26657
- name: relayer
image: publicawesome/hermes:0.15.0
image: publicawesome/hermes:1.7.3
commands:
- /bin/bash ./scripts/ci/setup-relayer.sh
- sleep 10
- /bin/bash ./scripts/ci/setup-hermes-1.7.sh

- name: relayer-start
image: publicawesome/hermes:0.15.0
image: publicawesome/hermes:1.7.3
commands:
- /bin/bash ./scripts/ci/start-relayer.sh
- /bin/bash ./scripts/ci/start-relayer-v1.7.sh
detach: true
- name: relayer-sender
image: publicawesome/hermes:0.15.0
image: publicawesome/hermes:1.7.3
commands:
- /bin/bash ./scripts/ci/transfer-relayer.sh
- /bin/bash ./scripts/ci/transfer-relayer-v1.7.sh
- name: proposal
image: publicawesome/stargaze:13.2.1
commands:
Expand Down Expand Up @@ -421,6 +422,6 @@ volumes:

---
kind: signature
hmac: 41f001cdaf2745a4352be314c4ec38c093b5d9778fc9420c98eed5a4aa27cfff
hmac: 9033462f3c971ac52fdfa4ddf6f376af074b303c151e2f0813a2cce31d6a0a09

...
41 changes: 29 additions & 12 deletions scripts/ci/upgrade/proposal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,45 @@ starsd config keyring-backend test --home $STARGAZE_HOME
echo "fund community pool"
starsd tx distribution fund-community-pool 20000000000000ustars \
--gas-prices 1ustars --gas auto --gas-adjustment 1.5 --from funder \
--chain-id stargaze -b block --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test
--chain-id stargaze -b sync --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test

sleep 5
starsd q distribution community-pool --node http://stargaze:26657

# HEIGHT=$(starsd status -o json --node http://stargaze:26657 --home $STARGAZE_HOME | jq .sync_info.latest_block_height -r)
HEIGHT=$(starsd status --node http://stargaze:26657 --home $STARGAZE_HOME | jq .SyncInfo.latest_block_height -r)

echo "current height $HEIGHT"
HEIGHT=$(expr $HEIGHT + 100)
HEIGHT=$(expr $HEIGHT + 450)
echo "submit with height $HEIGHT"
starsd tx gov submit-proposal software-upgrade v13 --upgrade-height $HEIGHT \
--deposit 1000000000ustars \
--description "v13 Upgrade" \
--title "v13 Upgrade" \
cat <<EOT >> proposal.json
{
"messages": [
{
"@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
"authority": "stars10d07y265gmmuvt4z0w9aw880jnsr700jw7ycaz",
"plan": {
"name": "v14",
"height": "$HEIGHT",
"info": ""
}
}
],
"deposit": "1000000000ustars",
"title": "Upgrade",
"summary": "Upgrade"
}
EOT
cat proposal.json
starsd tx gov submit-proposal proposal.json \
--gas-prices 1ustars --gas auto --gas-adjustment 1.5 --from validator \
--chain-id stargaze -b block --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test

--chain-id stargaze -b sync --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test
sleep 10
starsd q gov proposals --node http://stargaze:26657 --home $STARGAZE_HOME


starsd tx gov vote 1 "yes" --gas-prices 1ustars --gas auto --gas-adjustment 1.5 --from validator \
--chain-id stargaze -b block --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test
sleep 30
--chain-id stargaze -b sync --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test
sleep 120
starsd q gov proposal 1 --node http://stargaze:26657 --home $STARGAZE_HOME -o json | jq
starsd q gov proposals --node http://stargaze:26657 --home $STARGAZE_HOME
sleep 30
14 changes: 7 additions & 7 deletions scripts/ci/upgrade/setup-preinstalled-stargaze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ sed -i -e 's/timeout_commit = "5s"/timeout_commit = "100ms"/g' $STARGAZE_HOME/c
sed -i -e 's/timeout_propose = "3s"/timeout_propose = "100ms"/g' $STARGAZE_HOME/config/config.toml
starsd keys --keyring-backend test add validator --home $STARGAZE_HOME
starsd keys --keyring-backend test add funder --home $STARGAZE_HOME
starsd add-genesis-account $(starsd keys --keyring-backend test show validator -a --home $STARGAZE_HOME) 10000000000000$DENOM --home $STARGAZE_HOME
starsd add-genesis-account $RLYKEY 10000000000000$DENOM --home $STARGAZE_HOME
starsd add-genesis-account stars1y8tcah6r989vna00ag65xcqn6mpasjjdekwfhm 1000000000000$DENOM --home $STARGAZE_HOME
starsd add-genesis-account stars103y4f6h80lc45nr8chuzr3fyzqywm9n0gnr394 20000000000000$DENOM --home $STARGAZE_HOME
starsd add-genesis-account $(starsd keys --keyring-backend test show funder -a --home $STARGAZE_HOME) 21000000000000$DENOM --home $STARGAZE_HOME
starsd gentx validator 900000000$DENOM --keyring-backend test --chain-id stargaze --home $STARGAZE_HOME
starsd collect-gentxs --home $STARGAZE_HOME
starsd genesis add-genesis-account $(starsd keys --keyring-backend test show validator -a --home $STARGAZE_HOME) 10000000000000$DENOM --home $STARGAZE_HOME
starsd genesis add-genesis-account $RLYKEY 10000000000000$DENOM --home $STARGAZE_HOME
starsd genesis add-genesis-account stars1y8tcah6r989vna00ag65xcqn6mpasjjdekwfhm 1000000000000$DENOM --home $STARGAZE_HOME
starsd genesis add-genesis-account stars103y4f6h80lc45nr8chuzr3fyzqywm9n0gnr394 20000000000000$DENOM --home $STARGAZE_HOME
starsd genesis add-genesis-account $(starsd keys --keyring-backend test show funder -a --home $STARGAZE_HOME) 21000000000000$DENOM --home $STARGAZE_HOME
starsd genesis gentx validator 900000000$DENOM --keyring-backend test --chain-id stargaze --home $STARGAZE_HOME
starsd genesis collect-gentxs --home $STARGAZE_HOME
/stargaze/bin/upgrade-watcher starsd start --pruning nothing --home $STARGAZE_HOME --grpc.address 0.0.0.0:9090 --rpc.laddr tcp://0.0.0.0:26657

0 comments on commit 17cb1f1

Please sign in to comment.