Skip to content

Report fallback auth-tx failures under a calldata-typed txRef#469

Merged
piersy merged 1 commit into
espresso/batcher-fallback-audit-m3from
espresso/batcher-fallback-auth-txref
Jul 9, 2026
Merged

Report fallback auth-tx failures under a calldata-typed txRef#469
piersy merged 1 commit into
espresso/batcher-fallback-audit-m3from
espresso/batcher-fallback-auth-txref

Conversation

@piersy

@piersy piersy commented Jul 9, 2026

Copy link
Copy Markdown

Fixes a txpool-recovery livelock found while reviewing this branch. The bug predates #467 but the fix lands on the rewritten synchronous function.

The auth tx is always calldata, but its failure receipts are forwarded under the batch txdata's txRef, so with blob batches an auth failure is labeled as a blob failure. That matters for ErrAlreadyReserved: geth refuses a tx at submission when a tx of the other type from the same account is still in the pool, so a blob batch tx left in the blobpool across a restart makes the first auth tx bounce. The recovery in cancelBlockingTx infers the stuck tx's type from the failed tx's type and sends a cancel of the stuck type to replace it in its own pool. Fed the wrong label, it sends a calldata cancel, which the same blobpool reservation rejects; the txpool state then resets to good on the cancel's receipt and the next auth tx starts the cycle again. The blob cancel that would replace the stuck tx is never sent, so the batcher spins without landing batches until an operator intervenes.

The fix derives a calldata-typed authReference used for the auth tx's queue.Send and its failure receipts, keeping the batch txdata's id so a failed pair still requeues the right frames. Batch failures, the window check and the success receipt keep the batch ref, which is where the daType and size metrics read from.

https://claude.ai/code/session_013uE8M5ZPGXWTdhpeqmL5g3

@piersy piersy requested a review from lukeiannucci July 9, 2026 10:49
@piersy piersy marked this pull request as draft July 9, 2026 12:27
@piersy piersy marked this pull request as ready for review July 9, 2026 12:35
…xRef

The auth tx of a fallback pair was submitted and its failures forwarded
under the batch txdata's txRef. With a blob batch, an auth-tx failure
surfaced with isBlob=true, so an ErrAlreadyReserved failure (account
reserved by a stuck blob tx, e.g. left in the blobpool across a restart)
made cancelBlockingTx send a calldata cancel against a blobpool
reservation. That cancel is rejected the same way, the txpool state
resets to good on its receipt, and the cycle repeats: the blob cancel
needed to replace the stuck tx is never sent and no batch ever lands.

Derive a calldata-typed authReference for the auth tx's queue.Send and
its failure receipts, keeping the batch txdata's id so failures still
requeue the right frames.

Claude-Session: https://claude.ai/code/session_013uE8M5ZPGXWTdhpeqmL5g3
@piersy piersy force-pushed the espresso/batcher-fallback-auth-txref branch from 8abf21c to 882b8ca Compare July 9, 2026 12:44
@piersy piersy changed the base branch from espresso/batcher-fallback to espresso/batcher-fallback-audit-m3 July 9, 2026 12:44

@lukeiannucci lukeiannucci left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I see the comment by codex which i missed earlier
#458 (comment)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 882b8ca8e8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread op-batcher/batcher/fallback_auth.go
@piersy piersy merged commit 9fe36d8 into espresso/batcher-fallback-audit-m3 Jul 9, 2026
38 checks passed
@piersy piersy deleted the espresso/batcher-fallback-auth-txref branch July 9, 2026 14:11
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