CN109547211B - Grading concurrent byzantine consensus method and system applying digital signature technology - Google Patents

Grading concurrent byzantine consensus method and system applying digital signature technology Download PDF

Info

Publication number
CN109547211B
CN109547211B CN201811441930.5A CN201811441930A CN109547211B CN 109547211 B CN109547211 B CN 109547211B CN 201811441930 A CN201811441930 A CN 201811441930A CN 109547211 B CN109547211 B CN 109547211B
Authority
CN
China
Prior art keywords
consensus
leader
nodes
node
digital signature
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.)
Active
Application number
CN201811441930.5A
Other languages
Chinese (zh)
Other versions
CN109547211A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201811441930.5A priority Critical patent/CN109547211B/en
Publication of CN109547211A publication Critical patent/CN109547211A/en
Application granted granted Critical
Publication of CN109547211B publication Critical patent/CN109547211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Abstract

The invention relates to the field of consensus algorithm of block chain distributed nodes, in particular to a grading concurrency byzantine consensus method and a grading concurrency byzantine consensus system applying a digital signature technology, wherein the method comprises the following steps: electing nodes of the created blocks in the sliding time window as leader nodes to participate in consensus, taking the created nodes of the latest block as the highest leader nodes, and establishing a stock right pyramid according to the stock right from big to small; checking and adjusting the stock right pyramid from top to bottom in sequence; after the adjustment is finished, the highest leader node initiates consensus of each piece of transaction information, and the consensus is sequentially performed in each consensus group from top to bottom; when in consensus, the message is transmitted in a digital signature mode; after the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network, and then starting the consensus of the next transaction information; and when a new block is created, sliding the time window backwards by one block, and repeating the steps. The invention can overcome the defect that the Byzantine fault-tolerant algorithm is applied to the open block chain.

Description

Grading concurrent byzantine consensus method and system applying digital signature technology
Technical Field
The invention relates to the field of consensus algorithm of block chain distributed nodes, in particular to a hierarchical concurrent byzantine consensus method and system applying a digital signature technology.
Background
In recent years, with the rapid development of the blockchain technology and the popularization of the application of digital currency, the blockchain technology has gained more and more attention. The blockchain technology plays an increasingly important role in the development of the economic society due to its unique distributed accounting method. The realization of the distributed account book necessarily requires that the bottom layer node can realize effective consensus of information, so that the consensus method of the bottom layer node becomes one of the core parts of the block chain technology.
Bitcoin (Bitcoin) is taken as a representative of the most known open blockchain at present, and workload certification (Proof of Work) is taken as the core of the consensus mechanism, each node is required to obtain the workload certification by calculating a HASH value so as to obtain the leadership, so that the credibility of the leadership node can be ensured even if the Bitcoin is taken as the open blockchain. However, because the communication of the bitcoin still adopts point-to-point communication, if the POW algorithm is adopted for all nodes on the chain, the problems of low throughput and low consensus efficiency are also caused.
Digital Signature (Digital Signature) is a section of Digital string that can not be forged by others and can be generated only by the sender of the information, and the section of Digital string is also a valid proof of the authenticity of the information sent by the sender of the information. The integrity of digitally signed files is easily verified and digital signatures are non-repudiatable. The digital signature technique is to encrypt the digest information with the sender's private key and transmit it to the receiver together with the original text. The receiver can decrypt the encrypted digest information only by using the public key of the sender, and then generates a digest information for the received original text by using the HASH function, and compares the digest information with the decrypted digest information. If the two information are the same, the received information is complete and is not modified in the transmission process, otherwise, the information is modified, and therefore the digital signature can verify the integrity of the information. Because the digital signature can be decrypted based on the public key, a plurality of nodes can carry out verification and signature superposition for the same message packet for a plurality of times, so that the time complexity of message transmission among the nodes can be reduced to the O (n) level, and the consensus efficiency among the nodes can be effectively improved.
The problem of the general of byzantine refers to the problem that one or more components of a distributed system fail, resulting in failure of the entire system to reach consensus and thus to function properly. In general, consensus problems can be solved to some extent using the practical Byzantine Fault tolerant Algorithm (PBFT). The Byzantine fault-tolerant algorithm depends on the unified decision of the leader node in one area, when the leader node in one area receives different messages, a few opinions can be ignored according to a simple principle that a few obeys a majority, and the messages of the majority of nodes are used as a consensus result in the area.
However, the byzantine fault-tolerant algorithm still has the following disadvantages under certain specific environments:
(1) the premise of the Byzantine fault-tolerant algorithm is to ensure the credibility of the leader node. If a leader node within a region fails for some reason, consensus within the range cannot be performed, and more seriously, if a leader node becomes untrustworthy as a result of being compromised, the region will be fully controlled by the behavior of the leader node.
(2) The Byzantine fault-tolerant algorithm has stability requirements for the leader node. The byzantine fault-tolerant algorithm cannot be applied to some open blockchains, such as bitcoins, because the latter requires a constant change of leader node during the generation of the node, whereas the byzantine fault-tolerant algorithm presupposes a given leader node within an area and therefore cannot be applied to the open blockchain.
(3) Each consensus phase of the Byzantine fault-tolerant algorithm requires that all leader nodes complete one-to-one consensus communication, resulting in O (n)2) This is unacceptable in open chain applications where the number of nodes is high.
Therefore, how to enable the byzantine fault-tolerant algorithm to work stably and efficiently under the condition that the open chain and the reliability of the leader node cannot be completely guaranteed becomes a problem to be solved urgently.
Disclosure of Invention
Aiming at three main defects of a Byzantine fault-tolerant algorithm in an open block chain, the invention firstly provides a grading concurrent Byzantine consensus method applying a digital signature technology, and the consensus method is a consensus method which can still efficiently realize the Byzantine fault-tolerance in an open block chain system.
The specific technical scheme is as follows:
a grading concurrent Byzantine consensus method applying a digital signature technology comprises the following steps:
(1) electing nodes of blocks created in a sliding time window with a preset time width as leader nodes to participate in consensus, taking the created node of the latest block as the highest leader node, and establishing a stock right pyramid according to the stock right from big to small; in the stock right pyramid, each upper-layer leader node and a certain number of lower-layer leader nodes form a consensus group;
the rear edge of the sliding time window is the current moment;
(2) and sequentially checking and adjusting the stock right pyramid from top to bottom so that the stock right restriction relationship of each consensus group satisfies the formula (a): P/S is less than or equal to 49 percent, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and P is the stock weight of the upper leader node;
(3) after the adjustment is completed, the highest leader node initiates consensus of each piece of transaction information, and the consensus is sequentially performed in each consensus group at each level from top to bottom; when consensus is carried out, all leader nodes carry out message transmission in a digital signature mode;
(4) after the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network, and repeating the step (3) to start the consensus of the next transaction information;
(5) and (4) when a new block is created, sliding the sliding time window backwards by one block, and repeating the steps (1) to (4).
In the consensus method, only the nodes which create the new block in the sliding time window can acquire the qualification of the leader node for joining in consensus, and the nodes which do not create the new block in the sliding time window are excluded from the leader committee, so that the cost of becoming the leader node is increased to a certain extent, and the credibility of the leader node is increased.
If a leader node creates a block in the sliding time window, the leader node correspondingly obtains a share right; if a leader node creates multiple blocks within the sliding time window, the leader node obtains multiple shares accordingly.
The time width of the sliding time window is set according to specific conditions, for example, when the new chain digging speed is low, the width of the sliding time window is correspondingly increased, so that enough distributed equity rights exist in the leadership committee at each moment to perform corresponding right balance.
Each level of consensus only occurs between two adjacent layers of leaders, and each upper layer of leader nodes and a certain number of lower layer of leader nodes form a consensus group. If there are n upper level leaders in a level consensus, n peer consensus groups are formed accordingly.
In order to avoid that a leader node has too many rights and the consensus of the whole leader committee is broken, the structure of the right pyramid needs to be adjusted in a hierarchical right restriction mode in the step (2) before the consensus.
The step (2) comprises the following steps: and (4) checking whether the right restriction relation of each consensus group satisfies the formula (a) from top to bottom.
If not, then operation (i): selecting one node from the next layer of nodes of the lower layer leader node and promoting the selected node to the lower layer leader node until the formula (a) is satisfied;
if operation (i) is performed so as not to satisfy formula (a), operation (ii) is performed: canceling the consensus group, combining the two layers of leader nodes into one layer, and recombining the leader nodes and adding the leader nodes into the consensus of the previous layer;
if the formula (a) cannot be satisfied by performing the operation (ii), rolling back the stock right pyramid to the stock right pyramid which completes the stock right restriction last time;
if all the consensus groups can satisfy the formula (a), recording the current shape of the stock right pyramid, and finishing checking the stock right restriction relationship.
After checking the right restriction relationship, the highest leader node initiates consensus and performs consensus in each consensus group at each level from top to bottom.
In the step (3), the consensus groups of different levels perform consensus in sequence according to the level, and the consensus groups of the same level perform consensus concurrently.
In step (3), within a consensus group, if formula (b) is satisfied: if R/S is more than or equal to 51 percent, the consensus group achieves consensus, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and R is the sum of the stock weights of all the leader nodes achieving consensus;
otherwise, the consensus group can not reach consensus, the current transaction information consensus fails and is marked, and the consensus of the next transaction information is started.
In the step (3), the consensus among the consensus groups comprises:
(3-1) creating a data packet with consensus content by the upper-layer leader node, performing digital signature by adopting a private key, and transmitting the data packet to a lower-layer leader node;
(3-2) the lower-layer leader node adds own consensus information to the tail of the data packet, carries out digital signature by using a private key and transmits the digital signature to the next lower-layer leader node;
(3-3) repeating the step (3-2) until all lower-layer leader nodes perform consensus and digital signature and transmit the consensus and digital signature to the upper-layer leader nodes;
and (3-4) each leader node in the consensus group verifies the consensus result of the consensus group by using the public key, and if the consensus is successfully achieved, the consensus result is recorded into the distributed account book of the leader node.
After the first-stage consensus is completed, taking the lower-layer leader node of the first-stage consensus as an upper-layer leader node to start the next-stage consensus, and repeating the steps (3-1) - (3-4); until all leader nodes in the equity pyramid agree.
Based on the same inventive concept, the invention also provides a grading concurrent Byzantine consensus system applying the digital signature technology, which comprises the following steps:
the leader election module elects the nodes of the blocks created in the sliding time window with the preset time width as leader nodes to participate in consensus, takes the created nodes of the latest block as the highest leader nodes, and establishes a stock right pyramid according to the stock right from big to small; in the stock right pyramid, each upper-layer leader node and a certain number of lower-layer leader nodes form a consensus group;
and the hierarchical right restriction module is used for sequentially checking and adjusting the right pyramid from top to bottom so that the right restriction relation of each consensus group satisfies the formula (a): P/S is less than or equal to 49 percent, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and P is the stock weight of the upper leader node;
the hierarchical concurrent consensus module initiates consensus of each piece of transaction information by the highest leader node, and performs consensus in each consensus group of each level from top to bottom in sequence; after the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network;
and the digital signature module is used for carrying out digital signature on the messages transmitted among the leader nodes when the consensus is carried out in each consensus group.
Compared with the prior art, the invention has the beneficial effects that:
in the invention, the leader node is elected by using the idea proved by workload, so that the election problem of the leader node in the open chain is ensured; the method of carrying out graded balancing by depending on the right of stock is used, so that the credibility problem of the leader node is solved; by using the hierarchical concurrent consensus method and applying the digital signature technology, the time complexity for completing the whole consensus is greatly reduced, and the throughput of the whole system is remarkably improved.
Drawings
FIG. 1 is a block diagram of the hierarchical concurrent Byzantine consensus system using digital signature technology according to the present invention;
FIG. 2 is a schematic flow chart of a hierarchical concurrent Byzantine consensus algorithm using digital signature techniques according to the present invention;
FIG. 3 is a schematic diagram of the working principle of dynamically electing a leader node;
FIG. 4 is a schematic diagram of the adjustment principle of the equity pyramid;
FIG. 5 is a schematic diagram of a hierarchical consensus algorithm;
fig. 6 is a schematic diagram of a digital signature consensus method.
Detailed Description
The invention will be described in further detail below with reference to the drawings and examples, which are intended to facilitate the understanding of the invention without limiting it in any way.
The overall structure of the hierarchical concurrent byzantine consensus system applying the digital signature technology is shown in fig. 1 and comprises a leader election module, a hierarchical right-of-stock restriction module, a hierarchical concurrent consensus module and a digital signature module. The working flow of the whole hierarchical concurrent byzantine consensus system is shown in fig. 2, and is described below by means of each module.
1. Lead election module based on POW algorithm
For the selection problem of the leader node in the open block chain, the invention adopts a leader election mode based on a POW algorithm to convert a workload certification mechanism in the bitcoin into a leader selection mechanism. As shown in fig. 3, the process is as follows:
(1) a specific time window (shared window) is determined, and all nodes mining new blocks within the window are admitted as leader nodes. When a new block is connected to the end, the node that created the new block obtains leader membership while the time window is moved forward by the position of the block, which results in the leader power of the first block at the forefront being disabled.
(2) All nodes creating blocks in the current time window are used as members of the leadership committee to participate in consensus, and other nodes which do not contribute in the near period are excluded from the leadership committee, so that the cost of becoming the leadership node is increased to a certain extent, and the credibility of the leadership node is increased.
(3) If a node has ownership of a block in the time window, the leader node correspondingly acquires a share right; if a node owns multiple blocks in the time window, the right of share of the leader node is increased by a corresponding multiple.
(4) The size definition of the shared window is influenced by external factors, for example, when the new chain mining speed is low, the time window is correspondingly increased, so that enough decentralized equity rights can be ensured to be reserved in the leadership committee at each moment. And each time a new block is created, the time window slides backwards once, namely, each time a new block is created, a new equity pyramid is reconstructed, and all transaction information between the time period from the new block to the next new block is identified.
(5) After a node has mined a new block, all consensus within the leadership committees during the period of time, from the current start until the next new block is mined, is initiated by the node, which becomes the highest leader node during the period of time. Meanwhile, other nodes are classified according to the stock right size to form a stock right pyramid from top to bottom. And refreshing the corresponding pyramid structure after each time of the change of the highest leader node, and performing retry () operation according to the change condition of the share right of each node. The restart () operation refers to adjusting the relationship of the current leader node to all its lower level leader nodes. Traversing all the leader nodes in the lower-layer leader node list of the current leader node, if the stock right of a certain lower-layer leader node is greater than that of the current leader node, exchanging the position of the lower-layer leader node with that of the current leader node, and if the stock right of the lower-layer leader node is equal to that of the current node, promoting the lower-layer leader node to be level with the current leader node.
The lower-layer leader nodes are equally distributed below the upper-layer leader nodes, and each upper-layer leader node and a certain number of lower-layer leader nodes form a consensus group.
In fig. 3, nodes No. 1, 2, 3, and 4 are included in the shared window, indicating that these nodes have the granted workload proofs in the near term, and thus are selected as leader nodes.
Since node 3 is the owner of the newest block, node 3 is placed at the top of the equity pyramid as the highest leader node.
Each leader node will obtain a corresponding number of shares according to the number of blocks they control in the shared window, e.g. nodes 1 and 2 control four blocks and thus all obtain four shares, while node 4 only controls one block and thus only obtains one share.
Each node is arranged under the highest leader node according to the number of the stock right, and an initial stock right pyramid is formed. And reconstructing the stock right pyramid according to the latest stock right distribution after refreshing the shared window every time.
2. Hierarchical equity restriction module
For the credibility problem of the leader node, the invention adopts a hierarchical right-of-stock restriction mode to avoid the breakdown of the consensus of the whole leader committee caused by the excessive right of a certain node. The process is as follows:
(1) each level of consensus only occurs between two adjacent levels of leaders, each top level of leaders forming a consensus group with a certain number of bottom level leaders. If there are n upper level leaders in this level of consensus, n peer consensus groups are formed accordingly. Before all consensus starts, the equity constraint relationship of each consensus group between every two layers of the pyramid must be checked from top to bottom:
Figure GDA0002402096200000071
the sum of the share weights of the nodes in the consensus group is S, and the share weight of the upper node is P, which must satisfy
P/S≤49% (a)
Otherwise, the proxy () operation is needed to be carried out in the lower leader until the formula (a) is satisfied; the proxy () operation refers to: promoting a node, deleting the node from the lower node information list of the upper node, and promoting the node to the level equal to the original upper node.
And (4) if the lower layer cannot obtain enough right to meet the (a) through the proxy () operation, canceling the group consensus, combining the two layers of leader nodes into the same layer, and recombining the two layers of consensus. If the formula (a) is still not satisfied, rollback () operation is performed to roll back to the right pyramid shape in which right restriction is completed last time.
And (4) if all the consensus groups can meet the formula (a) finally, performing record () operation, recording the current shape of the stock right pyramid, and finishing checking the stock right restriction relationship.
(2) The pyramid formed after the stock right restriction check is completed can ensure that all consensus groups can meet the formula (a), and the stock right restriction check stage is completed.
As shown in fig. 4, the right pyramid in fig. 4 is shown before adjustment, and the positions a and b are adjusted because the right of the upper leader is too much to pass the right check at both positions a and b.
at the position a, because the lower layer can realize the right of stock restriction on the leader node of the upper layer through the proxy () operation, only one node needs to be lifted from the next level of consensus to join the level of consensus, as shown in the right side of fig. 4.
At the position b, because the lower layer still cannot realize the right-of-stock restriction of the level consensus through the proxy () function, the level consensus is cancelled, the lower-layer leader node and the upper-layer leader node are merged and jointly added into the upper-level consensus, as shown in the right side of fig. 4.
3. Hierarchical concurrent consensus module
And after the stock right restriction examination is finished, grading concurrent consensus is carried out, and each grade of consensus is finished from top to bottom according to the stock right pyramid.
(1) In the consensus stage, the highest leader node initiates consensus, consensus is realized inside each consensus group at each level from top to bottom in sequence, consensus groups at different levels perform consensus according to the levels in sequence, and consensus of different consensus groups at the same level is executed concurrently:
Figure GDA0002402096200000081
if the sum of the weights of the nodes in the consensus group is S and the sum of the weights of the nodes successfully achieving consensus is R, then the requirement of S and R must be satisfied
R/S≥51% (b)
If the condition of the formula (b) can not be met, the consensus group can not achieve consensus, the current consensus on the transaction information fails, the information is marked as 'non-consensus', and the consensus on the next transaction information is started.
(2) The formulas (a) and (b) can ensure that even if the upper-layer leader does not become credible any more for some reason, the lower-layer leader can still refute the inappropriate behavior of the upper-layer leader through the advantage of the collective right of stock, so that the problem that the right of stock of a certain leader node is too concentrated can be effectively avoided, and the influence of the leader node on the whole system is limited. Meanwhile, a plurality of peer-level consensus groups can execute consensus simultaneously, and the throughput of the system can be effectively improved.
As shown in fig. 5, after the stock right check and the stock right pyramid adjustment are completed, the consensus of each level starts from top to bottom in sequence.
In FIG. 5, a and b are in the second-level consensus, which are two consensus groups in the second-level consensus respectively; c. d is in the third-level consensus and is two consensus groups in the third-level consensus respectively.
The consensus is firstly initiated by the highest leader node, and only three nodes at the top of the pyramid participate in the first-level consensus; after the first-stage consensus is finished, executing consensus in parallel by two consensus groups a and b in the second-stage consensus; after the second-stage consensus is finished, executing consensus in parallel by the two consensus groups c and d in the third-stage consensus; after the consensus is successful, the whole equity pyramid completes the consensus.
After the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network, and then starting the consensus of the next transaction information;
and when a new block is created, sliding the time window backwards by one block, and repeating the steps.
4. Digital signature module
(1) And the leader nodes in each consensus group transmit messages in a digital signature mode, each leader node can correctly record consensus results in a two-round cyclic digital signature and verification mode, and the time complexity is controlled to be at the level of O (n).
Figure GDA0002402096200000091
A first round of circulation: transmitting a number with consensus content by an upper leader nodeAnd the data packet is encrypted by using a private key of the data packet, the data packet is transmitted to each lower-layer leader node in sequence, each lower-layer leader node adds a consensus result of the data packet to the tail of the data packet in sequence, digital signature is carried out by using the private key, and the data packet is transmitted to the next lower-layer leader node. The results of each lower level leader node in the level of consensus on the consensus and their digital signatures can be obtained after the first cycle is completed.
Figure GDA0002402096200000101
And (3) second circulation: and each leader node in the stage of consensus verifies the consensus results of other leader nodes by using the public key, and records the consensus results into the distributed account book of the leader node after the results are confirmed to be correct. If the consensus result of one leader node is disagreeed, but more than 51% of other shares achieve the consensus of the result, the leader node gives up the original result according to the principle of PBFT, and records the successful result of the consensus in the ledger. Because the consensus result of each node is provided with the digital signature and can be verified through the public key, the authenticity of the consensus result can be ensured and the consensus result cannot be faked maliciously.
(2) After all the leader nodes in the consensus of the level are confirmed, the lower-level leader of the level initiates the consensus of the next level, the lower-level leader of the level becomes the upper-level leader of the consensus of the lower level, the step (1) is restarted, and finally all the leader nodes in the equity pyramid can achieve the consensus.
(3) Due to the adoption of the digital signature form of each level of consensus, the number of times of consensus required by each node is in the O (1) level, so that the complexity of time required for completing the consensus among all the leader nodes is O (n).
As shown in fig. 6, if the node 1 is an upper-layer leader node in the consensus group, the node 1 first sends a data packet with consensus content to the node 2 and attaches its digital signature, the node 2 after consensus on the content adds the consensus result and its digital signature to the data packet, and then transmits the data packet to the node 3, and after a round of circulation, the leader node 1 will receive the data packet with the consensus results of all nodes and the digital signature.
After the first round of circulation is completed, the leader node 1 sends the data packet to the node 2 again, and starts a second round of circulation, in this round of circulation, each node judges whether the nodes with the total number of shares exceeding 51% have already agreed according to the digital signature, and if the agreement is found to be agreed, the contents of the agreement are written into the distributed account book of the node and cannot be modified.
The related data structure in the invention is defined as follows:
each node contains the following member variables:
Figure GDA0002402096200000102
Figure GDA0002402096200000111
each node contains the following member functions:
proxy () function: promoting a node, deleting the node from the lower node information list of the upper node, and promoting the node to the level equal to the original upper node
promote()
Figure GDA0002402096200000112
restuct () function: and adjusting the relationship between the current node and all nodes at the lower layer. Traversing all nodes in the lower node list of the current node, exchanging the position of the lower node with the position of the current node if the share right of the lower node is larger than that of the current node, and promoting the share right of the lower node to be level with the current node if the share right of the lower node is equal to that of the current node.
restruct()
Figure GDA0002402096200000113
Figure GDA0002402096200000121
rollback () function: rolling back the right of stock pyramid to the shape of pyramid with right of stock restriction completed at last time
rollback()
Figure GDA0002402096200000122
record () function: record the shape of the current equity pyramid
record()
Figure GDA0002402096200000123
The above-mentioned embodiments are intended to illustrate the technical solutions and advantages of the present invention, and it should be understood that the above-mentioned embodiments are only specific embodiments of the present invention, and are not intended to limit the present invention, and any modifications, additions, equivalents, etc. made within the scope of the principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A grading concurrent Byzantine consensus method applying a digital signature technology is characterized by comprising the following steps:
(1) electing nodes of blocks created in a sliding time window with a preset time width as leader nodes to participate in consensus, taking the created node of the latest block as the highest leader node, and establishing a stock right pyramid according to the stock right from big to small; in the stock right pyramid, each upper-layer leader node and a certain number of lower-layer leader nodes form a consensus group;
the rear edge of the sliding time window is the current moment;
(2) and sequentially checking and adjusting the stock right pyramid from top to bottom so that the stock right restriction relationship of each consensus group satisfies the formula (a): P/S is less than or equal to 49 percent, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and P is the stock weight of the upper leader node;
(3) after the adjustment is completed, the highest leader node initiates consensus of each piece of transaction information, and the consensus is sequentially performed in each consensus group at each level from top to bottom; when consensus is carried out, all leader nodes carry out message transmission in a digital signature mode;
(4) after the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network, and repeating the step (3) to start the consensus of the next transaction information;
(5) and (4) when a new block is created, sliding the sliding time window backwards by one block, and repeating the steps (1) to (4).
2. The hierarchical concurrent byzantine consensus method of applying digital signature technology as claimed in claim 1, wherein a time width of the sliding time window is adjusted according to a creation speed of a new tile.
3. The hierarchical concurrent byzantine consensus method using digital signature technology as claimed in claim 1, wherein the step (2) comprises: checking whether the right restriction relation of each consensus group satisfies the formula (a) from top to bottom;
if not, then operation (i): selecting one node from the next layer of nodes of the lower layer leader node and promoting the selected node to the lower layer leader node until the formula (a) is satisfied;
if operation (i) is performed so as not to satisfy formula (a), operation (ii) is performed: canceling the consensus group, combining the two layers of leader nodes into one layer, and recombining the leader nodes and adding the leader nodes into the consensus of the previous layer;
if the formula (a) cannot be satisfied by performing the operation (ii), rolling back the stock right pyramid to the stock right pyramid which completes the stock right restriction last time;
if all the consensus groups can satisfy the formula (a), recording the current shape of the stock right pyramid, and finishing checking the stock right restriction relationship.
4. The method for hierarchical concurrent byzantine consensus using digital signature technology as claimed in claim 1, wherein in step (3), the consensus groups of different levels perform consensus sequentially according to the level, and the consensus groups of the same level perform consensus concurrently.
5. The hierarchical byzantine consensus method according to claim 1 or 4, wherein in the step (3), within a consensus group, if formula (b) is satisfied: if R/S is more than or equal to 51 percent, the consensus group achieves consensus, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and R is the sum of the stock weights of all the leader nodes achieving consensus;
otherwise, the consensus group can not reach consensus, the current transaction information consensus fails and is marked, and the consensus of the next transaction information is started.
6. The method of claim 4, wherein the step (3) of performing consensus in the consensus group comprises:
(3-1) creating a data packet with consensus content by the upper-layer leader node, performing digital signature by adopting a private key, and transmitting the data packet to a lower-layer leader node;
(3-2) the lower-layer leader node adds own consensus information to the tail of the data packet, carries out digital signature by using a private key and transmits the digital signature to the next lower-layer leader node;
(3-3) repeating the step (3-2) until all lower-layer leader nodes perform consensus and digital signature and transmit the consensus and digital signature to the upper-layer leader nodes;
and (3-4) each leader node in the consensus group verifies the consensus result of the consensus group by using the public key, and if the consensus is successfully achieved, the consensus result is recorded into the distributed account book of the leader node.
7. The method for hierarchical byzantine consensus using digital signature technology as claimed in claim 6, wherein after a first-stage consensus is completed, a lower-layer leader node of the first-stage consensus starts a next-stage consensus as an upper-layer leader node, and repeating the steps (3-1) to (3-4); until all leader nodes in the equity pyramid agree.
8. A hierarchical concurrent byzantine consensus system using digital signature techniques, comprising:
the leader election module elects the nodes of the blocks created in the sliding time window with the preset time width as leader nodes to participate in consensus, takes the created nodes of the latest block as the highest leader nodes, and establishes a stock right pyramid according to the stock right from big to small; in the stock right pyramid, each upper-layer leader node and a certain number of lower-layer leader nodes form a consensus group;
and the hierarchical right restriction module is used for sequentially checking and adjusting the right pyramid from top to bottom so that the right restriction relation of each consensus group satisfies the formula (a): P/S is less than or equal to 49 percent, wherein S is the sum of the stock weights of all the leader nodes in the consensus group, and P is the stock weight of the upper leader node;
the hierarchical concurrent consensus module initiates consensus of each piece of transaction information by the highest leader node, and performs consensus in each consensus group of each level from top to bottom in sequence; after the consensus of all the consensus groups is completed, broadcasting the consensus result of the current transaction information to the whole network;
and the digital signature module is used for carrying out digital signature on the messages transmitted among the leader nodes when the consensus is carried out in each consensus group.
CN201811441930.5A 2018-11-29 2018-11-29 Grading concurrent byzantine consensus method and system applying digital signature technology Active CN109547211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811441930.5A CN109547211B (en) 2018-11-29 2018-11-29 Grading concurrent byzantine consensus method and system applying digital signature technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811441930.5A CN109547211B (en) 2018-11-29 2018-11-29 Grading concurrent byzantine consensus method and system applying digital signature technology

Publications (2)

Publication Number Publication Date
CN109547211A CN109547211A (en) 2019-03-29
CN109547211B true CN109547211B (en) 2020-06-30

Family

ID=65852012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811441930.5A Active CN109547211B (en) 2018-11-29 2018-11-29 Grading concurrent byzantine consensus method and system applying digital signature technology

Country Status (1)

Country Link
CN (1) CN109547211B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110246038A (en) * 2019-04-26 2019-09-17 众安信息技术服务有限公司 A kind of block chain transaction rapid acknowledgment method and system
CN110474986B (en) * 2019-08-20 2022-08-12 深圳前海微众银行股份有限公司 Consensus method, device and system based on block chain system
CN113570460A (en) * 2019-08-30 2021-10-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110598060A (en) * 2019-09-18 2019-12-20 广东卓启投资有限责任公司 Block chain rapid consensus method and device, computer equipment and storage medium
CN111475287B (en) * 2020-03-24 2023-05-02 浙江大学 Multi-robot cooperation multi-target point load balancing searching method and system based on blockchain
CN111756823A (en) * 2020-06-12 2020-10-09 山西警察学院 Open permit chain applied to public security system based on simplified Byzantine fault-tolerant algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
WO2018130910A1 (en) * 2017-01-13 2018-07-19 Digitus Peer-to-peer exchange platform
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018130910A1 (en) * 2017-01-13 2018-07-19 Digitus Peer-to-peer exchange platform
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一个高传输效率的多值拜占庭共识方案;郭兵勇,李新宇;《密码学报》;20181015(第5期);全文 *

