Large-scale block chain consensus method and device

By generating digital signatures and forming certificates in a large-scale blockchain system, each node generates a digital signature and forms a certificate to perform transaction synchronization and verification, the performance problem of consensus protocols in large-scale deployment scenarios is solved, and efficient node expansion is achieved.

CN120378104APending Publication Date: 2025-07-25TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410095135.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the large-scale blockchain deployment scenario, the performance problem of the classic Byzantine consensus protocol has become unavailable. The security of the public chain consensus protocol needs to be verified, and there is a lack of an effective consensus solution to improve the scale of nodes.

Method used

In each broadcast stage, each node generates multiple digital signatures to form a certificate, synchronize transactions through broadcast and shared messages, restore and verify proposals, and realize consensus on the certificate collection.

Benefits of technology

The node scale of blockchain consensus has been improved, and can be extended to a thousand or even ten thousand nodes, improving the performance of large-scale deployment scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378104A_ABST
    Figure CN120378104A_ABST
Patent Text Reader

Abstract

The invention discloses a large-scale block chain consensus method and device which are applied to a distributed system on a block chain, each broadcast stage corresponds to a plurality of nodes in the distributed system, and the method comprises the following steps: in each broadcast stage, each node carries out proposal and generates a plurality of digital signatures of the node; each node forms a certificate of the node according to a plurality of digital signatures from other nodes; all the nodes reach a consensus for the certificates of the preset number of nodes, and the certificates reaching the consensus are added into a certificate set; based on the certificate set and the proposal, each node performs transaction synchronization by broadcasting a distribution message and a shared message, and recovers the proposal; and verifying the recovered proposal, and completing transaction synchronization after the verification is passed. The performance of large-scale scene deployment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blockchain, and in particular, to a large-scale blockchain consensus method and apparatus. Background Art

[0002] This section aims to provide background or context for the embodiments of the present invention described in the claims. The description herein is not admitted to be prior art merely by virtue of its inclusion in this section.

[0003] In the current blockchain, especially the classical Byzantine consensus protocol BFT (broadcast protocol) used in consortium blockchains, usually can be extended to hundreds of nodes, and obvious performance problems often occur in large-scale deployment scenarios, resulting in unavailability. The consensus protocols such as Proof-of-Stake used in public blockchains can be extended to hundreds of thousands of nodes, but various attacks have been successively discovered, and their security needs to be verified.

[0004] Currently, there is a lack of a large-scale blockchain consensus solution to improve the performance of large-scale deployment scenarios, thereby increasing the scale of nodes that blockchain consensus can deploy. Summary of the Invention

[0005] Embodiments of the present invention provide a large-scale blockchain consensus method, which is applied to a distributed system on a blockchain. Each broadcast stage corresponds to multiple nodes in the distributed system, so as to improve the performance of large-scale deployment scenarios, thereby increasing the scale of nodes that blockchain consensus can deploy. The method includes:

[0006] In each broadcast stage, each node makes a proposal and generates multiple digital signatures of the node;

[0007] Each node forms a certificate of the node according to multiple digital signatures from other nodes;

[0008] All nodes reach a consensus on the certificates of a preset number of nodes and add the consensus-reached certificates to the certificate set;

[0009] Based on the certificate set and the proposal, each node synchronizes transactions through broadcast distribution messages and shared messages and restores the proposal;

[0010] Verify the restored proposal, and after the verification passes, complete the transaction synchronization.

[0011] Embodiments of the present invention further provide a large-scale blockchain consensus apparatus, which is applied to a distributed system on a blockchain. Each broadcast stage corresponds to multiple nodes in the distributed system, so as to improve the performance of large-scale deployment scenarios, thereby increasing the scale of nodes that blockchain consensus can deploy. The apparatus includes:

[0012] A proposal module, which is used for each node to make a proposal and generate multiple digital signatures of the node in each broadcast phase; each node forms a certificate of the node according to multiple digital signatures from other nodes;

[0013] A consensus module, which is used for all nodes to reach a consensus on the certificates of a preset number of nodes and add the certificates on which consensus is reached to the certificate set;

[0014] A transaction synchronization module, which is used for each node to perform transaction synchronization through broadcast distribution messages and shared messages based on the certificate set and the proposal, and restore the proposal; verify the restored proposal, and complete the transaction synchronization after the verification passes.

[0015] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned large-scale blockchain consensus method is implemented.

[0016] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned large-scale blockchain consensus method is implemented.

[0017] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned large-scale blockchain consensus method is implemented.

[0018] In an embodiment of the present invention, in each broadcast phase, each node makes a proposal and generates multiple digital signatures of the node; each node forms a certificate of the node according to multiple digital signatures from other nodes; all nodes reach a consensus on the certificates of a preset number of nodes and add the certificates on which consensus is reached to the certificate set; based on the certificate set and the proposal, each node performs transaction synchronization through broadcast distribution messages and shared messages, and restores the proposal; verify the restored proposal, and complete the transaction synchronization after the verification passes. Through the above steps, the solution proposed in the embodiment of the present invention can greatly improve the classical consensus scalability, follows the mode of separating block broadcast and proposal restoration, and can be extended to thousands or even tens of thousands of nodes. Description of the Drawings

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts. In the drawings:

[0020] Figure 1 It is a flowchart of the large-scale blockchain consensus method in the embodiments of the present invention;

[0021] Figure 2 It is a schematic diagram of the block proposal broadcast process in the embodiments of the present invention;

[0022] Figure 3 It is the pseudocode of the aforementioned block proposal broadcast process;

[0023] Figure 4 It is a flowchart of each node making a proposal in the embodiments of the present invention;

[0024] Figure 5 It is a flowchart of forming a certificate for a node in the embodiments of the present invention;

[0025] Figure 6 It is a schematic diagram of the block transaction synchronization process in the embodiments of the present invention;

[0026] Figure 7 It is the pseudocode of the block transaction synchronization process in the embodiments of the present invention;

[0027] Figure 8 It is a flowchart of each node in the embodiments of the present invention for transaction synchronization by broadcasting and sharing messages;

[0028] Figure 9 It is a schematic diagram of the large-scale blockchain consensus device in the embodiments of the present invention;

[0029] Figure 10 It is a schematic diagram of a computer device in the embodiments of the present invention. Detailed implementation manners

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following further elaborates on the embodiments of the present invention with reference to the accompanying drawings. Herein, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.

[0031] First, the definitions involved in this application are explained.

[0032] VRF: A pseudorandom function. Each blockchain node can generate a VRF signature for a certain message and consider the value output by this signature to be a pseudorandom number.

[0033] Digital signature: Sign a message, which has the property of non-forgery.

[0034] Hash: Calculate the hash digest of a message, assuming an implementation of a hash function that is collision-resistant;

[0035] Erasure code: It has two functions, Encode() and Decode(). Encode() encodes a message to form multiple shards, and Decode() aggregates multiple shards.

[0036] Figure 1 It is a flowchart of a large-scale blockchain consensus method in an embodiment of the present invention, including:

[0037] Step 101, in each broadcast phase, each node makes a proposal and generates multiple digital signatures of the node;

[0038] Step 102, each node forms a certificate of the node according to multiple digital signatures from other nodes;

[0039] Step 103, all nodes reach a consensus on the certificates of a preset number of nodes and add the certificates on which consensus is reached to the certificate set;

[0040] Step 104, based on the certificate set and the proposal, each node synchronizes transactions by broadcasting and sharing messages to restore the proposal;

[0041] Step 105, verify the restored proposal, and complete transaction synchronization after the verification passes.

[0042] Figure 2 It is a schematic diagram of the block proposal broadcast process in an embodiment of the present invention, Figure 3 It is the pseudocode of the aforementioned block proposal broadcast process, corresponding to Step 101 - Step 102.

[0043] Among them, each node Pi maintains the following local information:

[0044] epoch e: The number of the current broadcast phase;

[0045] Q: Transaction queue;

[0046] qc_i: The signature set with the largest epoch value formed locally, that is, a certificate;

[0047] W_i: The certificate set formed locally.

[0048] See Figure 4 , in an embodiment, in each broadcast phase, each node makes a proposal and generates multiple digital signatures of the node, including:

[0049] Step 401, at the beginning of each broadcast phase epoch e, determine whether each node Pi is a member of each first type of committee Members (1 <= j <= n, that is, there are n different first - type committees). The specific steps include: for each node, call the VRF function to sign the content of each first - type committee to obtain a signature value. When the signature value is less than a preset threshold, determine that the node is a member of the first - type committee corresponding to the content of the first - type committee, and locally store the signature value at the node. Each content of the first - type committee includes the number of the current broadcast phase, a first preset symbol, and each first - type committee identifier.

[0050] For example, to determine whether it is a member, it is necessary to use the VRF function to sign the content (t, e, 1) of the first - type committee, where t is the first preset symbol, e is the number of the current broadcast phase, and 1 is the identifier number of the first first - type committee. Each first - type committee with each identifier has k nodes, where the number of faulty nodes is u. The protocol assumptions and the VRF function ensure that the relationship k > 3u holds.

[0051] Step 402: Each node broadcasts a proposal message (Proposal, e, M, qc_i) to all nodes. The proposal message includes the number e of the current broadcast phase, the proposal M, and the certificate qc_i. Additionally, Proposal is an identifier; the proposal M contains some transactions in the queue Q.

[0052] Step 403: For each node Pi, after the node Pi receives the proposal message broadcast by other nodes Pj, determine whether the node Pi is a member of the first - type committee If so, calculate the erasure code and the Merkle root, and obtain the digital signature corresponding to each first - type committee of the node according to the numbers of the first - type committees to which the node belongs.

[0053] In one embodiment, calculating the erasure code and the Merkle root and performing digital signature according to the numbers of the first - type committees to which the node belongs includes:

[0054] Calculate the erasure code d according to the proposal M, and calculate the Merkle root z of the erasure code d. Specifically, perform an (u + 1, k) - relationship erasure code d = Encode(M) on M.

[0055] According to the number e of the current broadcast phase, the Merkle root z, and the numbers j of the first - type committees to which the node belongs, obtain the digital signature σ corresponding to each first - type committee of the node Pi i .

[0056] For example, if the node P1 determines that it is a member of the 1st, 2nd, and 3rd first - type committees, then obtain the digital signatures σ corresponding to the 1st, 2nd, and 3rd first - type committees i .

[0057] See Figure 5 In one embodiment, (step 102) each node forms a certificate for the node based on multiple digital signatures from other nodes, including:

[0058] Step 501, each node sends the digital signature corresponding to each first type of committee to the node corresponding to the number of each first type of committee;

