EEST's Petřín release adds many improvements and additions. Please read the breaking changes!
A noteable key package ethereum_test_tools
is now fragmented into several fine grained packages that are suitable for use within other Python based repositories.
The consume simulator pytest plugin now contains 4 fixture runners:
consume direct
: provides a pytest wrapper to execute multiple fixtures against client evmstatetest/blocktest
runners.consume rlp
: using hive as a back-end, executes fixture block rlps against fully instantiated clients, verifying the last block hash is expected.consume engine
: with a hive back-end, sendsengine_newPayloadVX
calls against fully instantiated clients validating each call response.consume all
: provides a wrapper surrounding all commands to execute consume direct, rlp and engine at once for the specified fixtures.
With a refined consume suite, testers can now fill
and consume
the generated fixtures extremely quickly to validate both the generated fixture and client implementation. This removes the cumbersome requirement of updating hive when verifying new fixtures.
To align the execution-apis engine specification with the consume engine
plugin, the blockchain_test_hive
fixture is renamed to blockchain_test_engine
to align more with the sentiment of the spec. Similarly, the fixture format of the latter is changed to match the engine new payload "params"
field defined in the spec.
💥 Breaking Changes
- Cancun is now the latest deployed fork, and the development fork is now Prague (#489).
- Stable fixtures artifact
fixtures.tar.gz
has been renamed tofixtures_stable.tar.gz
(#573) - The "Blockchain Test Hive" fixture format has been renamed to "Blockchain Test Engine" and updated to more closely resemble the
engine_newPayload
format in theexecution-apis
specification (https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#request) and now contains a single"params"
field instead of multiple fields for each parameter (#687). - Output folder for fixtures has been renamed from "blockchain_tests_hive" to "blockchain_tests_engine" (#687).
🧪 Test Cases
- ✨ Add tests for eof container's section bytes position smart fuzzing (#592).
- ✨ Add
test_create_selfdestruct_same_tx_increased_nonce
which tests self-destructing a contract with a nonce > 1 (#478). - ✨ Add
test_double_kill
andtest_recreate
which test resurrection of accounts killed withSELFDESTRUCT
(#488). - ✨ Add eof example valid invalid tests from ori, fetch EOF Container implementation (#535).
- ✨ Add tests for EIP-2537: Precompile for BLS12-381 curve operations (#499).
- ✨ EIP-663: Add
test_dupn.py
andtest_swapn.py
(#502). - ✨ Add tests for EIP-6110: Supply validator deposits on chain (#530).
- ✨ Add tests for EIP-7002: Execution layer triggerable withdrawals (#530).
- ✨ Add tests for EIP-7685: General purpose execution layer requests (#530).
- ✨ Add tests for EIP-2935: Serve historical block hashes from state (#564, #585).
- ✨ Add tests for EIP-4200: EOF - Static relative jumps (#581, #666).
- ✨ Add tests for EIP-7069: EOF - Revamped CALL instructions (#595).
- 🐞 Fix typos in self-destruct collision test from erroneous pytest parametrization (#608).
- ✨ Add tests for EIP-3540: EOF - EVM Object Format v1 (#634, #668).
- 🔀 Update EIP-7002 tests to match spec changes in ethereum/execution-apis#549 (#600)
- ✨ Convert a few eip1153 tests from ethereum/tests repo into .py (#440).
- ✨ Add tests for EIP-7480: EOF - Data section access instructions (#518, #664).
- ✨ Add tests for subcontainer kind validation from EIP-7620: EOF Contract Creation for the cases with deeply nested containers and non-first code sections (#676).
- ✨ Add tests for runtime stack overflow at CALLF instruction from EIP-4750: EOF - Functions (#678).
- ✨ Add tests for runtime stack overflow at JUMPF instruction from EIP-6206: EOF - JUMPF and non-returning functions (#690).
- ✨ Add tests for EIP-7251: Increase the MAX_EFFECTIVE_BALANCE (#642)
- ✨ Add tests for Devnet-1 version of EIP-7702: Set EOA account code (#621)
🛠️ Framework
- 🐞 Fix incorrect
!=
operator forFixedSizeBytes
(#477). - ✨ Add Macro enum that represents byte sequence of Op instructions (#457)
- ✨ Number of parameters used to call opcodes (to generate bytecode) is now checked (#492).
- ✨ Libraries have been refactored to use
pydantic
for type checking in most test types (#486, #501, #508). - ✨ Opcodes are now subscriptable and it's used to define the data portion of the opcode:
Op.PUSH1(1) == Op.PUSH1[1] == b"\x60\x01"
(#513) - ✨ Added EOF fixture format (#512).
- ✨ Verify filled EOF fixtures using
evmone-eofparse
duringfill
execution (#519). - ✨ Added
--traces
support when running with Hyperledger Besu (#511). - ✨ Use pytest's "short" traceback style (
--tb=short
) for failure summaries in the test report for more compact terminal output (#542). - ✨ The
fill
command now generates HTML test reports with links to the JSON fixtures and debug information (#537). - ✨ Add an Ethereum RPC client class for use with consume commands (#556).
- ✨ Add a "slow" pytest marker, in order to be able to limit the filled tests until release (#562).
- ✨ Add a CLI tool that generates blockchain tests as Python from a transaction hash (#470, #576).
- ✨ Add more Transaction and Block exceptions from existing ethereum/tests repo (#572).
- ✨ Add "description" and "url" fields containing test case documentation and a source code permalink to fixtures during
fill
and use them inconsume
-generated Hive test reports (#579). - ✨ Add git workflow evmone coverage script for any new lines mentioned in converted_ethereum_tests.txt (#503).
- ✨ Add a new covariant marker
with_all_contract_creating_tx_types
that allows automatic parametrization of a test with all contract-creating transaction types at the current executing fork (#602). - ✨ Tests are now encouraged to declare a
pre: Alloc
parameter to get the pre-allocation object for the test, and usepre.deploy_contract
andpre.fund_eoa
to deploy contracts and fund accounts respectively, instead of declaring thepre
as a dictionary or modifying its contents directly (see the state test tutorial for an updated example) (#584). - ✨ Enable loading of ethereum/tests/BlockchainTests (#596).
- 🔀 Refactor
gentest
to useethereum_test_tools.rpc.rpc
by adding toget_transaction_by_hash
,debug_trace_call
toEthRPC
(#568). - ✨ Write a properties file to the output directory and enable direct generation of a fixture tarball from
fill
via--output=fixtures.tgz
(#627). - 🔀
ethereum_test_tools
library has been split into multiple libraries (#645). - ✨ Add the consume engine simulator and refactor the consume simulator suite. (#691).
📋 Misc
- 🐞 Fix CI by using Golang 1.21 in Github Actions to build geth (#484).
- 💥 "Merge" has been renamed to "Paris" in the "network" field of the Blockchain tests, and in the "post" field of the State tests (#480).
- ✨ Port entry point scripts to use click and add tests (#483).
- 💥 As part of the pydantic conversion, the fixtures have the following (possibly breaking) changes (#486):
- State test field
transaction
now uses the proper zero-padded hex number format for fieldsmaxPriorityFeePerGas
,maxFeePerGas
, andmaxFeePerBlobGas
- Fixtures' hashes (in the
_info
field) are now calculated by removing the "_info" field entirely instead of it being set to an empty dict.
- State test field
- 🐞 Relax minor and patch dependency requirements to avoid conflicting package dependencies (#510).
- 🔀 Update all CI actions to use their respective Node.js 20 versions, ahead of their Node.js 16 version deprecations (#527).
- ✨ Releases now contain a
fixtures_eip7692.tar.gz
which contains all EOF fixtures (#573). - ✨ Use
solc-select
for tox when running locally and within CI (#604).
New Contributors
- @raxhvl made their first contribution in #482
- @yperbasis made their first contribution in #488
- @redistay made their first contribution in #493
- @hanghuge made their first contribution in #495
- @gumb0 made their first contribution in #559
- @artemd24 made their first contribution in #568
- @pdobacz made their first contribution in #614
- @raymondnguyen8 made their first contribution in #632
Full Changelog: v2.1.1...v3.0.0