Skip to content

evmone-statetest v0.21.0 root divergence for a valid EIP-7702 delegation sender #1511

@N0zoM1z0

Description

@N0zoM1z0

Summary

evmone-statetest v0.21.0 produces a different state root from geth for a valid Osaka state test where the transaction sender account contains an exact EIP-7702 delegation designator:

0xef0100 || 20-byte target address

The testcase is expected to be valid. geth enters the delegated destination code and matches the expected state root. evmone-statetest returns a different root and does not emit the destination execution trace.

Tested evmone version:

evmone-statetest 0.21.0

Root Cause Analysis

The divergence appears to be in the state-test execution path for a transaction whose sender account has valid EIP-7702 delegation code.

The testcase sets the sender account code to an exact delegation designator and uses nonce 0xfffffffffffffffe. Under the Prague/Osaka delegation rules, this sender shape should be valid and should execute through the delegated target. geth does that and reaches the expected post-state root.

evmone-statetest instead returns a different state root immediately, which suggests the delegation-sender path is not being applied in the same way as geth for this state test.

Reproduction Steps

The attachment contains the JSON state test at:

attachments/testcases/osaka-valid-delegation-sender.json

Build evmone v0.21.0 with testing enabled:

git checkout v0.21.0
cmake -S . -B build -DEVMONE_TESTING=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel --target evmone-statetest
build/bin/evmone-statetest --version

Run the testcase:

build/bin/evmone-statetest --trace attachments/testcases/osaka-valid-delegation-sender.json

Run the same testcase with geth evm statetest as a comparator.

Observed result:

Client Result
geth evm statetest executes destination code and matches expected root
evmone-statetest 0.21.0 returns root 0xe8226b9fa5130294ff3e1ee97044082f7b10fba08af28ba40cf62b9a5ad7b696

Impact

This is a state-test correctness issue in evmone-statetest. I have not shown impact on a production execution client.

The fixture should be useful as a regression test for EIP-7702 delegation-sender handling in the test runner.

Attachment Contents

  • attachments/testcases/osaka-valid-delegation-sender.json: minimized JSON state test.
  • attachments/evidence/repro.log: replay transcript.
  • attachments/evidence/geth-0-output.jsonl: geth comparator output.
  • attachments/evidence/evmone-0-output.jsonl: evmone output.
  • attachments/evidence/versions.txt: tested versions.

public-evmone-delegation-sender-root-divergence-attachment.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions