EIP-6810 Ex post facto cascading revert

No call decision · EVM & execution · EIP status Stagnant · created 2023-04-01

A proposal to introduce a new transaction type (0x5a) that cancels a finalized transaction after the fact, cascading the revert to that transaction and every subsequent transaction that depends on it.

Why it is needed

On Ethereum today, once a transaction is included in a block and finalized, there is no way to undo it. A transaction sent to the wrong address by mistake, signed under a scam, or with unforeseen side effects stays in place once finalized. This proposal introduces a new transaction type that can undo such mistakes after the fact, rolling state back to the point of a specific past transaction and cascading the invalidation to every subsequent transaction affected by it. The source text describes this capability as putting 'an end to all regret.'

What changes

Today

After EIP-6810

Who is affected

In depth

New transaction type and payload

A new EIP-2718 transaction type 0x5a is introduced. The TransactionPayload is rlp([chainId, nonce, revertNonce, budget, signatureYParity, signatureR, signatureS]), and the signature is a secp256k1 signature over keccak256(0x5a || rlp([chainId, nonce, revertNonce, budget])). The ReceiptPayload takes the form rlp([status, budgetUsed, removedLogsBloom, [newReceiptPayloads]]), where newReceiptPayloads is an array containing the updated receipts, in order, for every reverted transaction.

Only one allowed per block

A 0x5a transaction must be the only transaction in its block and must fill the entire block. The Rationale section explains that this constraint exists to prevent MEV attacks.

Revert operation and budget handling

The budget value is initialized to this transaction's fee, and the fees of the reverted transactions are refunded from this budget. If the budget is insufficient, the Ex Post Facto Cascading Revert transaction itself fails and the entire budget is paid to the block header's COINBASE. If it succeeds, after all transactions are reverted the remaining budget is paid to COINBASE. The Rationale section explains that fees must be refunded from this budget rather than from previous block rewards in order to preserve the security of the consensus protocol.

State rollback and cascade scope

State is rolled back to the point before the transaction specified by revertNonce began. An empty access list is created, and the ether balances, contract code, account nonces, and storage keys modified by the reverted transaction are added to it. Every subsequent transaction that reads or uses that state must also be reverted, and this process propagates all the way up to the current block.

Asymmetry in revert cost

The Rationale section explains that the cost of a revert can vary enormously even for the same kind of operation. It notes that reverting a token transfer sent to the wrong address is comparatively cheap, but reverting every deposit that flowed into a custodial exchange could be prohibitively expensive. Because of the budget structure, the sender bears the full cost of this network burden.

Sync burden and unfinished review items

The text states that because large-scale state changes must be handled, slow clients need to use snap sync to obtain the new state. Meanwhile, the Backwards Compatibility, Reference Implementation, and Security Considerations sections are each handled briefly with no concrete content, which itself shows in the source text that compatibility review, implementation, and security verification have not substantively been done.

Creation date and current status

This EIP was created on April 1, 2023 (created: 2023-04-01), and its current status is Stagnant. The Test Cases, Reference Implementation, and Security Considerations sections remain unspecified, and the proposal has made no further progress.

Original EIP · ← EIPs