feat(test-specs): Test mutators#2860
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2860 +/- ##
================================================
Coverage 86.94% 86.94%
================================================
Files 586 586
Lines 35777 35777
Branches 3363 3363
================================================
Hits 31106 31106
Misses 4012 4012
Partials 659 659
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:
|
|
afaik you mainly intend this feature to be used with |
|
the new flag and when you use |
🗒️ Description
Introduce a spec-test mutator framework that lets fill apply systematic mutations to existing spec tests so we can hunt for edge cases without writing new tests. Mutators are fork-gated: each fork declares which mutators it supports via
BaseFork.spec_test_mutators(), and the user opts in per fill invocation.Usage
The value selected for a given test is the intersection of what the user requested with what the test's fork supports — so requesting a mutator on a fork that doesn't enable it is a no-op rather than an error, and tests under a fork range get mutated only on the forks where the mutation is meaningful.
First mutator: EIP_7702_ALL_CONTRACTS_AS_DELEGATIONS (Prague+)
Every
pre.deploy_contract(...)call is rewritten so that:(0xef0100 || <code-address>)pointing at that account.This stresses the EIP-7702 delegation path against the full body of existing state/blockchain tests. Edge cases surfaced this way are expected to be promoted into standalone tests as a follow-up — the flag is an exploration aid, not part of regular fill runs.
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture