-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: Deactivate EIP-158 #8712
Conversation
File
|
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
The commit 3f365e8 (as a parent of 45e5d19) contains errors. |
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.
Two points.
Big support in general, I had some concerns about 158 with 7702, especially with the EOA account being empty but having state (and thus by 158 getting deleted)
|
||
## Motivation | ||
|
||
After [EIP-6780](./eip-6780.md), the `SELFDESTRUCT` instruction was neutered, so that contracts could no longer be deleted. Contract deletions can still occur, however, via EIP-158. While [EIP-7702](./eip-7702.md) this can not happen, this latter EIP introduces the possibility for an empty EoA to have state. This is causing some issues when interfacing with verkle, for which state deletion is not possible. |
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 7702 sentence does not read very well, I understand what you mean though.
BTW, I think you mean EIP-161 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-607.md |
--- | ||
eip: 7733 | ||
title: Deactivate EIP-158 | ||
description: Deactivates EIP-158 in order to avoid conflicts in a context in which statelessness and EIP-7702 are active |
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'd recommend removing EIP-7702 from the description. Reading 7702 is not a requirement to understand this proposal; it's more a motivating use case.
|
||
## Abstract | ||
|
||
Deactivate [EIP-158](./eip-158.md). |
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.
You should expand a little bit on your abstract. This certainly satisfies the terse requirement, but doesn't give the reader any information about the content of this document. Would you mind adding a sentence explaining, at a high level, what deactivating EIP-158 entails?
EIPS/eip-7733.md
Outdated
|----|-----| | ||
|`FORK_TIME`|TBD| | ||
|
||
At `block.timestamp > FORK_TIME`, EIP-158 rules no longer apply. |
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 wording here is a bit ambiguous. Are you trying to undo this rule as well:
Zero-value calls and zero-value suicides no longer consume the 25000 account creation gas cost in any circumstance
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.
This EIP is so vague that it is not entirely clear to me what you propose to change.
It seems to have been written to attempt to deal with an unfortunate edgecase that arises from one reading of EIP-7702. You should probably fixing EIP-7702 to handle this edgecase better instead.
|
||
## Abstract | ||
|
||
Deactivate [EIP-158](./eip-158.md). |
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.
EIP-158 was never adopted, instead it was replaced by EIP-161.
(IIRC geth never changed their variable names after the switch, which may have caused the confusion)
EIPS/eip-7733.md
Outdated
|----|-----| | ||
|`FORK_TIME`|TBD| | ||
|
||
At `block.timestamp > FORK_TIME`, EIP-158 rules no longer apply. |
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.
At
block.timestamp > FORK_TIME
, EIP-158 rules no longer apply.
EIP-161 is 8 years old. Its behaviour has been assumed by EIP authors and implementers. You really ought to explicitly spell out what you actually want to do, rather than make some vague comments about deactivating it. I'm also fairly confident that you meant something different than what you wrote implies.
EIP-161 (see previous comment) has 4 effects:
a. When an account is CREATE
d the nonce is incremented.
b. The new account gas cost is not charged if the account wouldn't be created because of rule c.
c. If an account would come into existence in an empty state, it remains non-existent.
d. Under certain triggering conditions, empty accounts that are marked for deletion and deleted at the the end of the transaction.
As it stands, rules a, b and c are uncontroversial. Rule d is now a nullity because all empty accounts have been deleted and it is impossible to create new ones.
Your motivation for writing this EIP seems related to the edgecase that occurs if EIP-7702 code setting is used with an EOA that doesn't exist. EIP-7702 does not explain what happens in this case, which is a significant deficiency. If this edgecase results in the creation of empty accounts, it is a serious DOS vulnerability because an account can be created for only 2500 gas (other methods require at least 21000).
Personally I am opposed to a version of EIP-7702 that creates empty accounts. If it is decided that EIP-7702 should create empty accounts, then we can then discuss changing the rules about them. Until then this EIP doesn't change the spec in a meaningful way.
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.
Personally I am opposed to a version of EIP-7702 that creates empty accounts.
the only thing that would prevent that would be to increase the nonce of the target account, which has received a lot of negative feedback since it apparently makes it much more difficult for AA to work properly.
yes, that is what I just heard in ACDE, in which case this EIP is moot. I'm going to move it to withdrawn.
As it stands, rules a, b and c are uncontroversial.
Rule d is now a nullity because all empty accounts have been deleted and it is impossible to create new ones.
that is no longer the case once 7702 is rolled out. this is the one that I want to deprecate, in fact.
(...) it is a serious DOS vulnerability because an account can be created for only 2500 gas (other methods require at least 21000).
this is only possible to trigger if you send a 7702 tx to an empty nonce, and drain its funds. You would have to pay the tx costs and there is no DOS vector.
Personally I am opposed to a version of EIP-7702 that creates empty accounts. If it is decided that EIP-7702 should create empty accounts, then we can then discuss changing the rules about them. Until then this EIP doesn't change the spec in a meaningful way.
The problem is that the only way to fix this would be to increase the nonce of the called contract, which I'm told is wreaking havoc with AA. It's also a problem if an alternate method for the verkle transition is chosen.
Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com> Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
the change is the deactivation of eip 158/161... How could I possibly make it any clearer in your view?
|
Since this hasn't made it into the repository, I'm just going to close this PR instead of merging it as Withdrawn. |
No description provided.