EIP-7702 delegation designator is followed before Prague

Open
#26,519 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@MysticRyuujin is already working on this.

Since Nov 18, 2026.

  • #26520 by @MysticRyuujin — open

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

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.