EIP-86 Transaction origination and signature abstraction (Abstraction of transaction origin and signature)

No call decision · Account abstraction · EIP status Stagnant · created 2017-02-10

EIP-86 is an early account abstraction proposal that lets account contracts define transaction signature and nonce verification themselves instead of fixing them in the protocol. It also introduces the CREATE2 opcode.

Why it is needed

In Ethereum today, transaction signature verification and nonce incrementing are fixed in the protocol to ECDSA and sequential nonces, so users who want a different signature scheme must emulate it entirely at the contract layer, and gas fees still have to be paid by an externally owned account (EOA). Multisig wallets are complicated because each participant must submit a transaction, and ETH has to be funded separately into each participant's account. Withdrawing coins from a ring signature mixer also requires separate ETH to pay gas, and the source of that ETH risks breaking privacy. EIP-86 addresses these problems by letting the account contract itself handle signature and nonce verification logic and pay its own gas fees.

What changes

Today

After EIP-86

Who is affected

In depth

NULL_SENDER and unsigned special transactions

After METROPOLIS_FORK_BLKNUM, a transaction whose signature values are r=s=0, v=CHAIN_ID is treated as valid, with its sender address set to NULL_SENDER (2^160-1). Such transactions must have gasprice=0, nonce=0, value=0, and the NULL_SENDER account's nonce does not increase. This 'entry point' address acts as a channel through which anyone can send a transaction without a signature, and the actual signature and nonce verification, as well as fee payment, are determined not by the protocol but by the code of the called account contract.

CREATE2 opcode(0xfb)

A new opcode, CREATE2, is added at 0xfb, taking four stack arguments: value, salt, mem_start, mem_size. The created address is computed as sha3(sender + salt + sha3(init code)) % 2^160, with salt always treated as a 32-byte value. Whereas the existing CREATE determines the address from the sender address and nonce, making it impossible to know in advance, CREATE2 determines the address from the salt and the init code hash, so you can compute the address in advance and send funds to it even before the contract is deployed.

Rules to prevent collisions on created addresses

A common rule is added to all contract-creation operations, whether via transaction or opcode. If the target address already has code or a nonzero nonce, creation fails and returns 0, as if the init code had run out of gas. Conversely, if the address's code and nonce are both empty and it only holds a balance, creation can still succeed normally. This rule allows funds to be sent in advance to an address that has not yet been deployed, while still allowing the intended contract to be created normally at that address later.

Forwarding contract structure

The Serpent example in the Rationale section shows what an account contract might look like. The contract reads the signature (sig_v, sig_r, sig_s), nonce, to, value, gasprice, and data from the calldata and computes the hash to be signed, including startgas. It checks the order against the stored nonce, verifies that the balance can cover value and gasprice*startgas, and then verifies the signature with ecrecover. If it passes, it increments the nonce, sends the fee to MINER_CONTRACT, executes the actual call to the specified to address, and gets back the remaining gas as a refund.

Use cases

The Rationale section lists four use cases. Multisig wallets have room to bundle participants' signatures into a single transaction and have the contract pay the fee directly. Ring signature mixers can pay the fee directly from the coins being withdrawn, without needing to arrange separate gas money, reducing privacy risk. Users can choose cryptographic schemes other than ECDSA, such as ed25519 or Lamport hash ladder signatures. Policies unrelated to cryptography, such as transactions with expiration times or k-parallelizable nonces, can also be applied on a per-account basis.

Miner acceptance strategy

Since unsigned special transactions offer no guaranteed fee to miners, the document notes that miners need to design their acceptance strategy carefully. One approach is to relay and mine only transactions that pass checks confirming the to address's code matches a known standard account pattern (such as the compiled Serpent code in the example), and that the signature, gasprice, state nonce, and balance all satisfy the required conditions. A looser approach is to allow any code matching the same format as long as the gas cost of checking is bounded and fee payment is guaranteed, with one suggested method being to include transactions requiring at most 250,000 gas based solely on whether the miner's balance increased before and after execution.

Current status

This EIP's status is Stagnant and the METROPOLIS_FORK_BLKNUM value is left as TBD, so the document itself does not settle whether it will be included in a fork or when it would activate. No separate decision on this proposal is found in the call records either.

Original EIP · ← EIPs