Skip to main content

Consensus

Channel

Consensus has four separate channels. The channel identifiers are listed below.
NameNumber
StateChannel32
DataChannel33
VoteChannel34
VoteSetBitsChannel35

Message Types

Proposal

Proposal is sent when a new block is proposed. It is a suggestion of what the next block in the blockchain should be.
NameTypeDescriptionField Number
proposalProposalProposed Block to come to consensus on1

Vote

Vote is sent to vote for some block (or to inform others that a process does not vote in the current round). Vote contains validator’s information (validator address and index), height and round for which the vote is sent, vote type, blockID if process vote for some block (nil otherwise) and a timestamp when the vote is sent. The message is signed by the validator private key.
NameTypeDescriptionField Number
voteVoteVote for a proposed Block1

BlockPart

BlockPart is sent when gossiping a piece of the proposed block. It contains height, round and the block part.
NameTypeDescriptionField Number
heightint64Height of corresponding block.1
roundint32Round of voting to finalize the block.2
partPartA part of the block.3

NewRoundStep

NewRoundStep is sent for every step transition during the core consensus algorithm execution. It is used in the gossip part of the CometBFT consensus protocol to inform peers about a current height/round/step a process is in.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
stepuint323
seconds_since_start_timeint644
last_commit_roundint325

NewValidBlock

NewValidBlock is sent when a validator observes a valid block B in some round r, i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. It contains height and round in which valid block is observed, block parts header that describes the valid block and is used to obtain all block parts, and a bit array of the block parts a process currently has, so its peers can know what parts it is missing so they can send them. In case the block is also committed, then IsCommit flag is set to true.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
block_part_set_headerPartSetHeader3
block_partsint324
is_commitbool5

ProposalPOL

ProposalPOL is sent when a previous block is re-proposed. It is used to inform peers in what round the process learned for this block (ProposalPOLRound), and what prevotes for the re-proposed block the process has.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
proposal_pol_roundint322
proposal_polbitarray3

ReceivedVote

ReceivedVote is sent to indicate that a particular vote has been received. It contains height, round, vote type and the index of the validator that is the originator of the corresponding vote.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
typeSignedMessageType3
indexint324

VoteSetMaj23

VoteSetMaj23 is sent to indicate that a process has seen +2/3 votes for some BlockID. It contains height, round, vote type and the BlockID.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
typeSignedMessageType3

VoteSetBits

VoteSetBits is sent to communicate the bit-array of votes a process has seen for a given BlockID. It contains height, round, vote type, BlockID and a bit array of the votes a process has.
NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
typeSignedMessageType3
block_idBlockID4
votesBitArrayRound of voting to finalize the block.5

Message

Message is a oneof protobuf type.
NameTypeDescriptionField Number
new_round_stepNewRoundStepHeight of corresponding block1
new_valid_blockNewValidBlockRound of voting to finalize the block.2
proposalProposal3
proposal_polProposalPOL4
block_partBlockPart5
voteVote6
received_voteReceivedVote7
vote_set_maj23VoteSetMaj238
vote_set_bitsVoteSetBits9