Skip to content

test(evm_tools): revive the opcode-count test against in-repo inputs - #3336

Open
mkzung wants to merge 1 commit into
ethereum:forks/amsterdamfrom
mkzung:fix/revive-count-opcodes-test
Open

test(evm_tools): revive the opcode-count test against in-repo inputs#3336
mkzung wants to merge 1 commit into
ethereum:forks/amsterdamfrom
mkzung:fix/revive-count-opcodes-test

Conversation

@mkzung

@mkzung mkzung commented Aug 7, 2026

Copy link
Copy Markdown

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 at
fixtures/evm_tools_testdata, which no download step provides. It now uses the
client_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 --ignore in the spec-tools target goes with it. Only one target carries it on
forks/amsterdam; the issue mentions two, which holds on another branch.

One thing I did not decide: test_execution_specs.py imports Berlin while this names
Frontier. 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 first
time. I restored the pre-change file from git and confirmed it still errors with
fixture 'root_relative' not found, and flipping the expected count to PUSH1: 2 fails,
so the assertion really reads the tracer.

Static analysis: ruff check, ruff format --check, codespell, vulture,
ethereum-spec-lint and mypy all 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.

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.
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.

chore(testing): delete or revive test_count_opcodes.py (never runnable since introduction)

1 participant