Skip to content

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Aug 21, 2025

🗒️ 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

  • All: Ran fast 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
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@fselmo fselmo added scope:forks Scope: Changes ethereum_test_forks package scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature fork: amsterdam Amsterdam hard fork labels Aug 21, 2025
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.

Some initial comments!

@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch 3 times, most recently from 0422c6d to 6999fa3 Compare August 22, 2025 15:22
@fselmo fselmo changed the title feat(fork,tests): Adds amsterdam fork and block access list tests feat(tests): Support for EIP-7928 - Block-Level Access Lists Aug 22, 2025
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from fa36237 to d6368b6 Compare August 22, 2025 21:25
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch 4 times, most recently from 02a740d to 0eabfef Compare August 30, 2025 19:29
@fselmo fselmo marked this pull request as ready for review August 30, 2025 19:31
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 amazing so far! Some comments and I think we can push to make the merge and make a release.

raxhvl and others added 14 commits September 2, 2025 13:14
- 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.
fselmo added a commit to fselmo/execution-spec-tests that referenced this pull request Sep 2, 2025
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 0eabfef to 697da8f Compare September 2, 2025 19:15
fselmo added a commit to fselmo/execution-spec-tests that referenced this pull request Sep 2, 2025
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 697da8f to 0687fdf Compare September 2, 2025 19:49
fselmo added a commit to fselmo/execution-spec-tests that referenced this pull request Sep 2, 2025
fselmo added a commit to fselmo/execution-spec-tests that referenced this pull request Sep 2, 2025
…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.
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 0687fdf to 89a3f1b Compare September 2, 2025 22:23
@fselmo
Copy link
Collaborator Author

fselmo commented Sep 2, 2025

@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.
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 89a3f1b to d0eb106 Compare September 2, 2025 22:37
@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 4badcbe to e0c2fba Compare September 3, 2025 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork: amsterdam Amsterdam hard fork scope:forks Scope: Changes ethereum_test_forks package scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants