refactor(tests): remove dead static-filler infrastructure#2950
Conversation
Remove the static-filler stack, now dead after the legacy ethereum/tests fillers were ported to Python tests under tests/ported_static/: - Fill path: the static_filler.py plugin and the --fill-static-tests flag and plumbing (incl. the unconditional -p static_filler load in pytest-fill.ini and the FixtureCollector.fill_static_tests field). - Parser: specs/base_static.py and the specs/static_state/ package. - Migration tools: scripts/filler_to_python/, cli/fillerconvert/, cli/modify_static_test_gas_limits.py and their entry points. Relocate the two runtime helpers used by 339 ported tests (resolve_expect_post / resolve_expect_post_fork, plus the ForkSet / ForkConstraint / CMP / _match_index closure) into a new self-contained module specs/post_state_resolution.py, and codemod the imports. Also drop the now-dead yul_test and compile_yul_with markers (the yul fixture they keyed off lived only in static_filler.py). Removes the public exports execution_testing.specs.BaseStaticTest and execution_testing.specs.StateStaticTest (no in-repo consumers). To be merged after ethereum#2556 (ethereum/tests archival), whose parity tooling overlaps with the migration tools removed here.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2950 +/- ##
================================================
Coverage 90.50% 90.50%
================================================
Files 535 535
Lines 32407 32407
Branches 3011 3011
================================================
Hits 29331 29331
Misses 2559 2559
Partials 517 517
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
marioevz
left a comment
There was a problem hiding this comment.
Just two comments, but overall looks great! Thanks!
There was a problem hiding this comment.
This file and some others contain an if fork is None check as a workaround for static tests not being properly parametrized with the correct fork object. After this PR I believe this is impossible, so we should be able to remove that code too. Iirc, the other file where this check was in places was pre_alloc.py.
There was a problem hiding this comment.
I think this file could even live in tests/ported_static because that's the only place (I think) where it's used.
🗒️ Description
tests/static/(the legacyethereum/tests-style YAML/JSON fillers) was removed after its~1,900 fillers were hand-ported to Python tests under
tests/ported_static/. Once porting and theethereum/testsarchival parity check are complete, the entire static-filler stack is dead codeand is removed here — ~6,150 LOC net.
Three layers removed:
static_filler.pypytest plugin and the--fill-static-testsflag withall its plumbing: the conditional plugin loader and
FixtureCollector.fill_static_testsfield,and the unconditional
-p …static_fillerregistration inpytest-fill.ini(this was loadedon every fill). No
*Filler.{json,yml,yaml}files exist in the repo, so this path had no inputs.specs/base_static.pyand the entirespecs/static_state/package (the pydanticmodel tree that parsed legacy fillers).
scripts/filler_to_python/(the filler→Python converter),cli/fillerconvert/, andcli/modify_static_test_gas_limits.py, plus their[project.scripts]entry points and
scripts/verify_dynamic_addresses.sh.Relocation (the one runtime link): 339 ported tests import
resolve_expect_post/resolve_expect_post_fork— runtime helpers that resolve expected post-state for a given(d, g, v)and fork. These, plus theirForkSet/ForkConstraint/CMP/_match_indexclosure,are moved out of the deleted parser into a new self-contained module
specs/post_state_resolution.py, and the 339 imports are codemod'd to the new path.Also removed: the now-dead
yul_testandcompile_yul_with(fork)markers — theyulfixturethey keyed off lived only in
static_filler.py, no test uses it, and they were never used forselection.
execution_testing.specs.BaseStaticTestandexecution_testing.specs.StateStaticTestare no longer exported. No in-repo consumers, butdownstream importers would need to drop them.
Kept on purpose: the
ported_tests.pyplugin and@ported_frommarkers (coverage tracking),the
solc.pyplugin (used bytools/tests/test_code.py), and the general-purposeYul/Solc/YulCompilerhelpers intools_code.Verification:
just staticpasses;fill --collect-onlycollects the full suite cleanly(confirming
pytest-fill.iniloads withoutstatic_filler); a targeted fill exercising bothrelocated functions (incl. the sole
resolve_expect_post_forkuser) passes; framework unit tests pass.🔗 Related Issues or PRs
Sequenced after #2556 (archiving
ethereum/tests). Some of the pieces removed here — in particularthe migration / parity tooling (
scripts/filler_to_python,cli/fillerconvert) — may still beneeded to complete that work, as they are the in-repo oracle for verifying the archived fixtures are
a superset of the last
ethereum/testsrelease. This PR should therefore be merged only after#2556 is done.
✅ Checklist
just static) — passes.type(scope):.docs/references to the removed flag/parser; the only doc mention (.claude/commands/fill-tests.md) was updated.mkdocs servelocally and verified the auto-generated docs for new tests — N/A (no new test cases; only an import-path codemod of existing tests).@ported_frommarker — N/A (no newly converted tests; existing markers unchanged).Cute Animal Picture