-
Notifications
You must be signed in to change notification settings - Fork 4
Reduce nack durations in EIP-7702 executor and EOA worker error handling #44
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
- Updated the nack durations for various error handling scenarios in the EIP-7702 executor's confirm module, decreasing wait times from 10 seconds to 2 seconds and from 2 seconds to 1 second. - Adjusted the nack duration in the EOA worker for work remaining errors from 2 seconds to 200 milliseconds. These changes aim to improve responsiveness in error handling and reduce overall latency in transaction processing.
WalkthroughBackoff durations for NACK/retry paths were reduced in two areas: EIP-7702 confirmation logic and EOA worker module. No control-flow, API, or signature changes; only timing adjustments on specific error and pending states. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing touches
🧪 Generate unit tests
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: 0
🧹 Nitpick comments (2)
executors/src/eoa/worker/mod.rs (1)
211-214
: 200 ms NACK is an outlier — make it configurable and add jitterRepo scan shows most nack backoffs are >=1s; 200ms can tight-loop under load (lock reacquisition + RPC polling). Extract the value to a module-level constant, make it configurable, and add a small randomized jitter; keep RequeuePosition::Last.
- .map_err_nack(Some(Duration::from_millis(200)), RequeuePosition::Last) + .map_err_nack(Some(Duration::from_millis(WORK_REMAINING_BACKOFF_MS)), RequeuePosition::Last)Add near module constants:
const WORK_REMAINING_BACKOFF_MS: u64 = 200; // TODO: make configurable; consider ±100ms jitterexecutors/src/eip7702_executor/confirm.rs (1)
217-217
: Centralize confirmation backoffs and add small jitterReplace hard-coded Duration::from_secs(1|2) with named constants and add ~±250ms jitter to avoid synchronized polling — occurrences found in confirm.rs and send.rs (confirm.rs: lines 217, 235, 256, 267; send.rs: lines 231, 254, 289).
- .nack(Some(Duration::from_secs(2)), RequeuePosition::Last) + .nack(Some(Duration::from_secs(TX_HASH_RETRY_SECS)), RequeuePosition::Last)- .map_err_nack(Some(Duration::from_secs(1)), RequeuePosition::Last); + .map_err_nack(Some(Duration::from_secs(PENDING_RETRY_SECS)), RequeuePosition::Last);- .nack(Some(Duration::from_secs(1)), RequeuePosition::Last) + .nack(Some(Duration::from_secs(RECEIPT_ERR_RETRY_SECS)), RequeuePosition::Last)- .map_err_nack(Some(Duration::from_secs(1)), RequeuePosition::Last); + .map_err_nack(Some(Duration::from_secs(RECEIPT_NONE_RETRY_SECS)), RequeuePosition::Last);Add near other top-level defs:
// Centralized confirmation backoffs (secs) const TX_HASH_RETRY_SECS: u64 = 2; // bundler non-error response const PENDING_RETRY_SECS: u64 = 1; // bundler says Pending const RECEIPT_ERR_RETRY_SECS: u64 = 1; // RPC error fetching receipt const RECEIPT_NONE_RETRY_SECS: u64 = 1; // receipt not mined yet // TODO: consider ±250ms jitter per job to avoid sync’d polling across many txs
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
executors/src/eip7702_executor/confirm.rs
(4 hunks)executors/src/eoa/worker/mod.rs
(1 hunks)
These changes aim to improve responsiveness in error handling and reduce overall latency in transaction processing.
Summary by CodeRabbit