Skip to content

fix: serve duplicate transaction submissions the original's status - #46

Draft
bmuddha wants to merge 1 commit into
replicatorfrom
fix/duplicate-transaction-status
Draft

fix: serve duplicate transaction submissions the original's status#46
bmuddha wants to merge 1 commit into
replicatorfrom
fix/duplicate-transaction-status

Conversation

@bmuddha

@bmuddha bmuddha commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What changed

Closes #ISSUE

Impact

Validation

Reviewer notes

A transaction submitted twice was deduplicated correctly but its second
submitter was never told the outcome, so it blocked until its own
deadline and reported a timeout for a transaction that had succeeded.

`Sequencer::schedule` returned silently when `append` reported a
duplicate. That is harmless while the original is still in flight —
both submitters share the signature's channel and `commit_execution`
reaches both — but once the original settles, the terminal broadcast
takes that channel with it, and a duplicate arriving afterwards
subscribes to a fresh one nothing will ever write to.

`commit_execution` also cached the status *after* that broadcast,
leaving a window in which a late subscriber found neither a live
channel nor a cached result.

Reached from ordinary validator behaviour: chainlink's dependency
refresh issued two identical clone transactions 0.8ms apart, which
share a signature. The clone landed successfully; its caller still saw
`deadline has elapsed` 8s later and undelegated the account.

- add `TransactionsAccessor::notify_duplicate`, replaying the cached
  status to the signature's subscribers. A cached `None` means still in
  flight, where the shared channel already serves both, so it correctly
  does nothing.
- call it from `Sequencer::schedule` on the duplicate path.
- cache before broadcasting, closing the ordering window.

Refs #41

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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