You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
2.6 KiB

  1. ---
  2. order: 1
  3. parent:
  4. title: Consensus
  5. order: 6
  6. ---
  7. # Consensus
  8. Tendermint Consensus is a distributed protocol executed by validator processes to agree on
  9. the next block to be added to the Tendermint blockchain. The protocol proceeds in rounds, where
  10. each round is a try to reach agreement on the next block. A round starts by having a dedicated
  11. process (called proposer) suggesting to other processes what should be the next block with
  12. the `ProposalMessage`.
  13. The processes respond by voting for a block with `VoteMessage` (there are two kinds of vote
  14. messages, prevote and precommit votes). Note that a proposal message is just a suggestion what the
  15. next block should be; a validator might vote with a `VoteMessage` for a different block. If in some
  16. round, enough number of processes vote for the same block, then this block is committed and later
  17. added to the blockchain. `ProposalMessage` and `VoteMessage` are signed by the private key of the
  18. validator. The internals of the protocol and how it ensures safety and liveness properties are
  19. explained in a forthcoming document.
  20. For efficiency reasons, validators in Tendermint consensus protocol do not agree directly on the
  21. block as the block size is big, i.e., they don't embed the block inside `Proposal` and
  22. `VoteMessage`. Instead, they reach agreement on the `BlockID` (see `BlockID` definition in
  23. [Blockchain](https://github.com/tendermint/spec/blob/master/spec/core/data_structures.md#blockid) section)
  24. that uniquely identifies each block. The block itself is
  25. disseminated to validator processes using peer-to-peer gossiping protocol. It starts by having a
  26. proposer first splitting a block into a number of block parts, that are then gossiped between
  27. processes using `BlockPartMessage`.
  28. Validators in Tendermint communicate by peer-to-peer gossiping protocol. Each validator is connected
  29. only to a subset of processes called peers. By the gossiping protocol, a validator send to its peers
  30. all needed information (`ProposalMessage`, `VoteMessage` and `BlockPartMessage`) so they can
  31. reach agreement on some block, and also obtain the content of the chosen block (block parts). As
  32. part of the gossiping protocol, processes also send auxiliary messages that inform peers about the
  33. executed steps of the core consensus algorithm (`NewRoundStepMessage` and `NewValidBlockMessage`), and
  34. also messages that inform peers what votes the process has seen (`HasVoteMessage`,
  35. `VoteSetMaj23Message` and `VoteSetBitsMessage`). These messages are then used in the gossiping
  36. protocol to determine what messages a process should send to its peers.
  37. We now describe the content of each message exchanged during Tendermint consensus protocol.