EIP-7702 delegation designator is followed before Prague
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- go
- Domain
- backend, blockchain
Research direction
Start in execution/state/intra_block_state.go at ResolveCode (lines 1006–1018) and compare its fork handling with the Prague check in runtime_gas.go. Reproduce the pre-Prague debug_traceCall example from the issue, then inspect the fork-boundary fixtures in ethereum/execution-apis#855. Done means the child call halts with an exceptional error, consumes all its gas, and produces no output or log; linked pull request #26520 is already open.
Written by the indexing model from the issue text.
Description
A call to an account whose code is an EIP-7702 delegation designator (exactly 23 bytes: 0xef0100 followed by an address) runs the delegated code at blocks before Prague. Before Prague, 0xef is an undefined opcode (EIP-3541), so the call must halt with an exceptional error and use all its gas. geth, Nethermind and reth halt there. A transaction sent directly to such an account shows the same difference.
Reachability: EIP-3541 rejects new code that starts with 0xef from London. A scan of mainnet at London found three contracts that start with 0xef, and none of them is a delegation designator. So on mainnet this is reachable only through a state override in an RPC call at a block before Prague. On other chains, a genesis allocation or a deployment before London can also reach it.
ResolveCode follows the designator with no fork check (intra_block_state.go:1006-1018). Only the delegation gas in runtime_gas.go checks IsPrague.
Tested: erigon main 40db3c3. Example at a block before Prague (block 44 of the execution-apis test chain; on mainnet, any block below 22431084). 0xe7 holds the designator for 0xc3. The code of 0xc3 runs in the context of 0xe7, so it logs and returns the address 0xe7.
{"jsonrpc":"2.0","id":1,"method":"debug_traceCall","params":[{"from":"0x0c2c51a0990aee1d73c1228de158688341557508","gas":"0x100000","to":"0x00000000000000000000000000000000000000c1"},"0x2c",{"tracer":"callTracer","tracerConfig":{"withLog":true},"stateOverrides":{"0x00000000000000000000000000000000000000c1":{"code":"0x6020600060006000600060e762010000f15000"},"0x00000000000000000000000000000000000000e7":{"code":"0xef010000000000000000000000000000000000000000c3"},"0x00000000000000000000000000000000000000c3":{"code":"0x3060005260aa60206000a160206000f3"}}}]}
Expected: the child CALL to 0xe7 has an error, and its gasUsed equals its gas (0x10000), with no output and no log. erigon runs the delegated code: no error, output is the address 0xe7, one log, gasUsed 0x408.
This shows in the fork-boundary fixtures of ethereum/execution-apis#855.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 820
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from erigontech/erigon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
flaky test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erigontech/erigon#26230 ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: pending nonce counts past gaps in the poolPossibly taken @yperbasis claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erigontech/erigon#26014 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
tracing: expose custom error selector and raw payload in callTracer revertReasonPossibly taken @lupin012 claimed this 9 days ago. OpenRPC
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#25928 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: remove redundant blob/commitment length checkPossibly taken @yperbasis claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
erigontech/erigon#25432 ·
Maintainers usually reply within 1 day
All issues in erigontech/erigon
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day