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

EXTCLEAR opcode for SELFDESTRUCT #2936

Merged
merged 12 commits into from
Sep 4, 2020
Merged

Conversation

wjmelements
Copy link
Contributor

@wjmelements wjmelements commented Sep 4, 2020

This introduces the EXTCLEAR opcode which reduces the complexity of SELFDESTRUCT.

@wjmelements
Copy link
Contributor Author

Replaces #2751

@wjmelements
Copy link
Contributor Author

Please redirect non-pull-request discussion to this thread.

Copy link
Contributor

@MicahZoltu MicahZoltu left a 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.

EIPS/eip-2936.md Outdated Show resolved Hide resolved
EIPS/eip-2936.md Outdated Show resolved Hide resolved
EIPS/eip-2936.md Outdated Show resolved Hide resolved
EIPS/eip-2936.md Outdated Show resolved Hide resolved
EIPS/eip-2936.md Show resolved Hide resolved
wjmelements and others added 2 commits September 3, 2020 23:03
Co-authored-by: Micah Zoltu <[email protected]>
Co-authored-by: Micah Zoltu <[email protected]>
EIPS/eip-2936.md Outdated Show resolved Hide resolved
wjmelements and others added 2 commits September 3, 2020 23:22
* 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.
Copy link
Contributor Author

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.

Copy link
Contributor

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.

EIPS/eip-2936.md Outdated Show resolved Hide resolved
@MicahZoltu MicahZoltu merged commit 04fa75f into ethereum:master Sep 4, 2020
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
This introduces the `EXTCLEAR` opcode which reduces the complexity of `SELFDESTRUCT`.
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
This introduces the `EXTCLEAR` opcode which reduces the complexity of `SELFDESTRUCT`.
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.

3 participants