A consensus method and system supporting parallel processing of computational verification

By adopting parallel simulation endorsement and state update methods in the blockchain system, the problems of low throughput and high latency of the blockchain consensus algorithm are solved, efficient parallel processing of computing verification is achieved, and the performance and reliability of the blockchain system are improved.

CN114297723BActive Publication Date: 2025-08-26ZHEJIANG LAB +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111428394.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-08-26
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The existing blockchain consensus algorithm has problems such as low throughput, high consensus latency and low success rate of hot update transactions, which limits its application in actual scenarios.

Method used

The method of parallel simulation endorsement and state update is adopted. The blockchain endorsement node performs parallel simulation endorsement and update based on local state through local state, and combines the longest public path of the transaction tree to generate consensus, reduce the scale of read and write locks, reduce the cost of communication, and realize parallelized computing verification processing with high throughput and low latency.

Benefits of technology

It realizes parallel processing of computing verification with high throughput and low latency, improves the efficiency of blockchain systems, meets the needs of enterprise-level data computing verification, and provides a safe and reliable data processing solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297723B_ABST
    Figure CN114297723B_ABST
Patent Text Reader

Abstract

The present invention discloses a consensus method and system that supports parallel processing of computation and verification. The method includes S1, a transaction execution stage; S2, a consensus generation stage; S3, a result submission stage; the system includes a client, a blockchain endorsement node, a blockchain sorting node and a blockchain accounting node, the client includes a request construction module and a result acquisition module; the blockchain endorsement node includes a simulation endorsement module and a request submission module; the blockchain sorting node includes a transaction verification module, a consensus generation module and a result broadcast module, and the blockchain accounting node includes a consensus result verification module and a status maintenance module; the present invention provides data users with a solution to enterprise-level scenario needs, reduces the high failure rate of chain-up due to hot updates of some data, and proposes a safer and more efficient data computation and verification processing solution for data users and data providers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer blockchain technology and distributed computing, and in particular to a consensus method and system that supports parallel processing of computational verification. Background Art

[0002] Currently, traditional consensus algorithms are divided into CFT and BFT. CFT doesn't account for malicious nodes, while BFT often relies on high-latency consensus across global nodes. Therefore, improving the efficiency of consensus algorithms while imbuing them with verifiable features has become a hot topic of research. Consensus optimization based on blockchain platforms stands out due to its tamper-proof nature. Blockchain is essentially a distributed ledger maintained by multiple nodes in a peer-to-peer network environment through trusted rules and other technologies. It boasts advantages such as decentralization, immutability, and traceability, and is therefore widely used in a variety of scenarios. However, blockchains suffer from issues such as low throughput, high consensus latency, and low success rates for hot-update transactions, limiting their practical application. Therefore, there is an urgent need for a consensus method that supports parallel computational verification. Providing a more convenient and reliable distributed consensus solution for data users and providers is a pressing issue for those skilled in the art.

[0003] Therefore, how to implement a consensus algorithm with high throughput and low latency that supports parallel processing of computation and verification;. Summary of the Invention

[0004] To address the shortcomings of the existing technology and achieve high throughput and low latency for blockchain consensus and support parallel processing of computational verification, the present invention adopts the following technical solutions:

[0005] A consensus method supporting parallel processing of computational verification includes the following steps:

[0006] S1, the transaction execution phase, includes the following steps:

[0007] S11: The client generates a blockchain transaction proposal based on demand and sends it to the blockchain endorsement node;

[0008] S12, the blockchain endorsement node simulates the endorsement of the blockchain transaction proposal based on the node status;

[0009] S13, the blockchain endorsement node updates the local state of the node based on the simulated endorsement result;

[0010] S14, the blockchain endorsement node signs the simulated endorsement result;

[0011] S2, the consensus generation phase, includes the following steps:

[0012] S21: After receiving the blockchain transaction proposal result and its signature of a certain ledger submitted by the blockchain endorsement node, the blockchain sorting node verifies the simulated endorsement result and signature with the endorsement policy.

[0013] S22, the blockchain sorting node will generate a transaction tree one by one according to the blockchain endorsement node to which it belongs based on the verified simulated endorsement results;

[0014] S23: The blockchain sorting node merges the transaction trees corresponding to the endorsement nodes of each blockchain, and takes the transactions on the longest public path to package, sign, generate transaction blocks, and upload them to the chain. Transactions that do not belong to this path are pruned and discarded.

[0015] S24, the blockchain sorting node broadcasts the transaction block to the accounting nodes in the blockchain system;

[0016] S3, the result submission phase, includes the following steps:

[0017] S31, after receiving the transaction block and its signature, the blockchain accounting node verifies the transaction block and signature;

[0018] S32: The blockchain accounting node splits the verified transaction blocks and verifies the simulated endorsement results of each transaction. Based on the verified simulated endorsement results, the node local state and global state are maintained.

[0019] S33: The blockchain accounting node, based on the verified simulated endorsement results, uploads the transaction block to the blockchain and modifies the global state of the blockchain system to ensure that the global state of the node is a subtree of the local state, thus ensuring the consistency of the uploaded data. This method can be extended to generate consensus in distributed computing systems.

[0020] Furthermore, the blockchain endorsement node in S12 simulates the endorsement of the blockchain transaction proposal based on the local state of the node; the blockchain endorsement node in S13 updates the local state of the node according to the simulated endorsement result; the local state of the blockchain endorsement node is different from the global state in the common blockchain system. The local state of the node is only maintained and updated in real time by the node, and is more timely than the global state of the node; the blockchain accounting node in S32 splits the verified transaction blocks, and verifies the simulated endorsement results of each transaction therein, and then maintains the local state of the blockchain accounting node according to the verified simulated endorsement results to ensure the periodic consistency of the local states of the respective accounting nodes of the blockchain system.

[0021] Furthermore, the simulated endorsement in S12 is a parallel simulated endorsement, and the update of the node status in S13 is a parallel update. The parallel simulated endorsement is different from the endorsement process of the original blockchain platform. The parallel simulated endorsement is based on the local status of each blockchain endorsement node, rather than the global status of the original blockchain platform. The parallel simulated endorsement and parallel update based on local status are in line with the characteristics of optimistic consensus, while reducing the scale and number of read-write locks in the parallel calculation process. There are only a very small number of key-based read-write locks, making the parallel calculation more time-effective and more in line with the needs of hot updates of some states in actual business scenarios; combined with S22 and S23, consensus is generated by constructing a transaction tree for each endorsement node and calculating the longest common path of the transaction trees of different endorsement nodes, realizing a high-throughput and low-latency consensus method that supports parallel processing of calculation verification.

[0022] Furthermore, in S14, each endorsing node submits the signed simulated endorsement result directly to the blockchain sorting node corresponding to the ledger to which the transaction belongs, according to the type of blockchain transaction proposal. This submission process is different from the endorsement process of the original blockchain system. The endorsing node does not need to return the endorsement result to the client and then submit it to the sorting node. Instead, the endorsing node directly submits the endorsement result to the sorting node, reducing the communication cost. In the submission process, the endorsing node submits the endorsement result to the sorting node corresponding to the ledger to which the transaction belongs, which will save the communication cost for the sorting node to reach consensus and reduce the consensus delay.

[0023] Furthermore, the maintenance of the node status in S32 includes rollback and update.

[0024] A consensus system that supports parallel processing of computational verification includes: a client, a blockchain endorsement node, a blockchain sorting node, and a blockchain accounting node. The client includes a request construction module and a result acquisition module. The blockchain endorsement node includes a simulation endorsement module and a request submission module. The blockchain sorting node includes a transaction verification module, a consensus generation module, and a result broadcast module. The blockchain accounting node includes a consensus result verification module and a state maintenance module.

[0025] The request construction module allows users to construct blockchain transaction requests based on their own needs, required computing source code and data, and send them to the blockchain endorsement node;

[0026] The result acquisition module obtains the transaction on-chain consensus result sent by the blockchain accounting node;

[0027] The simulated endorsement module simulates the endorsement of the blockchain transaction request sent by the client based on the blockchain node status;

[0028] The request submission module signs and submits the simulated endorsement result; and directly sends the simulated endorsement result to the blockchain sorting node corresponding to the ledger to which it belongs.

[0029] The transaction verification module performs signature verification on the simulated endorsement results sent by each blockchain endorsement node to ensure that the simulated endorsement results comply with the client's endorsement policy;

[0030] The consensus generation module generates a transaction tree for each verified blockchain endorsement node based on the ledger type, calculates the longest public path of the transaction tree to generate consensus, and packages, signs, generates transaction blocks for transactions on the public path and uploads them to the blockchain, while pruning and discarding transactions that do not belong to the path;

[0031] The result broadcast module broadcasts the latest transaction block on the chain to the blockchain accounting node.

[0032] The consensus result verification module verifies the legitimacy of the consensus transaction blocks sent by the sorting nodes and submits the verified blocks to the status maintenance module;

[0033] In the state maintenance module, the blockchain accounting node verifies the endorsement results of transactions in the transaction blocks that have passed the legitimacy verification one by one, and puts the transaction blocks on the chain to maintain the global state of the blockchain system.

[0034] Furthermore, the simulated endorsement module adds and maintains local status in each blockchain endorsement node, and simulates the endorsement of the blockchain transaction request sent by the client based on the local status of the blockchain endorsement node. The local status of the blockchain endorsement node is different from the global status in the common blockchain system. The local status of the node is only maintained and updated in real time by this node, and is more timely than the global status of the node. The status maintenance module maintains the local status of the blockchain accounting node based on the verified simulated endorsement results to ensure the periodic consistency of the local status of each accounting node in the blockchain system.

[0035] Furthermore, the simulated endorsement module performs parallel simulated endorsement on blockchain transaction requests and updates the status of blockchain endorsement nodes in parallel. Parallel simulated endorsement is different from the endorsement process of the original blockchain platform. Parallel simulated endorsement is based on the local status of each blockchain endorsement node, rather than the global status of the original blockchain platform. Parallel simulated endorsement and parallel update based on local status meet the characteristics of optimistic consensus, while reducing the scale and number of read-write locks in the parallel computing process. There are only a very small number of key-based read-write locks, making parallel computing more time-efficient and more in line with the needs of hot updates of some states in actual business scenarios; combined with S22 and S23, consensus is generated by constructing a transaction tree for each endorsement node and calculating the longest common path of transaction trees of different endorsement nodes, realizing a high-throughput and low-latency consensus method that supports parallel computing and verification.

[0036] Furthermore, the request submission module signs the simulated endorsement result and directly sends the simulated endorsement result to the blockchain sorting node corresponding to the ledger to which it belongs. This submission process is different from the endorsement process of the original blockchain system. The endorsing node does not need to return the endorsement result to the client and then submit it to the sorting node. Instead, the endorsing node directly submits the endorsement result to the sorting node, reducing the communication cost. In the submission process, the endorsing node submits the endorsement result to the sorting node corresponding to the ledger to which the transaction belongs, which will save communication costs for the sorting node to reach consensus and reduce consensus delay.

[0037] Furthermore, the result acquisition module maintains a pair of public and private keys. After the blockchain accounting node cluster encrypts the transaction on-chain consensus result using the public key and sends it to the client, the result acquisition module decrypts the transaction on-chain consensus result using the private key.

[0038] The advantages and beneficial effects of the present invention are:

[0039] The present invention is based on the distributed framework of the Hyperledger Fabric blockchain platform and constructs a consensus mechanism that supports parallel processing of computation and verification. This mechanism implements verifiable parallel computation, verification, and consensus, providing a high-throughput, low-latency, and parallel computation and verification consensus solution for distributed systems. This helps data providers use the blockchain platform for efficient data computation and verification, and helps data users resolve the high failure rate of on-chain data uploads caused by hot updates of some data. The Hyperledger Fabric used in the present invention can provide features such as non-tamperability and traceability, while supporting a consensus method for parallel processing of computation and verification, providing data users with a solution to enterprise-level scenario requirements and proposing a more secure and efficient data computation and verification processing solution for both data users and data providers. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flow chart of the present invention.

[0041] Figure 2 It is a flow chart of the transaction execution phase in the present invention.

[0042] Figure 3 This is a flow chart of the consensus generation stage in the present invention.

[0043] Figure 4 It is a flow chart of the result submission stage in the present invention. DETAILED DESCRIPTION

[0044] The following describes the specific embodiments of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.

[0045] A consensus system that supports parallel processing of computational verification, including four entities: clients, blockchain endorsement nodes, blockchain sorting nodes, and blockchain accounting nodes.

[0046] (1) The client can be implemented by extending the ordinary blockchain client. In addition to the functions of the ordinary blockchain client, the client also includes:

[0047] The request construction module allows users to construct transaction requests based on their own needs, required computing source code and data, and send the transaction requests to the blockchain endorsement node.

[0048] In the result acquisition module, client users need to maintain their own public and private keys to encrypt and decrypt the transaction consensus results. At the same time, when the blockchain accounting node cluster sends the encrypted transaction consensus results to the client, the private key is needed to decrypt the transaction consensus results.

[0049] (2) Blockchain endorsement nodes can be implemented by extending and modifying the existing blockchain platform. The deployed extended blockchain can be other blockchain platforms such as Ethereum and Hyperledger Fabric. This entity includes:

