Cosmos Tech
ELI5: Tendermint Consensus
Explore Tendermint Consensus: the core of Cosmos Appchains, offering BFT, low fees, instant finality, and scalability. Learn how it powers diverse applications.
LeThang
Lead Researcher
Date
April 17, 2023
Explore Tendermint Consensus: the core of Cosmos Appchains, offering BFT, low fees, instant finality, and scalability. Learn how it powers diverse applications.
Every Cosmos Appchains uses Tendermint consensus, which is currently maintained by @informalinc as @CometBFT.
But what makes TendermintBFT special? Here's an ELI5 of Tendermint consensus.
1. The problem
Imagine a blockchain as a database server that only stores a single number. Whenever a user sends a number to it, it will update the value after the majority of the node come to an agreement (Read: Consensus).
In a single-node system, this is easily achieved.
In a decentralized world with multiple validators:
How do they come to consensus?
What happens if one node record a wrong number?
That's the problem Tendermint solved: the Byzantine-Fault Tolerant (BFT) distributed consensus.
2. How Tendermint works
A node can be in 1 of 2 states:
Proposer:
Propose a new block (batch of transactions).
is chosen at the beginning of every epoch based on the stake amount and can't be selected twice in a row.
Validator.
How Tendermint works:
Proposer proposes a block, say a new value = 1.
Validators will send their vote to other nodes (read: Pre-vote).
Once 2/3 of the votes are received by a node, the node will send that result to other nodes (read: Pre-commit).
Nodes wait for pre-commits from 2/3 of all validators to decide whether to update the value to 1 or reject that block.
As long as > 2/3 of the validators are honest → The system is safe 🛡️
3. Tendermint features
Low fees
Instant finality
Loose synchrony
Scalability with Appchain Thesis
Blocktimes ~6s. @Injective_ reduce it to 1.1s while @SeiNetwork make it 0.6s
Battle-tested & high TPS (During Terra/UST collapse, it still worked perfectly)
4. Tendermint compatibility
Since Tendermint is a generic consensus protocol, any programming languages and applications (read: state machine) can run on top of Tendermint.
5. Who built on top of Tendermint?
Cosmos Appchains: 50+ on mainnet.
Ethereum Dapps: dYdX
Ethereum Layer 2 (Fork of Tendermint): Polygon
Trusted by exchange: OKX chain, Crypto.com chain, Binance Beacon Chain
and more!
6. Modification of Tendermint Consensus
@EvmosOrg built Ethermint = Tendermint + EVM-compatible.
@PolymerDAO is building zkMint, a ZK-friendly Tendermint consensus engine.
@anoma's Typhon consensus solves block proposal bottleneck & increases transactions computation speed by parallelization.