CBFT consensus mechanism

Source: Internet
Author: User
Tags commit hash prepare
Introduction

CBFT (Concurrent Byzantine Fault tolerance) parallel Byzantine fault-tolerant algorithm, which is a new consensus algorithm developed from the Byzantine fault-tolerant algorithm.
The CBFT algorithm has four phases: block determination, pre-prepare, prepare, and commit, and the latter three phases are similar to the three phases of the PBFT algorithm. One of the important advantages of CBFT is concurrency, where each block can vote and block in parallel with other blocks, thus greatly increasing the consensus speed. Another important feature of CBFT is the ability to detect corrupted nodes during the commit phase, and to broadcast messages at the final stage to identify traitor nodes. The steps include: Confirmation and voting of the transaction level, building block, block validation, block confirmation. CBFT consensus algorithm. JPG transaction level confirmation and voting

All nodes hash the received transaction, get a transaction hash set, send the transaction hash set to all the rest of the nodes, each node to the received transaction hash set 2/3 and operation, obtain the transaction intersection of more than 2/3 nodes corresponding transaction hash set; for copy Ni, Suppose Si is a set of transactions in its capture. Ni Broadcast Hi = {hash (t) | t∈s}, and to other replicas sign (HI,NI). This phase also selects a primary copy of the NP; building Blocks

The block node gets the set of transactions based on the transaction hash set, submits the blocks to the rest of the nodes, and for each received message (Hi,sign (Hi,ni)), the primary replica NP first uses sign (HI,NI) and Ni's public key to check for Hi consistency. Then, NP computes ∩in = 1Hi. Transactions in the intersection are added to block B. Then, NP broadcasts B and sign (B,NP) to the other replicas. Validating a block

The node receiving the block is validated by comparing its own trade hash set with the transaction set in the block, and the verification results are digitally signed to all the remaining nodes at the end of the validation, and at this stage each copy first uses the public key of sign (B,NP) and Np to check the consistency of B, each of which votes B. Causes vote (B,ni) to indicate that a copy of Ni's vote for B (vote (B,ni) is a consent or rejection). NI then broadcasts VBI = (vote (B,ni), sign (vote (B,NI), Ni) to the other copies. Block voting

The second round of balloting will be forwarded to all nodes received by the vote of the block, so that each node receives a vote of all the nodes, the poll is counted to get the final result, thus deciding whether to accept the block, each copy has received all other copies of the vote. However, a malicious copy can send different votes to different replicas. Therefore, at this stage, each copy of NJ first uses sign (vote (B,ni)) and Ni's public key to check for vote (B,ni) consistency. Then, NJ broadcasts SVJ = {VB0,VB1,...,VBN} and sign (SVJ,NJ) to all other replicas. Block Confirmation

For each copy of NI, it receives SV0,SV1,...,SVN. For 0≤j≤n, it first uses the public key of sign (SVJ,NJ) and Nj to check for SVJ consistency. Then, calculate the number of consents for B. If the number of consents exceeds 2n/3,ni reply agree to the caller. Note that if VBK in SVJ differs from SVL, the j≠l,nk is a malicious copy.



Author: vdes
Links: Https://www.jianshu.com/p/ff99453fd9a7
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.