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

SET_INDESTRUCTIBLE opcode #2937

Merged
merged 8 commits into from Sep 10, 2020
Merged

SET_INDESTRUCTIBLE opcode #2937

merged 8 commits into from Sep 10, 2020

Conversation

vbuterin
Copy link
Contributor

@vbuterin vbuterin commented Sep 4, 2020

Add a SET_INDESTRUCTIBLE opcode that prevents the contract from calling SELFDESTRUCT.

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

Add a `SET_INDESTRUCTIBLE` opcode that prevents the contract from calling `SELFDESTRUCT`.
EIPS/eip-2937.md Outdated Show resolved Hide resolved
EIPS/eip-2937.md Outdated Show resolved Hide resolved
EIPS/eip-2937.md Show resolved Hide resolved
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.

Formatting stuff needs to be addressed before merge.

EIPS/eip-2937.md Outdated Show resolved Hide resolved
EIPS/eip-2937.md Outdated Show resolved Hide resolved
Comment on lines +30 to +32
This breaks forward compatibility with _some_ forms of state rent, which would simply delete contracts that get too old without paying some maintenance fee. However, this is not the case with all state size control schemes; for example this is not an issue if we use [ReGenesis](https://ledgerwatch.github.io/regenesis_plan.html).

If `SELFDESTRUCT` is ever removed in the future, this EIP would simply become a no-op.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not personally a fan of forward compatibility stuff in an EIP. This feels like something much more appropriate in the discussion-to link, or in the HF inclusion discussions. If you imagine reading this EIP 5 years in the future after it has been implemented, this section won't really provide any significant value to those readers.

@axic axic added the type: Core label Sep 6, 2020
vbuterin and others added 6 commits September 10, 2020 09:05
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
@MicahZoltu MicahZoltu merged commit 4d9b090 into master Sep 10, 2020
@MicahZoltu MicahZoltu deleted the vbuterin-patch-2 branch September 10, 2020 06:07
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
Add a `SET_INDESTRUCTIBLE (0xA8)` opcode that prevents the contract from calling `SELFDESTRUCT (0xFF)`.
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
Add a `SET_INDESTRUCTIBLE (0xA8)` opcode that prevents the contract from calling `SELFDESTRUCT (0xFF)`.
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.

None yet

4 participants