Limited proving support: Due to receipt data being linearly hashed as part of the receipts_root Merkle-Patricia Trie (MPT), it is not possible to efficiently proof individual parts of receipts, such as logs. Requiring the full receipt data to be present can be prohibitive for smart contract based applications such as L2 fraud proofs or client applications verifying log data.
Unnecessary statefulness:EIP-658 replaced the intermediate post-state root from receipts with a boolean status code. However, cumulativeGasUsed and logIndex are similarly stateful, unnecessarily complicating efforts to execute transactions in parallel. Further, gasUsed verification requires computation from cumulativeGasUsed across multiple receipts.
Incomplete data: JSON-RPC provides from, gasUsed, and contractAddress fields for receipts, but the on-chain receipt does not contain the required information to verify them.
Inefficient logs bloom: The logs bloom mechanism is inefficient due to its high false positive rate. It does not find enough practical use to warrant its high storage requirement, and should be removed.
This EIP defines a universal receipt format based on SSZ to address these concerns.
Specification
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119 and RFC 8174.
Existing definitions
Definitions from existing specifications that are used throughout this document are replicated here for reference.
For transactions with an authorization list, the list of EIP-7702authority addresses. Non-successful authorizations are represented with an all-zero address
The logs_bloom and intermediate state root (Homestead scheme) are not present in SSZ receipts.
Transaction receipt objects in the context of the JSON-RPC API are extended to include:
authorities: Array of DATA|null - Array of DATA entries each containing 20 Bytes, corresponding to the receipt’s authorities field
Within logs, the logIndex field is changed to indicate the log index position in the individual receipt, rather than in the entire block.
The logsBloom field is no longer returned for new receipts. It continues to be returned for historical receipts conforming to earlier schemes.
from, gasUsed, and contractAddress are already provided via JSON-RPC and are left unchanged.
Consensus ExecutionPayload changes
When building a consensus ExecutionPayload, the receipts_root is now based on the Receipt type, changing the type of receipts_root from an MPT Hash32 to an SSZ Root.
All receipts share the same Merkle tree shape with a stable generalized index (gindex) assigned to each field. Future transaction features can introduce additional receipt fields or drop existing fields without breaking verifiers.
Verifier improvements
Committing to from, contract_address and authorities in the receipt allows efficient verification without the expensive ecrecover mechanism. This allows future EIPs to change how these addresses are computed without breaking verifiers, e.g., when future signature schemes are introduced.
Execution client improvements
Execution Layer implementations no longer need access to the transaction and additional indices when serving receipts based on SSZ.
Backwards Compatibility
Applications that rely on the replaced MPT receipts_root in the block header require migration to the SSZ receipts_root.
Applications using verified cumulativeGasUsed values have to compute the value from prior receipts.
Applications relying on the logsBloom will have to swap to an out-of-protocol mechanism for filtering logs, or fall back to processing the complete set of receipts. As the logsBloom mechanism was prohibitively inefficient for light clients, its removal is unlikely to have a significant impact.
Applications relying on the per block logIndex now have to compute this data, as logIndex now refers to an index per receipt.
RLP and SSZ receipts may clash when encoded. It is essential to use only a single format within one channel. When requesting receipts by hash over the network, the block header corresponding to the containing receipts root can be consulted to identify the underlying fork.