主页EIPs
EIPsEIP-6466
EIP-6466

SSZ Receipts Root

Migration of receipts MPT commitment to SSZ
ReviewStandards Track: Core
创建时间: 2023-02-08
关联 EIP: EIP-6404, EIP-6493
Etan Kissling (@etan-status), Vitalik Buterin (@vbuterin)
社区讨论原文链接编辑
1 分钟了解
欢迎补充好内容
去提交
相关视频
欢迎补充好内容
去提交
正文

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.

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)
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.

class ExecutionPayloadHeader(Container): ... receipts_root: Root ...
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.

Security Considerations

None

Copyright and related rights waived via CC0.

扩展阅读
欢迎补充好内容
去提交
相关项目
欢迎补充好内容
去提交

不想错过最新的 EIP 动态?

订阅 EIPs Fun 周刊以跟进相关更新,建⽴你与 EIP 之间的连接 ,更好地建设以太坊。

详情
支持以太坊贡献者,推动生态建设
资源
GitHub
支持社区