about consensus

Issuing time:2018-08-28 00:00

In the block chain, the most frequently used noun is “consensus” except “encryption”.  We needn’t to explain “encryption” any more.  The lost of files almost name the block chain economy as “encryption digital economy”, which indicates the importance of the encryption technique in the block chain.  If cryptography is like a skeleton supporting the running of the block chain, consensus is the nerve system connecting each independent node of the network. Not mentioned with block chain, as for the consensus itself, this noun has a kind of technique meaning, meanwhile has a kind of philosophical or methodological meaning.

Simply speaking, “consensus” is the common understanding.  In a stand-alone system, it needn’t the consensus, just like one person making the decision.  But in a distributed system and PPN (peer-to-peer network) system, the role of the consensus is vitally important.  At this moment, the cognitive commonality to the rule and data by each individual constitutes an entirety of the logical roles.  Taking bit coin for instance, each bit coin node is responsible for synchronous data, verification data and storage data.  People will not be subject to the single node, but will treat bit coin by the whole network constituted by most of the nodes in the network. The each individual obeys the same specific protocol rule, in order to march towards to the same target.

To the distributed system, like most of the applications, such as Taobao, Wechat, Meituan etc., they reply on a large number of servers cooperating together to accomplish the single tasks.  The server functions will be divided to different roles. Some of them are responsible of the requests from users, some of them are responsible of breaking down and distributing the complaints to other servers, some of them are responsible of the handling of the commodities orders, some of them are responsible of the payment and settlement, and some of them are responsible of the passing coordination messages between the servers.  At this moment, the consensus mechanism is extremely important.  Every single servers with different roles are just like different workers in an assembly line, who need a control plan and rule to keep the same steps. However in order to prevent the single point failure, the same role is more than one server.  For instance, the server responsible for the storage might be 10. But the system will not wait for all the 10 servers to enter all the reports before telling the users that the operation is complete.  Instead, the users will be informed that the operation is complete only after 2 servers enter the report, and the remaining 8 servers will be synchronized through the consensus mechanism. In fact, in this condition, it’s relatively easy to synchronize the data, because the servers are almost maintained in the computer room with a fixed quantity, good directory management, stable network and good judgment of data writing and status. As for the public chain running in the internet asynchronous network environment, the process of consensus is more complicated.

We don’t know how many nodes in the network, and very hard to judge whether the data of one node has been accomplished, even there are no servers or the roles of coordinator.  The public chain is a PPN (peer-to-peer network). One single task will be not divided and distributed to several parts, while each node does the same thing. Under such circumstance, nodes can’t be assumed to communicate normally between each other, so they can’t rely on the correspondence between nodes to coordinate and synchronize.  Instead, they must fulfill their duties and follow the agreed rule to receive data or verification data or saved data. In this process, in case any node breaks the protocol, the other nodes can’t detect actively, but this node will be excluded from the main network.

This character of public chain network requires the selection of consensus mechanism has to have a certain independence.  For instance, bit coin uses the POW (proof of work) mechanism. Everybody agrees on a difficulty as the accuracy, which needn’t consult with other nodes since it can execute the judgment and verification independently. Besides the POW, the proof of equitymechanism is available too.  Some one may ask, why the consensus used by us is just like Raft or PBFT such kind mechanism in some league chain.  It seems that these mechanisms don’t reply on nodes itself to finish the validation, but need the following roles such as vote, validation and witness to accomplish it. Because for league chain, its scenario is similar to the distributed system as above, where the nodes are relatively clear, and the block production nodes in the league chain are basically in a good network environment.

The consensus in block chain, it is not so selective.  Sometimes in order to integrate the characters of different consensus mechanisms, they are mixed to be used, such as POW and proof of equity are mixed o be used. The only thing to be noticed is the difference between the public and league chain network and the traditional distributed system.  

Share to:
Community
Contact us
Address:152 BEACH ROAD #14-02 GATEWAY EAST SINGAPORE (189721)
E-mail:wise_cc@outlook.com
Company's E-mail:market@wdc852.com
Developer Resources