Skip to content

Conversation

@fselmo
Copy link
Contributor

@fselmo fselmo commented Jan 26, 2026

🗒️ Description

We had some issues filling EIP-7934 tests for Amsterdam after introducing tests for EIP-7843, that we very quickly patched (here) so we could get the tests released. This "fix" was more of a bandaid fix that was likely going to leak issues out again eventually. This PR aims to fix this in a more proper way as this is still currently failing one test in forks/amsterdam since we haven't introduced this fix here.

  • First few commits here Claude added +/- 1byte tolerance which helps us not have to find a perfect match (original problem). Then optimized the search by changing from linear to binary search.
  • I then went down a path to play with increasing the starting extraData to half of what it can be. extraData is a 32-byte field, so if we start somewhere in the middle we can have even better tolerance. It turns out that our calldata estimate for the last tx is good enough where we're always within ~5 bytes of what we need. This actually removes the need for the binary search entirely as we have plenty of tolerance to adjust with block extraData.

This PR brings the fill time for these tests down significantly to where I don't believe these tests are a burden on fill anymore.


Bonus:

Fix typo in EIP-7251 BAL tests that was just merged to forks/amsterdam and slipped by PR reviews.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

Screenshot 2026-01-26 at 16 14 53

- extradata field is 32 bytes so we can adjust using the block's extradata
  up to +/- 15 bytes or so (we will need to add one more for rlp at limit
  + 1 byte invalid tests). This makes it so we should selfomly even hit the
  binary search logic.
@fselmo fselmo changed the title Fix/eip7934 tests logic accuracy fix(tests): fix EIP-7934 tests logic accuracy Jan 26, 2026
@fselmo fselmo added C-bug Category: this is a bug, deviation, or other problem A-test-tests Area: tests for packages/testing labels Jan 26, 2026
@fselmo fselmo requested review from gurukamath and marioevz January 26, 2026 23:31
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.14%. Comparing base (c6c380a) to head (ad55b5e).
⚠️ Report is 1 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2078   +/-   ##
================================================
  Coverage            86.14%   86.14%           
================================================
  Files                  599      599           
  Lines                39472    39472           
  Branches              3780     3780           
================================================
  Hits                 34002    34002           
  Misses                4848     4848           
  Partials               622      622           
Flag Coverage Δ
unittests 86.14% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gurukamath gurukamath left a comment

Choose a reason for hiding this comment

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

Just a minor nit about the values returned by the exact_size_transactions. Looks good to me otherwise

@fselmo fselmo merged commit 9325a81 into ethereum:forks/amsterdam Jan 27, 2026
15 checks passed
@fselmo fselmo deleted the fix/eip7934-tests-logic-accuracy branch January 27, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-tests Area: tests for packages/testing C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants