-
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
Add EIP: Revert creation in case of non-empty storage #8161
Add EIP: Revert creation in case of non-empty storage #8161
Conversation
✅ All reviewers have approved. |
5e641ed
to
bdfd33b
Compare
The commit bdfd33b (as a parent of d7343e9) contains errors. |
--- | ||
eip: 7610 | ||
title: Revert creation in case of non-empty storage | ||
description: Revert contract creation if address already has the non-empty storage |
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.
Avoid restating the title in the description. Maybe include why this is important to do.
|
||
## Backwards Compatibility | ||
|
||
This is an execution layer upgrade, and so it requires a hard fork. |
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.
Does this actually require a hard fork?
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.
https://eips.ethereum.org/EIPS/eip-684 uses the same terminology.
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.
Given we are "retroactively activating" this from genesis, it may be worth being a bit more specific here @rjl493456442
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: Sam Wilson <[email protected]>
@SamWilsn @abcoathup can we merge this retroactive eip? |
|
||
If a contract creation is attempted due to a creation transaction, the `CREATE` opcode, the `CREATE2` opcode, or any other reason, and the destination address already has either a nonzero nonce, a nonzero code length, or non-empty storage, then the creation MUST throw as if the first byte in the init code were an invalid opcode. This change MUST apply retroactively for all existing blocks. | ||
|
||
This EIP amends [EIP-684](./eip-684.md) with one extra condition, requiring empty storage for contract deployment. |
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.
could you explain or write pesudo code of how this check will be done? storageRoot
? and how it will be addressed in verkle (i am guessing this check only applies on the merkle structure, but EIP should address the scenario)
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 assume you are rite or I don't understand
Could we please get the draft of this merged and address the comments in another PR, given we've already "included" this? TY! |
@timbeiko Sgtm! |
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.
lgtm for draft status
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.
All Reviewers Have Approved; Performing Automatic Merge...
This EIPs introduce another restriction for contract deployment that the destination must have empty storage; otherwise the contract deployment must be rejected.