- Blockchain Quick Reference
- Brenn Hill Samanyu Chopra Paul Valencourt
- 346字
- 2021-08-13 15:55:09
Achieving Consensus
The concept of consensus is straightforward: consensus is when the network agrees on what information stored in the network is true and should be kept, and what is not true and should not be kept. For Bitcoin, achieving consensus is a simple matter of coming to agreement on the set to send and receive of Bitcoin across the network. For other networks, achieving consensus would also involve coming to an agreement on the final state of smart contracts, medical records, or any other network information stored on the blockchain.
Consensus algorithms have been the subject of research for decades. The consensus algorithms for distributed systems have to be resilient to multiple types of failures and issues, such as corrupt messages, parts of a network connecting and disconnecting, delays, and so on. In financial systems, and especially in blockchains, there is a risk of selfish and malicious actors in the system seeking profit. For each algorithm in a blockchain network, achieving consensus ensures that all nodes in the network agree upon a consistent global state of the blockchain. Any distributed consensus protocol has three critical properties:
- Safety: The ability of all the nodes on a distributed network to guarantee that they have the same state or consistency
- Liveness/Availability: The protocol is guaranteed to succeed and have the different nodes produce a final result
- Fault tolerance: The ability of the protocol to deal with nodes producing faulty or hostile results
As it happens, a famous paper by Fischer, Lynch, and Paterson stated that it's impossible for all three to be true in the same asynchronous distributed system. Hence, any and all blockchain designs must make trade-offs between these properties. These trade-offs are typically between safety and liveness, as fault tolerance is generally seen as a must-have for a globally distributed network.
In blockchain systems, there are currently four primary methods of achieving consensus. They are as follows:
- Practical Byzantine fault tolerance algorithm
- PoW algorithms
- PoS algorithms
- Delegated PoS algorithms (DPoS)
These approaches will each be covered in turn in this chapter.