Changelog¶
Test fixtures for use by clients are available for each release on the Github releases page.
Key: โจ = New, ๐ = Fixed, ๐ = Changed, ๐ฅ = Breaking change.
๐ Unreleased - 2024-xx-xx¶
๐งช Test Cases¶
- ๐ Dynamic create2 collision from different transactions same block (#430).
- ๐ Fix beacon root contract deployment tests so the account in the pre-alloc is not empty (#425).
- ๐ All beacon root contract tests are now contained in tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py, and all state tests have been converted back to blockchain tests format (#449)
๐ ๏ธ Framework¶
- โจ Add Prague to forks (#419).
- โจ Improve handling of the argument passed to
solc --evm-version
when compiling Yul code (#418). - ๐ Fix
fill -m yul_test
which failed to filter tests that are (dynamically) marked as a yul test (#418). - ๐ Helper methods
to_address
,to_hash
andto_hash_bytes
have been deprecated in favor ofAddress
andHash
, which are automatically detected as opcode parameters and pushed to the stack in the resulting bytecode (#422). - โจ
Opcodes
enum now contains docstrings with each opcode description, including parameters and return values, which show up in many development environments (#424) @ThreeHrSleep. - ๐ Locally calculate state root for the genesis blocks in the blockchain tests instead of calling t8n (#450).
- ๐ Fix bug that causes an exception during test collection because the fork parameter contains
None
(#452). - โจ The
_info
field in the test fixtures now contains ahash
field, which is the hash of the test fixture, and ahasher
script has been added which prints and performs calculations on top of the hashes of all fixtures (seehasher -h
) (#454). - โจ Adds an optional
verify_sync
field to hive blockchain tests (EngineAPI). When set to true a second client attempts to sync to the first client that executed the tests.(#431). - ๐ Fix manually setting the gas limit in the genesis test env for post genesis blocks in blockchain tests. (#472).
๐ง EVM Tools¶
๐ Misc¶
- ๐ Fix deprecation warnings due to outdated config in recommended VS Code project settings (#420).
- ๐ Fix typo in the selfdestruct revert tests module (#421).
v2.1.0 - 2024-01-29: ๐๐๏ธ Cancun¶
Release v2.1.0 primarily fixes a small bug introduced within the previous release where transition forks are used within the new StateTest
format. This was highlighted by @chfast within #405 (#405), where the fork name ShanghaiToCancunAtTime15k
was found within state tests.
๐งช Test Cases¶
- โจ EIP-4844: Adds
test_blob_gas_subtraction_tx()
verifying the blob gas fee is subtracted from the sender before executing the blob tx (#407).
๐ ๏ธ Framework¶
- ๐ State tests generated with transition forks no longer use the transition fork name in the fixture output, instead they use the actual enabled fork according to the state test's block number and timestamp (#406).
๐ Misc¶
- โจ Use
run-parallel
and shared wheel packages fortox
(#408).
v2.0.0 - 2024-01-25: ๐๐๏ธ Cancun¶
Release v2.0.0 contains many important framework changes, including introduction of the StateTest
format, and some additional Cancun and other test coverage.
Due to changes in the framework, there is a breaking change in the directory structure in the release tarball, please see the dedicated "๐ฅ Breaking Changes" section below for more information.
๐งช Test Cases¶
- โจ EIP-4844: Add
test_sufficient_balance_blob_tx()
andtest_sufficient_balance_blob_tx_pre_fund_tx()
(#379). - โจ EIP-6780: Add a reentrancy suicide revert test (#372).
- โจ EIP-1153: Add
test_run_until_out_of_gas()
for transient storage opcodes (#401). - โจ EIP-198: Add tests for the MODEXP precompile (#364).
- โจ Tests for nested
CALL
andCALLCODE
gas consumption with a positive value transfer (previously lacking coverage) (#371). - ๐ EIP-4844: Fixed
test_invalid_tx_max_fee_per_blob_gas()
to account for extra gas required in the case where the account is incorrectly deduced the balance as if it had the correct block blob gas fee (#370). - ๐ EIP-4844: Fixed
test_insufficient_balance_blob_tx()
to correctly calculate the minimum balance required for the accounts (#379). - ๐ EIP-4844: Fix and enable
test_invalid_blob_tx_contract_creation
(#379). - ๐ Convert all eligible
BlockchainTest
s toStateTest
s (and additionally generate correspondingBlockchainTest
s) (#368, #370).
๐ ๏ธ Framework¶
- โจ Add
StateTest
fixture format generation;StateTests
now generate aStateTest
and a correspondingBlockchainTest
test fixture, previously onlyBlockchainTest
fixtures were generated (#368). - โจ Add
StateTestOnly
fixture format is now available and its only difference withStateTest
is that it does not produce aBlockchainTest
(#368). - โจ Add
evm_bytes_to_python
command-line utility which converts EVM bytecode to Python Opcodes (#357). - โจ Fork objects used to write tests can now be compared using the
>
,>=
,<
,<=
operators, to check for a fork being newer than, newer than or equal, older than, older than or equal, respectively when compared against other fork (#367). - โจ Add solc 0.8.23 support (#373).
- โจ Add framework unit tests for post state exception verification (#350).
- โจ Add a helper class
ethereum_test_tools.TestParameterGroup
to define test parameters as dataclasses and auto-generate test IDs (#364). - โจ Add a
--single-fixture-per-file
flag to generate one fixture JSON file per test case (#331). - ๐ Storage type iterator is now fixed (#369).
- ๐ Fix type coercion in
FixtureHeader.join()
(#398). - ๐ Locally calculate the transactions list's root instead of using the one returned by t8n when producing BlockchainTests (#353).
- ๐ Change custom exception classes to dataclasses to improve testability (#386).
- ๐ Update fork name from "Merge" to "Paris" used within the framework and tests (#363).
- ๐ฅ Replace
=
with_
in pytest node ids and test fixture names (#342). - ๐ฅ The
StateTest
, spec format used to write tests, is now limited to a single transaction per test (#361). - ๐ฅ Tests must now use
BlockException
andTransactionException
to define the expected exception of a given test, which can be used to test whether the client is hitting the proper exception when processing the block or transaction (#384). - ๐ฅ
fill
: Remove the--enable-hive
flag; now all test types are generated by default (#358). - ๐ฅ Rename test fixtures names to match the corresponding pytest node ID as generated using
fill
(#342).
๐ Misc¶
- โจ Docs: Add a "Consuming Tests" section to the docs, where each test fixture format is described, along with the steps to consume them, and the description of the structures used in each format (#375).
- ๐ Docs: Update
t8n
tool branch to fill tests for development features in the readme (#338). - ๐ Filling tool: Updated the default filling tool (
t8n
) to go-ethereum@master (#368). - ๐ Docs: Fix error banner in online docs due to mermaid syntax error (#398).
- ๐ Docs: Fix incorrectly formatted nested lists in online doc (#403).
๐ฅ Breaking Changes¶
A concrete example of the test name renaming and change in directory structure is provided below.
-
Fixture output, including release tarballs, now contain subdirectories for different test types:
-
blockchain_tests
: ContainsBlockchainTest
formatted tests blockchain_tests_hive
: ContainsBlockchainTest
with Engine API call directives for use in hive-
state_tests
: ContainsStateTest
formatted tests -
StateTest
, spec format used to write tests, is now limited to a single transaction per test. - In this release the pytest node ID is now used for fixture names (previously only the test parameters were used), this should not be breaking. However,
=
in both node IDs (and therefore fixture names) have been replaced with_
, which may break tooling that depends on the=
character. - Produced
blockchain_tests
fixtures and their correspondingblockchain_tests_hive
fixtures now contain the named exceptionsBlockException
andTransactionException
as strings in theexpectException
andvalidationError
fields, respectively. These exceptions can be used to test whether the client is hitting the proper exception when processing an invalid block.
Blockchain test:
"blocks": [
{
...
"expectException": "TransactionException.INSUFFICIENT_ACCOUNT_FUNDS",
...
}
...
]
Blockchain hive test:
"engineNewPayloads": [
{
...
"validationError": "TransactionException.INSUFFICIENT_ACCOUNT_FUNDS",
...
}
...
]
Renaming and Release Tarball Directory Structure Change Example¶
The fixture renaming provides a more consistent naming scheme between the pytest node ID and fixture name and allows the fixture name to be provided directly to pytest 5on the command line to execute individual tests in isolation, e.g. pytest tests/frontier/opcodes/test_dup.py::test_dup[fork_Frontier]
.
-
Pytest node ID example:
-
Previous node ID:
tests/frontier/opcodes/test_dup.py::test_dup[fork=Frontier]
. -
New node ID:
tests/frontier/opcodes/test_dup.py::test_dup[fork_Frontier]
. -
Fixture name example:
-
Previous fixture name:
000-fork=Frontier
-
New fixture name:
tests/frontier/opcodes/test_dup.py::test_dup[fork_Frontier]
(now the same as the pytest node ID). -
Fixture JSON file name example (within the release tarball):
-
Previous fixture file name:
fixtures/frontier/opcodes/dup/dup.json
(BlockChainTest
format). -
New fixture file names (all present within the release tarball):
fixtures/state_tests/frontier/opcodes/dup/dup.json
(StateTest
format).fixtures/blockchain_tests/frontier/opcodes/dup/dup.json
(BlockChainTest
format).fixtures/blockchain_tests_hive/frontier/opcodes/dup/dup.json
(a blockchain test inHiveFixture
format).
v1.0.6 - 2023-10-19: ๐๐๏ธ Cancun Devnet 10¶
๐งช Test Cases¶
- ๐ EIP-4844: Update KZG point evaluation test vectors to use data from the official KZG setup and Mainnet Trusted Setup (#336).
๐ ๏ธ Framework¶
- ๐ Fixtures: Add a non-RLP format field (
rlp_decoded
) to invalid blocks (#322). - ๐ Spec: Refactor state and blockchain spec (#307).
๐ง EVM Tools¶
- โจ Run geth's
evm blocktest
command to verify JSON fixtures after test case execution (--verify-fixtures
) (#325). - โจ Enable tracing support for
ethereum-spec-evm
(#289).
๐ Misc¶
- โจ Tooling: Add Python 3.12 support (#309).
- โจ Process: Added a Github pull request template (#308).
- โจ Docs: Changelog updated post release (#321).
- โจ Docs: Add a section explaining execution-spec-tests release artifacts (#334).
- ๐ T8N Tool: Branch used to generate the tests for Cancun is now lightclient/go-ethereum@devnet-10 (#336)
๐ฅ Breaking Change¶
- Fixtures now use the Mainnet Trusted Setup merged on consensus-specs#3521 (#336)
v1.0.5 - 2023-09-26: ๐๐๏ธ Cancun Devnet 9 Release 3¶
This release mainly serves to update the EIP-4788 beacon roots address to 0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02
, as updated in ethereum/EIPs/pull/7672.
๐งช Test Cases¶
- ๐ EIP-4844: Fix invalid blob txs pre-Cancun engine response (#306).
- โจ EIP-4788: Final update to the beacon root address (#312).
๐ Misc¶
- โจ Docs: Changelog added (#305).
- โจ CI/CD: Run development fork tests in Github Actions (#302).
- โจ CI/CD: Generate test JSON fixtures on push (#303).
๐ฅ Breaking Change¶
Please use development fixtures from now on when testing Cancun. These refer to changes that are currently under development within clients:
- fixtures: All tests until the last stable fork (Shanghai)
- fixtures_develop: All tests until the last development fork (Cancun)
- fixtures_hive: All tests until the last stable fork (Shanghai) in hive format (Engine API directives instead of the usual BlockchainTest format)
- fixtures_develop_hive: All tests until the last development fork (Cancun) in hive format
v1.0.4 - 2023-09-21: ๐ Cancun Devnet 9 Release 2¶
This release adds additional coverage to the current set of Cancun tests, up to the Devnet-9 Cancun specification.
Note: Additional EIP-4788 updates from ethereum/EIPs/pull/7672 will be included in the next release.
๐งช Test Cases¶
- โจ EIP-7516: BLOBBASEFEE opcode: Add first and comprehensive tests (@marioevz in #294).
- โจ EIP-4788: Beacon block root in the EVM: Increase coverage (@spencer-tb in #297).
- ๐ EIP-1153: Transient storage opcodes: Remove conftest '+1153' in network field (@spencer-tb in #299).
๐ ๏ธ Framework¶
- ๐ EIP-4788: Beacon root contract is pre-deployed at
0xbEAC020008aFF7331c0A389CB2AAb67597567d7a
(@spencer-tb in #297). - โจ Deprecate empty accounts within framework (@spencer-tb in #300).
- โจ Fixture generation split based on hive specificity (@spencer-tb in #301).
- ๐ฅ
fill
:--disable-hive
flag removed; replaced by--enable-hive
(@spencer-tb in #301). - โจ Add engine API forkchoice updated information in fixtures (@spencer-tb in #256).
v1.0.3 - 2023-09-14: ๐ Cancun Devnet 9 Release¶
See v1.0.3.
v1.0.2 - 2023-08-11: ๐ Cancun Devnet 8 + 4788 v2 Pre-Release¶
See v1.0.2.
v1.0.1 - 2023-08-03: ๐ Cancun Devnet-8 Pre-Release¶
See v1.0.1.
v1.0.0 - 2023-06-27: ๐งช Welcome to the Pytest Era¶
See v1.0.0.
Older releases can be found on the releases page.