[0059] For example, after node P1 obtains the digital signatures σi corresponding to the 1st, 2nd, and 3rd first type of committees, it sends them to nodes P2 and P3 respectively (P1 doesn't need to send to itself).

[0060] Step 502, for each node, if the node receives at least the first preset number (2u + 1) of consistent digital signatures sent by the members of the first type of committee corresponding to the number of this node, update the certificate of this node, and after receiving the proposal messages from the second preset number (n - f, where n is the number of nodes and f is the number of faulty nodes) of nodes, determine that the proposal for this broadcast phase is completed and enter the next epoch e + 1.

[0061] For example, after node P2 receives 2u + 1 consistent digital signatures sent by the 2nd first type of committee, update the certificate of P2. Updating the certificate of this node means updating the local certificate qc_i to 2u + 1 digital signatures.

[0062] Figure 6 is the schematic diagram of the block transaction synchronization process in the embodiment of the present invention, Figure 7 is the pseudocode of the block transaction synchronization process in the embodiment of the present invention, corresponding to step 104 - step 105.

[0063] See Figure 8 Based on the certificate set, each node performs transaction synchronization and restores the proposal by broadcasting and sharing messages, including:

[0064] Step 801, group the multiple nodes in the distributed system, and each group includes multiple nodes; for example, n nodes are assigned to k groups, and each group is labeled as B_i, that is, each group has n / k nodes. This grouping is visible to all nodes.

[0065] Step 802, determine whether each node is a member of each second type of committee or each third type of committee where 1 <= j <= n, that is, there are n different second types of committees and n different third types of committees. The specific steps include:

[0066] For each node, call the VRF function to sign each piece of content of the second type of committee to obtain a signature value. When the signature value is less than the preset threshold, determine that the node is a member of the second type of committee corresponding to the content of the second type of committee, and locally store the signature value at the node. Each piece of content of the second type of committee (s, e, *, j) includes the number e of the current broadcast phase, the second preset symbol s, the third preset symbol *, and each identifier j of the second type of committee;

[0067] For each node, call the VRF function to sign each piece of content of the third type of committee to obtain a signature value. When the signature value is less than the preset threshold, determine that the node is a member of the third type of committee corresponding to the content of the third type of committee, and locally store the signature value at the node. Each piece of content of the third type of committee (s, e, *, j) includes the number e of the current broadcast phase, the second preset symbol s, the third preset symbol *, and each identifier j of the third type of committee. Each of the second type of committee and the third type of committee has k nodes, where the number of faulty nodes is u, and the protocol assumption and the VRF function ensure that the relationship k > 3u holds.

[0068] Step 803, for each certificate qc in the certificate set m, the node Pi corresponding to the certificate qc broadcasts a distribution message to all nodes in the group where the node is located when it is determined that it has received the proposal message and belongs to a member of the second type of committee;

[0069] In an embodiment, the distribution message includes the Merkle root z, the erasure code shard d_h of the group B_h where the node is located, and the Merkle root shard w_h;

[0070] For each certificate in the certificate set, the node corresponding to the certificate broadcasts a distribution message to all nodes in the group where the node is located when it is determined that it has received the proposal message and belongs to a member of the second type of committee, including:

[0071] For each certificate qc in the certificate set m, the node Pi corresponding to the certificate qc calculates the erasure code d = Encode(M) and the Merkle root z, the erasure code shard d_h of the group B_h where the node is located, and the Merkle root shard w_h when it is determined that it has received the proposal message and belongs to a member of the second type of committee, and broadcasts the distribution message (Distribute, z, w_h, d_h) to all nodes in the group B_h where the node Pi is located.

[0072] For example, node P1 is in group B_1, corresponding to the erasure code shard d_1 and the Merkle root shard w_1, and broadcasts the distribution message to all nodes in group B_1.

[0073] Step 804: For each node Pj, if the node Pj receives a distribution message, determine whether the node meets the sharing condition according to the distribution message, and broadcast a sharing message to all nodes;

[0074] Among them, determining whether the node meets the sharing condition according to the distribution message includes:

[0075] If the certificate to which the Merkle root z in the distribution message (Distribute, z, w_h, d_h) belongs is the certificate qc of the node Pj, and the node Pj belongs to the group B_h corresponding to the Merkle root shard w_h in the distribution message, and the node Pj belongs to the members of the third type of committee, it is determined that the node Pj meets the sharing condition.

[0076] For example, the node P2 receives the distribution message (Distribute, z, w_1, d_1). The certificate to which the Merkle root z in the distribution message belongs is qc_2, corresponding to the node P2. The node P2 belongs to the group B_1 corresponding to the Merkle root shard w_1 in the distribution message, and the node P2 belongs to the members of the third type of committee. It is determined that the node P2 meets the sharing condition, and then a sharing message (Share, z, w_1, d_1) is sent to all nodes.

[0077] The sharing message (Share, z, w_h, d_h) includes the Merkle root z, the erasure code shard d_h of the group B_h where the node is located, and the Merkle root shard w_h, where Share is an identifier.

[0078] Step 805: For each node, if the node receives a sharing message, determine whether the node meets the aggregation condition according to the sharing message. If so, aggregate the received erasure code shards to obtain a proposal.

[0079] Among them, determining whether the node meets the aggregation condition according to the sharing message includes:

[0080] If the node belongs to the group corresponding to the Merkle book shard w_h in the sharing message (Share, z, w_h, d_h) and belongs to the members of the third type of committee, determine whether it has received u + 1 different erasure code shards d_h; if so, it is determined that the node meets the aggregation condition.

[0081] For example, the node P3 receives the sharing message (Share, z, w_1, d_1), the node P3 belongs to the group B_1 corresponding to w_1, and belongs to the members of the third type of committee, and has received u + 1 different erasure code shards d_1. Then the node P3 meets the aggregation condition.

[0082] In one embodiment, verifying the recovered proposal includes:

[0083] Verify whether the Merkle root corresponding to the verification proposal is the Merkle root in the shared message;

[0084] If so, determine that the verification passes;

[0085] If not, determine that the verification fails.

[0086] An embodiment of the present invention also proposes a large-scale blockchain consensus device, which is applied to a distributed system on the blockchain. Among them, each broadcast stage corresponds to multiple nodes in the distributed system, and its principle is similar to the large-scale blockchain consensus method, which will not be elaborated here.

[0087] Figure 9 It is a schematic diagram of the large-scale blockchain consensus device in the embodiment of the present invention, including:

[0088] A proposal module 901, configured to, in each broadcast stage, each node makes a proposal and generates multiple digital signatures of the node; each node forms a certificate of the node according to multiple digital signatures from other nodes;

[0089] A consensus module 902, configured to enable all nodes to reach a consensus on the certificates of a preset number of nodes, and add the certificates on which consensus is reached to the certificate set;

[0090] A transaction synchronization module 903, configured to, based on the certificate set and the proposal, each node performs transaction synchronization through broadcast distribution messages and shared messages to restore the proposal; verify the restored proposal, and complete the transaction synchronization after the verification passes.

[0091] In one embodiment, the proposal module is specifically configured to:

[0092] At the beginning of each broadcast stage, determine whether each node is a member of each first type of committee;

[0093] Each node broadcasts a proposal message to all nodes;

[0094] For each node, after the node receives the proposal messages broadcast by other nodes, determine whether the node is a member belonging to the first type of committee. If so, calculate the erasure code and the Merkle root, and obtain the digital signature corresponding to each first type of committee of the node according to the numbers of the first type of committees to which the node belongs.

[0095] In one embodiment, the proposal message includes the number of the current broadcast stage, the proposal, and the certificate;

[0096] The proposal module is specifically configured to:

[0097] Calculate the erasure code according to the proposal, and calculate the Merkle root of the erasure code;

[0098] Obtain the digital signature corresponding to each first - type committee of the node according to the number of the current broadcast phase, the Merkle root, and the numbers of the first - type committees to which the node belongs.

[0099] In one embodiment, the proposal module is specifically configured to:

[0100] Each node sends the digital signature corresponding to each first - type committee to the node corresponding to the number of each first - type committee;

[0101] For each node, if the node receives consistent digital signatures sent by at least the first preset number of members of the first - type committee corresponding to the number of the node, update the certificate of the node, and after receiving proposal messages from the second preset number of nodes, determine that the proposal for this broadcast phase is completed.

[0102] In one embodiment, the transaction synchronization module is specifically configured to:

[0103] Group multiple nodes in the distributed system, and each group includes multiple nodes;

[0104] Determine whether each node is a member of each second - type committee or each third - type committee;

[0105] For each certificate in the certificate set, when the node corresponding to the certificate determines that it has received a proposal message and is a member of the second - type committee, broadcast a distribution message to all nodes in the group where the node is located;

[0106] For each node, if the node receives a distribution message, determine whether the node meets the sharing condition according to the distribution message, and broadcast a sharing message to all nodes;

[0107] For each node, if the node receives a sharing message, determine whether the node meets the aggregation condition according to the distribution message. If so, aggregate the received erasure - code shards to obtain a proposal.

[0108] In one embodiment, the distribution message includes the Merkle root, the erasure - code shards of the group where the node is located, and the Merkle - root shards;

[0109] The transaction synchronization module is specifically configured to:

[0110] For each certificate in the certificate set, when the node corresponding to the certificate determines that it has received a proposal message and is a member of the second - type committee, calculate the erasure code and the Merkle root, the erasure - code shards of the group where the node is located, and the Merkle - root shards, and broadcast a distribution message to all nodes in the group where the node is located.

[0111] In one embodiment, the transaction synchronization module is specifically configured to:

[0112] If the certificate to which the Merkle root in the distribution message belongs is the certificate of the node, and the node belongs to the group corresponding to the Merkle root shard in the distribution message, and the node belongs to the members of the third type of committee, it is determined that the node meets the sharing condition;

[0113] If the node belongs to the group corresponding to the Merkle book shard in the sharing message and belongs to the members of the third type of committee, it is determined whether a second preset number of different erasure code shards have been received; if so, it is determined that the node meets the aggregation condition.

[0114] In one embodiment, the transaction synchronization module is specifically configured to:

[0115] Verify whether the Merkle book root corresponding to the proposal is the Merkle book root in the sharing message;

[0116] If so, it is determined that the verification passes; if not, it is determined that the verification fails.

[0117] In summary, in the method and device proposed in the embodiments of the present invention, in each broadcast stage, each node makes a proposal and generates multiple digital signatures of the node; each node forms the certificate of the node according to multiple digital signatures from other nodes; all nodes reach a consensus on the certificates of a preset number of nodes and add the consensus-reached certificates to the certificate set; based on the certificate set and the proposal, each node performs transaction synchronization by broadcasting distribution messages and sharing messages to restore the proposal; the restored proposal is verified, and after the verification passes, the transaction synchronization is completed. Through the above steps, the solution proposed in the embodiments of the present invention can greatly improve the classical consensus malleability, follows the mode of separating block broadcasting and proposal restoration, and can be extended to thousands or even tens of thousands of nodes.

[0118] The embodiments of the present invention also provide a computer device, Figure 10 which is a schematic diagram of the computer device in the embodiments of the present invention. The computer device 1000 includes a memory 1010, a processor 1020, and a computer program 1030 stored on the memory 1010 and executable on the processor 1020. When the processor 1020 executes the computer program 1030, the above-mentioned large-scale blockchain consensus method is implemented.

[0119] The embodiments of the present invention also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned large-scale blockchain consensus method is implemented.

[0120] The embodiments of the present invention also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned large-scale blockchain consensus method is implemented.

[0121] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.

[0122] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0123] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0125] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A large-scale blockchain consensus method, characterized in that, A distributed system applied to a blockchain, where each broadcast phase corresponds to multiple nodes in the distributed system, and the method includes: In each broadcast phase, each node makes a proposal and generates multiple digital signatures of the node; Each node forms a certificate of the node based on multiple digital signatures from other nodes; All nodes reach a consensus on the certificates of a preset number of nodes and add the certificates on which consensus is reached to the certificate set; Based on the certificate set, each node synchronizes transactions by broadcasting distribution messages and sharing messages and restores the proposal; Verify the restored proposal, and complete transaction synchronization after passing the verification.

