Skip to content

tests@v21.0.3

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 09:39
391d8a0

This is a patch follow-up to tests@v21.0.2 with no consensus changes for Frontier through Amsterdam. It adds two simulators, consume-reorg and consume-wirex, more Merkle Patricia Trie cases, and fixes for test expectations and exception mappings that failed clients on the mainnet hive dashboard.

Main Updates

  • New simulator and fixture format: consume-reorg (#3556, #4032): blockchain_test_engine_reorg fixtures test chain reorganizations over the Engine API, listing every spec-legal outcome. The suite unifies reorg tests from the go-ethereum, Erigon, Nethermind and reth repositories with all of hive's engine reorg tests: all ten reorg.go scenarios now run here (ethereum/hive#1608, #4032). 416 fixtures from Paris to Amsterdam, including five fork transitions, each on a fresh client. See the format docs. @CPerezz
  • New simulator: consume-wirex (#3365, #3933, #3938, #3990): runs blockchain_test_engine_x fixtures through a client's full-sync path, serving each test's blocks from a deterministic devp2p peer. v21.0.2 only carried its fixtures; the simulator ships first in this release. See the docs. @danceratopz
  • Additional Merkle Patricia Trie cases (#3964, #3984): a new leaf between a skipped subtree and a deeper stored branch (the reth state root bug fixed in paradigmxyz/reth#28264), branches rebuilt at a path an earlier block cleared, and batches of up to 300 changes in one block. 20 new cases, 140 fixtures. ethereum/hive#1662 adds client switches to run them on non-default trie modes. @CPerezz @danceratopz
  • Test fixes and exception mappings: EIP-155 legacy transactions with chain ids over 64 bits now accept INVALID_CHAINID as well as INVALID_SIGNATURE_VRS (#3935), the EIP-8282 transition block lists the empty system contract in its BAL (#3929), consume-rlp no longer schedules the DAO fork after Tangerine Whistle, which stopped geth on 2,349 tests (#3980), and exception mappings for reth (#3918, #3994), besu (#3966) and erigon (#3962). @rorupuntou @LukaszRozmej @danceratopz @mattsse @yperbasis
  • Forged BALs at the item cap (#3944): test_bal_invalid_extraneous_entries now pads the forged list to exactly the BAL item cap and one item past it, 48 new cases on Amsterdam. @fselmo
  • Faster consume-enginex and consume-wirex (#3914, #3919, #3952): tests run in fixture file order within a group, oversized groups split across workers, and the next group's client starts while the current group runs. @danceratopz

Tests

Test cases, compared to the previous release, tests@v21.0.2, change in count as follows:

Test type v21.0.2 v21.0.3 Added Removed Changed Unchanged
State test 83,555 83,559 26 22 24 83,509
Blockchain test 21,343 21,437 118 24 4 21,315
Reorg test 0 416 416 0 0 0
Transaction test 750 750 0 0 0 750
  • The 22 removed state tests are 11 account trie cases on Osaka and Amsterdam that are now blockchain tests (#3984); they reappear among the 118 added blockchain tests.
  • The 24 removed blockchain tests are the existing forged-BAL cases, kept under new padding_none ids (#3944).
  • The 24 changed state tests are the two over-64-bit EIP-155 cases on 12 forks (#3935).
Expand to see the changes by fixture format.
Fixture format v21.0.2 v21.0.3 Added Removed Changed Unchanged
state_test 83,555 83,559 26 22 24 83,509
blockchain_test 104,803 104,901 144 46 28 104,729
blockchain_test_engine 83,598 83,694 142 46 16 83,536
blockchain_test_engine_x 83,598 83,694 142 46 29,267 54,285
blockchain_test_engine_reorg 0 416 416 0 0 0
blockchain_test_sync 18 18 0 0 0 18
transaction_test 750 750 0 0 0 750
Total 356,322 357,032 870 160 29,335 326,827

29,252 of the engine x changes come from the largest Osaka and Amsterdam pre-allocation groups getting a new genesis; see the pre-allocation group details below.

New Tests

  • Reorgs over the Engine API (tests/reorg/): forkchoice reorgs to siblings, side chains and canonical ancestors at several depths, invalid payloads and missing ancestors on a side chain, payload building across reorgs, transaction pool reinjection and reorgs across a fork boundary. Ports of hive's reorg.go scenarios and of client reorg tests; the README maps each test to its source. 43 tests, 416 fixtures (#3556, #4032) @CPerezz
  • Merkle Patricia Trie (tests/mpt/): a new key inserted between a skipped subtree and a deeper stored branch, at genesis and across blocks, in the storage and account tries; branches and storage tries rebuilt at a path an earlier block cleared; several updates on one node in one transaction; and bulk batches of 160 to 300 changes that cross the batch sizes where clients switch to batched or parallel trie updates. 20 new cases on Osaka and Amsterdam, 140 fixtures (#3964, #3984) @CPerezz @danceratopz
  • EIP-7928: forged block access lists padded to exactly the BAL item cap (padding_to_cap) and one item past it (padding_past_cap), where BLOCK_ACCESS_LIST_GAS_LIMIT_EXCEEDED is also accepted (test_bal_invalid_extraneous_entries), 48 new cases, 144 fixtures (#3944) @fselmo
  • EIP-1559: test_low_gas_price_old_types now also runs on London, Paris and Shanghai, 20 fixtures (#3993) @Srizdebnath
  • EIP-7702: a transaction must fit the block gas left after an earlier set-code transaction's existing-authority refund (test_tx_gas_limit_after_existing_authority_refund), Prague and Osaka, 12 fixtures (#3943) @fselmo

Changed Tests

  • EIP-155: test_legacy_chain_id_over_64_bits cases smallest_65_bit_chain_id and chain_id_plus_2_64 now expect INVALID_SIGNATURE_VRS|INVALID_CHAINID instead of INVALID_SIGNATURE_VRS alone. largest_64_bit_chain_id still expects INVALID_CHAINID. 72 fixtures across Spurious Dragon to Amsterdam (#3935) @rorupuntou
  • EIP-8282: in the deploy_after_fork cases of test_builder_deposit_contract_deployment and test_builder_exit_contract_deployment, the BAL of the invalid block now lists the empty system contract with no changes, and the header's BAL hash follows. Only BPO2ToAmsterdamAtTime15k changes, 12 fixtures (#3929) @LukaszRozmej
  • EIP-7928: the 24 existing forged-BAL cases now run with a 100,000 block gas limit (was 120,000,000), so the cap padding stays short. Three modifiers that appended an account out of address order now re-sort the forged list, so a client cannot reject them on ordering alone. Expected exceptions are unchanged (#3944) @fselmo
  • Engine x: 29,252 Osaka and Amsterdam fixtures change only because their pre-allocation group has a new genesis; see the pre-allocation group details below.

Removed and Renamed Tests

  • test_bal_invalid_extraneous_entries ids gain a padding_none component, for example fork_Amsterdam-blockchain_test-same_tx-extra_balance is now fork_Amsterdam-blockchain_test-padding_none-same_tx-extra_balance: 24 cases, 72 fixtures (#3944, see Changed Tests). @fselmo
  • Six account trie tests in test_account_trie_structure.py are now blockchain tests rather than state tests, so their 11 cases per fork lose the state_test and blockchain_test_from_state_test ids and come back as blockchain_test (#3984). @CPerezz
Expand to see the Engine X pre-allocation group changes.

Engine x needs 2,575 pre-allocation groups, 12 more than v21.0.2, and the pre_alloc/ folder grows from 110.3 to 110.6 MB. Old pre_alloc folders cannot be mixed with this release's engine x fixtures: the largest Osaka and Amsterdam groups get new hashes.

Group v21.0.2 v21.0.3 Why
Largest Amsterdam group 17,067 tests, 22,946 accounts (0xc50a176ed8d0c109) 17,059 tests, 22,956 accounts (0xbe21b4dcdb801536) New MPT tests join (#3964, #3984); the 24 forged-BAL tests leave with their new block gas limit (#3944)
Largest Osaka group 12,209 tests, 20,774 accounts (0x1871a9349b287d50) 12,225 tests, 20,785 accounts (0xbfefaad0ee7fad36) New MPT tests join (#3964, #3984)
Low gas limit Amsterdam group 3 tests (0xf8f71c3a3ccf5585) 75 tests (0xe1935ab5e8c37057) Now shared by the 72 forged-BAL fixtures (#3944)
Small groups – 22 retired, 34 new, 1 or 2 tests each Account trie tests that build their own genesis move to new groups under their new ids, plus new account trie cases (#3964, #3984), test_low_gas_price_old_types on Paris and Shanghai, and the EIP-7702 refund test
  • Each largest group's genesis changes, so its fixtures get a new preHash, parent hash, block hashes and state root, and history contract storage in postStateDiff, because EIP-2935 stores the new parent hash there (and on Amsterdam the BAL follows). Test behaviour is unchanged.
  • That accounts for 29,252 of the 29,267 changed engine x fixtures. The other 15 are 8 EIP-155 fixtures before Osaka (#3935), 4 EIP-8282 transitions (#3929) and the 3 transaction gas tests that moved with the low gas limit group.

Framework and Consume Changes

  • consume-reorg (#3556): one fresh client per fixture. The simulator resolves payload labels to hashes, so fixtures are identical across clients, and checks every built payload against the requested attributes. --get-payload-wait-time sets the build wait, and a fixture's minReorgDepth reaches the client as HIVE_ENGINE_MAX_REORG_DEPTH once ethereum/hive#1608 maps it. Published as the consume-reorg simulator image. @CPerezz
  • consume-wirex (#3365): a mock devp2p peer (RLPx, eth/69 to eth/72) serves each test's chain and checks that every block below the head actually traveled. Engine API requests time out after 10 s with a freshly signed JWT on each retry (#3933), and a client that has been served every block gets 15 s (--wirex-verdict-grace) to give a verdict instead of the full 60 s sync timeout (#3938). @danceratopz
  • consume-enginex and consume-wirex: tests run in fixture file order within a group (#3914), a group larger than max(1000, selected tests / (2 × workers)) is split into sub-groups (#3919), the next group's client starts while the current group runs, so -n 4 keeps at most 8 client containers (#3952), and a test whose client fails to start is reported as "Test setup failed" instead of silently missing (#3990). @danceratopz
  • All consume simulators: the DAO fork block is set only for Frontier and Homestead (#3980). HIVE_OMIT_GENESIS_ALLOC=1 is set for enginex and wirex clients (#3937, ethereum/hive#1643) and HIVE_KZG_FAST_SETUP=1 for every client (#3949, ethereum/hive#1647). @danceratopz
  • Exception mappers: reth's evm2 messages (#3918) and its floor gas and cap messages (#3994), besu's unrecoverable signature and gas used errors (#3966), erigon's empty blob execution error (#3962) and nethermind's duplicate storage read BAL rejection (#3944). EELS now raises InsufficientMaxFeePerGasError for a legacy gas price below the base fee instead of a bare InvalidBlock; block validity is unchanged (#3993). @danceratopz @mattsse @yperbasis @fselmo @Srizdebnath
  • Filling: release fills now run --invariant-checks (ether conservation, header gas used, nonces and the BAL against the state diff), and this release passed them (#3982). A state test's blockchain form keeps the state test's excess blob gas from Osaka on (#3983); no fixture in this release changes from it. ethereum-spec-evm resolves BPO4 to its own module (#3951), an Ethrex transition tool is available (#4021) and a P256 signing helper is added (#3961). @fselmo @erkancamli @jsign @raxhvl
  • Execute: Initcode handles long deploy code prefixes (#3922), execute deploy-required-contracts --help works (#3870) and the genesis blockhash test is skipped in execute mode (#3981). @jumbokun @nniiovoo @jevinjojo
  • Benchmarks, not part of this release's fixtures: partial-word CALLDATALOAD (#3911), distinct MOD chains (#3963), invalid-block benchmarks (#3823), and faster fills (#3972, #3973). @chfast @LouisTsai-Csie
  • Docs: the site is built with Zensical (#3975, #3977) and rdocc (#3974), moves to specs.ethereum.foundation (#3992, #3976), and builds the test case reference faster (#3979). Protocol history is split into stable and unstable forks (#3924, #3932), and a contribution policy with an outside contributor gate is added (#3881, #4010). @danceratopz @marioevz @spencer-tb
  • The EIP-7976 calldata floor now uses its token multiplier constant instead of the standard token cost (#3969). Both are 4, so no gas value changes. @Ay-obami
  • HIVE_SKIP_GENESIS_INIT (#3910) and the heze-devnet-3 merge (#3920) were reverted (#3912, #3921) and do not ship.

New Contributors

Full Changelog: https://github.com/ethereum/execution-specs/compare/tests@v21.0.2...tests@v21.0.3