Update EIP-8130: Add delegated account creation#11751
Draft
chunter-cb wants to merge 1 commit into
Draft
Conversation
Extends the create entry so an account can be created as an EIP-7702 delegation in addition to placed bytecode, without a new entry type: - The create body is a bytecode account (existing CREATE2 derivation) or a delegated account when `code` is exactly a 23-byte delegation indicator (`0xef0100 || target`). Detection is on the full `0xef0100` prefix and 23-byte length, keeping it disjoint from EOF and from bytecode (which MUST NOT begin with `0xef`, per EIP-3541). - Delegated accounts derive their address per EIP-7819 (`keccak256(0xef0100 || ACCOUNT_CONFIG_ADDRESS || keccak256(user_salt || target || owners_commitment))[12:]`), a 55-byte pre-image disjoint from CREATE2's 85-byte pre-image. `target` and `owners_commitment` are bound into the salt to prevent front-running. - On create, the delegation indicator is written, the nonce is bumped 0->1 (EIP-7819 step 9), and the implicit EOA owner slot is set to REVOKED_VERIFIER since a 7819-derived address has no controlling key. - Delegation-update authorization now depends on the implicit EOA slot: EOA owner when present (portable to EIP-7702), or any CONFIG-scoped owner when the slot is REVOKED_VERIFIER (keyless delegated accounts). - Gas: delegated accounts charge 25,000 (EIP-7819 EMPTY_ACCOUNT_COST) rather than the 32,000 + per-byte bytecode deposit. - Single rationale paragraph under "Why Delegation via Account Changes?" covers the unified create model and EOA symmetry. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
|
✅ All reviewers have approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JUST A DRAFT FOR DISCUSSION
Summary
Extends the EIP-8130 create entry so a new account can be created as an EIP-7702 delegation in addition to placed bytecode — without adding a new account-changes entry type.
codeis exactly a 23-byte delegation indicator (0xef0100 || target). Detection keys on the full0xef0100prefix and 23-byte length, keeping it disjoint from EOF and from bytecode (which MUST NOT begin with0xef, per EIP-3541).targetandowners_commitmentare bound into the salt to prevent front-running.0 -> 1(EIP-7819 step 9), and the implicit EOA owner slot is set toREVOKED_VERIFIER(a 7819-derived address has no controlling key).REVOKED_VERIFIER(keyless delegated accounts).25,000(EIP-7819EMPTY_ACCOUNT_COST) instead of the bytecode32,000 +per-byte deposit.This account type is controlled by the 8130 Account Configuration Contract, and the 8130 transaction path can upgrade its delegation via the top-level delegation entry.
Notes
requires:), consistent with how EIP-8130 references other proposals.master; independent of the open owner-policies PR (both touch the Create entry, so whichever merges second will reconcile that overlap).