主页EIPs周刊
EIPsEIP-6873
EIP-6873

Preimage retention

Execution clients must retain the preimages of addresses and slots accessed between the fork preceding the verge, and the verge itself.
StagnantStandards Track: Core
创建时间: 2023-04-14
Guillaume Ballet (@gballet)
社区讨论原文链接编辑
1 分钟了解
欢迎补充好内容
去提交
相关视频
欢迎补充好内容
去提交
正文

Abstract

Enforce preimage collection by every node on the network from the fork preceding the verge, up to the fork. This is needed in case each node is responsible for their own conversion.

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.

Let T_p be the timestamp of the fork preceding the verge, and T_v the timestamp of the verge.

  • EL clients MUST save the preimage of each address and slot hashes they produce during the execution of all blocks produced between T_p and T_v

  • EL clients MAY start storing preimages outside of this time range as well

  • Given a hash produced between T_p and T_v, EL clients SHOULD be able to show they have the preimage for that hash in their database

  • EL clients SHOULD be able to download the preimages of the address and slot hashes that were produced before T_v from a publicly-available datastore

Rationale

Switching to verkle trees require a complete rehashing of all tree keys. Most execution clients store all keys hashed, without their preimages, which as the time of print take up 70GB on mainnet. In order to make these preimages available to everyone, the following course of action are available to each user:

  • Restart a full-sync with preimage retention enabled
  • Download the preimages as a file

The second option is the only acceptable option in practice, as a full-sync requires the syncing machine to be offline for several days, and therefore should not be simultaneously imposed to the entire network. A file download, however, poses a problem of data obsolecense as new preimages will immediately need to be added to the list as the chain progresses and new addresses are accessed. Updating the preimage file is not sufficient, since it takes more than a slot time to download over 70GB.

To guarantee a timely availability of all preimages around the verkle transition time, each node is therefore responsible for updating the list of preimages between the fork preceding the Verge, and the Verge itself.

Backwards Compatibility

No backward compatibility issues found.

Reference Implementation

All clients already implement preimage retention, at least as an option.

Security Considerations

Needs discussion.

Copyright and related rights waived via CC0.

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

不想错过最新的 EIP 动态?

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

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