Skip to content

Petřín (v3.0.0)

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 23 Jul 23:43
· 167 commits to main since this release
1e1e3cf

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 evm statetest/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, sends engine_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 to fixtures_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 the execution-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

🛠️ Framework

  • 🐞 Fix incorrect != operator for FixedSizeBytes (#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 during fill 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 in consume-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 use pre.deploy_contract and pre.fund_eoa to deploy contracts and fund accounts respectively, instead of declaring the pre 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 use ethereum_test_tools.rpc.rpc by adding to get_transaction_by_hash, debug_trace_call to EthRPC (#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 fields maxPriorityFeePerGas, maxFeePerGas, and maxFeePerBlobGas
    • Fixtures' hashes (in the _info field) are now calculated by removing the "_info" field entirely instead of it being set to an empty dict.
  • 🐞 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

Full Changelog: v2.1.1...v3.0.0