Skip to content

sentry/execution: requeue transactions that gain data late - #884

Open
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix/mempool-orphaned-transaction-requeue
Open

sentry/execution: requeue transactions that gain data late#884
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix/mempool-orphaned-transaction-requeue

Conversation

@damilolaedwards

Copy link
Copy Markdown

Summary

A transaction seen hash-only over the websocket subscription and later enriched with data from a poller was supposed to be requeued for processing once it had data. The requeue check compared record.TxData against nil, but an earlier line in the same branch had already written the new data into record.TxData, so the check always saw non-nil and the transaction was never requeued. It stayed in pendingTxs, fully hydrated, until the age based pruner quietly dropped it.

Capture whether the record just gained data before mutating it, and use that captured value for the requeue decision instead of re-reading the field afterward.

Test plan

  • go build ./...
  • go test ./pkg/sentry/execution/... -race
  • New test delivers a hash-only sighting followed by a data-bearing one for the same transaction and asserts the processing callback is invoked

A transaction seen hash-only over the websocket subscription and later
enriched with data from a poller was supposed to be requeued for
processing once it had data. The requeue check compared
record.TxData against nil, but an earlier line in the same branch had
already written the new data into record.TxData, so the check always
saw non-nil and the transaction was never requeued. It stayed in
pendingTxs, fully hydrated, until the age-based pruner quietly
dropped it.

Capture whether the record just gained data before mutating it, and
use that captured value for the requeue decision instead of
re-reading the field afterward.
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