Skip to content

feat(tests): add more SELFDESTRUCT scenarios#2075

Merged
felix314159 merged 2 commits into
ethereum:forks/amsterdamfrom
felix314159:selfdestruct-tests-added
Feb 27, 2026
Merged

feat(tests): add more SELFDESTRUCT scenarios#2075
felix314159 merged 2 commits into
ethereum:forks/amsterdamfrom
felix314159:selfdestruct-tests-added

Conversation

@felix314159

@felix314159 felix314159 commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

Adds the following test scenarios:

  • create and destroy multiple contracts in same tx
  • create multiple contract, but only instantly destroy one. try to destroy the other one later and check before/after 6780 behavior
  • parent contract creates child contract, but 'neither can live while the other survives'
  • recursive contract creation + deletion with scenarios all are destroyed and only deepest one is destroyed

Tested
uv run fill --clean -v -s ./tests/cancun/eip6780_selfdestruct/
and
uv run consume direct ./fixtures/ --bin=/home/user/Documents/go-ethereum/build/bin/evm -v -s

🔗 Related Issues or PRs

Solves #1592
Relevant EIP-six-seven-80

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

@codecov

codecov Bot commented Jan 26, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2075   +/-   ##
================================================
  Coverage            84.89%   84.89%           
================================================
  Files                  599      599           
  Lines                36719    36719           
  Branches              3780     3780           
================================================
  Hits                 31172    31172           
  Misses                4916     4916           
  Partials               631      631           
Flag Coverage Δ
unittests 84.89% <ø> (ø)

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.

@LouisTsai-Csie LouisTsai-Csie self-requested a review January 29, 2026 12:24
dapplion pushed a commit to gnosischain/execution-specs that referenced this pull request Feb 4, 2026
@marioevz marioevz requested review from gurukamath and removed request for LouisTsai-Csie February 18, 2026 22:10

@gurukamath gurukamath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couple of nits. Otherwise it looks good to me.

Comment thread tests/cancun/eip6780_selfdestruct/test_selfdestruct.py Outdated
Comment thread tests/cancun/eip6780_selfdestruct/test_selfdestruct.py Outdated
@felix314159 felix314159 force-pushed the selfdestruct-tests-added branch from cc4e2d7 to d6b0935 Compare February 27, 2026 10:26
@felix314159 felix314159 merged commit 1831deb into ethereum:forks/amsterdam Feb 27, 2026
2 checks passed
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.

2 participants