Skip to content

Conversation

@pdobacz
Copy link
Contributor

@pdobacz pdobacz commented Oct 1, 2025

🗒️ Description

First step towards supporting consume direct with evmone.

Remarks:

  1. Starting off with just state_test support to get the ball rolling
  2. evmone has two things which make things harder. One is that it has two separate binaries: evmone-statetest and evmone-blockchaintest, rather than a single one with 2 subcommands, as EEST assumes. Decision we need to make where do we adjust - on EEST end or on evmone end. Gut tells me it is more elegant to adjust evmone, but overall easier to do so in EEST (assuming we can cut a corner and let EEST choose state/blockchain binary on the fly as it picks up fixtures). EDIT: using evmone-blockchaintest is handled in this PR 👇
  3. Other is that evmone tests on the granularity level of a single json file. This means a failed test case fails the entire file, making it a bit harder to figure out where the failure is (failure message provides a good hint, but is pretty messy). Also test filtering is very coarse. Something we need to tackle on evmone end as we progress.

Opening as draft - let me know if OK to proceed with such first step into main.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

@pdobacz pdobacz force-pushed the feat/consume-direct-evmone branch from 961539a to 1819482 Compare October 2, 2025 06:27
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my side! Thanks for adding this. Feel free to covert to ready for review :)

@danceratopz danceratopz self-requested a review October 2, 2025 14:33
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdobacz wow, this is amazing!

consume direct --bin=~/bin/evmone-statetest [email protected] -v -m state_test -n 8

🥳
image

  1. evmone has two things which make things harder. One is that it has two separate binaries: evmone-statetest and evmone-blockchaintest, rather than a single one with 2 subcommands, as EEST assumes. Decision we need to make where do we adjust - on EEST end or on evmone end.

You can specify two binaries as --bin=evmone-statetest --bin=evmone-blockchaintest, then configure the EvmoneFixtureConsumer appropriately so that it picks the relevant binary based on binary version output and fixture type.

This works right now, for example:

consume direct --bin=~/bin/evmone-statetest --bin=~/bin/evm [email protected] -v -m "state_test and Prague" -k test_chainid

Edit: Just to clarify, this parametrizes each test by Geths' evm and evmone-statetest:
image

I don't think we should merge this as-is. It fails by default if you provide a blockchain_test fixture. Instead, the test case should rather be skipped - then I'd be ok to merge!

@pdobacz
Copy link
Contributor Author

pdobacz commented Oct 2, 2025

Makes sense, will do! My initial plan for the EEST modification was to make it have some "leeway" in the way one specifies the binary. I.e. when evmone-statetest is specified, it would switch to evmone-blockchaintest when needed, assuming it's there (and vice versa). Could also add a version check to ensure both binaries match.

Not sure how the dual --bin works yet, but I'll take a look, thx.

I'll expand this PR soon, but I suppose the "granularity" issue (3.) can be fixed in a followup?

@danceratopz
Copy link
Member

Makes sense, will do! My initial plan for the EEST modification was to make it have some "leeway" in the way one specifies the binary. I.e. when evmone-statetest is specified, it would switch to evmone-blockchaintest when needed, assuming it's there (and vice versa). Could also add a version check to ensure both binaries match.

Not sure how the dual --bin works yet, but I'll take a look, thx.

I think the architecture should be flexible enough as-is.

The direct plugin builds a list of FixtureConsumers:
https://github.com/ipsilon/execution-spec-tests/blob/1819482d0a0b5c6cddfd25138e22ce40eab9dfb2/src/pytest_plugins/consume/direct/conftest.py#L79-L86

The FixtureConsumer class detects what type of FixtureConsumer* subclass it should instantiate based on their -v output, luckily the two binaries have the required output:

  • evmone-statetest 0.16.0-7+commit.0591d81e,
  • evmone-blockchaintest 0.16.0-7+commit.0591d81e.

This allows us to define two FixtureConsumer classes for evmone:

  • EvmOneStateFixtureConsumer,
  • EvmOneBlockchainFixtureConsumer.

Then you use the appropriate class in consume_state_test_file() and consume_blockchain_test_file().

I'll expand this PR soon, but I suppose the "granularity" issue (3.) can be fixed in a followup?

Yes, I wouldn't let 3. block this PR!

Thanks for adding this!

@marioevz
Copy link
Member

marioevz commented Oct 3, 2025

This allows us to define two FixtureConsumer classes for evmone:

* `EvmOneStateFixtureConsumer`,

* `EvmOneBlockchainFixtureConsumer`.

I agree on this point, I think this should be the way to go IMO.

If we implement that, and then doing --bin=evmone-statetest --bin=evmone-blockchaintest still results in fails for BlockchainTest-formatted tests, then there's something we need to fix in EEST.

Thanks for implementing this @pdobacz !

@pdobacz
Copy link
Contributor Author

pdobacz commented Oct 6, 2025

Okay, this approach works up to this point:

user@pop-os:~/sources/ethereum/execution-spec-tests$ PATH=$PATH:/home/user/sources/ethereum/evmone/build/bin/ uv run consume direct --bin=evmone-statetest --bin=evmone-blockchaintest --input /home/user/download_fixtures/fixtures_develop_v5.2.0_eip7939/fixtures/
<snip>                                                      

EvmOneFixtureConsumer-tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py .............................................................................................................. [ 110/2386]
........................................................................................................................................................................................................ [ 310/2386]
........................................................................................................................................................................................................ [ 510/2386]
......................................................................................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 710/2386]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 910/2386]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [1110/2386]
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                                                                                                      [1193/2386]
EvmOneBlockchainFixtureConsumer-tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [1293/2386]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [1493/2386]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [1693/2386]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss........................................................................................................ [1893/2386]
........................................................................................................................................................................................................ [2093/2386]
........................................................................................................................................................................................................ [2293/2386]
.............................................................................................                                                                                                            [2386/2386]
<snip>
======================================================================================== 1193 passed, 1193 skipped in 4.89s =========================================================================================

You'll notice the s-s. I think since test case discovery and consumer discovery are separate (and should stay this way), the BlockchainConsumer has no other option than pytest.skip on state fixtures and vice versa, leading to this noisy output. LMK if this works for you (or maybe there's some way to skip these cases on discovery I'm missing)

@pdobacz pdobacz force-pushed the feat/consume-direct-evmone branch from 1819482 to b0b01dc Compare October 6, 2025 13:13
@pdobacz pdobacz marked this pull request as ready for review October 6, 2025 13:21
@pdobacz pdobacz force-pushed the feat/consume-direct-evmone branch from b0b01dc to 333878a Compare October 6, 2025 13:23
@pdobacz pdobacz changed the title feat(consume): consume direct using evmone-statetest feat(consume): consume direct using evmone-state and blockchaintest Oct 6, 2025
@pdobacz pdobacz force-pushed the feat/consume-direct-evmone branch from 333878a to 99d1aad Compare October 6, 2025 13:26
@pdobacz
Copy link
Contributor Author

pdobacz commented Oct 6, 2025

blockchaintest done with the caveat as mentioned above, ready to review.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, amazing work, thanks!

@marioevz marioevz merged commit 50d6bc2 into ethereum:main Oct 7, 2025
15 checks passed
@marioevz marioevz deleted the feat/consume-direct-evmone branch October 7, 2025 13:54
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.

4 participants