test(evm_tools): revive the opcode-count test against in-repo inputs - #3336
Open
mkzung wants to merge 1 commit into
Open
test(evm_tools): revive the opcode-count test against in-repo inputs#3336mkzung wants to merge 1 commit into
mkzung wants to merge 1 commit into
Conversation
The test never ran: it wanted a `root_relative` fixture from a sibling tree and data no download step provides, so the Justfile ignored it outright. Fixture 3 is the only client_clis alloc with code, `0x600140`, so the call runs PUSH1 then BLOCKHASH. A plain transition, not a state test. Closes ethereum#3326.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3326, taking the second option there: rewrite rather than delete, so the
opcode-count tracer gets its first coverage.
The test asked for
root_relative, defined in a sibling tree, and pointed atfixtures/evm_tools_testdata, which no download step provides. It now uses theclient_clis transition inputs. Fixture 3 is the only alloc there with code,
0x600140,so the call runs PUSH1 then BLOCKHASH. Those inputs are a plain transition rather than a
state test, so the run names the fork instead of passing
--state-test.The
--ignorein thespec-toolstarget goes with it. Only one target carries it onforks/amsterdam; the issue mentions two, which holds on another branch.One thing I did not decide:
test_execution_specs.pyimportsBerlinwhile this namesFrontier. The count is the same either way, but say if Berlin is the intended fork.
Testing
uv run pytest -n 4 tests/evm_tools: 42 passed, with the file collected for the firsttime. I restored the pre-change file from git and confirmed it still errors with
fixture 'root_relative' not found, and flipping the expected count toPUSH1: 2fails,so the assertion really reads the tracer.
Static analysis:
ruff check,ruff format --check,codespell,vulture,ethereum-spec-lintandmypyall pass.Claude Code was used for implementation assistance, covering the test rewrite and this
description. All changes have been reviewed, understood and manually tested by me.