Skip to content

feat(spec,test): EIP-7708 spec updates for self as target#2086

Merged
fselmo merged 7 commits into
ethereum:eips/amsterdam/eip-7708from
fselmo:fix/selfdestruct-log-only-in-same-tx
Jan 29, 2026
Merged

feat(spec,test): EIP-7708 spec updates for self as target#2086
fselmo merged 7 commits into
ethereum:eips/amsterdam/eip-7708from
fselmo:fix/selfdestruct-log-only-in-same-tx

Conversation

@fselmo

@fselmo fselmo commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

SELFDESTRUCT

CALL and Transactions

Also added some more test cases for coverage emitting transfer logs when not in the same tx, self destruct logs when in same tx, combo of transfer and selfdestruct logs across fork transition, update tests to reflect above changes

closes #2088

✅ 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

Screenshot 2026-01-28 at 11 06 45

@codecov

codecov Bot commented Jan 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.14%. Comparing base (bf16746) to head (41d9159).
⚠️ Report is 23 commits behind head on eips/amsterdam/eip-7708.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           eips/amsterdam/eip-7708    #2086      +/-   ##
===========================================================
- Coverage                    86.14%   84.14%   -2.01%     
===========================================================
  Files                          599      642      +43     
  Lines                        39491    42267    +2776     
  Branches                      3782     4066     +284     
===========================================================
+ Hits                         34021    35566    +1545     
- Misses                        4848     5971    +1123     
- Partials                       622      730     +108     
Flag Coverage Δ
unittests 84.14% <100.00%> (-2.01%) ⬇️

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.

@fselmo fselmo force-pushed the fix/selfdestruct-log-only-in-same-tx branch 3 times, most recently from 8fa8d42 to a76f905 Compare January 28, 2026 00:21
@fselmo fselmo linked an issue Jan 28, 2026 that may be closed by this pull request
@fselmo fselmo changed the title fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx fix(spec,test): EIP-7708 spec updates for self as beneficiary Jan 28, 2026
@fselmo fselmo changed the title fix(spec,test): EIP-7708 spec updates for self as beneficiary fix(spec,test): EIP-7708 spec updates for self as target Jan 28, 2026
@fselmo fselmo force-pushed the fix/selfdestruct-log-only-in-same-tx branch from a76f905 to 1213282 Compare January 28, 2026 17:04
@fselmo fselmo added A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-feat Category: an improvement or new feature C-test Category: test labels Jan 28, 2026
@fselmo fselmo changed the title fix(spec,test): EIP-7708 spec updates for self as target feat(spec,test): EIP-7708 spec updates for self as target Jan 28, 2026
@fselmo fselmo force-pushed the fix/selfdestruct-log-only-in-same-tx branch from 1213282 to 70d5a42 Compare January 28, 2026 18:11
@fselmo fselmo marked this pull request as ready for review January 28, 2026 18:11

@jochem-brouwer jochem-brouwer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checked tests, they look good but left a few nit comments and commented on one test where I think it is not tested what is intended.

Here are some extra cases to add:

  • Ensure CALLCODE does not emit any logs
  • Ensure SELFDESTRUCT to COINBASE emits the correct logs
    This specific case will: 1. Invoke selfdestruct (address is coinbase), this could burn eth if coinbase has funds already (the contract created is thus sending to Op.ADDRESS, but the block.coinbase is set such that this matches the created address). 2. Pay the priority fees to coinbase and 3. Destroy coinbase.
  • Ensure that in all 3 create situations (tx create, CREATE, CREATE2) the logs are emitted correctly
  • Invoking selfdestruct in the same contract multiple times (parametrize sending to self (burn), other addresses, and then burn again). This should either burn or emit transfer logs.
  • Send via selfdestruct funds to a contract already marked for selfdestruct.
  • Ensure that a transaction which 7702-delegates an account, which calls that account, which itself does SELFDESTRUCT, does not do the burn logs (as it does not burn since contract is not created)
  • Ensure that if any action done in current tx, which reverts, that the logs are also deleted

Let me know if I can assist 😄 👍

Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py Outdated
Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py Outdated
Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py Outdated
Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py Outdated
@fselmo

fselmo commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

Here are some extra cases to add:

