Skip to content

feat(tests): cover invalid-BAL content canonicality (no-op / missing / phantom-read entries)#3170

Open
edg-l wants to merge 1 commit into
ethereum:forks/amsterdamfrom
edg-l:tests/amsterdam-bal-invalid-content-coverage
Open

feat(tests): cover invalid-BAL content canonicality (no-op / missing / phantom-read entries)#3170
edg-l wants to merge 1 commit into
ethereum:forks/amsterdamfrom
edg-l:tests/amsterdam-bal-invalid-content-coverage

Conversation

@edg-l

@edg-l edg-l commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds invalid Block-Level Access List (EIP-7928) tests for canonicality violations the current suite doesn't cover. The existing invalid-BAL tests inject values that differ from execution state, so entries that match the start-of-tx value, omitted writes, and phantom reads on destroyed accounts all pass today.

New cases, all expecting INVALID_BLOCK_ACCESS_LIST:

  • no-op change entries (post value == start-of-tx value) for storage, balance, nonce, code
  • a storage write omitted from the BAL
  • a CREATE's code_changes omitted
  • a slot change recorded only at a later index than the tx that wrote it
  • a phantom storage_read on an account created and destroyed in the same tx

Also adds a remove_slot_change modifier and lists the new cases in test_cases.md. All cases fill against the reference spec and the full amsterdam eip7928 suite fills with no regressions.

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

cute animal

Add invalid Block-Level Access List (EIP-7928) cases exercising
content-canonicality violations the existing suite misses:
- spurious no-op (post==pre) storage/balance/nonce/code change entries
- a storage write omitted from the BAL
- a CREATE's code_changes omitted
- a slot change recorded only at a later index than the tx that wrote it
- a phantom storage_read on a same-tx selfdestructed account

Add remove_slot_change modifier to drop a single slot_change entry, and
catalog the new cases in test_cases.md.
@edg-l
edg-l marked this pull request as ready for review July 14, 2026 16:05
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (f34ff59) to head (74080bc).
⚠️ Report is 9 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3170   +/-   ##
================================================
  Coverage            93.37%   93.37%           
================================================
  Files                  624      624           
  Lines                36993    36993           
  Branches              3384     3384           
================================================
  Hits                 34544    34544           
  Misses                1676     1676           
  Partials               773      773           
Flag Coverage Δ
unittests 93.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant