execution-spec-tests icon indicating copy to clipboard operation
execution-spec-tests copied to clipboard

feat(fw): Changes required for Devnet-4 Tests

Open marioevz opened this issue 4 months ago • 0 comments

🗒️ Description

Allow Bytes()

Allow instantiating an empty Bytes instance by calling it with no parameters.

Add sha256 calculation to Bytes

Adds the sha256 method to all Bytes instances, which returns a Hash instance containing the sha256 digest.

Allow instantiating Address with a label

Adds keyword argument label to Address init method to allow it being instantiated with a label.

Fix FixedSizeBytes comparison

Minor fix to FixedSizeBytes __eq__ method to fix casting of the other element under comparison.

Add BlockchainTestEngine

Adds a BlockchainTestEngine spec which has all the same properties as BlockchainTest except that it only generates a blockchain test engine version fixture.

Add ethereum_test_addresses

Adds the ethereum_test_addresses library which contains all known precompiles and system contracts, with Enums for each type and labels.

It also modifies the ethereum_test_forks library and the tests to use these constants, in order to only have to change an address in one location in case the contracts are updated.

🔗 Related Issues

None

✅ Checklist

  • [x] All: Set appropriate labels for the changes.
  • [x] All: Considered squashing commits to improve commit history.
  • [ ] 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.

marioevz avatar Oct 09 '24 23:10 marioevz