This is quite helpful, thank you 👍🏼. Imo, we should track these cases in the tracker for this EIP here. Or feel free to push here if you have permissions or PR to this branch. My goal here is to update the spec and provide enough tests to get a new release out and get clients to agree. Anything beyond this I think we can make subsequent PRs with more test cases. Wdyt?

Let me know if I can assist 😄 👍

The more the merrier 🙂! Thank you for the review! I will look into updating this tomorrow. Much appreciated 🙏🏼

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some comments, thanks!

Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py Outdated
Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py Outdated
Comment thread tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py Outdated
@marioevz marioevz force-pushed the eips/amsterdam/eip-7708 branch from f3d0672 to 6b9199e Compare January 29, 2026 20:31
fselmo added a commit to fselmo/execution-specs that referenced this pull request Jan 29, 2026
- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases
@fselmo fselmo force-pushed the fix/selfdestruct-log-only-in-same-tx branch from db5b412 to c069c11 Compare January 29, 2026 20:48

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for these tests! And many thanks to @jochem-brouwer for your review!

I think we can go ahead and merge as-is, and add any remaining tests to the tracker #1875, in order to (a) be able to release soon, and (b) keep this PR from growing out of proportion.

@fselmo

fselmo commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

add any remaining tests to the tracker

done #1875 (comment) 👍🏼

@fselmo fselmo merged commit fb17a68 into ethereum:eips/amsterdam/eip-7708 Jan 29, 2026
14 of 17 checks passed
@fselmo fselmo deleted the fix/selfdestruct-log-only-in-same-tx branch January 29, 2026 23:17
fselmo added a commit that referenced this pull request Feb 3, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
spencer-tb pushed a commit that referenced this pull request Feb 11, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Feb 12, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit that referenced this pull request Feb 12, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Feb 13, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit that referenced this pull request Feb 13, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit that referenced this pull request Feb 13, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
gurukamath pushed a commit that referenced this pull request Feb 24, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
gurukamath pushed a commit that referenced this pull request Feb 24, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
github-actions Bot pushed a commit that referenced this pull request Feb 27, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Mar 3, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Mar 6, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Mar 10, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Mar 10, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Mar 13, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
felix314159 pushed a commit that referenced this pull request Mar 13, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Mar 17, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
fselmo added a commit to fselmo/execution-specs that referenced this pull request Mar 18, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
marioevz added a commit that referenced this pull request Mar 24, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
marioevz added a commit that referenced this pull request Apr 8, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
github-actions Bot pushed a commit that referenced this pull request Apr 10, 2026
* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Apr 20, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
Carsons-Eels pushed a commit to Carsons-Eels/execution-specs that referenced this pull request Apr 27, 2026
)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
marioevz added a commit that referenced this pull request May 13, 2026
…2844)

* feat(spec-specs): Add transfer log for all `CALL*` and `SELFDESTRUCT`

fix(spec-specs): correct CR issues, fix formatting

fix(spec-specs): inline `execute_code()` to `process_message()`

chore(spec-specs): backport changes

fix(spec-specs): trim out whitespace in topic hash to match tests

feat(spec-specs): add selfdestruct event topic and logging function

feat(spec-specs): selfdestruct to self emits selfdestruct event

feat(spec-specs): define call success constant

feat(spec-specs): emit selfdestruct finalization log for remaining balance

* fix(spec-specs): emit account closure logs in lexicographical order

* feat(test-tests): add eip-7708 eth transfer log tests

test(test-tests): add selfdestruct topic and use empty account

test(test-tests): add nested calls log ordering test

feat(test-tests): add selfdestruct finalization test

fix(test-tests): use spaces in event signature to match spec

* fix(spec-specs): Refactor topic strings to match EIP

* fix(spec-tests): formatting fixes so static checks pass

