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(specs): verify intermidiate block state in blockchain test #1075

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

winsvega
Copy link
Contributor

@winsvega winsvega commented Jan 14, 2025

πŸ—’οΈ Description

Allow verification of individual block states in blockchain test

πŸ”— Related Issues

#1033

βœ… 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.

@winsvega winsvega added scope:pytest Scope: Pytest plugins type:feat type: Feature labels Jan 14, 2025
@winsvega winsvega requested a review from danceratopz January 14, 2025 13:23
@winsvega winsvega self-assigned this Jan 14, 2025
@winsvega
Copy link
Contributor Author

add a unit test to
src/ethereum_test_specs/tests/test_expect.py

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a few comments.

@@ -570,7 +577,12 @@ def make_fixture(
),
)

self.verify_post_state(t8n, alloc)
if block.expected_post_state:
Copy link
Member

Choose a reason for hiding this comment

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

We could try to move this into the generate_block_data so it's verified for make_fixture and make_hive_fixture too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this violates the logic. because function states generate_block_data and it will be implicit that it also verifies the post state

src/ethereum_test_specs/blockchain.py Show resolved Hide resolved
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

LGTM, I made some fixes to the test added and the unit test too.
I'll wait until CI passed and then merge, thanks!

@marioevz marioevz changed the title verify intermidiate block state in blockchain test feat(specs): verify intermidiate block state in blockchain test Jan 17, 2025
@marioevz
Copy link
Member

Once #1085 is merged we can rebase and CI should be green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:pytest Scope: Pytest plugins type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants