Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Oct 15, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Oct 9, 2024

🗒️ Description

This PR can be best reviewed (and also merged via any method that is not Squash) by commit.

Allow Bytes(), add sha256 method

Allow instantiating an empty Bytes instance by calling it with no parameters, and also add a 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, and allow comparing against None without raising an exception.

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.

Allow nonce in fund_eoa

Allows specifying a starting nonce for the funded EOA, which could only be achieved during fill but not on execution.

Allow Bytes in Initcode

Minor fix to allow deploying arbitrary bytes in an Initcode.

🔗 Related Issues

None

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • 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.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@marioevz marioevz added type:chore Type: Chore type:refactor Type: Refactor type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) labels Oct 9, 2024
@marioevz marioevz force-pushed the pre-reqs-for-devnet-4-updates branch 4 times, most recently from 8b76a55 to 6ef9589 Compare October 11, 2024 17:37
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving the precompile and system contract enums and the simplification this brings to forks.

I would suggest renaming this package from ethereum_test_addresses to ethereum_addresses as it's not really test specific.

Few comments below mainly regarding naming. At the cost of duplication, I would write the current version of system contract addresses in test Spec classes for ease of verification in the docs (see screenshot in comment below).

docs/CHANGELOG.md Outdated Show resolved Hide resolved
docs/CHANGELOG.md Outdated Show resolved Hide resolved
docs/CHANGELOG.md Outdated Show resolved Hide resolved
docs/writing_tests/writing_a_new_test.md Outdated Show resolved Hide resolved
src/ethereum_test_addresses/precompiles.py Outdated Show resolved Hide resolved
tests/prague/eip2537_bls_12_381_precompiles/spec.py Outdated Show resolved Hide resolved
tests/prague/eip6110_deposits/spec.py Outdated Show resolved Hide resolved
tests/prague/eip7002_el_triggerable_withdrawals/spec.py Outdated Show resolved Hide resolved
tests/prague/eip7251_consolidations/spec.py Outdated Show resolved Hide resolved
@marioevz marioevz force-pushed the pre-reqs-for-devnet-4-updates branch from c60dbfa to 2c5594b Compare October 14, 2024 22:01
@marioevz
Copy link
Member Author

Scrapped ethereum_test_addresses as it's unnecessary and contentious.

@marioevz marioevz force-pushed the pre-reqs-for-devnet-4-updates branch from 2c5594b to 818c87f Compare October 15, 2024 19:30
@marioevz marioevz merged commit e91a712 into main Oct 15, 2024
5 checks passed
@marioevz marioevz deleted the pre-reqs-for-devnet-4-updates branch October 15, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fw Scope: Framework (evm|tools|forks|pytest) type:chore Type: Chore type:feat type: Feature type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants