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.

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
Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

For an initial release it might be worth adding the following to, https://github.com/ethereum/execution-spec-tests/blob/main/.github/configs/feature.yaml, in the PR:

glamsterdam-alpha:
  evm-type: develop
  fill-params: --fork=Amsterdam ./tests/amsterdam
  feature_only: true

Note evm-type can be stable/develop as both point to EELS. glamsterdam-alpha must be the name of the head of the release tag, I used that as an example.

With the latter you should be able to run the following once the PR is merged to main, and your local git is up to date with the upstream/main:

git tag [email protected]
git push upstream [email protected]

@fselmo fselmo force-pushed the feat/amsterdam-and-block-access-lists branch from 573224f to 64e0310 Compare September 3, 2025 20:37
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, thanks!

@marioevz marioevz merged commit 484ebb6 into ethereum:main Sep 3, 2025
16 checks passed
@fselmo fselmo deleted the feat/amsterdam-and-block-access-lists branch September 3, 2025 22:22
LouisTsai-Csie pushed a commit to LouisTsai-Csie/execution-spec-tests that referenced this pull request Sep 5, 2025
…m#2067)

* 🚧 wip(EIP-7928): Block-level Access Lists

* ✨ feat(EIP-7928): Spec params

* 🧹 chore(EIP-7928): Rename package

* ✨ feat(EIP-7928): Test cases

* ✨ feat(EIP-7928): Add BAL header

* 🧹 chore(EIP-7928): bal_hash header

* 🧹 chore: Populate bal_hash env

* ✨ feat(EIP-7928): Add BAL to block body

* ✨ feat(EIP-7928): Add pokebal package

* ✨ feat: update env

* 🚧 wip: Checklist and basic tests

* 🧹 chore: scope

* Add more sophisticated test cases (ethereum#2029)

Co-authored-by: raxhvl <[email protected]>

* WIP: Attempt to get EEST + EELS bals PRs talking to each other

* refactor(bal): Use full bal in t8n; verify and build fixtures

- 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(lint): Fix lint issues, assign method to Frontier to be overridden

* fix(tests,lint): Set up code changes test case; fix remaining lint issues

* refactor(forks): move BAL tests to Amsterdam

- chore(cleanup): Remove reference to told BlockAccessLists fork
- refactor(fork): ``Amsterdam`` above old EOF fork.

* chore: Fix CI lint issues not present locally

- Update some docstrings to remove AI excessive verbosity and add
  CodeChanges case to example.

* refactor(bal): Apply comments from first pass at PR

- Use ``Number`` instead of ``int`` where appropriate
- Use ``default_factory=list`` without ``Optional`` and ``None`` where
  appropriate

* refactor(bal): Split BAL into two classes

- 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.

* refactor(tests): Rename checklist.md -> test_cases.md for BAL test case tracking

* feat(tests,tools): [WIP] initial invalid BAL tests

* chore(spec-resolver): Update commit hash to point to for spec resolver

* fix(lint,resolver): Use latest commit in resolver; fix lint

* Address comments from PR ethereum#2067

* chore(docs): Add changelog entries for BAL updates

* refactor(types): Refactor BAL checks for explicit exclusion of acct changes

- 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.

* fix(bal): Fix explicit empty checks for account changes; add unit tests

* feat(bal): Extend BAL support within framework

- 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

* fix(warnings): Silence warning for unused reference in .md file

* fix(bal): Move state test expected bal to Block

* feat(release): Set up BAL work for a feature release

* fix: BAL as object in fixture block so RLP is correct

* chore(pytest): Add Amsterdam to ruleset for simulator plugin

---------

Co-authored-by: raxhvl <[email protected]>
Co-authored-by: Toni Wahrstätter <[email protected]>
Co-authored-by: raxhvl <[email protected]>
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.

5 participants