Skip to content

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Oct 8, 2025

  • Updated webhook queuing logic to skip notifications for "waiting for receipt" states, improving efficiency.
  • Enhanced error handling in the delegation contract checks to differentiate between retryable and non-retryable errors.
  • Increased maximum confirmation attempts and reduced confirmation retry delay for external bundler to optimize transaction processing.

Summary by CodeRabbit

  • New Features
    • Smarter, conditional retry strategy for delegation checks and signing with backoff and finite retries to improve reliability on transient errors.
  • Bug Fixes
    • Prevents unnecessary webhook notifications when a transaction receipt isn’t yet available; retains lock and logs context instead.
  • Chores
    • Tuned confirmation polling: increased max attempts (20→50) and reduced delay (5s→2s) for faster, more robust confirmations.

…al bundler executors

- Updated webhook queuing logic to skip notifications for "waiting for receipt" states, improving efficiency.
- Enhanced error handling in the delegation contract checks to differentiate between retryable and non-retryable errors.
- Increased maximum confirmation attempts and reduced confirmation retry delay for external bundler to optimize transaction processing.
Copy link

coderabbitai bot commented Oct 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Conditional webhook queuing on NACK was introduced in confirm paths to skip queuing when the reason is ReceiptNotAvailable. EIP-7702 send flow now adds centralized retryability checks and conditional backoff-based retries for delegation and signing steps. External bundler confirmation adjusts retry defaults (max_attempts 50, delay 2s).

Changes

Cohort / File(s) Summary of Changes
NACK handling updates
executors/src/eip7702_executor/confirm.rs, executors/src/external_bundler/confirm.rs
on_nack now conditionally queues webhooks: skip when error is ReceiptNotAvailable; log debug on skip; include transaction_id and error on queue failure. External bundler also updates confirmation retry defaults (max_attempts 20→50, delay 5s→2s).
EIP-7702 send retry logic
executors/src/eip7702_executor/send.rs
Introduces is_build_error_retryable with helpers to classify errors. Applies conditional nack-with-backoff retries for delegation check and authorization/signing: retry on network/5xx-like issues; fail fast on client/4xx, specific JSON-RPC codes, or revert data. No public API signature changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant EIP7702Send as EIP-7702 Send
  participant Delegation as Delegation Check
  participant Auth as Authorization/Signing
  participant Nack as Nack/Retry

  Caller->>EIP7702Send: send()
  EIP7702Send->>Delegation: validate delegation
  alt delegation ok
    EIP7702Send->>Auth: add authorization / sign
    alt auth/sign ok
      EIP7702Send-->>Caller: success
    else auth/sign error
      EIP7702Send->>EIP7702Send: is_build_error_retryable(err)?
      alt retryable
        EIP7702Send->>Nack: nack_with_max_retries(backoff)
        Nack-->>EIP7702Send: retry
      else non-retryable
        EIP7702Send-->>Caller: fail (SigningFailed/DelegationCheckFailed)
      end
    end
  else delegation error
    EIP7702Send->>EIP7702Send: is_build_error_retryable(err)?
    alt retryable
      EIP7702Send->>Nack: nack_with_max_retries(backoff)
      Nack-->>EIP7702Send: retry
    else non-retryable
      EIP7702Send-->>Caller: fail (DelegationCheckFailed)
    end
  end
Loading
sequenceDiagram
  autonumber
  actor Exec as Executor
  participant Confirm as confirm.on_nack
  participant Queue as Webhook Queue

  Exec->>Confirm: on_nack(tx_id, error)
  alt error == ReceiptNotAvailable
    Note right of Confirm: debug: skipping webhook
    Confirm-->>Exec: return (no queue)
  else other error
    Confirm->>Queue: queue_webhook(tx_id)
    alt queued
      Confirm-->>Exec: return
    else enqueue error
      Note right of Confirm: error log with tx_id and details
      Confirm-->>Exec: return
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–75 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pb/no-nack-webhooks

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • 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 5786fb5 and d5845b7.

📒 Files selected for processing (3)
  • executors/src/eip7702_executor/confirm.rs (1 hunks)
  • executors/src/eip7702_executor/send.rs (2 hunks)
  • executors/src/external_bundler/confirm.rs (2 hunks)

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

@d4mr d4mr merged commit b4487d0 into main Oct 8, 2025
2 of 3 checks passed
@d4mr d4mr deleted the pb/no-nack-webhooks branch October 8, 2025 19:23
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