Skip to content

feat(test-tests) add testcase for calldata/codecopy OOG#2012

Merged
spencer-tb merged 5 commits intoethereum:forks/amsterdamfrom
bshastry:claude/add-regression-test-10116-l200K
Jan 13, 2026
Merged

feat(test-tests) add testcase for calldata/codecopy OOG#2012
spencer-tb merged 5 commits intoethereum:forks/amsterdamfrom
bshastry:claude/add-regression-test-10116-l200K

Conversation

@bshastry
Copy link
Contributor

@bshastry bshastry commented Jan 13, 2026

Description

Add regression tests for CALLDATACOPY and CODECOPY gas consumption, specifically targeting the word copy cost calculation. These tests are ported from a Nethermind fix (PR #10116).

The tests verify that:

  • With sufficient gas: the data copy operation succeeds and storage write occurs
  • With insufficient gas for word copy cost: the transaction runs out of gas and storage write does not occur

Related Issues or PRs

Ported from: NethermindEth/nethermind#10116

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: 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.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Cute capybara

claude and others added 4 commits January 13, 2026 06:42
Tests cover:
- CALLDATACOPY with sufficient/insufficient gas for memory expansion
- CODECOPY with sufficient/insufficient gas for memory expansion

The tests verify that:
- With sufficient gas: storage write succeeds
- With insufficient gas: transaction runs out of gas and storage write
  does not occur
Shorten comment to comply with 79 character line limit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bshastry bshastry force-pushed the claude/add-regression-test-10116-l200K branch from f353187 to 782d351 Compare January 13, 2026 05:43
@bshastry bshastry force-pushed the claude/add-regression-test-10116-l200K branch from 7a0f758 to 46c3dde Compare January 13, 2026 05:51
@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (9aefc86) to head (46c3dde).
⚠️ Report is 3 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2012   +/-   ##
================================================
  Coverage            86.33%   86.33%           
================================================
  Files                  538      538           
  Lines                34557    34557           
  Branches              3222     3222           
================================================
  Hits                 29835    29835           
  Misses                4148     4148           
  Partials               574      574           
Flag Coverage Δ
unittests 86.33% <ø> (ø)

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.

@spencer-tb spencer-tb changed the title Add testcase for calldata/codecopy OOG feat(test-tests) add testcase for calldata/codecopy OOG Jan 13, 2026
@spencer-tb spencer-tb added C-feat Category: an improvement or new feature P-high A-test-tests Area: tests for packages/testing labels Jan 13, 2026
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.

LGTM!

Thanks for this, and highlighting that we have a postmortem doc. I didn't even know we had this!

Tested on all clients in with consume engine and also verified the bug on Nethermind.

@spencer-tb spencer-tb merged commit 858336e into ethereum:forks/amsterdam Jan 13, 2026
18 checks passed
jsign pushed a commit to jsign/execution-specs that referenced this pull request Jan 20, 2026
CPerezz pushed a commit to CPerezz/execution-specs that referenced this pull request Feb 27, 2026
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-feat Category: an improvement or new feature P-high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants