rpc: keep modified-account tags on committed view - #23193
Open
yperbasis wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures modified-account block tags resolve against the committed database view, matching history scans.
Changes:
- Resolve start/end tags without forkchoice overlays.
- Fall back
pendingto committed execution progress. - Add regression coverage for overlay-ahead conditions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
rpc/jsonrpc/debug_api.go |
Uses the committed transaction for tag resolution. |
rpc/jsonrpc/debug_api_test.go |
Verifies committed-view pending behavior. |
rpc/jsonrpc/overlay_race_test.go |
Tests start/end tags while an overlay is ahead. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| startNum, _, _, err := rpchelper.GetBlockNumber(ctx, rpc.BlockNumberOrHashWithNumber(startNumber), tx, api._blockReader, api.filters) | ||
| startNum, _, _, err := rpchelper.GetBlockNumber(ctx, rpc.BlockNumberOrHashWithNumber(startNumber), tx, api._blockReader, nil) |
Collaborator
There was a problem hiding this comment.
this change looks so weird
AskAlexSharov
approved these changes
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
AskAlexSharov
enabled auto-merge
August 12, 2026 06:18
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.
Summary
debug_getModifiedAccountsByNumberbounds on the committed transaction viewpendingfall back to the latest committed block when pending history is not indexedContext
Follow-up to #23129, discovered while reviewing the release backport in #23167.
#23129 resolves block tags through the API filters. During an FCU commit, that can select an in-flight overlay head while execution progress and the transaction-number/history scans still use the committed MDBX snapshot. With committed execution at block 5 and an overlay head at block 6, a valid
latestrequest fails withstart block (6) is later than the latest block (5).This change resolves tags on the same committed transaction used by the history scan. APIs that can consume overlay data remain overlay-aware; this history-only endpoint does not mix the two views.
Testing
go test ./rpc/jsonrpc -run '^TestGetModifiedAccountsByNumber' -count=1go test ./rpc/jsonrpc -count=1make lint(repeated)make erigon integration