Skip to content

Commit

Permalink
fix: gas=auto for all submit-proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 18, 2024
1 parent fc9cdf8 commit 8185903
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ test_not_val() {
fi
}

# gas=200000 is the default but gas used may be higher or lower. Setting it
# to "auto" makes the proposal executions less brittle.
GAS_ADJUSTMENT=1.2
export SUBMIT_PROPOSAL_OPTS="--keyring-backend=test --chain-id=$CHAINID \
--gas=auto --gas-adjustment=$GAS_ADJUSTMENT \
--yes --broadcast-mode block --from validator"

voteLatestProposalAndWait() {
waitForBlock
proposal=$($binary q gov proposals -o json | jq -r '.proposals | last | if .proposal_id == null then .id else .proposal_id end')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ else
echo "Upgrade info is not valid JSON: $info"
exit $status
fi
agd tx -bblock gov submit-proposal software-upgrade "$UPGRADE_TO" \
# shellcheck disable=SC2086
agd tx gov submit-proposal software-upgrade "$UPGRADE_TO" \
--upgrade-height="$height" --upgrade-info="$info" \
--title="Upgrade to ${UPGRADE_TO}" --description="upgrades" \
--from=validator --chain-id="$CHAINID" \
--yes --keyring-backend=test
${SUBMIT_PROPOSAL_OPTS="--missing-env-setup"}
waitForBlock

voteLatestProposalAndWait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ else
echo "Upgrade info is not valid JSON: $info"
exit $status
fi
# shellcheck disable=SC2086
agd tx gov submit-proposal software-upgrade "$UPGRADE_TO" \
--upgrade-height="$height" --upgrade-info="$info" \
--title="Upgrade to ${UPGRADE_TO}" --description="upgrades" \
--from=validator --chain-id="$CHAINID" \
--yes --keyring-backend=test
${SUBMIT_PROPOSAL_OPTS="--missing-env-setup"}
waitForBlock

voteLatestProposalAndWait
Expand Down
9 changes: 2 additions & 7 deletions proposals/61:lo-bundle-cost/eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ set -e

source /usr/src/upgrade-test-scripts/env_setup.sh

GAS_ADJUSTMENT=1.2
SIGN_BROADCAST_OPTS="--keyring-backend=test --chain-id=$CHAINID \
--gas=auto --gas-adjustment=$GAS_ADJUSTMENT \
--yes -b block"

# shellcheck disable=SC2086
agd tx gov submit-proposal param-change lower-bundle-cost.json \
$SIGN_BROADCAST_OPTS --from validator
${SUBMIT_PROPOSAL_OPTS="--missing-env-setup"}

voteLatestProposalAndWait

0 comments on commit 8185903

Please sign in to comment.