* fix(spec-specs): Move account closure log emission before priority fee charges (#2059)

* fix(spec-specs): Move account closure log emission before priority fee charges

* fix(spec-specs): formatting and spelling tweaks

* fix(spec-specs): remove duplicate WriteInStaticContext check

* refactor(spec-specs): align memory expansion with other opcodes

* fix(testing/test): Fix unit test expectation

* refactor(spec-specs): move post-mining coinbase balance calculation

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>

* feat(test-specs): add extra eip-7708 test coverage (#2062)

* feat(test-specs): add/refactor tests, add mainnet marked, checklist, coverage check

* feat(test-specs): add fork transition test for selfdestruct logs

* fix: tests

* chore(test-specs): fix fork transition tests

* test(test-specs): add code deposit oog test case

---------

Co-authored-by: carsons-eels <carson@ethereum.org>
Co-authored-by: Mario Vega <marioevz@gmail.com>

* feat(spec,test): EIP-7708 spec updates for self as target (#2086)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR #2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR #2086

* Update test to use dynamic addresses

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>

* feat(test): extend EIP-7708 tests from cases in tracker (#1875) (#2106)

- Add CREATE2 support via with_all_create_opcodes marker
- Add tests for SELFDESTRUCT to coinbase - revealed a change needed since
  the last update was made to the EIP that should be included in the
  currect refspec (miner fees paid before finalization LOG2).

* fix(test): Use new ``pre_alloc_mutable`` marker for eip7708 test (#2199)

* fix(test): Update test to account for recent Initcode updates

* 🧹 chore: Remove duplicate test (#2210)

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>

* ♻️ refactor(tests): Rename EIP 7708 selfdestruct log to burn (#2211)

* ♻️ refactor: Rename selfdestruct log to burn

* 🥢 nit:

* chore(tests): fix stale selfdestruct references and rename to burn

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>

* fix(specs): Merge issues

* fix(tests): Merge issues

* refactor(test-forks): Add EIP-7708

* refactor(tests): Condition EIP-7708 tests to EIP inclusion

* feat(tests): EIP-7708 - finalization burn log ordering + coinbase fee no-log (#2717)

* feat(tests): EIP-7708 - multi-account finalization burn log ordering

Adds a dedicated test that proves finalization burn logs are emitted
in lexicographical address order when multiple accounts are marked for
deletion in the same transaction.

Parametrized over N in {2, 5}. N accounts are created and
SELFDESTRUCT'd in the same tx, then funded via payer contracts called
in REVERSE sorted address order with distinct nonzero amounts. Each
destroyed account ends with a unique nonzero balance at finalization,
so ordering by address vs. by call order is always distinguishable.

Addresses issue #2691.

* feat(tests): EIP-7708 - coinbase priority fee must not emit transfer log

Adds a dedicated test proving the coinbase priority fee payment does
not produce a Transfer log.

A contract CALLs the coinbase address with nonzero value while the tx
pays a nonzero priority fee to that same coinbase. Only the
CALL-with-value must produce a Transfer log; the priority fee credit
happens outside the EVM as a protocol-level balance change.

An implementation that hooks every balance addition (instead of only
CALL / SELFDESTRUCT / tx-level value transfers) would emit an extra
Transfer log for the fee and fail the exact-log assertion.

Addresses issue #2692.

* feat(tests): add single account multi transfer test

* fix(tests): minor nit

---------

Co-authored-by: marioevz <marioevz@gmail.com>

* fix(tests): rename GAS_CODE_DEPOSIT_PER_BYTE to CODE_DEPOSIT_PER_BYTE

Align EIP-7708 selfdestruct finalization test with the gas constant
rename on forks/amsterdam.

* fix(tests): EIP-7708 + 8037 cross-EIP fixes

* feat(tests): Add EIP-7708 checks to 6780 tests (#2743)

* feat(tests): Add EIP-7708 checks to 6780 tests

* fix: add another call and properly accumulate so that burn logs are validated

* fix(tests): Review fixes

---------

Co-authored-by: carsons-eels <carson@ethereum.org>

* feat(tests): cover EIP-7708 CREATE log rollback on outer revert (#2785)

* feat(tests): cover EIP-7708 CREATE log rollback on outer revert

Mirror `test_inner_call_succeeds_outer_reverts_no_log` for the bal-devnet-5 update that brings CREATE/CREATE2 under EIP-7708. A factory CREATEs a child with value (the deployment succeeds and a `factory -> created` log is emitted in the child frame) and then REVERTs; the receipt must record no logs because the outer revert discards the factory's frame along with every log it produced.

* feat(tests): Review comments

---------

Co-authored-by: marioevz <marioevz@gmail.com>

* fix(specs-spec, tests): CR comment fixes

* Apply suggestion from @marioevz

---------

Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
Co-authored-by: felipe <fselmo2@gmail.com>
Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: raxhvl <10168946+raxhvl@users.noreply.github.com>
Co-authored-by: danceratopz <danceratopz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-feat Category: an improvement or new feature C-test Category: test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Small update to 7708 EIP requires minor spec update

3 participants