返回介绍

Warp Sync (par)

发布于 2023-06-28 21:14:12 字数 1908 浏览 0 评论 0 收藏 0

Warp Sync is an extension to the Ethereum Wire protocol, which involves sending snapshots over the network to get the full state at a given block extremely quickly, and then filling in the blocks between the genesis and the snapshot in the background.

Warp Sync is a subprotocol built on the DevP2P networking layer, with 3-byte identifier par.

Documentation on the snapshot and manifest format can be found here.

Wire messages

The warp protocol inherits all packets from version 63 of the eth wire protocol, as well as amending the status packet (0x01) and adding a few new ones:

Status [0x00, ..., snapshot_hash: B_32, snapshot_number: P] In addition to all the fields in eth protocol version 63’s status (denoted by ...), include snapshot_hash and snapshot_number which signify the snapshot manifest RLP hash and block number respectively of the peer’s local snapshot.

GetSnapshotManifest [0x11] Request a snapshot manifest in RLP form from a peer.

SnapshotManifest [0x12, manifest or nothing] Respond to a GetSnapshotManifest message with either an empty RLP list or a 1-item RLP list containing a snapshot manifest

GetSnapshotData [0x13, chunk_hash: B_32] Request a chunk (identified by the given hash) from a peer.

SnapshotData [0x14, chunk_data or nothing] Respond to a GetSnapshotData message with either an empty RLP list or a 1-item RLP list containing the raw chunk data requested.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文