Skip to content
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

[TT-1517] add fluent waiting for pending transactions #1100

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Aug 28, 2024

Background:
Currently when we check whether an address has pending transactions (pending nonce) we only do it once and if it does, fails immediately. It would be better if we made it into a fluent wait that checks it for given time.Duration.

I did update readmes and the builder, but did not add any new dedicated tests.


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes enhance the flexibility and configurability of nonce management and pending transaction handling in the Seth blockchain client library. Specifically, they introduce a configurable timeout for pending nonce protection, allowing users to define how long the client should wait for pending transactions to be mined before considering nonce protection measures. Additionally, the changes improve documentation and code clarity around nonce protection and pending transaction management.

What

  • seth/README.md
    • Added documentation on enabling pending nonce protection and specifying a timeout for pending transactions to be mined.
  • seth/client.go
    • Introduced a default value for PendingNonceProtectionTimeout to ensure the client has a fallback timeout value.
    • Modified error handling and logging to include details about the pending nonce protection timeout.
  • seth/client_builder.go
    • Updated WithProtections method to accept a timeout parameter for pending nonce protection, allowing for more granular configuration.
  • seth/config.go
    • Added a new field PendingNonceProtectionTimeout to the configuration structure to store the timeout value for pending nonce protection.
  • seth/config_test.go
    • Updated tests to reflect the addition of the timeout parameter for pending nonce protection in client configuration.
  • seth/gas_bump_test.go
    • Adjusted tests to account for the new parameter in nonce protection configuration, ensuring consistency in test setups.
  • seth/seth.toml
    • Updated the example configuration file to include comments and placeholders for the new pending nonce protection timeout setting, guiding users on how to configure this feature.

@Tofel Tofel force-pushed the tt_1517_fluent_pending_nonce_wait branch from d29c251 to 44555e6 Compare August 28, 2024 09:49
@Tofel Tofel marked this pull request as ready for review August 28, 2024 09:52
@Tofel Tofel requested review from sebawo and a team as code owners August 28, 2024 09:52
@cl-sonarqube-production
Copy link

@Tofel Tofel merged commit c852ecd into main Aug 28, 2024
41 checks passed
@Tofel Tofel deleted the tt_1517_fluent_pending_nonce_wait branch August 28, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants