db, rpc: tests to verify receipt domain reads go through the block overlay - #22961
Merged
Conversation
…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
marked this pull request as ready for review
August 3, 2026 06:57
lupin012
requested review from
AskAlexSharov,
sudeepdino008 and
yperbasis
as code owners
August 3, 2026 06:57
AskAlexSharov
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:TestReceiptAsOf_InFlightBlockLogIndexrelease/3.50x7instead of0x3TestDomainReadErrorsPropagaterelease/3.6but got nilTestGetReceiptLogIndexThroughOverlaymainWithTemporalOverlaycall inGetReceiptThe third one is the reason this is worth having on
mainregardless of the backports:Filters.WithOverlay/WithTemporalOverlayhad no test coverage anywhere in the tree. Removetx = g.filters.WithTemporalOverlay(tx)fromGetReceiptand 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
LogIndexAfterTxKeythroughrawtemporaldb.ReceiptAsOf; #22893 shipped with no test at all.One adaptation from the release branches:
AppendReceiptis namedAppendReceiptMetadatahere.