Читать книгу Cryptocurrency All-in-One For Dummies - Peter Kent, Kiana Danial - Страница 104
Consensus: The Driving Force of Blockchains
ОглавлениеBlockchains are powerful tools because they create honest systems that self-correct without the need of a third party to enforce the rules. They accomplish the enforcement of rules through their consensus algorithm.
In the blockchain world, consensus is the process of developing an agreement among a group of commonly mistrusting shareholders. These are the full nodes on the network. The full nodes are validating transactions that are entered into the network to be recorded as part of the ledger.
Figure 1-2 shows the concept of how blockchains come to agreement.
FIGURE 1-2: How blockchains work.
Each blockchain has its own algorithms for creating agreement within its network on the entries being added. There are many different models for creating consensus because each blockchain is creating different kinds of entries. Some blockchains are trading value, others are storing data, and others are securing systems and contracts.
Bitcoin, for example, is trading the value of its token between members on its network. The tokens have a market value, so the requirements related to performance, scalability, consistency, threat model, and failure model will be higher. Bitcoin operates under the assumption that a malicious attacker may want to corrupt the history of trades in order to steal tokens. Bitcoin prevents this from happening by using a consensus model called “proof of work” that solves the Byzantine general’s problem (which we discuss further in Book 6, Chapter 1): “How do you know that the information you are looking at has not been changed internally or externally?” Because changing or manipulating data is almost always possible, the reliability of data is a big problem for computer science.
Most blockchains operate under the premise that they will be attacked by outside forces or by users of the system. The expected threat and the degree of trust that the network has in the nodes that operate the blockchain will determine the type of consensus algorithm that they use to settle their ledger. For example, Bitcoin and Ethereum expect a very high degree of threat and use a strong consensus algorithm called proof of work. There is no trust in the network.
On the other end of the spectrum, blockchains that are used to record financial transactions between known parties can use a lighter and faster consensus. Their need for high-speed transactions is more important. Proof of work is too slow and costly for them to operate because of the comparatively few participants within the network and the immediate finality needed for each transaction. They also do not need a token or cryptocurrency to incentivize transaction processing. So, they eliminate these components from their system, which enables them to run faster and cheaper than PoW systems. You can learn more about PoW and PoS algorithms in Book 6, Chapter 2.