feat(validate): new validate command for direct client binary testing#2622
feat(validate): new validate command for direct client binary testing#2622spencer-tb wants to merge 1 commit into
Conversation
d67f961 to
8e48ce6
Compare
2c76c12 to
2658023
Compare
New `validate` CLI command for running EEST fixtures directly against client EVM binaries, replacing Hive for execution correctness testing. Usage: validate health # health check all clients validate engine --client geth # engine tests validate state --client besu # state tests validate block --client nethermind # block tests Features: - 7 clients: geth, besu, nethermind, erigon, reth, ethrex, nimbus - Per-type Pydantic result models: StateTestResult, BlockTestResult, EngineTestResult with type-specific fields - Exception matching: maps client error strings to EEST exception types via ExceptionMapper, verifies correct exception for every invalid test (--no-exception-check to disable) - Cross-validation: lastBlockHash against fixture, lastPayloadStatus (VALID/INVALID) for engine tests - validate.toml config for client binary paths with per-type overrides (state-bin, block-bin, engine-bin) - Auto bin-workers and xdist tuning per client - Bundled Frontier sanity fixtures for health checks - Shared validate_helpers.py for validation logic Client binary PRs: - geth: ethereum/go-ethereum#34650 - erigon: erigontech/erigon#20315 - besu: besu-eth/besu#10184 - nethermind: NethermindEth/nethermind#11035 - reth: paradigmxyz/reth#23361 - ethrex: lambdaclass/ethrex#6445 - nimbus: status-im/nimbus-eth1#4101 - revm: bluealloy/revm#3544 Tracking issue: ethereum#2319
2658023 to
88d72b6
Compare
There was a problem hiding this comment.
Very excited about this!!
I don't mind if we make this a mono-pr, but as we discussed, it'll be easier to catch things and perhaps speed-up getting this in, if we split it up into more bite-size PRs.
The rename should also be addressed the docs, which are coming back to life :)
About the rename: I think renaming away from consume direct is fair to get a shorter command (without an extra subcommand redirection) to run each test type (state, block, engine), because consume direct state / consume direct --type=state is clunky.
But, after thinking on it, I'm not that fond of validate. It was suggested by Rahul in a different context (that of validating payloads), but I'm not sure it generalizes to the different test types well. Imo, it feels:
- Too generic, especially if we use this name in a github action (we should). What does it do?
- Respectfully, it's too specific to validating payloads, which this command isn't always doing.
I'd propose either:
test-elel-test
Wdyt?
Then we'd have, e.g.,
uv run test-el state
Tip: try with Spanish accent.
And the action could be (in ethsteel org) ethsteel/eels-test-el-action?
|
I opened a small stacked follow-up for #2631 here: #2776 Reason for stacking it on this PR: #2631 becomes most useful with the direct client-testing flow introduced here. Once clients run The follow-up keeps the existing built-in mappers as defaults and only adds external YAML mappings on top. I also kept Hive consume wired to the same loader so both exception-checking paths stay Happy to retarget/fold it into this branch if that is preferable. |
🗒️ Description
New
validate(props to @raxhvl for the naming convention) CLI command for running EEST fixtures directly against client EVM binaries. Replacesconsume directwith a cleaner UX — type is the subcommand,--clientis required, no--binor--typeflags.Features
StateTestResult(stateRoot),BlockTestResult(lastBlockHash),EngineTestResult(lastPayloadStatus)--no-exception-checkto disable)go-ethereumresolves togethconsume direct: replaced entirely byvalidatePydantic Result Models
All client adapters return structured results via a shared model hierarchy in
cli_types.py:FixtureTestResultname,pass,fork,errorStateTestResultstateRootvalidate stateBlockTestResultlastBlockHashvalidate blockEngineTestResultlastBlockHash,lastPayloadStatusvalidate engineEach client binary outputs JSON matching these schemas. The shared
validate_helpers.pymodule validates results against fixture expectations:postStatehashlastblockhashExceptionMapperagainst fixture'sexpectException/validationErrorResults (v5.3.0 fixtures, Apple M-series)
Exception check = client reports validation error on pass for negative tests, enabling EELS-side exception verification.
Client PRs (adding statetest/blocktest/enginetest runners)
🔗 Related Issues or PRs
Fixes #2319
✅ Checklist
just statictype(scope):.