AlertSourceDiscuss
Skip to content

EIP-6466: SSZ Receipts Root

Migration of receipts MPT commitment to SSZ

⚠️ DraftCore

Draft Notice

This EIP is in the process of being drafted. The content of this EIP is not final and can change at any time; this EIP is not yet suitable for use in production. Thank you!

AuthorsEtan Kissling (@etan-status), Vitalik Buterin (@vbuterin)
Created2023-02-08

Abstract

This EIP defines a migration process of existing Merkle-Patricia Trie (MPT) commitments for receipts to Simple Serialize (SSZ)

Motivation

EIP-6404 introduces the more modern SSZ format to the transactions_root of the consensus ExecutionPayloadHeader and the execution block header. This EIP defines the equivalent transition for receipts_root to add support for EIP-6493 Receipt.

Note that in contrast to the transactions_root which refers to a Merkle Patricia Trie (MPT) root in execution but to an SSZ root in consensus, the receipts_root is already consistent and refers to the same MPT root. With this EIP, it will be changed to consistently refer to the same SSZ root.

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.

Consensus ExecutionPayload changes

When building a consensus ExecutionPayload, the receipts_root is now based on the Receipt SSZ container. EIP-6493 defines how RLP receipts can be converted to SSZ.

This changes the type of receipts_root from an MPT Hash32 to an SSZ Root.

python
class ExecutionPayload(Container):
    ...
    receipts_root: Root
    ...

To compute the receipts_root, the list of individual Receipt containers is represented as an SSZ List.

NameValue
MAX_TRANSACTIONS_PER_PAYLOADuint64(2**20) (= 1,048,576)
python
receipts = List[Receipt, MAX_TRANSACTIONS_PER_PAYLOAD](
    receipt_0, receipt_1, receipt_2, ...)

payload.receipts_root = receipts.hash_tree_root()

Consensus ExecutionPayloadHeader changes

The consensus ExecutionPayloadHeader is updated to match the new ExecutionPayload.receipts_root definition.

python
class ExecutionPayloadHeader(Container):
    ...
    receipts_root: Root
    ...
python
payload_header.receipts_root = payload.receipts_root

Execution block header changes

The execution block header's receipts-root is updated to match the consensus ExecutionPayloadHeader.receipts_root.

Rationale

This change enables the use of SSZ transactions as defined in EIP-6493.

Backwards Compatibility

Applications that rely on the replaced MPT receipts_root in the block header require migration to the SSZ receipts_root.

Test Cases

TBD

Reference Implementation

TBD

Security Considerations

None

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Etan Kissling, Vitalik Buterin, "EIP-6466: SSZ Receipts Root[DRAFT]," Ethereum Improvement Proposals, no. 6466, 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6466.