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

reference EIP-2470 (create2 deployer) #4344

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

drortirosh
Copy link
Contributor

@vbuterin ,
this PR adds the create2 deployer refernce to the EIP
the code is updated in eth-infinitism/account-abstraction#14
(can't PR to the EIP-4337 itself, since it is not public,

@eth-bot
Copy link
Collaborator

eth-bot commented Oct 3, 2021

All tests passed; auto-merging...

@@ -303,7 +303,8 @@ The paymaster scheme allows a contract to passively pay on users' behalf under a

It is an important design goal of this proposal to replicate the key property of EOAs that users do not need to perform some custom action or rely on an existing user to create their wallet; they can simply generate an address locally and immediately start accepting funds.

This is accomplished by having the entry point itself create wallets using CREATE2. The `UserOperation` struct has an `initCode` field; this field would be empty for all operations by a given wallet after the first, but the first operation would fill in the `initCode`. The entry point creates the wallet, and then performs the operation. The user can compute the address of their wallet by locally running the [EIP 1014](https://eips.ethereum.org/EIPS/eip-1014) CREATE2 address formula. The salt used is the `nonce` of the `UserOperation`.
This is accomplished by having the entry point itself create wallets using CREATE2. The `UserOperation` struct has an `initCode` field; this field would be empty for all operations by a given wallet after the first, but the first operation would fill in the `initCode`. The entry point uses [EIP-2470](https://eips.ethereum.org/EIPS/eip-2470) deployer contract to create the wallet, and then performs the operation. The user can compute the address of their wallet by locally running the [EIP 1014](https://eips.ethereum.org/EIPS/eip-1014) CREATE2 address formula. The salt used is the `nonce` of the `UserOperation`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This is accomplished by having the entry point itself create wallets using CREATE2. The `UserOperation` struct has an `initCode` field; this field would be empty for all operations by a given wallet after the first, but the first operation would fill in the `initCode`. The entry point uses [EIP-2470](https://eips.ethereum.org/EIPS/eip-2470) deployer contract to create the wallet, and then performs the operation. The user can compute the address of their wallet by locally running the [EIP 1014](https://eips.ethereum.org/EIPS/eip-1014) CREATE2 address formula. The salt used is the `nonce` of the `UserOperation`.
This is accomplished by having the entrypoint itself create wallets using CREATE2. The `UserOperation` struct has an `initCode` field; this field would be empty for all operations by a given wallet after the first, but the first operation would fill in the `initCode`. The entry point uses [EIP-2470](./eip-2470.md) deployer contract to create the wallet, and then performs the operation. The user can compute the address of their wallet by locally running the [EIP 1014](./eip-1014.md) `CREATE2` address formula. The salt used is the `nonce` of the `UserOperation`.

@MicahZoltu
Copy link
Contributor

eip-4337.md: trailing whitespace

  • internal image ../assets/eip-4337/image1.png does not exist (line 279)
  • internal image ../assets/eip-4337/image2.png does not exist (line 293)
  • linking to internal hash #Reputation-scoring-and-throttlingbanning-for-paymasters that does not exist (line 299)
    reputation, throttling and banning section
  • linking to internal hash #Simulation that does not exist (line 281)
    Simulation section below

@timelinefunds
Copy link

timelinefunds commented Oct 4, 2021 via email

@vbuterin vbuterin merged commit c82b769 into ethereum:vbuterin-patch-1 Oct 4, 2021
@MicahZoltu
Copy link
Contributor

@vbuterin This shouldn't have been merged. It wasn't passing CI, which is why it didn't auto-merge. This can cause CI to fail for every PR from now on until someone goes and fixes the failing CI issues.

@MicahZoltu
Copy link
Contributor

Though, I suppose this hasn't been passing CI since it was created, not because of this PR specifically. Someone really should fix this EIP so it passes CI ASAP.

@MicahZoltu
Copy link
Contributor

Ah, my bad. This PR was against your branch, which hasn't been merged to master yet! Everything is fine, please ignore my previous comments. 😬

MicahZoltu added a commit that referenced this pull request Oct 8, 2021
* Account Abstraction via Entry Point Contract specification

An account abstraction proposal which completely avoids the need for consensus-layer protocol changes, instead relying on a separate mempool of `UserOperation` objects and miners either running custom code or connecting to a bundle marketplace.

* Rename file to match ERC number

* Update eip-4337.md

* Apply suggestions from code review

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>

* Replaced simple summary with abstract

* Apply suggestions from code review

* Changing to relative links for images

* Update EIPS/eip-4337.md

* Added mandatory sections

* reference EIP-2470 (create2 deployer) (#4344)

* Made EIP links relative

* Update EIPS/eip-4337.md

Co-authored-by: Micah Zoltu <micah@zoltu.net>

* Update EIPS/eip-4337.md

Co-authored-by: Micah Zoltu <micah@zoltu.net>

* Update EIPS/eip-4337.md

* Update EIPS/eip-4337.md

* Update EIPS/eip-4337.md

* add images for eip-4337

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: Dror Tirosh <dror@opengsn.org>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
PhABC pushed a commit to PhABC/EIPs that referenced this pull request Jan 25, 2022
…reum#4337)

* Account Abstraction via Entry Point Contract specification

An account abstraction proposal which completely avoids the need for consensus-layer protocol changes, instead relying on a separate mempool of `UserOperation` objects and miners either running custom code or connecting to a bundle marketplace.

* Rename file to match ERC number

* Update eip-4337.md

* Apply suggestions from code review

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>

* Replaced simple summary with abstract

* Apply suggestions from code review

* Changing to relative links for images

* Update EIPS/eip-4337.md

* Added mandatory sections

* reference EIP-2470 (create2 deployer) (ethereum#4344)

* Made EIP links relative

* Update EIPS/eip-4337.md

Co-authored-by: Micah Zoltu <micah@zoltu.net>

* Update EIPS/eip-4337.md

Co-authored-by: Micah Zoltu <micah@zoltu.net>

* Update EIPS/eip-4337.md

* Update EIPS/eip-4337.md

* Update EIPS/eip-4337.md

* add images for eip-4337

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: Dror Tirosh <dror@opengsn.org>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
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.

5 participants