Skip to content

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Sep 11, 2025

  • 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.

Summary by CodeRabbit

  • Performance
    • Accelerated transaction confirmation flow by reducing retry backoffs across key steps, leading to faster detection of transaction hashes and receipts and more responsive confirmations.
    • Shortened delays when additional work remains, enabling quicker re-queueing and higher throughput.
    • Overall, users should experience reduced waiting times (from multi‑second pauses to near sub‑second retries in several paths), improving perceived speed without changing functionality.

- 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.
Copy link

coderabbitai bot commented Sep 11, 2025

Walkthrough

Backoff 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

Cohort / File(s) Summary of edits
EIP-7702 confirmation backoff adjustments
executors/src/eip7702_executor/confirm.rs
Reduced nack/map_err_nack backoffs: 10s→2s on bundler tx hash retrieval non-error; 2s→1s on Pending; 5s→1s on get receipt error; 2s→1s when receipt is None. No logic or payload changes.
EOA worker NACK backoff adjustment
executors/src/eoa/worker/mod.rs
Reduced NACK backoff for WorkRemaining from 2s to 200ms. No other logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title concisely and accurately summarizes the primary change: reducing nack backoff durations in the EIP-7702 executor and the EOA worker's error handling. It is specific, single-sentence, and directly reflects the changes described in the PR summary and objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • EIP-7702: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pb/reduce-eoa-worker-delay

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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 jitter

Repo 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 jitter
executors/src/eip7702_executor/confirm.rs (1)

217-217: Centralize confirmation backoffs and add small jitter

Replace 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 1453e7a and ce3845f.

📒 Files selected for processing (2)
  • executors/src/eip7702_executor/confirm.rs (4 hunks)
  • executors/src/eoa/worker/mod.rs (1 hunks)

@d4mr d4mr merged commit 9913fda into main Sep 11, 2025
3 checks passed
@d4mr d4mr deleted the pb/reduce-eoa-worker-delay branch September 11, 2025 20:59
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.

1 participant