Also Published As

Publication number Publication date
CN109547211A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109547211B (en) Grading concurrent byzantine consensus method and system applying digital signature technology
CN110784346B (en) Reputation value-based PBFT consensus system and method
US11907174B2 (en) Systems and methods for managing data generation, storage, and verification in a distributed system having a committee of validator nodes
Abraham et al. The blockchain consensus layer and BFT
CN111061769B (en) Consensus method of block chain system and related equipment
CN112287029A (en) Block chain multi-chain cross-chain system and implementation mechanism thereof
CN108616596A (en) It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
Sheng et al. BFT protocol forensics
CN108632362B (en) Method for electing private block chain building block node
CN113328997B (en) Alliance chain crossing system and method
CN111241593A (en) Data synchronization method and device for block chain nodes
CN114240439B (en) Cross-chain transaction rollback method and device based on threshold signature and double-hash chain mode
Innerbichler et al. Federated byzantine agreement to ensure trustworthiness of digital manufacturing platforms
Sohrabi et al. ZyConChain: A scalable blockchain for general applications
CN111798234B (en) Lightweight block chain system and construction method
KR20200081533A (en) Blockchain Consensus Method based Improved Dynamic Blind Voting for Internet of Things Environment
CN111737352B (en) Supply chain information collaborative management method based on block chain
CN113837758A (en) Consensus method and device for block chain system
CN114745140B (en) Urban planning field block chain consensus verification method and system based on aggregation encryption
CN117527834B (en) Improved PBFT consensus method based on reputation scoring mechanism
CN115174570A (en) Cross-chain consensus method and system based on dynamic committee
Xu et al. Improved PBFT algorithm based on vague sets
Fang et al. Pelopartition: Improving blockchain resilience to network partitioning
CN115865943A (en) Self-adaptive dynamic cross-chain consensus mechanism selection method
Lu et al. A cache enhanced endorser design for mitigating performance degradation in hyperledger fabric

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