EIPs Explained

EIP-86 · Stagnant · Core · 2017-02-10

EIP-86: Abstraction of transaction origin and signature

An early account-abstraction proposal that would let contracts check signatures and pay gas themselves, and that first described CREATE2; it is Stagnant and was never adopted as written.

What problem does it solve?

Ethereum hard-codes how an account is secured: a transaction must carry an ECDSA signature from a private key, use a sequential nonce, and be paid for by the signer in ETH. That rules out many useful designs. A multisig wallet cannot simply pay its own fees. A privacy mixer cannot pay gas from withdrawn funds without linking the user to a funded account. Nobody can switch to a different signature scheme.

EIP-86 was Vitalik Buterin's 2017 first step toward "abstracting out" signatures and nonces, with the long-term goal that every account is a contract that defines its own security rules.

How it works

The proposal had four parts:

  1. Null-sender transactions. A transaction whose signature is (v = CHAIN_ID, r = 0, s = 0) is valid with no real signer. Its sender is the special address NULL_SENDER = 2**160 - 1. It must have gasprice = 0, nonce = 0 and value = 0, and it does not bump any nonce.
  2. Account contracts. The user's "wallet" is a contract that receives this null-sender call. It reads a signature, nonce and target from calldata, checks them with any logic it likes, pays the miner out of its own balance, then forwards the call.
  3. A new CREATE2 opcode (0xfb) whose address is sha3(sender + salt + sha3(init_code)) % 2**160. This lets you know a contract's address before it is deployed, so funds can be sent to an account that does not exist on chain yet.
  4. No overwriting. Any contract creation fails if the target address already has code or a non-zero nonce.

Because miners would not be paid by the protocol, the spec also discussed how they could decide which such transactions are safe to include, for example by accepting only known wallet code patterns.

Sample code

The CREATE2 address rule from the proposal, in pseudocode:

def create2_address(sender: bytes20, salt: bytes32, init_code: bytes) -> bytes20:
    # EIP-86 form; the version that shipped (EIP-1014) adds a 0xff prefix
    return sha3(sender + salt + sha3(init_code))[12:]

The shape of a null-sender transaction:

nonce    = 0
gasprice = 0
value    = 0
to       = <account contract>
data     = [sig, nonce, to, value, gasprice, payload]   # checked by the contract
v, r, s  = CHAIN_ID, 0, 0                              # sender = 0xffff...ffff

Things to know

  • This proposal is Stagnant and was never adopted as written. The null-sender transaction type never reached mainnet.
  • Its CREATE2 idea did ship, in a revised form, as EIP-1014 in the Constantinople upgrade. The final formula uses keccak256(0xff ++ sender ++ salt ++ keccak256(init_code)).
  • Account abstraction was later attempted in protocol by EIP-2938 (Withdrawn). It reached users without a consensus change through ERC-4337, and EOAs can delegate to contract code with EIP-7702.
  • CHAIN_ID here is the same value introduced by EIP-155.

#account-abstraction #core #create2 #stagnant

Details

Authors
Vitalik Buterin (@vbuterin)
Status
Stagnant
Type
Standards Track / Core
Created
2017-02-10

Machine-readable: Markdown · JSON