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

Add EIP: Revert creation in case of non-empty storage #8161

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Feb 2, 2024

This EIPs introduce another restriction for contract deployment that the destination must have empty storage; otherwise the contract deployment must be rejected.

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Feb 2, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Feb 2, 2024

✅ All reviewers have approved.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Feb 2, 2024
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

The commit bdfd33b (as a parent of d7343e9) contains errors.
Please inspect the Run Summary for details.

EIPS/eip-tbd.md Outdated Show resolved Hide resolved
---
eip: 7610
title: Revert creation in case of non-empty storage
description: Revert contract creation if address already has the non-empty storage
Copy link

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.
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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

EIPS/eip-7610.md Outdated Show resolved Hide resolved
EIPS/eip-7610.md Outdated Show resolved Hide resolved
rjl493456442 and others added 2 commits April 2, 2024 20:27
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: Sam Wilson <[email protected]>
@rjl493456442
Copy link
Member Author

@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.
Copy link
Contributor

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)

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

@timbeiko
Copy link
Contributor

timbeiko commented Apr 4, 2024

Could we please get the draft of this merged and address the comments in another PR, given we've already "included" this? TY!

@rjl493456442
Copy link
Member Author

@timbeiko Sgtm!

Copy link
Contributor

@g11tech g11tech left a 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

@eth-bot eth-bot enabled auto-merge (squash) April 8, 2024 17:21
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants