Skip to content

[wip] main ci is red#20430

Closed
AskAlexSharov wants to merge 3 commits intomainfrom
alex/ci_main_35
Closed

[wip] main ci is red#20430
AskAlexSharov wants to merge 3 commits intomainfrom
alex/ci_main_35

Conversation

@AskAlexSharov
Copy link
Copy Markdown
Collaborator

@AskAlexSharov AskAlexSharov commented Apr 9, 2026

Summary

  • Reverts the RangeAsOf DB iterator optimization from db/state: RangeAsOf DB iterator starts from files.EndTxNum() #20360 that started the DB iterator at max(startTxNum, files.EndTxNum()) instead of startTxNum
  • The optimization assumed snapshot files always cover all history entries below EndTxNum(), but files may be incomplete during segment merges or partial rebuilds
  • When the DB iterator skips real history entries, DomainRoTx.RangeAsOf falls back to the latest state, incorrectly returning current values for historical queries (e.g. accounts created after block 1M appearing in debug_accountRange at block 1M)
  • Updates the test from db/state: RangeAsOf DB iterator starts from files.EndTxNum() #20360 to verify DB entries within the file range ARE returned (the safe/correct behavior)

Fixes flaky debug_accountRange/test_05, debug_accountRange/test_25, and debug_storageRangeAt/test_01 failures in mainnet RPC integration tests.

The optimization to start the DB iterator at max(startTxNum,
files.EndTxNum()) assumed files always cover all history entries below
EndTxNum. In practice, files may be incomplete (during segment merges,
partial rebuilds, etc.), causing the DB iterator to skip real history
entries. When history misses a key, DomainRoTx.RangeAsOf falls back to
the latest state, incorrectly returning current values for historical
queries (e.g., accounts appearing at block 1M that were created later).

This caused flaky failures in debug_accountRange and
debug_storageRangeAt RPC integration tests on mainnet.
@AskAlexSharov AskAlexSharov changed the title main ci is red [wip] main ci is red Apr 9, 2026
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