Consensus

Wire format of the messages exchanged by the consensus reactor. How a node acts on them is specified in the consensus protocol.

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 the validator's information (ProTxHash and index), height and round for which the vote is sent, vote type, blockID if process vote for some block (nil otherwise), the block signature and, on a non-nil precommit, the vote extensions. 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 Tenderdash protocol to inform peers about a current height/round/step a process is in. It is also sent to each peer when the peer connects and then periodically, at the peer-query-maj23-sleep-duration cadence, so that a peer whose copy was lost in transit learns the current step without waiting for the next transition. A receiver ignores a copy that does not advance the height, round or step it already holds for the sender.

NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
stepuint323
seconds_since_start_timeint644
last_commit_roundint325

NewValidBlock

NewValidBlock advertises a block-part download target: its height, round, part-set header, and the parts the node already holds. is_commit identifies a commit target. Consensus emits this event for a current-round polka or a verified commit even when the proposal or complete block is not held. It is a gossip announcement, not proof that the sender has processed a valid proposal. While the node holds block parts for its round, the periodic per-peer NewRoundStep described above is followed by a NewValidBlock for the same height and round. See valid-block bookkeeping and commit handling.

NameTypeDescriptionField Number
heightint64Height of corresponding block1
roundint32Round of voting to finalize the block.2
block_part_set_headerPartSetHeader3
block_partsBitArray4
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

HasVote

HasVote 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
typeSignedMsgType3
indexint324

Commit

Commit is sent on the VoteChannel to deliver a threshold-signed commit for a block.

NameTypeDescriptionField Number
commitCommitCommit for a decided block1

HasCommit

HasCommit is sent to indicate that a process holds the commit for a given height and round.

NameTypeDescriptionField Number
heightint64Height of the commit1
roundint32Round the commit belongs to2

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
typeSignedMsgType3
block_idBlockID4

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
typeSignedMsgType3
block_idBlockID4
votesBitArrayVotes the process has for the BlockID.5

ProposerHeartbeat

ProposerHeartbeat is sent on the StateChannel by the proposer of a round that waits for transactions, and relayed once by validators that verify it (CONSENSUS_VERSION_2; see Proposer liveness).

NameTypeDescriptionField Number
heartbeatProposerHeartbeatThe signed heartbeat.1

ProposerHeartbeat contents

tendermint.types.ProposerHeartbeat:

NameTypeDescriptionField Number
heightint64Height of the round.1
roundint32Round the sender proposes in.2
sequenceuint64Grows with every heartbeat of the round, counting from the signing time in milliseconds.3
proposer_pro_tx_hashbytesProTxHash of the proposer.4
timestampgoogle.protobuf.TimestampSigning time.5
signaturebytesSignature with the proposer's quorum key share (Signing).6

RoundSkipVote

RoundSkipVote is sent on the StateChannel by a validator that heard no heartbeat from the proposer of its waiting round for the silence timeout, and relayed by validators when they first count it and again on a later copy until the round is certified (CONSENSUS_VERSION_2; see Collecting votes).

NameTypeDescriptionField Number
voteRoundSkipVoteThe signed skip vote.1

RoundSkipVote contents

tendermint.types.RoundSkipVote:

NameTypeDescriptionField Number
heightint64Height of the round to skip.1
roundint32Round to skip.2
validator_pro_tx_hashbytesProTxHash of the voting validator.3
validator_indexint32Index of the voting validator in the validator set.4
signaturebytesSignature share over the round's skip sign bytes, the same for every validator.5

RoundSkipCertificate

RoundSkipCertificate is sent on the StateChannel by a node that recovered or received a valid certificate, and resent by gossip to peers at its height that have not sent one for that round or a later one (CONSENSUS_VERSION_2).

NameTypeDescriptionField Number
certificateRoundSkipCertificateThe round skip certificate.1

RoundSkipCertificate contents

tendermint.types.RoundSkipCertificate:

NameTypeDescriptionField Number
heightint64Height of the skipped round.1
roundint32Skipped round.2
quorum_hashbytesQuorum that signed.3
threshold_signaturebytesQuorum threshold signature recovered from the skip votes of +2/3 of the validator set (the mainnet default; the quorum type and VotingPowerThreshold can change it).4

Message

Message is a oneof protobuf type.

NameTypeDescriptionField Number
new_round_stepNewRoundStep1
new_valid_blockNewValidBlock2
proposalProposal3
proposal_polProposalPOL4
block_partBlockPart5
voteVote6
has_voteHasVote7
vote_set_maj23VoteSetMaj238
vote_set_bitsVoteSetBits9
commitCommit10
has_commitHasCommit11
proposer_heartbeatProposerHeartbeat12
round_skip_voteRoundSkipVote13
round_skip_certificateRoundSkipCertificate14