From 4223cbaca92f8f8bc2afacbbf88ad8169116f448 Mon Sep 17 00:00:00 2001 From: ValarDragon <dojha12@gmail.com> Date: Fri, 6 Aug 2021 01:38:35 -0400 Subject: [PATCH] Add more instructions to testing script --- scripts/upgrades/3/test_script.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/upgrades/3/test_script.sh b/scripts/upgrades/3/test_script.sh index c8b949042..de0323184 100644 --- a/scripts/upgrades/3/test_script.sh +++ b/scripts/upgrades/3/test_script.sh @@ -1,4 +1,5 @@ -# Create a genesis.json for testing +# Create a genesis.json for testing. The node that you this on will be your "validator" +# It should be on version v3.0.0-rc0 osmosisd init --chain-id=testing testing --home=$HOME/.osmosisd osmosisd keys add validator --keyring-backend=test --home=$HOME/.osmosisd osmosisd add-genesis-account $(osmosisd keys show validator -a --keyring-backend=test --home=$HOME/.osmosisd) 1000000000uosmo,1000000000valtoken --home=$HOME/.osmosisd @@ -12,19 +13,28 @@ cat $HOME/.osmosisd/config/genesis.json | jq '.app_state["gov"]["deposit_params" cat $HOME/.osmosisd/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="120s"' > $HOME/.osmosisd/config/tmp_genesis.json && mv $HOME/.osmosisd/config/tmp_genesis.json $HOME/.osmosisd/config/genesis.json cat $HOME/.osmosisd/config/genesis.json | jq '.app_state["staking"]["params"]["min_commission_rate"]="0.050000000000000000"' > $HOME/.osmosisd/config/tmp_genesis.json && mv $HOME/.osmosisd/config/tmp_genesis.json $HOME/.osmosisd/config/genesis.json -# start the chain +# Now setup a second full node, and peer it with this v3.0.0-rc0 node. + +# start the chain on both machines osmosisd start # Create proposals osmosisd tx gov submit-proposal --title="existing passing prop" --description="passing prop" --from=validator --deposit=1000valtoken --chain-id=testing --keyring-backend=test --broadcast-mode=block --type="Text" osmosisd tx gov vote 1 yes --from=validator --keyring-backend=test --chain-id=testing --yes osmosisd tx gov submit-proposal --title="prop with enough osmo deposit" --description="prop w/ enough deposit" --from=validator --deposit=500000000uosmo --chain-id=testing --keyring-backend=test --broadcast-mode=block --type="Text" +# Check that we have proposal 1 passed, and proposal 2 in deposit period osmosisd q gov proposals +# CHeck that validator commission is under min_commission_rate osmosisd q staking validators +# Wait for upgrade block. # Upgrade happened +# your full node should have crashed with consensus failure + +# Now we test post-upgrade behavior is as intended + # Everything in deposit stayed in deposit osmosisd q gov proposals -# Check that commissions were bumped +# Check that commissions was bumped to min_commission_rate osmosisd q staking validators # pushes 2 into voting period osmosisd tx gov deposit 2 1valtoken --from=validator --keyring-backend=test --chain-id=testing --yes \ No newline at end of file -- GitLab