Skip to content

feat(tests): port the repeated ECRECOVER call fillers - #3590

Open
chfast wants to merge 1 commit into
ethereum:forks/amsterdamfrom
chfast:test/ecrecover-repeated-calls
Open

chfast wants to merge 1 commit into
ethereum:forks/amsterdamfrom
chfast:test/ecrecover-repeated-calls

Conversation

@chfast

@chfast chfast commented Sep 15, 2026

Copy link
Copy Markdown
Member

Description

Fold Call50000_ecrec and static_Call50000_ecrec into a single parametrized test over every call opcode, with ten iterations instead of fifty thousand. The fillers repeat the call until the transaction runs out of gas, so their whole post-state is the empty one a reverted transaction leaves behind; running the loop to completion instead lets the residue be checked.

What the precompile receives, stipend included, is exactly one gas short of its price, so every call fails: the success flags accumulate to their seeded base, the loop counter proves all ten iterations ran, the seeded return word survives and the precompile receives no value. One gas more and every call recovers instead. The input window stays as wide as the fillers made it, far wider than the 128 bytes the precompile reads.

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.

Fold Call50000_ecrec and static_Call50000_ecrec into a single
parametrized test over every call opcode, with ten iterations instead
of fifty thousand. The fillers repeat the call until the transaction
runs out of gas, so their whole post-state is the empty one a reverted
transaction leaves behind; running the loop to completion instead lets
the residue be checked.

What the precompile receives, stipend included, is exactly one gas
short of its price, so every call fails: the success flags accumulate
to their seeded base, the loop counter proves all ten iterations ran,
the seeded return word survives and the precompile receives no value.
One gas more and every call recovers instead. The input window stays as
wide as the fillers made it, far wider than the 128 bytes the
precompile reads.
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.44%. Comparing base (b20964f) to head (af6b4ec).
⚠️ Report is 4 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #3590      +/-   ##
===================================================
- Coverage            94.44%   94.44%   -0.01%     
===================================================
  Files                  624      624              
  Lines                36929    36928       -1     
  Branches              3326     3326              
===================================================
- Hits                 34876    34875       -1     
  Misses                1450     1450              
  Partials               603      603              
Flag Coverage Δ
unittests 94.44% <ø> (-0.01%) ⬇️

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.

@LouisTsai-Csie
LouisTsai-Csie self-requested a review September 16, 2026 09:15
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