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: Deactivate EIP-158 #8712

Closed
wants to merge 11 commits into from
Closed

Conversation

gballet
Copy link
Member

@gballet gballet commented Jul 2, 2024

No description provided.

@gballet gballet requested a review from eth-bot as a code owner July 2, 2024 19:26
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Jul 2, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Jul 2, 2024

File EIPS/eip-7733.md

Requires 1 more reviewers from @axic, @g11tech, @gcolvin, @lightclient, @SamWilsn

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jul 2, 2024
@eth-bot eth-bot changed the title eip-158 deactivation eip Add EIP: EIP 158 deactivation Jul 2, 2024
@eth-bot eth-bot changed the title Add EIP: EIP 158 deactivation Add EIP: EIP-158 deactivation Jul 2, 2024
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jul 2, 2024
EIPS/eip-template.md Outdated Show resolved Hide resolved
EIPS/eip-template.md Outdated Show resolved Hide resolved
EIPS/eip-template.md Outdated Show resolved Hide resolved
gballet and others added 2 commits July 3, 2024 08:45
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
@eth-bot eth-bot changed the title Add EIP: EIP-158 deactivation Add EIP: Deactivate EIP-158 Jul 3, 2024
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jul 3, 2024
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Copy link

github-actions bot commented Jul 3, 2024

The commit 3f365e8 (as a parent of 45e5d19) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jul 3, 2024
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jul 3, 2024
Copy link
Member

@jochem-brouwer jochem-brouwer left a 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.
Copy link
Member

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.

EIPS/eip-7733.md Outdated Show resolved Hide resolved
@jochem-brouwer
Copy link
Member

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

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

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 Show resolved Hide resolved
EIPS/eip-7733.md Outdated
|----|-----|
|`FORK_TIME`|TBD|

At `block.timestamp > FORK_TIME`, EIP-158 rules no longer apply.
Copy link
Contributor

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

EIPS/eip-7733.md Outdated Show resolved Hide resolved
Copy link
Contributor

@petertdavies petertdavies left a 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).
Copy link
Contributor

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

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 CREATEd 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.

Copy link
Member Author

@gballet gballet Jul 4, 2024

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.

EIPS/eip-7733.md Outdated Show resolved Hide resolved
gballet and others added 2 commits July 4, 2024 16:04
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>
@gballet
Copy link
Member Author

gballet commented Jul 4, 2024

This EIP is so vague that it is not entirely clear to me what you propose to change.

the change is the deactivation of eip 158/161... How could I possibly make it any clearer in your view?

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.

That is a much more complex fix than simply deactivating eip 158, and it would effectively be the same thing. there was a push to make the nonce 1 when calling a 7702 contract, this is no longer true.

@SamWilsn
Copy link
Contributor

SamWilsn commented Jul 9, 2024

Since this hasn't made it into the repository, I'm just going to close this PR instead of merging it as Withdrawn.

@SamWilsn SamWilsn closed this Jul 9, 2024
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.

7 participants