-
Notifications
You must be signed in to change notification settings - Fork 169
feat(tests): Support for EIP-7928 - Block-Level Access Lists #2067
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
base: main
Are you sure you want to change the base?
feat(tests): Support for EIP-7928 - Block-Level Access Lists #2067
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments!
0422c6d
to
6999fa3
Compare
fa36237
to
d6368b6
Compare
02a740d
to
0eabfef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing so far! Some comments and I think we can push to make the merge and make a release.
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py
Outdated
Show resolved
Hide resolved
Co-authored-by: raxhvl <[email protected]>
- Use the full bal object in the t8n. We can use this to model_validate() into our pydantic model. - Also, pass the bal_hash via t8n so that once we do build the BAL, validate the explicitly defined values, rlp encode it, then hash it, we can compare the full BAL against the hash and make sure that even though we only validated the part that was important for our test, the full BAL is also always valid. Bonus: - Added a new type for ``StorageKey`` because these were not being rlp encoded properly without the left padding. This was tricky to find and I think this can be a common issue. New type here seemed appropriate.
- chore(cleanup): Remove reference to told BlockAccessLists fork - refactor(fork): ``Amsterdam`` above old EOF fork.
- Update some docstrings to remove AI excessive verbosity and add CodeChanges case to example.
- Use ``Number`` instead of ``int`` where appropriate - Use ``default_factory=list`` without ``Optional`` and ``None`` where appropriate
- Use a root model class for the t8n BAL model. This lets us stick closer to the EIP definition where the BAL itself is a list. - The class doesn't need to be `RLPSerializable`, just have simple instructions to serialize its elements (`rlp()`). - Create a `BlockAccessListExpectation` class to represent the expected BAL for a given block. This class can describe different expectations for the test cases, such as defining mutations to be used for invalid tests.
0eabfef
to
697da8f
Compare
697da8f
to
0687fdf
Compare
…hanges - From comments on PR ethereum#2067, we should allow for an explicit exclusion case for an entire set of account changes. If a test case warrants a sanity check that some account might have been impacted but shouldn't be accounted for, we should be able to specify that explicitly.
0687fdf
to
89a3f1b
Compare
@marioevz this needed a rebase to fix some conflicts, hence the force push. For ease of a re-review, only the last 4 commits should have any changes since you last reviewed and I believe I addressed all your comments. Thanks for the thorough review 🙏🏼 edit: The only two comments not marked as "resolved" here are outstanding things to think about. I think we can create an issue to track the remaining changes as we iterate. Or, if you think we can answer those now, I'm happy to chat about it and implement it here as well. Let me know. |
…hanges - From comments on PR ethereum#2067, we should allow for an explicit exclusion case for an entire set of account changes. If a test case warrants a sanity check that some account might have been impacted but shouldn't be accounted for, we should be able to specify that explicitly.
89a3f1b
to
d0eb106
Compare
- Add BAL to engine execution payload as defined in: https://github.com/ethereum/consensus-specs/pull/4526/files#diff-4b950f0c895b4d521c9e8103d638e73a4c7746c6aea51250994425a1efd6f4c8R55 - Add BAL support for state tests to be able to create blockchain tests
4badcbe
to
e0c2fba
Compare
🗒️ Description
This builds upon #1823 and #1866. I worked on this side by side with ethereum/execution-specs#1381 to get BAL support and tests working with each other.
🔗 Related Issues or PRs
#ethereum/execution-specs#1381
✅ Checklist
tox
checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
type(scope):
.mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.