Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SELFDESTRUCT #487

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Fix SELFDESTRUCT #487

merged 2 commits into from
Aug 12, 2024

Conversation

Nashtare
Copy link
Collaborator

We were appending to the "newly create contract lists" any target of a CREATE or CREATE2, but the latter may be targeting existing accounts (especially accounts already having funds). This changes the behavior of EIP-6780, as it shouldn't wipe out the entire account but only remove the contract bytecode and drain funds, if a contract is being deployed and SELFDESTRUCT is called within the same transaction.

Added a test case that highlights this behavior:

@Nashtare Nashtare added the bug Something isn't working label Aug 12, 2024
@Nashtare Nashtare added this to the Testing and Validation milestone Aug 12, 2024
@Nashtare Nashtare self-assigned this Aug 12, 2024
@Nashtare Nashtare requested a review from muursh as a code owner August 12, 2024 16:44
@github-actions github-actions bot added crate: trace_decoder Anything related to the trace_decoder crate. crate: evm_arithmetization Anything related to the evm_arithmetization crate. labels Aug 12, 2024
@Nashtare
Copy link
Collaborator Author

Hmm actually this test block has some remaining issues for the consistency check with header root, probably due to the known regressions around REVERT, I'll remove it for the time being. This transaction is still testable against develop (fail) and this branch (success).
tx_92_inputs.json

@github-actions github-actions bot removed the crate: trace_decoder Anything related to the trace_decoder crate. label Aug 12, 2024
@Nashtare Nashtare merged commit 092d98b into develop Aug 12, 2024
15 checks passed
@Nashtare Nashtare deleted the fix-selfdestruct branch August 12, 2024 22:59
Nashtare added a commit that referenced this pull request Aug 13, 2024
This reverts commit 092d98b.
Nashtare added a commit that referenced this pull request Aug 14, 2024
atanmarko pushed a commit that referenced this pull request Aug 14, 2024
atanmarko pushed a commit that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants