Blockchain across Oracle
上QQ阅读APP看书,第一时间看更新

Importance of the consensus protocol

One of the main mechanisms that make a blockchain secure is the consensus protocol. In Chapter 4, Blockchain 101 - Blocks, Chains, and Consensus, I explained the four commonly-used consensus protocols. The choice of protocol can determine whether it is best to use a public blockchain for your application. Public blockchains use protocols where all nodes participate in reaching consensus. If you want to be sure that transactions are verified by more than a few nodes, and you don't mind paying these nodes for doing the work, then a public blockchain may be an option for an enterprise blockchain. Usually, public blockchains aren't a good choice for an enterprise blockchain because they are designed to take time, maybe two or five or even 10 minutes before consensus is reached. In addition, transactions are not considered fully verified for about three to six blocks, until the block (including your transaction) has settled deeply enough into the main chain. The delay is both a significant obstacle if your application must deliver near real-time data to the end user and a noteworthy vulnerability when initially, a transaction seems to be verified but is lost later when it is not part of the main chain (that is, part of an orphaned chain or the shortest fork).

In contrast, in a private blockchain, operators can choose the consensus method that they want to use when setting up the blockchain. For example, when using Hyperledger Fabric, as a network starter, you can choose between a few different protocols. You can select the one that suits your cause best and, even better, they are pluggable, which means that you are not stuck with just one. Operators of the blockchain can also choose to deny certain nodes from participating in the consensus. Nodes that do participate are responsible for communicating verified transactions to the rest of the network. The responsibility for determining when and from whom the network can be expanded is a decision made by the same blockchain system operator(s).