[0050] The simulated endorsement module can be implemented based on the basic functions of the existing blockchain platform, but the functions need to be modified. Local state is added and maintained at each endorsing node, and transactions sent by the client are simulated endorsed based on the local state.

[0051] The request submission module can be implemented based on the basic functions of the existing blockchain platform, but the functions need to be modified. After the endorsing node completes the simulated endorsement, it directly sends the simulated endorsement result to the blockchain sorting node corresponding to the ledger to which it belongs.

[0052] (3) Blockchain sorting nodes can be implemented by extending and modifying the existing blockchain platform. The deployed extended blockchain can be other blockchain platforms such as Ethereum and Hyperledger Fabric. This entity includes:

[0053] In the transaction verification module, the sorting node performs signature verification on the simulated endorsement results sent by each endorsing node to ensure that the endorsement results comply with the client's endorsement policy.

[0054] In the consensus generation module, the sorting node generates a transaction tree for each endorsement node based on the ledger type, generates consensus by calculating the longest public path of the transaction tree, and packages, signs, generates blocks, and uploads them to the chain.

[0055] In the result broadcast module, the sorting node broadcasts the latest block on the chain to the blockchain accounting node.

[0056] (4) Blockchain accounting nodes can be implemented by extending and modifying the existing blockchain platform. The deployed extended blockchain can be other blockchain platforms such as Ethereum and Hyperledger Fabric. This entity includes:

[0057] Consensus result verification module: The accounting node verifies the legitimacy of the consensus block sent by the sorting node and submits the verified block to the status maintenance module.

[0058] State maintenance module: The accounting node verifies the transactions in the blocks that have passed the legitimacy verification one by one, verifies and maintains the local state of the node for successful transactions, and after maintaining the local state, puts the block on the chain and maintains the global state of the blockchain system.

[0059] The relationship between system instances and process control Figure 1 As shown, it is divided into three parts: transaction execution stage, consensus generation stage and result submission stage. This embodiment uses Hyperledger Fabric as the blockchain platform for implementation and is implemented based on the Fabric process.

[0060] After initialization, the transaction execution phase process is as follows Figure 2 As shown, it involves a request construction module, a simulated endorsement module, and a request submission module. This stage is described in detail below with reference to the accompanying drawings and embodiments:

[0061] (1) The client generates a blockchain transaction proposal based on demand and sends it to the blockchain system endorsement node;

[0062] (2) The endorsing node simulates the blockchain transaction proposal in parallel based on the node’s local state;

[0063] (3) The endorsing node updates the local state of the node in parallel based on the simulated endorsement result;

[0064] (4) The endorsement node simulates the endorsement result to sign and submits it directly to the corresponding blockchain system sorting node according to the type of transaction proposal;

[0065] After the blockchain endorsement node sends a data packet to the sorting node cluster, the consensus generation phase process is as follows: Figure 3 As shown, it involves a transaction verification module, a consensus generation module, and a result broadcast module. This stage is described in detail below with reference to the accompanying drawings and embodiments:

[0066] (1) After receiving the transaction proposal result and its signature of a certain ledger submitted by the endorsing node, the sorting node verifies the result, signature and endorsement policy;

[0067] (2) The sorting node generates a transaction tree for each of the verified simulated endorsement results according to the endorsement nodes to which they belong;

[0068] (3) The sorting node merges the transaction trees corresponding to each endorsing node, and takes the transactions on the longest public path to package, sign, generate transaction blocks, and upload them to the chain. Transactions that do not belong to the path are pruned and discarded;

[0069] (4) The sorting node broadcasts the transaction block to the accounting nodes in the blockchain system.

[0070] After the sorting node cluster sends the results to the blockchain accounting node, the result submission phase process is as follows Figure 4 As shown, it involves the consensus result verification module and the status maintenance module. The following is a detailed description of this stage with reference to the accompanying drawings and embodiments:

[0071] (1) After receiving the transaction block and its signature, the accounting node verifies the transaction block and signature;

[0072] (2) The accounting node splits the verified transaction blocks and verifies the endorsement results of each transaction. Based on the verified endorsement results, the accounting node maintains, rolls back, and updates its local state to ensure the periodic consistency of the local states of the accounting nodes in the blockchain system.

[0073] (3) The accounting node uploads the data to the chain based on the verified endorsement results and modifies the global state of the blockchain system to ensure that the global state of the node is a subtree of the local state and the consistency of the data uploaded to the chain is guaranteed.

