Consensus protocols

Table of Contents

A consensus protocol is the protocol for validators to agree on one chain of blocks. In particular, the consensus protocol defines,

  • who is allowed to add a new block to the blockchain,

  • how validators choose the chain to which they add a new block and

  • when a block and all included transactions are final, i.e., irrevocably deemed part of the blockchain.

Consensus protocol in Klayr

In the Klayr SDK, the different aspects of the consensus protocol are handled by different sub-protocols as outlined in the table below.

Domain Protocol Responsible for

Block proposal

Klayr PoS or Klayr PoA

  • Choosing validators: Deciding who can be a validator, i.e. who is allowed to add new blocks to the blockchain. Also called "block generator selection algorithm", or "consensus algorithm".

Agreement on one chain

Klayr BFT

  • Fork choice rule: Determining how validators choose the chain to which they add a new block.

  • Block finalization: Determining when a block (and all included transactions) is irrevocably deemed part of the blockchain.

Certificates

Klayr Certificates

  • Certificate generation: Certificates are generated for finalized blocks. Certificates are crucial for submitting cross-chain updates to other blockchains as they attest outgoing cross-chain messages and changes of validators.