Professional Documents
Culture Documents
Mastering Blockchain: Chapter 5, Consensus Algorithms
Mastering Blockchain: Chapter 5, Consensus Algorithms
Mastering Blockchain
Third Edition
• Classification
• Types of algorithm
• Choosing an algorithm
Consensus problem 3
• The problem has been studied extensively in distributed systems research since the late
1970s
• This resulted in a rapid evolution of blockchain technology, and more research in novel
methods of consensus has been ongoing
The famous Byzantine generals problem was formulated by Lamport et al. in their paper:
Lamport, L., Shostak, R. and Pease, M., 1982. The Byzantine Generals Problem. ACM
Transactions on Programming Languages and Systems, 4(3), pp.382-401.
Attack?
Attack ?
Retreat ?
Retreat ?
Attack?
Fault tolerance 5
• Upper bounds
• Passive
Designing and analyzing consensus mechanisms requires a model that can be used to study
and explore system properties, and make designs more logical.
• Processes
• Timing assumptions
• Synchrony
• Asynchrony
• Partial synchrony
Classification 8
Since the invention of Bitcoin, which introduced lottery-based consensus algorithms, there are
two main types of consensus:
• Traditional
• This category includes Paxos, BFT algorithms
• Lottery-based
• This category includes modern Proof of Work (PoW) algorithms
Consensus correctness properties 9
• Safety
• Agreement
• Validity
• Integrity
• Liveness
• Termination
Algorithms 10
• CFT
• Paxos
• Raft
• BFT
• PBFT
• IBFT
• Tendermint
• HotStuff
Here, a stake calculator function is used to calculate the amount of staked funds and, based
on that, select a new proposer:
PoS mechanism
Choosing an algorithm 20
• Finality
• Speed
• Performance
• Scalability
21
Exercise
• Proof of Work.
• Proof of Stake.