[0074] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A consensus method that supports parallel processing of computational verification, characterized in that The steps include: S1, the transaction execution phase, includes the following steps: S11, the client generates a blockchain transaction proposal and sends it to the blockchain endorsement node; S12, the blockchain endorsement node performs parallel simulated endorsement on the blockchain transaction proposal based on the local state of the endorsement node; S13, the blockchain endorsement node updates the local state of the endorsement node in parallel based on the simulated endorsement result; S14, the blockchain endorsement node signs the simulated endorsement result; S2, the consensus generation phase, includes the following steps: S21, the blockchain sorting node will simulate the endorsement result and verify the signature and endorsement policy; S22, the blockchain sorting node will generate a transaction tree one by one according to the blockchain endorsement node to which it belongs based on the verified simulated endorsement results; S23: The blockchain sorting node merges the transaction trees corresponding to the endorsement nodes of each blockchain, and takes the transactions on the longest public path to package, sign, generate transaction blocks, and upload them to the chain. Transactions that do not belong to this path are pruned and discarded. S24, the blockchain sorting node broadcasts the transaction block to the blockchain accounting node; S3, the result submission phase, includes the following steps: S31, after receiving the transaction block and its signature, the blockchain accounting node verifies the transaction block and signature; S32: The blockchain accounting node splits the verified transaction blocks and verifies the simulated endorsement results of each transaction. Based on the verified simulated endorsement results, the local state of the blockchain accounting node is maintained. S33, the blockchain accounting node puts the transaction block on the chain based on the verified simulated endorsement result and modifies the global state of the blockchain.

2. A consensus method supporting parallel processing of computational verification according to claim 1, characterized in that In S14, each endorsing node directly submits the signed simulated endorsement result to the corresponding blockchain sorting node according to the type of blockchain transaction proposal.

3. A consensus method supporting parallel processing of computational verification according to claim 1, characterized in that The maintenance of the node status in S32 includes rollback and update.

4. A system using the consensus method supporting parallel processing of computational verification according to claim 1, comprising: Client, blockchain endorsement node, blockchain sorting node and blockchain accounting node, characterized in that the client includes a request construction module and a result acquisition module, the blockchain endorsement node includes a simulation endorsement module and a request submission module, the blockchain sorting node includes a transaction verification module, a consensus generation module, and a result broadcast module, and the blockchain accounting node includes a consensus result verification module and a state maintenance module; The request construction module constructs a blockchain transaction request and sends it to the blockchain endorsement node; The result acquisition module obtains the transaction on-chain consensus result sent by the blockchain accounting node; The simulated endorsement module simulates the endorsement of the blockchain transaction request sent by the client based on the blockchain node state; adds and maintains the local state at each blockchain endorsement node, simulates the endorsement of the blockchain transaction request sent by the client in parallel based on the local state of the blockchain endorsement node, and updates the local state of the blockchain endorsement node in parallel; The request submission module signs and submits the simulated endorsement result; The transaction verification module performs signature verification on the simulated endorsement result sent by the blockchain endorsement node to ensure that the simulated endorsement result complies with the endorsement policy; The consensus generation module generates a transaction tree for the verified blockchain endorsement nodes based on the ledger type, calculates the longest public path of the transaction tree to generate consensus, and packages, signs, generates transaction blocks for the transactions on the public path and uploads them to the blockchain, while pruning and discarding transactions that do not belong to the path; The result broadcast module broadcasts the transaction blocks on the chain to the blockchain accounting nodes; The consensus result verification module verifies the legitimacy of the transaction block; The state maintenance module verifies the endorsement results of transactions in the transaction blocks that have passed the legitimacy verification one by one, and puts the transaction blocks on the chain to maintain the global state of the blockchain system; based on the verified simulated endorsement results, the local state and global state of the blockchain accounting node are maintained in parallel.

5. The system according to claim 4, characterized in that The request submission module signs the simulated endorsement result and directly sends the simulated endorsement result to its corresponding blockchain sorting node.

6. The system according to claim 4, characterized in that The result acquisition module maintains a pair of public and private keys. After the blockchain accounting node cluster encrypts the transaction on-chain consensus result using the public key and sends it to the client, the result acquisition module decrypts the transaction on-chain consensus result using the private key.

Citation Information

Patent Citations

  • Transaction processing method of block chain network, node, equipment and storage medium

    CN112232822A

  • Transaction processing method and device of block chain system, medium and electronic equipment

    CN112232823A