Skip to content

rpc: Fix regression on eth_createAccessList and add mgt ctx.err in loop#21086

Draft
lupin012 wants to merge 5 commits intomainfrom
lupin012/fix-create-access-list-ctx-check
Draft

rpc: Fix regression on eth_createAccessList and add mgt ctx.err in loop#21086
lupin012 wants to merge 5 commits intomainfrom
lupin012/fix-create-access-list-ctx-check

Conversation

@lupin012
Copy link
Copy Markdown
Contributor

@lupin012 lupin012 commented May 10, 2026

This PR contains 2 fixes:

  1. rpc/jsonrpc/eth_call.go — removed excl[to] = struct{}{} → fixes the convergence regression (PR execution/tracing: Fix exclude address list in AccessListTracer #21036)
  2. rpc/jsonrpc/eth_call.go — add ctx.Err() check as a protection

Update: test_15 is OK with the new changes, but test_17 fails.
I found a similar Geth PR (#34887) merged recently.
I'll check Geth's historical responses to fix the expected output for test_17.

The convergence loop had no ctx.Err() check, so when the HTTP context
expired (300s timeout) the goroutine kept running indefinitely. Geth
has this check; add the equivalent to Erigon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lupin012 lupin012 requested a review from canepat as a code owner May 10, 2026 08:27
lupin012 and others added 2 commits May 10, 2026 10:57
…excl

'to' was added to the exclusion map so it wouldn't appear as a redundant
address entry in the access list (EIP-2929 pre-warms it). However, fix
#21036 made NewAccessListTracer fully skip excluded addresses AND their
storage slots. This broke convergence: each iteration the EVM adds 'to's
storage slots to the tracer (SLOAD/SSTORE have no exclusion check in
OnOpcode), but the next prevTracer strips them, so the two tracers never
match.

Remove 'to' from excl so its storage slots propagate correctly through
the convergence loop. The address entry for 'to' appearing in the result
is redundant but harmless — its slots must be warmed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lupin012 lupin012 marked this pull request as draft May 10, 2026 08:58
@lupin012 lupin012 changed the title rpc: check context cancellation in eth_createAccessList loop rpc: Fix regression on eth_createAccessList and add mgt ctx.err in loop May 10, 2026
@lupin012 lupin012 force-pushed the lupin012/fix-create-access-list-ctx-check branch from 5a22d1e to a02a122 Compare May 10, 2026 20:35
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.

2 participants