Skip to content

rpc: fix prestateTracer diff mode missing deleted accounts#20807

Merged
AskAlexSharov merged 2 commits intomainfrom
lupin012/fix_prestate_diff_mode_deleted_accounts
Apr 29, 2026
Merged

rpc: fix prestateTracer diff mode missing deleted accounts#20807
AskAlexSharov merged 2 commits intomainfrom
lupin012/fix_prestate_diff_mode_deleted_accounts

Conversation

@lupin012
Copy link
Copy Markdown
Contributor

@lupin012 lupin012 commented Apr 25, 2026

Replaces repeated t.pre[addr] map lookups with the range variable state

Re-enable test_33/test_34 of debug_traceBlockByNumber()

@lupin012 lupin012 changed the title rpc_ fix prestateTracer diff mode missing deleted accounts rpc: fix prestateTracer diff mode missing deleted accounts Apr 25, 2026
lupin012 and others added 2 commits April 28, 2026 20:26
…nts on main

Port of release/3.4 fix (#20775): adds GetCodeHash to tracing.IntraBlockState
so processDiffState can distinguish deleted accounts (NilCodeHash → zero hash)
from codeless-but-existing ones (EmptyCodeHash). GetCode returns empty bytes
for both cases and cannot make that distinction.

Also replaces repeated t.pre[addr] map lookups with the range variable `state`
and adds a compile-time interface assertion in the unit test.

Fixes flaky rpc-compat test_42 (debug_traceBlockByNumber with prestateTracer
diffMode:true).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…est_33,test_34

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lupin012 lupin012 force-pushed the lupin012/fix_prestate_diff_mode_deleted_accounts branch from 0e00ac7 to 694f44b Compare April 28, 2026 18:37
@lupin012 lupin012 marked this pull request as ready for review April 28, 2026 19:00
@AskAlexSharov AskAlexSharov added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit d7b3ae0 Apr 29, 2026
61 of 68 checks passed
@AskAlexSharov AskAlexSharov deleted the lupin012/fix_prestate_diff_mode_deleted_accounts branch April 29, 2026 03:05
@yperbasis yperbasis added the RPC label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants