-
Notifications
You must be signed in to change notification settings - Fork 168
Add some helper scripts for handling proposals and voting #3241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe PR introduces and enhances Bash scripts for automating governance proposal submission and voting across three environments (local/dev, staging, testnet), with network-specific command flags and orchestration logic that delegates voting to environment-specific helper scripts. Changes
Sequence DiagramsequenceDiagram
participant User
participant submit_and_vote_proposal.sh
participant submit_proposal.sh
participant dydxprotocold
participant Network RPC
participant vote_in_*.sh
User->>submit_and_vote_proposal.sh: Invoke with network, account, proposal file, vote option
rect rgb(200, 220, 240)
Note over submit_and_vote_proposal.sh, submit_proposal.sh: Proposal Submission Phase
submit_and_vote_proposal.sh->>submit_proposal.sh: Delegate submission
submit_proposal.sh->>dydxprotocold: Submit proposal with network-specific flags
dydxprotocold->>Network RPC: Execute on chain
end
rect rgb(220, 240, 200)
Note over submit_and_vote_proposal.sh, Network RPC: Fetch Proposal ID
submit_and_vote_proposal.sh->>Network RPC: Query latest proposal ID (via dydxprotocold + jq)
Network RPC-->>submit_and_vote_proposal.sh: Return proposal ID
end
rect rgb(240, 220, 200)
Note over submit_and_vote_proposal.sh, vote_in_*.sh: Voting Phase
submit_and_vote_proposal.sh->>vote_in_*.sh: Delegate voting with proposal ID and vote option
vote_in_*.sh->>dydxprotocold: Vote on proposal (network-specific voters)
dydxprotocold->>Network RPC: Execute votes on chain
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Nitpick comments (2)
protocol/scripts/governance/submit_proposal.sh (1)
38-39: Validate proposal file existence before use.The script does not check whether the
$PROPOSAL_FILEexists before attempting to use it. This can result in a cryptic error fromdydxprotocold. Consider adding a validation check early in the script.Add this validation after argument parsing:
if [ ! -f "$PROPOSAL_FILE" ]; then echo "Error: Proposal file '$PROPOSAL_FILE' not found" >&2 exit 1 fiprotocol/scripts/governance/submit_and_vote_proposal.sh (1)
38-39: Validate proposal file before submission.The script does not verify that the proposal file exists before attempting to submit it. Add an early validation check to provide clearer error messaging.
Add this validation after argument parsing (after line 13):
if [ ! -f "$PROPOSAL_FILE" ]; then echo "Error: Proposal file '$PROPOSAL_FILE' not found" >&2 exit 1 fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
protocol/scripts/governance/submit_and_vote_proposal.sh(1 hunks)protocol/scripts/governance/submit_proposal.sh(1 hunks)protocol/scripts/governance/vote_in_dev.sh(1 hunks)protocol/scripts/governance/vote_in_staging.sh(1 hunks)protocol/scripts/governance/vote_in_testnet.sh(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
- GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
- GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
- GitHub Check: check-sample-pregenesis-up-to-date
- GitHub Check: benchmark
- GitHub Check: unit-end-to-end-and-integration
- GitHub Check: liveness-test
- GitHub Check: test-coverage-upload
- GitHub Check: test-race
- GitHub Check: build-and-push-mainnet
- GitHub Check: build-and-push-testnet
- GitHub Check: container-tests
- GitHub Check: build
- GitHub Check: golangci-lint
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
| # Submit the proposal | ||
| echo "Submitting proposal..." | ||
| if [ "$NETWORK" = "testnet" ]; then | ||
| # Testnet uses dydxcli and adydx | ||
| dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \ | ||
| --from "$FROM_ACCOUNT" \ | ||
| --yes \ | ||
| --broadcast-mode sync \ | ||
| --gas auto \ | ||
| --fees 200000000000adydx \ | ||
| --keyring-backend test | ||
| else | ||
| # Local/staging uses dydxprotocold and adv4tnt | ||
| dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \ | ||
| --from "$FROM_ACCOUNT" \ | ||
| --keyring-backend test \ | ||
| --fees 5000000000000000adv4tnt \ | ||
| --yes | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Reconcile fee inconsistency between submit_proposal.sh and submit_and_vote_proposal.sh.
This script uses 5000000000000000adv4tnt for local/staging fees (line 41), but submit_proposal.sh specifies 500000000000000adv4tnt for the same environment. These values should match. Additionally, like the other submission script, the local/staging branch lacks --broadcast-mode sync while testnet includes it (line 32).
Please verify the correct fee amount and ensure consistency across both submission scripts. Also clarify whether --broadcast-mode sync should be applied to all paths.
🏁 Script executed:
#!/bin/bash
# Find submit_proposal.sh and display its content, focusing on fee configurations
fd -t f "submit_proposal.sh" -x cat {}Length of output: 1717
🏁 Script executed:
#!/bin/bash
# Search for fee patterns in governance scripts to understand the standard
rg -n "fees.*adv4tnt|fees.*adydx" --type=sh protocol/scripts/governance/Length of output: 3402
🏁 Script executed:
#!/bin/bash
# Check for any documentation or comments about fee amounts
rg -n "5000000000000000|500000000000000" protocol/scripts/governance/ -B2 -A2Length of output: 4034
Reconcile fee inconsistency between submit_proposal.sh and submit_and_vote_proposal.sh; also ensure consistent use of --broadcast-mode sync across submission scripts.
Verification confirms a 10x fee discrepancy for local/staging: submit_proposal.sh uses 500000000000000adv4tnt while submit_and_vote_proposal.sh uses 5000000000000000adv4tnt. The higher fee in submit_and_vote_proposal.sh aligns with all voting scripts, but the inconsistency between the two submission scripts needs clarification—either this is intentional separation by operation type, or one script has an error. Additionally, --broadcast-mode sync is absent from both submission scripts for local/staging, while all voting scripts include it. Determine whether all paths should consistently use --broadcast-mode sync.
🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_and_vote_proposal.sh around lines 25–43,
the local/staging fee value (5000000000000000adv4tnt) is inconsistent with
protocol/scripts/governance/submit_proposal.sh (500000000000000adv4tnt) and
voting scripts; reconcile these by choosing the correct fee (prefer the value
used across voting scripts if that was intended) and make both submission
scripts use the same fee (or pull the fee into a shared variable at the top of
the scripts to avoid future drift), and also add --broadcast-mode sync to the
local/staging dydxprotocold tx gov submit-proposal invocation so submission
paths match voting scripts' broadcast behavior.
| if [ -z "$PROPOSAL_ID" ]; then | ||
| echo "⚠️ Could not retrieve proposal ID from $NODE" | ||
| echo " Please check the node is accessible or vote manually." | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exit with error code when proposal ID retrieval fails.
When the proposal ID cannot be retrieved, the script exits with code 0 (success), which masks the failure in CI/CD pipelines and automated workflows. This should exit with a non-zero code to indicate failure.
Apply this diff to exit with a failure code:
if [ -z "$PROPOSAL_ID" ]; then
echo "⚠️ Could not retrieve proposal ID from $NODE"
echo " Please check the node is accessible or vote manually."
- exit 0
+ exit 1
fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [ -z "$PROPOSAL_ID" ]; then | |
| echo "⚠️ Could not retrieve proposal ID from $NODE" | |
| echo " Please check the node is accessible or vote manually." | |
| exit 0 | |
| fi | |
| if [ -z "$PROPOSAL_ID" ]; then | |
| echo "⚠️ Could not retrieve proposal ID from $NODE" | |
| echo " Please check the node is accessible or vote manually." | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_and_vote_proposal.sh around lines 73 to
77, the script currently exits with code 0 when PROPOSAL_ID is empty; change the
exit to a non-zero status to signal failure (e.g. replace exit 0 with exit 1),
and optionally send the error messages to stderr to ensure CI detects the
failure.
| if [ "$NETWORK" = "testnet" ]; then | ||
| # Testnet uses dydxcli and adydx | ||
| echo "Submitting to testnet..." | ||
| dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \ | ||
| --from "$FROM_ACCOUNT" \ | ||
| --yes \ | ||
| --broadcast-mode sync \ | ||
| --gas auto \ | ||
| --fees 200000000000adydx \ | ||
| --keyring-backend test | ||
| else | ||
| # Local/staging uses dydxprotocold and adv4tnt | ||
| echo "Submitting to $NETWORK..." | ||
| dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \ | ||
| --from "$FROM_ACCOUNT" \ | ||
| --keyring-backend test \ | ||
| --fees 500000000000000adv4tnt \ | ||
| --yes | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Address fee inconsistency between local/staging and testnet paths.
Line 41 specifies fees of 500000000000000adv4tnt for local/staging, but the related submit_and_vote_proposal.sh script uses 5000000000000000adv4tnt (10x higher) for the same environment. These should be consistent. Additionally, the testnet path includes --broadcast-mode sync (line 31) but the local/staging path omits it (line 38), which may cause behavioral differences.
Please verify the correct fee amount for local/staging environments and ensure both scripts use the same value. Also confirm whether --broadcast-mode sync should be present for all paths.
🏁 Script executed:
#!/bin/bash
# Find and examine both proposal submission scripts
echo "=== Finding submit_proposal.sh ==="
fd -name "submit_proposal.sh" -type f
echo -e "\n=== Finding submit_and_vote_proposal.sh ==="
fd -name "submit_and_vote_proposal.sh" -type f
echo -e "\n=== Examining submit_proposal.sh content ==="
fd -name "submit_proposal.sh" -type f -exec cat {} \;
echo -e "\n=== Examining submit_and_vote_proposal.sh content ==="
fd -name "submit_and_vote_proposal.sh" -type f -exec cat {} \;Length of output: 1104
🏁 Script executed:
#!/bin/bash
# Search for both scripts using find
find . -name "submit_proposal.sh" -type f 2>/dev/null | head -5
find . -name "submit_and_vote_proposal.sh" -type f 2>/dev/null | head -5
# Search for fee patterns in shell scripts
echo "=== Searching for fee patterns in governance scripts ==="
rg "fees.*adv4tnt|fees.*adydx" --type sh -C 3 2>/dev/null | head -100
# Search for broadcast-mode patterns
echo "=== Searching for broadcast-mode patterns ==="
rg "broadcast-mode" --type sh -C 2 2>/dev/null | head -100Length of output: 10604
Address fee inconsistency between local/staging paths in submit scripts, and add missing --broadcast-mode sync to local/staging submissions.
The fee mismatch is confirmed: submit_proposal.sh specifies 500000000000000adv4tnt for local/staging while submit_and_vote_proposal.sh uses 5000000000000000adv4tnt (10x higher). These must be unified.
Additionally, all governance voting scripts (vote_in_staging.sh, vote_in_dev.sh, vote_in_testnet.sh) include --broadcast-mode sync across all environments. The submit scripts inconsistently omit it only for local/staging paths (lines 38-42 in submit_proposal.sh and the equivalent in submit_and_vote_proposal.sh), which may cause unexpected behavioral differences. Add --broadcast-mode sync to the local/staging submit commands to align with the voting scripts pattern.
🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_proposal.sh around lines 25 to 43, the
local/staging branch uses a different fee and omits --broadcast-mode sync;
update the else-branch submit command to use the same fee as the other submit
script (5000000000000000adv4tnt) and add --broadcast-mode sync to the
dydxprotocold tx gov submit-proposal invocation (preserving --from,
--keyring-backend, --fees and --yes flags).
| dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote the vote_option parameter.
The $2 parameter should be quoted to handle edge cases with special characters.
Apply this diff to quote the parameter:
-dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test |
🤖 Prompt for AI Agents
In protocol/scripts/governance/vote_in_dev.sh around lines 8 to 11 the second
positional parameter ($2) is unquoted when passed to `dydxprotocold tx gov
vote`, which can break if the vote_option contains spaces or special chars;
update each command to quote the $2 parameter (e.g. "$2") so the shell treats it
as a single argument and preserves its contents.
| dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote the vote_option parameter to handle edge cases.
The $2 parameter in these vote commands is unquoted and could fail if the vote option contains spaces or special characters. Additionally, there is no error handling if a vote fails; the script continues to the next voter.
Apply this diff to quote the parameter:
-dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test |
🤖 Prompt for AI Agents
protocol/scripts/governance/vote_in_staging.sh lines 8-17: the second parameter
$2 is unquoted and commands don't check for failure; update each dydxprotocold
tx gov vote invocation to use "$2" (quote the vote_option) and after each
command test its exit status, printing an error identifying the voter and
exiting non‑zero on failure (or use a failing shell option like set -e and a
descriptive trap) so the script does not silently continue on a failed vote.
| dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | ||
| dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use correct token denomination for testnet votes.
The testnet environment uses adydx as the token denomination, but this script incorrectly uses adv4tnt in the fees. This will cause vote transactions to fail. Additionally, the vote_option parameter should be quoted.
Apply this diff to fix the token denomination and quote the parameter:
-dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dydx-1 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dydx-2 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from dydx-1 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test | |
| dydxprotocold tx gov vote "$1" "$2" --from dydx-2 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test |
🤖 Prompt for AI Agents
In protocol/scripts/governance/vote_in_testnet.sh around lines 8 to 9, the fee
denomination is incorrect and the vote_option parameter is unquoted; update both
dydxprotocold tx gov vote commands to use the testnet token denomination "adydx"
in the --fees flag and ensure the vote option parameter ($2) is passed quoted
(e.g., "$2") so the command becomes dydxprotocold tx gov vote "$1" "$2" ...
--fees 5000000000000000adydx --yes --keyring-backend test for both dydx-1 and
dydx-2 invocations.
This is a no-op
Changelist
Test Plan
Author/Reviewer Checklist
state-breakinglabel.indexer-postgres-breakinglabel.PrepareProposalorProcessProposal, manually add the labelproposal-breaking.feature:[feature-name].backport/[branch-name].refactor,chore,bug.Summary by CodeRabbit
Release Notes