Skip to main content

Block Sync

Channel

Block sync has one channel.
NameNumber
BlocksyncChannel64

Message Types

There are multiple message types for Block Sync

BlockRequest

BlockRequest asks a peer for a block at the height specified.
NameTypeDescriptionField Number
Heightint64Height of requested block1

NoBlockResponse

NoBlockResponse notifies the peer requesting a block that the node does not contain it.
NameTypeDescriptionField Number
Heightint64Height of requested block1

BlockResponse

BlockResponse contains the block requested. It also contains an extended commit iff vote extensions are enabled at the block’s height.
NameTypeDescriptionField Number
BlockBlockRequested Block1
ExtCommitExtendedCommitSender’s LastCommit information2

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.
NameTypeDescriptionField Number
Heightint64Current Height of a node1
Baseint64First known block, if pruning is enabled it will be higher than 12

Message

Message is a oneof protobuf type. The oneof consists of five messages.
NameTypeDescriptionField Number
block_requestBlockRequestRequest a block from a peer1
no_block_responseNoBlockResponseResponse saying it doe snot have the requested block2
block_responseBlockResponseResponse with requested block + (optionally) vote extensions3
status_requestStatusRequestRequest the highest and lowest block numbers from a peer4
status_responseStatusResponseResponse with the highest and lowest block numbers the store5