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

SELFDESTRUCT must reset contract account #3067

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Dec 1, 2024

What does it do?

Adds a test to ensure that when a contract is created with CREATE2 and Self Destructed in the same transaction, it can be created again.

The behaviour of SELFDESTRUCT was changed in Cancun hard-fork, where it will recover all funds to the target but not delete the account, except when called in the same transaction as creation.

References:
https://eips.ethereum.org/EIPS/eip-6780

TODO:

@RomarQ RomarQ added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. breaking Needs to be mentioned in breaking changes labels Dec 1, 2024
@RomarQ RomarQ self-assigned this Dec 1, 2024
Copy link
Contributor

github-actions bot commented Dec 1, 2024

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2248 KB (no changes) ✅

Moonbeam runtime: 2228 KB (no changes) ✅

Moonriver runtime: 2224 KB (no changes) ✅

Compared to latest release (runtime-3300)

Moonbase runtime: 2248 KB (+220 KB compared to latest release) ⚠️

Moonbeam runtime: 2228 KB (+232 KB compared to latest release) ⚠️

Moonriver runtime: 2224 KB (+232 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Dec 1, 2024

Coverage Report

@@                   Coverage Diff                   @@
##           master   rq/fix-selfdestruct      +/-   ##
=======================================================
+ Coverage   74.70%                74.73%   +0.03%     
  Files         369                   369              
- Lines       94308                 94258      -50     
=======================================================
- Hits        70445                 70442       -3     
- Misses      23863                 23816      -47     
Files Changed Coverage
/node/cli/src/cli.rs 32.93% (+3.26%) 🔼
/node/cli/src/command.rs 16.90% (+0.04%) 🔼
/pallets/moonbeam-foreign-assets/build.rs 86.67% (+20.00%) 🔼

Coverage generated Sun Dec 1 22:02:42 UTC 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant