通道
区块同步有一个通道。| 名称 | 编号 |
|---|---|
| BlocksyncChannel | 64 |
消息类型
Block Sync 有多种消息类型。BlockRequest
BlockRequest 用于向对等节点请求指定高度的区块。| 名称 | 类型 | 说明 | 字段编号 |
|---|---|---|---|
| Height | int64 | 所请求区块的高度 | 1 |
NoBlockResponse
NoBlockResponse 用于通知请求区块的对等节点,当前节点不包含该区块。| 名称 | 类型 | 说明 | 字段编号 |
|---|---|---|---|
| Height | int64 | 所请求区块的高度 | 1 |
BlockResponse
BlockResponse 包含所请求的区块。 如果该区块高度启用了投票扩展,它还会包含扩展提交。| 名称 | 类型 | 说明 | 字段编号 |
|---|---|---|---|
| Block | Block | 所请求的区块 | 1 |
| ExtCommit | ExtendedCommit | 发送方的 LastCommit 信息 | 2 |
StatusRequest
StatusRequest 是一条空消息,用于通知对等节点返回其已存储的最高和最低区块。空消息。
StatusResponse
StatusResponse 会向对等节点返回其区块存储中任意区块的最高和最低高度。| 名称 | 类型 | 说明 | 字段编号 |
|---|---|---|---|
| Height | int64 | 节点当前高度 | 1 |
| Base | int64 | 已知的第一个区块;如果启用了裁剪,该值会大于 1 | 2 |
Message
Message 是一种oneof protobuf 类型。该 oneof 由五种消息组成。
| 名称 | 类型 | 说明 | 字段编号 |
|---|---|---|---|
| block_request | BlockRequest | 向对等节点请求一个区块 | 1 |
| no_block_response | NoBlockResponse | 响应表示其没有所请求的区块 | 2 |
| block_response | BlockResponse | 返回所请求的区块,并可选包含投票扩展 | 3 |
| status_request | StatusRequest | 向对等节点请求最高和最低区块号 | 4 |
| status_response | StatusResponse | 返回存储中的最高和最低区块号 | 5 |
Channel
Block sync has one channel.| Name | Number |
|---|---|
| BlocksyncChannel | 64 |
Message Types
There are multiple message types for Block SyncBlockRequest
BlockRequest asks a peer for a block at the height specified.| Name | Type | Description | Field Number |
|---|---|---|---|
| Height | int64 | Height of requested block | 1 |
NoBlockResponse
NoBlockResponse notifies the peer requesting a block that the node does not contain it.| Name | Type | Description | Field Number |
|---|---|---|---|
| Height | int64 | Height of requested block | 1 |
BlockResponse
BlockResponse contains the block requested. It also contains an extended commit iff vote extensions are enabled at the block’s height.| Name | Type | Description | Field Number |
|---|---|---|---|
| Block | Block | Requested Block | 1 |
| ExtCommit | ExtendedCommit | Sender’s LastCommit information | 2 |
StatusRequest
StatusRequest is an empty message that notifies the peer to respond with the highest and lowest blocks it has stored.Empty message.
StatusResponse
StatusResponse responds to a peer with the highest and lowest heights of any block it has in its blockstore.| Name | Type | Description | Field Number |
|---|---|---|---|
| Height | int64 | Current Height of a node | 1 |
| Base | int64 | First known block, if pruning is enabled it will be higher than 1 | 2 |
Message
Message is aoneof protobuf type. The oneof consists of five messages.
| Name | Type | Description | Field Number |
|---|---|---|---|
| block_request | BlockRequest | Request a block from a peer | 1 |
| no_block_response | NoBlockResponse | Response saying it doe snot have the requested block | 2 |
| block_response | BlockResponse | Response with requested block + (optionally) vote extensions | 3 |
| status_request | StatusRequest | Request the highest and lowest block numbers from a peer | 4 |
| status_response | StatusResponse | Response with the highest and lowest block numbers the store | 5 |