mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-05 19:05:03 +00:00
traceBlockParallel rebuilt per-tx prestate by replaying transactions but did not execute the same pre-exec system calls that traceBlock/traceChain apply before transaction execution. This created a semantic mismatch under post- merge forks (EIP-4788/Prague), where tracer-visible state could diverge from the canonical block execution context. Root cause - The parallel fast-replay path initialized EVM and immediately started tx replay. - It skipped: - ProcessBeaconBlockRoot (EIP-4788) - ProcessParentBlockHash (Prague / EIP-2935) Fix - In traceBlockParallel, after constructing EVM on parent state and before tx replay, execute the same pre-exec system calls as other tracing paths: - ProcessBeaconBlockRoot when block has a beacon root - ProcessParentBlockHash when Prague rules are active - This makes parallel tracing state preparation behaviorally equivalent to traceBlock and traceChain. Regression test - Add TestTraceBlockParallelPragueParentHashSystemCall. - Build a post-merge test chain (beacon+ethash faker), seed history storage contract in genesis, run traceBlockParallel, and assert that the EIP-2935 ring-buffer slot for block-1 stores block.ParentHash(). - The test fails without the fix and passes with it. Validation - go test ./eth/tracers -run TestTraceBlockParallelPragueParentHashSystemCall - go test ./eth/tracers -run 'TestTraceBlock|TestTraceCall|TestTraceTransaction' |
||
|---|---|---|
| .. | ||
| internal | ||
| js | ||
| live | ||
| logger | ||
| native | ||
| api.go | ||
| api_test.go | ||
| dir.go | ||
| live.go | ||
| tracers_test.go | ||
| tracker.go | ||
| tracker_test.go | ||