Skip to content

db, rpc: tests to verify receipt domain reads go through the block overlay - #22961

Merged
AskAlexSharov merged 1 commit into
mainfrom
lupin012/port_receipt_overlay_tests
Aug 3, 2026
Merged

db, rpc: tests to verify receipt domain reads go through the block overlay#22961
AskAlexSharov merged 1 commit into
mainfrom
lupin012/port_receipt_overlay_tests

Conversation

@lupin012

@lupin012 lupin012 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Port of the tests added in the release-branch backports #22951 (release/3.5) and #22960 (release/3.6).

All three pass on main — both #22511 and #22893 are here — so they land as regression coverage. Each was written against the branch where its fix was missing and verified red there first:

Test Verified red on Without
TestReceiptAsOf_InFlightBlockLogIndex release/3.5 #22511 — returns 0x7 instead of 0x3
TestDomainReadErrorsPropagate release/3.6 #22893 — error swallowed, but got nil
TestGetReceiptLogIndexThroughOverlay main the WithTemporalOverlay call in GetReceipt

The third one is the reason this is worth having on main regardless of the backports: Filters.WithOverlay / WithTemporalOverlay had no test coverage anywhere in the tree. Remove tx = g.filters.WithTemporalOverlay(tx) from GetReceipt and the bug reported on #22106 returns in production while CI stays green — verified, that test now fails.

The other two also add coverage the upstream fixes did not ship: #22511's own test works at storage level with a synthetic key, so nothing exercised LogIndexAfterTxKey through rawtemporaldb.ReceiptAsOf; #22893 shipped with no test at all.

One adaptation from the release branches: AppendReceipt is named AppendReceiptMetadata here.

…erlay

Port of the tests added in the release-branch backports #22951 (release/3.5)
and #22960 (release/3.6). All three pass on main — both #22511 and #22893 are
here — so they land as regression coverage, but each was written against the
branch where its fix was missing and verified red there first.

- TestGetReceiptLogIndexThroughOverlay — pins the production wiring. The
  overlay is seeded with a log index the committed tx does not hold, so only a
  read routed through Filters.WithTemporalOverlay can produce it. Removing
  `tx = g.filters.WithTemporalOverlay(tx)` from GetReceipt makes it fail;
  nothing else in the tree catches that.

- TestReceiptAsOf_InFlightBlockLogIndex — ReceiptAsOf through the overlay read
  view must return the in-flight block's LogIndexAfterTx rather than the last
  committed block's. Uses the production key and accessor, which the
  storage-level test added by #22511 does not touch.

- TestDomainReadErrorsPropagate — a DomainReader error must reach the caller
  instead of falling through to the committed tx, which would silently answer
  with stale data. Covers both MemoryMutation and OverlayTemporalReadView; the
  fix in #22893 shipped without a test.

AppendReceipt is named AppendReceiptMetadata here; otherwise identical to the
release-branch versions.
@lupin012
lupin012 marked this pull request as ready for review August 3, 2026 06:57
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit 305767a Aug 3, 2026
185 of 217 checks passed
@AskAlexSharov
AskAlexSharov deleted the lupin012/port_receipt_overlay_tests branch August 3, 2026 10:13
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