-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
EXTCLEAR opcode for SELFDESTRUCT #2936
Conversation
Replaces #2751 |
Please redirect non-pull-request discussion to this thread. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting changes must be applied prior to merging as a draft, the feedback stuff on wording suggestions can be delayed (or debated) until sometime before last call if you prefer.
Co-authored-by: Micah Zoltu <[email protected]>
Co-authored-by: Micah Zoltu <[email protected]>
Co-authored-by: Micah Zoltu <[email protected]>
* otherwise, the destroyed contract's slot is reset to 0, charging the same gas as `EXTCODEHASH` and `SSTORE` when resetting storage, while also refunding the amount specified in `SSTORE`. | ||
|
||
`SELFDESTRUCT` is modified to not clear contract storage. | ||
This change also works retroactively: all prior destroyed contracts can be cleaned up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ambivalent on this detail. I wonder whether it would be easier for client implementors for the SELFDESTRUCT
change to apply retroactively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably discuss in the discussion-to link, but it seems like all self destructed contracts prior to this change would already have all state cleared so this statement is a no-op effectively.
Co-authored-by: Micah Zoltu <[email protected]>
This introduces the `EXTCLEAR` opcode which reduces the complexity of `SELFDESTRUCT`.
This introduces the `EXTCLEAR` opcode which reduces the complexity of `SELFDESTRUCT`.
This introduces the
EXTCLEAR
opcode which reduces the complexity ofSELFDESTRUCT
.