2. The method according to claim 1, wherein In each broadcast phase, each node makes a proposal and generates multiple digital signatures of the node, including: At the beginning of each broadcast phase, determine whether each node is a member of each first type of committee; Each node broadcasts a proposal message to all nodes; For each node, after the node receives the proposal messages broadcast by other nodes, determine whether the node is a member of the first type of committee. If so, calculate the erasure code and the Merkle root, and obtain the digital signature corresponding to each first type of committee of the node according to the numbers of the first type of committees to which the node belongs.

3. The method according to claim 2, wherein The proposal message includes the number of the current broadcast phase, the proposal, and the certificate; Calculate the erasure code and the Merkle root, and perform digital signature according to the numbers of the first type of committees to which the node belongs, including: Calculate the erasure code according to the proposal and calculate the Merkle root of the erasure code; Obtain the digital signature corresponding to each first type of committee of the node according to the number of the current broadcast phase, the Merkle root, and the numbers of the first type of committees to which the node belongs.

4. The method according to claim 2, characterized in that, Each node forms a certificate of the node based on multiple digital signatures from other nodes, including: Each node sends the digital signature corresponding to each first type of committee to the node corresponding to the number of each first type of committee; For each node, if the node receives consistent digital signatures sent by at least a first preset number of members of the first type of committee corresponding to the number of the node, update the certificate of the node, and determine that the proposal for this broadcast phase is completed after receiving the proposal messages from a second preset number of nodes.

5. The method according to claim 1, wherein Based on the certificate set, each node synchronizes transactions by broadcasting distribution messages and sharing messages and restores the proposal, including: Group multiple nodes in the distributed system, and each group includes multiple nodes; Determine whether each node is a member of each second type of committee or each third type of committee; For each certificate in the certificate set, the node corresponding to the certificate broadcasts a distribution message to all nodes in the group where the node is located after determining that it has received a proposal message and belongs to a member of the second type of committee; For each node, if the node receives a distribution message, determine whether the node meets the sharing condition according to the distribution message and broadcast a sharing message to all nodes; For each node, if the node receives a sharing message, determine whether the node meets the aggregation condition according to the distribution message. If so, aggregate the received erasure code shards to obtain the proposal.

6. The method according to claim 5, wherein The distributed message includes a Merkle root, an erasure code shard of the group where the node is located, and a Merkle root shard; For each certificate in the certificate set, when the node corresponding to the certificate determines that it has received a proposal message and belongs to a member of the second type of committee, it broadcasts the distributed message to all nodes in the group where the node is located, including: For each certificate in the certificate set, when the node corresponding to the certificate determines that it has received a proposal message and belongs to a member of the second type of committee, it calculates the erasure code and the Merkle root, the erasure code shard of the group where the node is located, and the Merkle root shard, and broadcasts the distributed message to all nodes in the group where the node is located.

7. The method according to claim 5, wherein Judging whether the node meets the sharing condition according to the distributed message, including: If the certificate to which the Merkle root in the distributed message belongs is the certificate of the node, and the node belongs to the group corresponding to the Merkle root shard in the distributed message, and the node belongs to a member of the third type of committee, it is determined that the node meets the sharing condition; Judging whether the node meets the aggregation condition according to the sharing message, including: If the node belongs to the group corresponding to the Merkle book shard in the sharing message and belongs to a member of the third type of committee, it is judged whether it has received a second preset number of different erasure code shards; if so, it is determined that the node meets the aggregation condition.

8. The method according to claim 1, characterized in that, Verifying the restored proposal, including: Verifying whether the Merkle book root corresponding to the proposal is the Merkle book root in the sharing message; If so, it is determined that the verification passes; if not, it is determined that the verification fails.

9. A large-scale blockchain consensus device, characterized in that, Applied to a distributed system on a blockchain, where each broadcast stage corresponds to multiple nodes in the distributed system, the device includes: A proposal module, which is used in each broadcast stage, each node makes a proposal and generates multiple digital signatures of the node; each node forms a certificate of the node according to multiple digital signatures from other nodes; A consensus module, which is used for all nodes to reach a consensus on the certificates of a preset number of nodes and add the certificates on which the consensus is reached to the certificate set; A transaction synchronization module, which is used based on the certificate set and the proposal, each node conducts transaction synchronization by broadcasting a distributed message and a sharing message to restore the proposal; verifying the restored proposal, and after the verification passes, completing the transaction synchronization.

10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.