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.
NameTypeDescriptionField Number
BlockBlockRequested Block1

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

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 block3
status_requestStatusRequestRequest the highest and lowest block numbers from a peer4
status_responseStatusResponseResponse with the highest and lowest block numbers the store5