CN114820183A - Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm - Google Patents

Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm Download PDF

Info

Publication number
CN114820183A
CN114820183A CN202111049565.5A CN202111049565A CN114820183A CN 114820183 A CN114820183 A CN 114820183A CN 202111049565 A CN202111049565 A CN 202111049565A CN 114820183 A CN114820183 A CN 114820183A
Authority
CN
China
Prior art keywords
block group
node
height
block
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111049565.5A
Other languages
Chinese (zh)
Other versions
CN114820183B (en
Inventor
王菡
李挥
王子贤
曹和平
国宏宇
肖振威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Bay District Digital Economy And Technology Research Institute
Foshan Saisichen Technology Co ltd
Peking University Shenzhen Graduate School
Original Assignee
Shenzhen Bay District Digital Economy And Technology Research Institute
Foshan Saisichen Technology Co ltd
Peking University Shenzhen Graduate School
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Bay District Digital Economy And Technology Research Institute, Foshan Saisichen Technology Co ltd, Peking University Shenzhen Graduate School filed Critical Shenzhen Bay District Digital Economy And Technology Research Institute
Priority to CN202111049565.5A priority Critical patent/CN114820183B/en
Publication of CN114820183A publication Critical patent/CN114820183A/en
Application granted granted Critical
Publication of CN114820183B publication Critical patent/CN114820183B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is suitable for the technical improvement field of block chains, and provides a method and a system for eliminating the bifurcation problem in a parallel voting certification consensus algorithm, wherein the method comprises the following steps: s1, judging whether the network generates subareas before submitting the block groups by the parallel voting certification consensus round value accounting node; s2, judging whether the last state block group height a of the node is higher than the height of the other legal block group after the network is recovered; s3, the minority nodes request the block group information with the height of a from the majority nodes and check the block group information to pass, the block group with the height of a is rewritten, and the network is recovered to be normal. The method improves the bifurcation problem of the PPoV consensus algorithm caused by network partition by delaying block dropping and timing the height of the synchronization block group, and improves the usability of the PPoV consensus algorithm. In an actual application scene, the improvement can well avoid the problems of transaction data confusion and the like caused by chain bifurcation.

Description

Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm
Technical Field
The invention belongs to the field of block chain technology improvement, and particularly relates to a method and a system for eliminating a bifurcation problem in a parallel voting certificate consensus algorithm.
Background
In recent years, with the acceleration of industrial informatization, digitization and networking and the popularization of intelligent terminals, the internet has become one of the driving forces for the development of human society and is closely linked with the life of people. In 2018, the total amount of Chinese internet users reaches 8 hundred million, the number of internet users worldwide exceeds 40 hundred million, and the data volume generated on the internet per day exceeds 5 terabytes. The anonymity and the low threshold of the Internet facilitate the life of people and provide a hotbed for breeding malicious programs such as Trojan horses, viruses and the like. In order to resist various kinds of layered and endless attack means, more and more new technologies are continuously emerging.
The development of the blockchain technology can be traced to the white paper "bitcoin" published by the chinese smart in 2008 for the earliest time: a peer-to-peer electronic cash system is favored because of its completely decentralized and account book tamper-resistant nature. The block chain is a distributed storage technology with tamper-proof and fault-tolerant capabilities, and the data security is ensured through technologies such as a chain structure, a Hash algorithm and asymmetric encryption. As with the conventional distributed storage technology, the blockchain also needs to coordinate the operations of the nodes through a consensus algorithm to ensure the consistency of the data stored by the nodes. The bitcoin, which is the most widely used blockchain system, has many advantages such as data tamper resistance.
With the development of policy and industry, the application of block chains in many fields is increasingly accelerated, such as financial trade, public service industry, tourism industry, intelligent education, catering industry, logistics industry, medical construction and other industry fields.
The block chain structure can be roughly divided into 6 levels, namely a data layer, a network layer, a consensus layer, an incentive layer, a contract layer and an application layer.
The data layer is the bottom layer and mainly comprises functions of data storage and transaction record, and the layer has the most basic logic structures such as a chain structure and a hash function;
the network layer is used for realizing the mutual communication among the nodes and has the functions of data transmission and verification;
the consensus layer is the core part of the block chain, encapsulates various consensus algorithms and is mainly used for realizing consensus of block, block header generation and transaction data. The consensus algorithm is selected from multiple aspects, so that the safety of block chain data and the convenience and quickness in the transaction process are facilitated, and various unintentional or malicious consensus attacks are prevented;
the incentive layer is mainly responsible for introducing an incentive mechanism of the mining nodes, for example, the digital token allocation is carried out on miners who mine new blocks, and the mining work of the miners is encouraged;
the contract layer mainly comprises written intelligent contracts and various scripts, so that the block chain obtains programmable application attributes;
the application layer is a specific application of the block chain in a real industry scene, and is mainly embodied in various programmable currencies.
The first three layers are indispensable in the block chain architecture, and the last three layers can be flexibly adjusted according to the requirements of the actual scene.
According to different application scenarios and the openness of a network running by a participating node, the blockchain can be divided into a public chain, a private chain and a alliance chain. The public chain is open to the whole network, any user node in the network can freely join or leave the block chain system, and the authority of everyone is equal; in a private chain, an organization or a node completely controls the generation authority of a block or a block group, which is similar to a centralized system; the alliance chain is between the public chain and the private chain, and is managed by a plurality of members, different authorities and identities are granted to different nodes, and a block chain system is maintained together.
However, the consensus algorithm adopted by the bitcoin has the defects of energy waste and low efficiency, so that the consensus algorithm is difficult to cope with other application scenarios with high throughput. Aiming at the defect of low throughput, people optimize the consensus algorithm of the bitcoin or design a new consensus algorithm as the consensus algorithm of the block chain.
The voting Proof (PoV, Proof of volume) consensus algorithm designs a specific role model, and classifies nodes in a blockchain network into four roles of committee (commission), Butler (Butler), Candidate Butler (Candidate), and general User (edit User). Committees are authorities in blockchain networks that collectively manage the entire blockchain, and all transactions need to be executed with most of the committees' consent.
The candidate housekeeping can be converted after being applied for joining by a common user. The steward is selected from the candidate stewards, and when the common user becomes the candidate steward, the steward is qualified to be selected as the steward. The election process is carried out by committees, each committee needs to vote for each candidate housekeeper in the voting stage, and the Nb nodes with large votes become housekeeper nodes. The housekeeping node is mainly responsible for collecting transactions and generating blocks, and each round of block generation is performed by a housekeeper, called a duty housekeeper, randomly assigned by the block generated in the previous round. The PoV consensus algorithm also specifies that the candidate caretaker needs to be voted again after every M normal blocks are generated, so as to generate the next caretaker, and the voting information and the result thereof are stored in the M +1 th block. After the block is generated, the next block packing cycle is started, and meanwhile, the manager in the previous cycle is changed into the candidate manager, the right of generating the block is lost, and instead, the candidate manager specified by the special block is changed into the manager to be responsible for packing the block in a new round.
The algorithmThe process of generating a new block by consensus has two kinds of nodes participating together, namely a manager node needing to generate the new block and all committee nodes in charge of auditing votes, at the moment, the name of the manager generating the block is a manager on Duty (Duty Butler), and the manager on Duty is determined by the serial numbers of the managers selected by the committee. Suppose there are n committees participating in the block generation process, each C 1 ,C 2 ,…,C n The total number of manager nodes serving as the round of consensus process is m, and the manager nodes are respectively B 1 ,B 2 ,…,B m The overall consensus process of the PoV algorithm, as shown in fig. 1, illustrates the overall process of generating a commit for a block. The PoV contains a total of four processes, namely preparation (Prepare), preparation (Ready), Commit (Commit) and Confirm (Confirm), wherein the Confirm process is a Commit process after the block is generated, so that no information is transmitted.
Each block is composed of a block header and a plurality of transactions associated with the consensus. In the preparation process, the manager node on duty, which is responsible for calculating the generation block of the round, takes out and combines a plurality of transaction transactions in the transaction reserve pool in the consensus process of the round to generate a pre-block, and then the manager node on duty transmits the generated pre-block to all committee nodes. The method of distinguishing between pre-blocks and complete real blocks consists in observing whether the block has a timestamp, the authentication information of all committees and the serial number of the attendant responsible for the generation of the next block.
The committee node needs to check the received block header of the pre-block and a plurality of transaction information, if the check is successful, signature authentication is carried out on the pre-block header, and the authentication is transmitted to the manager on duty. The manager on duty can complement the pre-block completely and finally become a formal block after receiving the committee certification which is larger than n/2.
All the nodes receiving the newly issued block generated this time store the block in the local block chain of the node, and update some corresponding information and data, such as the next attendant number, so as to confirm the attendant who generates the next new block. The integrity of the pre-block header is supplemented by the voting signatures of all committees, the PoV defines the committee authentication time at which the vote is the latest as the real generation time of the block, and the next attendant housekeeping number is generated by performing a calculation such as a hash operation on the voting signatures. These methods utilize the unpredictability and tamper resistance of the votes, and since the votes generated by each committee are all unordered and random, the serial number of the next attendant node obtained by hash operation is also random.
The PoV only allows one housekeeper to generate a block in each consensus period, only one block in each consensus, and the other housekeepers are idle, so the block generation process is also serialized. However, since the communication complexity of PoV is O (3Nc), Nc is the number of committee, and the attendant needs to send the generated blocks to all committee request signatures, when the number of committee nodes increases, the data throughput of PoV will decrease linearly, which adversely affects the scalability of PoV.
In addition, since the next attendant number in the PoV is calculated by using the committee signatures in the block, and the attendant can arbitrarily arrange and combine the signatures when collecting the signatures and storing the signatures in the block header to change the next attendant number, there is a possibility of self-privy mining.
The Parallel voting certification (PPoV, Parallel Proof of volume) is a consensus mechanism of the Parallel voting certification, is a consensus algorithm improved on the basis of PoV, inherits the mechanisms of the PoV in the aspects of communication complexity, safety, monitorability, fairness and the like, solves the defect of poor expandability of the PoV by the design of Parallel generation blocks, and obtains high transaction throughput and good expandability by the algorithm. The PPoV consensus defines that data on a block chain is stored in the form of block groups. The block group consists of a block group head and a block group body. Each block group header contains the height of the current block group and the voting result. The block group contains all the blocks that pass the voting. Each block comprises information such as a hash value, a mercker root, a public key of a generator, a timestamp and the like of a previous block group and a transaction set. The algorithm continues the idea of separating the voting right and the accounting right of the node, and totally designs five kinds of identity nodes including a verification node, an accounting node, a candidate accounting node, a round value accounting node and a common node. The verification nodes have voting right, vote for the block data in consensus, the voting weights of all the verification nodes are equal, and only the blocks which obtain more than 50% of vote approval can become legal blocks. The accounting node is a bearer of the block chain accounting function, and is responsible for collecting transaction data generated by the network node, packaging the transaction into blocks, broadcast blocks, commit block groups and the like. The candidate accounting nodes do not have the ability to directly participate in the consensus process, but qualify for election by the verifying node as an accounting node. At any time of system operation, a unique round value accounting node is in charge of collecting and counting voting information generated by the verification node, the node is selected from the accounting nodes, and the voting mode is the same as the common consensus of the PoV. The common node cannot join the consensus process, but can receive the blockchain data sent by other nodes and can also issue a transaction.
PPoV refers to all operations that need to be performed to generate a block set as a round of consensus, and generally requires that the time to complete a round of consensus not exceed a maximum value, which is referred to as a timeout. The consensus process is completed by the accounting node and the verification node together. After a round of consensus begins, each accounting node generates a block and broadcasts the block to the network, and all nodes in the network need to collect the blocks. And after collecting all the blocks generated by the accounting node, the verifying node verifies the blocks and sends a vote to the round value accounting node, wherein the vote comprises the signature of the verifying node, the hash value of each block and the verification result. The round value accounting node is responsible for collecting and counting votes, the block which obtains more than half of the verification passing tickets can be a legal block and can be stored in a finally generated block group, and the block which obtains more than half of the verification failing tickets is an illegal block. The round-robin accounting node needs to store the voting list and the voting result in the block group header, and finally broadcast the block group header to the network. The node that receives the block header and all valid blocks assembles them into a complete block group and stores it in the local block chain.
PPoV effectively prevents the possible downtime problem of the system because more than one accounting node can process the transaction in parallel, but introduces the branch of the block chain. Network partitioning occurs if the round-robin accounting node is at the synchronization block header and it is in the minority dispatch network. The other node will generate a round-robin accounting node and generate the same height block set, and when the network recovers, the two same height and valid block sets will cause the block chain to branch.
Disclosure of Invention
The invention aims to provide a method and a system for eliminating the bifurcation problem in a parallel voting certification consensus algorithm, and aims to solve the bifurcation problem in a PPoV algorithm and solve the technical problems of synchronizing the self height, delaying the block falling and the like.
The invention is realized in such a way that a method for eliminating the bifurcation problem in the parallel vote proof consensus algorithm comprises the following steps:
s1, judging whether the network generates subareas before submitting the block groups by the wheel value accounting nodes of the parallel voting certification consensus, if so, continuing to execute the consensus algorithm in each subarea to generate different block groups and executing the next step, and if not, submitting the previous block group and executing the transaction after the next block group falls;
s2, after the network is recovered, judging whether the height a of the last state block group of the node is higher than the height of another legal block group, if not, the node realizes that the block group with the height a needs to be rewritten according to the longest chain rule, and if so, combining the other block group into the block group with the height a;
s3, the minority nodes request the block group information with the height of a from the majority nodes and check the block group information to pass, the block group with the height of a is rewritten, and the network is recovered to be normal.
The further technical scheme of the invention is as follows: in step S3, after the network communication is resumed, the round-robin accounting node that has voted more for the verification node needs to be selected according to the number of nodes newly added to the block group to continue to generate the next block group.
The further technical scheme of the invention is as follows: at nodes in the minority and majority of networks, the block groups are legal, although the header information is different.
The further technical scheme of the invention is as follows: in step S2, the request is sent from the current height when the node synchronization block group height is high, and if the block group of a certain node is found to be different from the block group of the current height of the node and the height of the block group of the node is greater than itself, the block group of the current height needs to be rewritten.
Another object of the present invention is to provide a system for eliminating the fork problem in the parallel vote proof consensus algorithm, wherein the system for eliminating the fork problem in the parallel vote proof consensus algorithm comprises
The partition judging module is used for judging whether the network generates partitions before submitting the block groups by the wheel value accounting nodes for parallel voting certification consensus, if so, continuing to execute a consensus algorithm in each partition to generate different block groups and executing the next step, and if not, submitting the previous block group and executing the transaction after the next block group falls;
the block height judging module is used for judging whether the height a of the last state block group of the node is higher than that of another legal block group after the network is recovered, if not, the node realizes that the block group with the height a of the node needs to be rewritten according to the longest chain principle, and if so, the other block group is combined into the block group with the height a;
and the rewriting recovery module is used for requesting block group information with the height of a from the majority of the dispatching nodes by the minority of the dispatching nodes, checking the block group information to pass, rewriting the block group with the height of a, and recovering the network to be normal.
The further technical scheme of the invention is as follows: and after network communication is recovered, the rewriting recovery module selects the round value accounting node which has more votes for the verification node according to the number value of the newly added nodes in the block group to continue generating the next block group.
The further technical scheme of the invention is as follows: at nodes in the minority and majority of networks, the block groups are legal, although the header information is different.
The further technical scheme of the invention is as follows: the block height judging module requests from the current height when the node synchronization block group height is high, and if the block group of a certain node is different from the block group with the current height of the node and the block group height of the node is larger than the node height, the block group with the current height needs to be rewritten.
The invention has the beneficial effects that: the method improves the bifurcation problem of the PPoV consensus algorithm caused by network partition by delaying block dropping and timing the height of the synchronization block group, and improves the usability of the PPoV consensus algorithm. In an actual application scene, the improvement can well avoid the problems of transaction data confusion and the like caused by chain bifurcation.
Drawings
Figure 1 is a schematic diagram of a housekeeper node and a committee node.
Fig. 2 is a schematic diagram of various nodes in a network.
Fig. 3 is a first diagram illustrating block group heights and node partitioning according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating a block group height and a node partitioning according to an embodiment of the present invention.
Fig. 5 is a third schematic diagram after the block group height and the node partitioning according to the embodiment of the present invention.
Fig. 6 is a flowchart of a method for eliminating a bifurcation problem in a parallel vote proof consensus algorithm according to an embodiment of the present invention.
Detailed Description
As shown in fig. 6, in the present solution, in order to solve the problem of forking in the PPoV algorithm, the technical problems of synchronizing the self height, delaying the block dropping, and the like are adopted.
When the transaction processing and the packaging of the PPoV algorithm are carried out, the PPoV algorithm is responsible for round value accounting nodes voted by the verification nodes, only one round value accounting node is provided in each period of time, and the polling of the round value accounting nodes in turn also needs to be processed by the current round value accounting node, which easily causes a problem that if the round value accounting node goes down, the process of calculating the sequence number of the next round value accounting node cannot be carried out any more, and the PPoV system goes into paralysis, as shown in FIG. 2. In addition, when the following two partitions occur in the network, the downtime problem also exists: the majority of the verification nodes and the round-robin accounting nodes are isolated in one partition, and the minority of other nodes are isolated in another partition.
A few verification nodes and round billing nodes are isolated in one partition, and a majority of other nodes are isolated in another partition.
In the first case, during the operation of the PPoV algorithm, the part of the network with only a small number of verification nodes may be stuck due to the fact that there is no wheel value accounting node, while the other part of the network may be stuck due to the fact that the next wheel value accounting node needs to be calculated in the algorithm, but the wheel value accounting node is not in the partition, and the subsequent consensus process may be stuck.
In the second case, a minority of verification nodes and the round value accounting node are isolated in the same partition, and at the moment, the round value accounting node wants to generate a partition group, but cannot receive the vote of the majority of verification nodes all the time through continuous communication and waiting, and the generation of a new partition group cannot be mentioned; although another partition has a plurality of verification nodes, because the PPoV consensus algorithm has no re-election mechanism, the verification nodes cannot obtain the transaction verification request any more, and at this time, neither partition can operate normally. Therefore, the scheme introduces a timeout reselection mechanism to solve the downtime problem in the PPoV.
In addition, the election of the round-robin accounting node in the PPoV algorithm is specified by voting to generate a random number by the verification node. The original random number generation algorithm counts the latest voting of the verification nodes, and does not fully consider the preorder voting of other verification nodes. Therefore, the scheme improves the generation algorithm of the random number.
Assuming that there are seven nodes { P1, P2, P3, P4, P5, P6, P7} for the entire consensus network at this time, the P1 node is the round-robin accounting node, and the network is in the synchronization phase for submitting the chunk sets. Assuming that the P1 node has synchronized the group information of height a to the P1, P2, P3 node, the P1, P2, P3 node recognizes the head of the group of height a and submits it.
But then the network is in problem and two network partitions of { P1, P2, P3} and { P4, P5, P6, P7} appear. At this time, it can be found that the height of the { P1, P2, P3} node is a, but the height of { P4, P5, P6, P7} node is a-1, then for the first three nodes, they can enter the consensus generation process of the block group with height a +1, at this time, if the round accounting node is changed to the P2 node in a certain round, the P2 will wait for the voting of the majority verification node, obviously, he cannot receive the voting of the majority node because the majority node is located in another network partition. Therefore, after the P2 waits for a timeout, the round-robin accounting node is replaced with the P3, the P3 repeats the running logic of the P2, and naturally cannot obtain the approval of most verification nodes, so that the nodes in the { P1, P2, P3} set are always in the round-robin accounting node rotation, but a new block group cannot be generated all the time, as shown in fig. 3.
At this time, for nodes of { P4, P5, P6, P7} network partition, because the network partition exists, they cannot receive the block group information with height a, and then after waiting for a timeout, they will change the round-robin node and regenerate the block group. But the next round billing node P2 will also time out because of no connection, and then wait until the P4 node is used as the round billing node. The P4 node will again generate the block group with height a. However, this block group is different from the block group with height a generated by P1 (the producer is different, because the node of another partition cannot participate in the generation of the block group), and at this time, it can be considered that the block group with height a generated by P1 is a, and the block group with height a generated by P4 is a 1. At the same time, because the nodes are in the majority pie, they can also continue to generate new groups of blocks of height a1+1, a1+2, a1+3, as shown in FIG. 4.
At this time, it can be seen that if the algorithm continues to run, the fork that has occurred in the network cannot be repaired, and then the existing algorithm cannot handle and recover from the situation. Assuming the network is normal, the { P1, P2, P3} nodes find that the { P4, P5, P6, P7} nodes are taller than themselves, and they go to the { P4, P5, P6, P7} four nodes to request the block group a +1 after a. However, in fact, the next chunk set currently at several other nodes is a1+1, and when the { P1, P2, P3} requests the chunk set, it is found that its chunk set header information does not match a, so that the chunk cannot be successfully merged into a.
At this time, the algorithm principle has actually been problematic, and both { P1, P2, P3} and { P4, P5, P6, P7} consider the block group information of which the self height is a to be effective. And from an algorithmic point of view, these two block groups of height a are indeed both valid, since they are generated by the round accounting node. In this case, unrecoverable forking of the network occurs.
It can be seen that this problem arises because network partitioning occurs when the round value accounting node is in the synchronization block group phase, and it is in the minority dispatch network. The other node will generate a round-robin accounting node and generate a set of equal-height blocks, and when the network recovers, the two equal-height blocks, which are both valid, will cause the network to generate partitions.
Theoretically, the consensus mechanism herein is inevitable if the situation of network partitioning is encountered after improvement, mainly how to recover from the bifurcation state to the normal state.
Firstly, when the network is restored to normal, the final state of the node is that the height of the current block group of { P1, P2, P3} is a, and the legal block group of { P4, P5, P6, P7} is found to be higher than itself, and at the same time, it finds that the several nodes are legal in addition to the header information and itself.
At this time { P1, P2, P3} can be considered as a minority of the dispatch network and network partition recovery occurs, then they realize that the block group with height a needs to be rewritten according to the longest chain rule. Thus, the { P1, P2, P3} needs to request the block group information with height a from { P4, P5, P6, P7} and check that the block group with height a is rewritten, so that the network can be recovered to normal.
But now it is a further question that if P1, P2, P3 has committed the group of blocks of height a and modified the state database, it will need to modify the state database again when it receives the group of blocks of a 1. At this time, there are two ways of submitting, one is direct modification, and then the data of { P1, P2, P3} and { P4, P5, P6, P7} are not synchronized because of the influence of the transaction already executed in the a block group; the other is to restore the state database to the state of the block group before the block group a was generated, and to re-perform the transaction packaged in a1 on P1, P2, and P3, which will cause the disorder of the user end although the final state is the same.
So, for the sake of enhancing its availability, the performance may be slightly sacrificed, that is, when a block group is received, the node does not submit the block group first, because it cannot determine whether the block group is overwritten later. According to the longest chain rule, the current block group is submitted until the next block group generation approval message is received, as shown in fig. 5.
Two major modifications to the original PPoV consensus scheme can be made in specific implementation. First, the node needs to delay the block group to be submitted, and needs to wait for the next block group to be submitted. And secondly, requesting from the current height when the node synchronization block group height is high, and if the block group of a certain node is different from the block group of the current height of the node and the block group height of the node is higher than the node, rewriting the block group of the current height is needed. After network communication is resumed, the accounting node with more votes of the verification node is selected as a round-robin accounting node according to the number value of the nodes newly added in the block, and the next block group is generated continuously.
The scheme provides a mode of delaying block falling and timing the height of the synchronous block group to improve the bifurcation problem of the PoV consensus algorithm caused by network partition, and improves the usability of the PPoV consensus algorithm. In an actual application scene, the improvement can well avoid the problems of transaction data confusion and the like caused by chain bifurcation.
The invention aims at improving the problem that under the scenes that the network environment is unstable and the network is easy to be forked, the PPoV consensus algorithm can generate block groups with the same height and different contents due to the parallel work of accounting nodes with different round values. The method firstly analyzes the reason of the phenomenon, then proposes a method for adopting delay block dropping, regularly synchronizing the heights of other node block groups and rewriting the current height block group, and well solves the problem of chain branching existing in the PPoV consensus algorithm.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. A method for eliminating the bifurcation problem in the parallel vote proof consensus algorithm is characterized by comprising the following steps of:
s1, the parallel voting proves that the consensus round value bookkeeping node judges whether the network generates subareas before submitting the block groups, if yes, the consensus algorithm is continuously executed in each subarea to generate different block groups and execute the next step, and if not, the previous block group is submitted and the transaction is executed after the next block group falls;
s2, after the network is recovered, judging whether the height a of the last state block group of the node is higher than the height of another legal block group, if not, the node realizes that the block group with the height a needs to be rewritten according to the longest chain rule, and if so, combining the other block group into the block group with the height a;
s3, the minority nodes request the block group information with the height of a from the majority nodes and check the block group information to pass, the block group with the height of a is rewritten, and the network is recovered to be normal.
2. The method for eliminating the bifurcation in the parallel vote proof consensus algorithm as claimed in claim 1, wherein after the network communication is resumed, the round accounting node with more votes for the verification node is selected according to the number of newly added nodes in the block group in step S3 to continue generating the next block group.
3. The method of claim 2, wherein the block groups are legal even though the header information is different at the nodes in the minority and majority networks.
4. The method of claim 3, wherein the step S2 requests the node from the current height at the node synchronization block group height, and if the block group of a node is found to be different from the block group of the current height of the node and the block group height of the node is greater than the node, the block group of the current height needs to be rewritten.
5. The system for eliminating the fork problem in the parallel vote proof consensus algorithm is characterized by comprising the following steps
The partition judging module is used for judging whether the network generates partitions before submitting the block groups by the wheel value accounting nodes for parallel voting certification consensus, if so, continuing to execute a consensus algorithm in each partition to generate different block groups and executing the next step, and if not, submitting the previous block group and executing the transaction after the next block group falls;
the block height judging module is used for judging whether the height a of the last state block group of the node is higher than the height of another legal block group after the network is recovered, if not, the node realizes that the block group with the height a of the node needs to be rewritten according to the longest chain principle, and if so, the other block group is combined into the block group with the height a;
and the rewriting recovery module is used for requesting block group information with the height of a from the majority of the dispatching nodes by the minority of the dispatching nodes, checking the block group information to pass, rewriting the block group with the height of a, and recovering the network to be normal.
6. The system for eliminating the fork problem in the parallel vote proof consensus algorithm as claimed in claim 5, wherein the rewrite recovery module selects the round accounting node with more votes for the verification node to continue generating the next block group according to the number of newly added nodes in the block group after network communication is recovered.
7. The system of claim 5, wherein at nodes in minority and majority networks, the block groups are legal despite different header information.
8. The system of claim 5, wherein the block height determining module requests the node from the current height when the node synchronization block height is reached, and if the block group of a node is found to be different from the block group of the current height of the node and the block group height of the node is greater than the node, the block group of the current height needs to be rewritten.
CN202111049565.5A 2021-09-08 2021-09-08 Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm Active CN114820183B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111049565.5A CN114820183B (en) 2021-09-08 2021-09-08 Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111049565.5A CN114820183B (en) 2021-09-08 2021-09-08 Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm

Publications (2)

Publication Number Publication Date
CN114820183A true CN114820183A (en) 2022-07-29
CN114820183B CN114820183B (en) 2023-01-31

Family

ID=82526481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111049565.5A Active CN114820183B (en) 2021-09-08 2021-09-08 Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm

Country Status (1)

Country Link
CN (1) CN114820183B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107507006A (en) * 2017-08-11 2017-12-22 杭州秘猿科技有限公司 A kind of common recognition bifurcated processing method based on license chain
US9875510B1 (en) * 2015-02-03 2018-01-23 Lance Kasper Consensus system for tracking peer-to-peer digital records
US20180152289A1 (en) * 2016-11-30 2018-05-31 International Business Machines Corporation Checkpoints for permissionless blockchains
US20200059369A1 (en) * 2017-05-16 2020-02-20 Peking University Shenzhen Graduate School Determining consensus by parallel proof of voting in consortium blockchain
US20200250747A1 (en) * 2019-01-31 2020-08-06 Salesforce.Com, Inc. Systems, methods, and apparatuses for dynamically assigning nodes to a group within blockchains based on transaction type and node intelligence using distributed ledger technology (dlt)
CN111679936A (en) * 2020-05-26 2020-09-18 中国工商银行股份有限公司 Block chain network bifurcation automatic recovery method, device and system
CN112104482A (en) * 2020-08-11 2020-12-18 佛山赛思禅科技有限公司 Consensus method based on parallel voting
CN112487496A (en) * 2020-12-07 2021-03-12 合肥达朴汇联科技有限公司 Block chain consensus system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9875510B1 (en) * 2015-02-03 2018-01-23 Lance Kasper Consensus system for tracking peer-to-peer digital records
US20180152289A1 (en) * 2016-11-30 2018-05-31 International Business Machines Corporation Checkpoints for permissionless blockchains
US20200059369A1 (en) * 2017-05-16 2020-02-20 Peking University Shenzhen Graduate School Determining consensus by parallel proof of voting in consortium blockchain
CN107507006A (en) * 2017-08-11 2017-12-22 杭州秘猿科技有限公司 A kind of common recognition bifurcated processing method based on license chain
US20200250747A1 (en) * 2019-01-31 2020-08-06 Salesforce.Com, Inc. Systems, methods, and apparatuses for dynamically assigning nodes to a group within blockchains based on transaction type and node intelligence using distributed ledger technology (dlt)
CN111679936A (en) * 2020-05-26 2020-09-18 中国工商银行股份有限公司 Block chain network bifurcation automatic recovery method, device and system
CN112104482A (en) * 2020-08-11 2020-12-18 佛山赛思禅科技有限公司 Consensus method based on parallel voting
CN112487496A (en) * 2020-12-07 2021-03-12 合肥达朴汇联科技有限公司 Block chain consensus system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
侯佳忆等: "区块链分叉问题的分析研究", 《科技视界》 *
魏彬等: "预防区块链分叉的节点检测算法研究", 《内江师范学院学报》 *

Also Published As

Publication number Publication date
CN114820183B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
Wang et al. Sok: Sharding on blockchain
CN110784346B (en) Reputation value-based PBFT consensus system and method
Abraham et al. The blockchain consensus layer and BFT
CN111131209B (en) Improved efficient consensus method, system, computer device and storage medium
US11128522B2 (en) Changing a master node in a blockchain system
US20210097538A1 (en) Systems and methods for managing data generation, storage, and verification in a distributed system having a committee of validator nodes
Sonnino et al. Replay attacks and defenses against cross-shard consensus in sharded distributed ledgers
CN111061769B (en) Consensus method of block chain system and related equipment
CN112104482B (en) Consensus method based on parallel voting
Li et al. PoV: An efficient voting-based consensus algorithm for consortium blockchains
CN110298754B (en) Consensus method applied to block chain
CN113141414B (en) Grouped multi-chain asynchronous consensus method for block chain nodes in CNFS protocol
Sohrabi et al. ZyConChain: A scalable blockchain for general applications
US20230017790A1 (en) Graphic-blockchain-orientated hybrid consensus implementation apparatus and implementation method thereof
CN113553375A (en) Partitioned storage device and method for schema block chain
Tsai et al. Lessons learned from developing permissioned blockchains
CN113448694B (en) Block chain consensus method for improving transaction processing capability
Yao et al. Sok: A taxonomy for critical analysis of consensus mechanisms in consortium blockchain
CN114820183B (en) Method and system for eliminating bifurcation problem in parallel voting certification consensus algorithm
EP4004853A1 (en) Unity protocol consensus
CN112346826A (en) Deep learning distributed computing method and system based on block chain
Wu et al. Multimaster Node Byzantine Fault-Tolerant Consensus Algorithm Based on Consistent Hash Algorithm
Fidelman A generic sharding scheme for blockchain protocols
CN117082075B (en) Block chain consensus mechanism processing system based on weight distribution computing scene
Jain Survey of Blockchain Consensus Algorithms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant