execution-spec-tests
execution-spec-tests copied to clipboard
feat(plugins): Features plug-in, EIP-7702 mode
🗒️ Description
Introduces a new pytest plugin called "features" which allows enabling a specific feature globally for all tests.
EIP-7702 Mode
Fills all tests with each deployed contract being a set-code-delegated account instead of an actual contract, i.e. the behavior of pre.deploy_contract
changes to the following:
- Deploy the requested code at some location
A
- Generate an EOA account
B
- Set storage of
B
to the requested initial storage (In case of normal allocation during filling, the storage is simply set in the dictionary, but if the test was to be executed on a live network, there would need to be a first authorization transaction to a contract which only purpose is to set the storage) - Create an authorization to set-code of
B
toA
- Return address
B
EOF V1 Mode
Fill all tests with each deployed contract (with unspecified EVM code type) set to EOF V1 code type, i.e. pre.deploy_contract
now first checks if the parameter evm_code_type
is unset, and if the provided deployment code is not already ethereum_test_tools.eof.v1.Container
, and if so then wraps the code in an EOF container before setting/deploying the code.
🔗 Related Issues
✅ Checklist
- [x] All: Set appropriate labels for the changes.
- [x] All: Considered squashing commits to improve commit history.
- [x] All: Added an entry to CHANGELOG.md.
- [x] All: Considered updating the online docs in the ./docs/ directory.
- [x] Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
- [x] Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
- [x] Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
- [x] Tests: Ran
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.