-
Notifications
You must be signed in to change notification settings - Fork 939
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
feat(cmd): adding timeout flag #3580
Conversation
does this time out the transaction in the mempool, or just in the client? |
just in the client. is it supposed to also set it for the mempool? |
I'm thinking of a case where I send transaction with nonce x, it times out, and then when I go to send another transaction, also with nonce x, it errors because it has the same nonce as the tx that is already timed out on client, but in the mempool |
But node does not support nonce so far. We agreed that's it is not necessary. |
This does not happen anymore - the nonce error was fixed by upgrading app :)
I don't think he's saying we need to support nonce, I think @jcstein was just describing that what happens with a nonce in the background was throwing errors to the user, and that a timeout for txs in the mempool could fix this. What if we add a timeout to |
I'd rather pass it through the context. |
Fair, I guess we can't have a timeout in the transaction itself that gets submitted, right? |
I don't want to grow the TxConfig. Timeout is smth we can configure through the context. |
😄 🚢
yeah, i was thinking of a case where the tx is timed out on client, but when user makes new tx, there is still error due to mempool. it sounds like the nonce upgrades fixed this though |
@jcstein Did you test this PR already? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3580 +/- ##
==========================================
+ Coverage 44.83% 46.44% +1.60%
==========================================
Files 265 314 +49
Lines 14620 18137 +3517
==========================================
+ Hits 6555 8423 +1868
- Misses 7313 8701 +1388
- Partials 752 1013 +261 ☔ View full report in Codecov by Sentry. |
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.
Could you describe how the user should interact with the flag? In what units the timeout should be passed, bc duration represents time in nanoseconds.?
007d9ea
@vgonkivs The flag docstring prints the usage, e.g. 30s, 1m. This is because pflag has a DurationVar option, which handles this parsing underneath. And it's tested, this is the output you get when the timeline is exceeded |
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.
Hey @sebasti810!
Thank you for the contribution
f7bbb68
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 Celestia Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
fixes #3575