-
Notifications
You must be signed in to change notification settings - Fork 28
chore: added retry functionality for failing govt props #1022
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
1 file reviewed, no comments
9d11c08
to
8aa9f02
Compare
63085da
to
7325389
Compare
70acd3f
to
2ac9243
Compare
isi8787
reviewed
Sep 25, 2025
isi8787
reviewed
Sep 25, 2025
isi8787
approved these changes
Sep 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
why?
current bug exists when making a govt. prop. If you wait for ~10> seconds on the submit prompt then it fails with an err due to a closed socket
how?
added a simple retry functionality for when this error occurs.
testing
ran govt prop and waited for it to fail. confirmed tx still fails as it was before in the logs of the retry but now with the retry it successfully submits prop on second attempt.
Greptile Summary
Updated On: 2025-09-16 15:46:16 UTC
This PR introduces retry functionality to handle transient network failures when submitting government proposals in the CosmWasm deployment system. The change addresses a specific bug where waiting more than ~10 seconds on the submit prompt causes RPC socket closure, leading to proposal submission failures.
The implementation adds a new
signAndBroadcastWithRetry
function that wraps the existingclient.signAndBroadcast
call with intelligent retry logic. The function specifically targets transient network errors (socket closure and fetch failures) and implements exponential backoff with a maximum of 3 attempts. The retry mechanism is conservative - it only retries on known recoverable errors while preserving the original behavior for all other error types.This change integrates seamlessly with the existing government proposal submission workflow. The
submitProposal
function incosmwasm/utils.js
now uses the retry wrapper instead of directly calling the client method, providing automatic recovery from common timeout scenarios without requiring users to restart the entire proposal process.Changed Files
Confidence score: 4/5
Sequence Diagram