A parallel chain system and its consensus method, device and storage medium

By deploying verification key and transaction verification modules on the main chain, using zero-knowledge proof to reduce the disk space requirements of parachain nodes, the problem of difficulty in deploying parachain nodes on mobile terminals is solved, and the deployment of light nodes and consensus security is achieved .

CN114372799BActive Publication Date: 2024-12-31HANGZHOU FUZAMEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210001160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2024-12-31
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

In the parachain consensus mechanism, it is difficult to deploy parachain nodes on mobile terminals because a large amount of disk space is required to store blocks and multiple consensus nodes are required to agree, which exceeds the configuration requirements of mobile terminals.

Method used

Using a parachain system based on zero-knowledge proof, by deploying verification keys and transaction verification modules on the main chain, maintenance nodes only need to maintain the parachain account system and temporary block database, generate zero-knowledge proofs and submit them to the main chain for verification, and complete Consensus reduces the disk space requirements of parachain nodes.

Benefits of technology

The possibility of deploying light nodes on mobile terminals is realized, the disk space requirements of parachain nodes is reduced, the security and consistency of consensus is ensured, and redundant verification of multiple consensus nodes is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372799B_ABST
    Figure CN114372799B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer technology, and in particular, relates to a parallel chain system and its consensus method, device and storage medium. After the parallel chain transaction of the present invention is packaged into a block locally at the parallel chain maintenance node, it is only a public input data of a zero-knowledge proof and a zero-knowledge proof submitted to the main chain. After the main chain verification is completed, the local block can be deleted. Since the zero-knowledge proof is adopted, the verification key is deployed on the main chain, and all transaction verification modules and circuits are verified by the main chain. No one can forge it, and multiple consensus nodes are not required to make a consensus, because the zero-knowledge proof circuit that has passed the main chain consensus meets the consensus requirements. Therefore, the parallel chain only needs to maintain a parallel chain account system in the maintenance node locally, a transaction database for transaction reception and caching, and a small temporary block database, so that the light node is light enough to be deployed on devices without enough disks, such as personal terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular, relates to a parallel chain system and its consensus method, device and storage medium. Background Art

[0002] In the parallel chain consensus mechanism proposed by the applicant, the parallel chain node synchronizes the parallel chain transaction from the main chain to generate the parallel chain block. Each authorized node of the parallel chain packages the consensus transaction (executed on the main chain and the parallel chain respectively) according to the execution result of the parallel chain block of the current node and sends it to the main chain node. The main chain node records each consensus transaction on the main chain for voting. If it meets the pre-configured conditions (for example, more than 2 / 3 of the votes are consistent, etc.), the parallel chain block consensus is successful, thereby completing the parallel chain consensus with the help of the main chain consensus; after the parallel chain node synchronizes to the above consensus transactions from the main chain and packages them for execution, it votes locally to complete the parallel chain self-consensus; after the parallel chain node synchronizes to the above consensus transactions from the main chain and packages them for execution, it votes locally to complete the parallel chain self-consensus.

[0003] In the above-mentioned parallel chain consensus mechanism, it is difficult to deploy parallel chain nodes on mobile terminals. This is mainly because parallel chain nodes need to store parallel chain blocks locally, which takes up a relatively large amount of disk space and requires multiple consensus nodes to complete consensus. General mobile terminals cannot meet the configuration requirements of parallel chain nodes. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a parallel chain system based on zero-knowledge proof and a consensus method thereof, which can greatly reduce the demand for disk space of parallel chain nodes. The parallel chain nodes only need to maintain the parallel chain account system and temporarily store a small number of blocks locally.

[0005] The present invention adopts the following technical solutions.

[0006] In a first aspect, a parallel chain system is provided, comprising a main chain and a parallel chain, wherein a zero-knowledge proof circuit and a transaction verification module are deployed on the parallel chain, wherein both the zero-knowledge proof circuit and the transaction verification module are subject to the main chain consensus, wherein a verification key is deployed on the main chain, wherein the verification key is used to verify the zero-knowledge proof generated by the zero-knowledge proof circuit, wherein at least one maintenance node and a plurality of light nodes are provided in the parallel chain, wherein the maintenance node and the light node each maintain a corresponding account system, wherein a transaction database and a temporary block database are deployed in the maintenance node, wherein the temporary block database is used to temporarily store parallel chain blocks; wherein the transaction verification module is used to verify parallel chain transactions according to the account system and the transaction data of the parallel chain transactions, wherein the zero-knowledge proof circuit comprises a transaction signature verification circuit and a status verification circuit for verifying the account status before and after the transaction is executed, wherein the zero-knowledge proof circuit is used to generate a corresponding zero-knowledge proof according to the block data of the parallel chain block and the corresponding public input, wherein the public input is generated based on the corresponding account system update data, wherein the account system update data is generated based on the execution of the parallel chain transaction in the parallel chain block, and wherein the account system update data is used to update the account system of the parallel chain.

[0007] Preferably, the maintenance node is also deployed with a block storage database, which stores all parachain blocks.

[0008] In a second aspect, a parallel chain consensus method is provided, the method being applicable to the parallel chain system as described in the first aspect above, the method comprising:

[0009] The light node sends the parachain transaction to the maintenance node;

[0010] The maintenance node receives and verifies the parachain transactions and stores the received transactions in the transaction database; wherein the maintenance node verifies the legitimacy of the parachain transactions through the transaction verification module;

[0011] The maintenance node packages several parallel chain transactions in its transaction database to generate a first block, executes all parallel chain transactions in the first block, updates the parallel chain account system according to the execution results, and stores the first block in a temporary block database;

[0012] Generate first account system update data according to the execution results of all parallel transactions in the first block, and generate corresponding first public input data based on the first account system update data; wherein the first account system update data is data used for account system update caused by the execution of all parallel transactions in the first block;

[0013] Constructing first zero-knowledge proof data using block data of the first block and first public input data;

[0014] The maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain;

[0015] The main chain verifies the first zero-knowledge proof data based on the verification key and the first public input data. If the verification is successful, the main chain consensus is completed;

[0016] After completing the main chain consensus, the maintenance node deletes the first block stored in its temporary block database;

[0017] The light nodes in the parallel chain update the account systems they maintain by synchronizing the first zero-knowledge proof data and the first public input data.

[0018] Preferably, after completing the main chain consensus, the maintenance node stores the first block in the block storage database before deleting the first block.

[0019] Preferably, all parallel chain transactions in the transaction database are configured with transaction fees. When the maintenance node packages several parallel chain transactions in the transaction database to generate the first block, the corresponding packaging priority is configured according to the transaction fees of the parallel chain transactions in the transaction database.

[0020] Preferably, the zero-knowledge proof computing device of the maintenance node is provided with a corresponding device performance score, and devices with different device performance scores are allocated to perform zero-knowledge proof data calculation according to the transaction fees of the parallel chain transactions in the transaction database.

[0021] Preferably, in the process of submitting the first zero-knowledge proof data and the first public input data to the main chain, the maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain in batches according to the generation order of the first zero-knowledge proof data and the first public input data.

[0022] In a third aspect, a computer device is provided, comprising one or more processors;

[0023] a memory for storing one or more programs,

[0024] When the one or more programs are executed by the one or more processors, the one or more processors execute the method as described in the second aspect above.

[0025] According to a fourth aspect, a storage medium storing a computer program is provided, and when the program is executed by a processor, the method described in the second aspect is implemented.

[0026] The beneficial effect of the present invention is that in the present invention, the parallel chain system and the corresponding consensus method are constructed based on zero-knowledge proof. After the parallel chain transaction is packaged into a block locally at the parallel chain maintenance node, it is submitted to the main chain with only a zero-knowledge proof of public input data (built based on the account system update data) and a zero-knowledge proof. After the main chain verification is completed, the local block can be deleted. Due to the use of zero-knowledge proof, the verification key is deployed on the main chain, and all transaction verification modules and circuits are verified by the main chain, that is, no one can forge it, and there is no need for multiple consensus nodes to make a consensus, because the zero-knowledge proof circuit that has passed the main chain consensus meets the consensus requirements. Therefore, the parallel chain only needs to maintain a parallel chain account system in the maintenance node, a transaction database for transaction reception and caching, and a small temporary block database locally, so that the light node is light enough to be deployed on devices without enough disks, such as personal terminals. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a schematic diagram of a consensus method flow chart of Example 1 of the present invention.

[0028] Figure 2 This is a schematic diagram of the structure of a computer device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0029] The present invention is further described in detail below in conjunction with specific embodiments and the accompanying drawings. Those of ordinary skill in the art will be able to implement the present invention based on these descriptions. In addition, the embodiments of the present invention involved in the following description are generally only embodiments of a part of the present invention, rather than all embodiments. Therefore, based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative work should fall within the scope of protection of the present invention. Unless otherwise specified, the methods briefly described in the embodiments of the present invention are methods mastered by those skilled in the art.

[0030] Example 1

[0031] The present embodiment provides a parachain system, including a main chain and a parachain, wherein a zero-knowledge proof circuit and a transaction verification module are deployed on the parachain, wherein both the zero-knowledge proof circuit and the transaction verification module are subject to the main chain consensus, wherein a verification key is deployed on the main chain, wherein the verification key is used to verify the zero-knowledge proof generated by the zero-knowledge proof circuit, wherein at least one maintenance node and a plurality of light nodes are provided in the parachain, wherein the maintenance node and the light node each maintain a corresponding account system, wherein a transaction database and a temporary block database are deployed in the maintenance node, wherein the temporary block database is used to temporarily store parachain blocks; wherein the transaction verification module is used to verify the parachain transaction according to the account system and the transaction data of the parachain transaction, wherein the zero-knowledge proof circuit includes a transaction signature verification circuit and a status verification circuit for verifying the account status before and after the transaction is executed, wherein the zero-knowledge proof circuit is used to generate a corresponding zero-knowledge proof according to the block data of the parachain block and the corresponding public input, wherein the public input is generated based on the corresponding account system update data, wherein the account system update data is generated based on the execution of the parachain transaction in the parachain block, and wherein the account system update data is used to update the account system of the parachain.

[0032] Furthermore, the maintenance node is also deployed with a block storage database, which stores all parallel chain blocks.

[0033] As another aspect of this embodiment, a parallel chain consensus method is provided, which is applicable to the parallel chain system as described above. The method flow is as follows: Figure 1 As shown, including:

[0034] The light node sends the parachain transaction to the maintenance node;

[0035] The maintenance node receives and verifies the parachain transactions and stores the received transactions in the transaction database; wherein the maintenance node verifies the legitimacy of the parachain transactions through the transaction verification module;

[0036] The maintenance node packages several parallel chain transactions in its transaction database to generate a first block, executes all parallel chain transactions in the first block, updates the parallel chain account system according to the execution results, and stores the first block in a temporary block database;

[0037] Generate first account system update data according to the execution results of all parallel transactions in the first block, and generate corresponding first public input data based on the first account system update data; wherein the first account system update data is data used for account system update caused by the execution of all parallel transactions in the first block;

[0038] Constructing first zero-knowledge proof data using block data of the first block and first public input data;

[0039] The maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain;

[0040] The main chain verifies the first zero-knowledge proof data based on the verification key and the first public input data. If the verification is successful, the main chain consensus is completed;

[0041] After completing the main chain consensus, the maintenance node deletes the first block stored in its temporary block database;

[0042] The light nodes in the parallel chain update the account systems they maintain by synchronizing the first zero-knowledge proof data and the first public input data.

[0043] Furthermore, after the main chain consensus is completed, the maintenance node stores the first block in the block storage database before deleting the first block.

[0044] Furthermore, all parallel chain transactions in the transaction database are configured with transaction fees. When the maintenance node packages several parallel chain transactions in the transaction database to generate the first block, the corresponding packaging priority is configured according to the transaction fees of the parallel chain transactions in the transaction database.

[0045] Furthermore, the zero-knowledge proof computing device of the maintenance node is provided with a corresponding device performance score, and devices with different device performance scores are allocated to perform zero-knowledge proof data calculation according to the transaction fees of the parallel chain transactions in the transaction database.

[0046] Furthermore, in the process of submitting the first zero-knowledge proof data and the first public input data to the main chain, the maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain in batches according to the generation order of the first zero-knowledge proof data and the first public input data.

[0047] In this embodiment, the parallel chain system and the corresponding consensus method are constructed based on zero-knowledge proof. After the parallel chain transaction is packaged into blocks locally in the parallel chain maintenance node, it is submitted to the main chain with only a zero-knowledge proof of public input data (built based on the account system update data) and a zero-knowledge proof. After the main chain verification is completed, the local block can be deleted. Due to the use of zero-knowledge proof, the verification key is deployed on the main chain, and all transaction verification modules are verified by the main chain, which means that no one can forge it, and there is no need for multiple consensus nodes to make consensus, because the zero-knowledge proof circuit that has passed the main chain consensus meets the consensus requirements. Therefore, the parallel chain only needs to maintain a parallel chain account system in the maintenance node locally, a transaction database for transaction reception and caching, and a small temporary block database, making the parallel chain node more lightweight.

[0048] Example 2

[0049] This embodiment provides a parallel chain system, including a main chain A chain and a parallel chain B chain of A chain. A verification key for verifying the zero-knowledge proof generated by the B chain is deployed in the A chain, denoted as Kb. A transaction verification module and a zero-knowledge proof circuit that have passed the A chain consensus are deployed in the B chain. A maintenance node and multiple light nodes are deployed in the B chain. The maintenance node and the light node each maintain an account system of a parallel chain, which is similar to a blockchain ledger, but only records the world account status of the B chain. The maintenance node is configured with a transaction database and a temporary block database. The transaction database is used to store the B chain transactions received by the maintenance node and the verified transactions. The B-chain transaction, the temporary database is used to temporarily store the generated parachain blocks, the transaction verification module is used to verify the B-chain transaction according to the B-chain account system and the data of a certain B-chain transaction, the zero-knowledge proof circuit includes a transaction signature verification circuit and a state verification circuit for verifying the account state before and after the transaction is executed, the zero-knowledge proof circuit is used to generate the zero-knowledge proof of the block according to the block data of the block in the B-chain and the corresponding public input, the public input is generated based on the account system update data, the account system update data is generated according to the execution of the B-chain transaction in the block, and the account system update data is used to update the account system of the B-chain. The transaction signature verification circuit verifies the transactions in an entire parachain block before generating the zero-knowledge proof. Although the transaction has been verified before, all transactions in the block are verified before consensus to prevent cheating.

[0050] Preferably, a block storage database can also be deployed on the maintenance node to store all parachain blocks in the database to retain all transaction records of the parachain. However, in fact, since the parachain is based on the main chain for consensus, all parachain transactions are retained in the main chain. Even if the maintenance node is damaged, all parachain transactions can be synchronized from the main chain for recovery. However, the advantage of configuring a block storage database is that there is no need to synchronize from the main chain every time, and it can be called directly on the maintenance node, which is more convenient for light nodes on the parachain.

[0051] The advantage of the above system is that the light node does not need to store any B-chain blocks locally. The consensus on the B-chain side is based on the account system of the B-chain maintained by each party. Further, it can be the latest status of the account system of the B-chain. As long as the latest status is consistent, it means that a consensus has been reached. All transaction records of the B-chain can be synchronized from the A-chain, but they are not stored locally on the node. They can be synchronized from the A-chain when needed, thereby reducing the requirements for disks in the deployment of B-chain nodes.

[0052] As another aspect of this embodiment, a base parallel chain consensus method is provided, which is applicable to the above-mentioned parallel chain system and includes the following steps:

[0053] The maintenance node on the B chain receives several B chain transactions from the A chain and stores these transactions in the cache area of ​​the transaction database of the maintenance node. The maintenance node verifies the legitimacy of the received B chain transactions through the transaction verification module. If the verification passes, the legal B chain transactions are stored in the transaction database. If they are illegal, the corresponding B chain transactions are deleted.

[0054] The maintenance node packages several B-chain transactions in the transaction database to generate the first block, executes all B-chain transactions in the first block, updates the B-chain account system according to the execution results of these transactions, and stores the first block in the temporary block database of the maintenance node.

[0055] Generate first account system update data according to the execution results of all B-chain transactions in the first block, and generate corresponding first public input data based on the first account system update data; wherein the first account system update data is the data used for updating the account system of the B-chain.

[0056] The first zero-knowledge proof data is constructed using the block data of the first block and the first public input data. Specifically, the zero-knowledge proof circuit first verifies the signatures of all transactions in the first block according to the transaction signature verification circuit, and then the state verification circuit verifies whether the account state before and after the transaction is accurate according to the public data and the transactions in the first block, and generates the corresponding first zero-knowledge proof after the verification is passed.

[0057] The maintenance node submits the first zero-knowledge proof data and the first public input data to the A chain.

[0058] Chain A verifies the first zero-knowledge proof data based on the verification key and the first public input data. If the verification is successful, the consensus of the first block on chain A is completed;

[0059] After completing the consensus of the first block in chain A, the maintenance node can delete the first block stored in its temporary block database, and other light nodes in chain B update their respective maintained account systems by synchronizing the first zero-knowledge proof data and the first public input data.

[0060] Furthermore, each parallel chain transaction in the transaction database is configured with a transaction fee. When the maintenance node packages several B-chain transactions in the transaction database to generate the first block, the corresponding packaging priority is configured according to the transaction fee of the parallel chain transaction in the transaction database. A high priority means a higher handling fee, so that high-priority transactions will be packaged into blocks first, especially priority transactions exceeding a certain threshold will be packaged into a separate block and submitted for proof, so that account synchronization will be faster.

[0061] Furthermore, each maintenance node in the B chain is provided with a corresponding device performance score, and devices with different device performance scores are allocated according to the transaction fees of the parallel chain transactions in the first transaction database to perform zero-knowledge proof data calculation.

[0062] Furthermore, in the process of submitting the first zero-knowledge proof data and the first public input data to the A chain, the maintenance node submits them to the A chain in batches according to the generation order of the first zero-knowledge proof data and the first public input data.

[0063] In the above process, the maintenance node of the B chain only needs to temporarily store the first block when the first block is generated and the A chain has not yet completed the verification of the first zero-knowledge proof and the first public input data corresponding to the first block. The original parallel chain, that is, all authorized nodes of the above-mentioned B chain, store the block data of the entire blockchain. The consensus process is the process of unifying the ledger. In this embodiment, the maintenance node is used to maintain the account system of the parallel chain rather than the block data of the entire parallel chain. Maintaining the account system of the parallel chain can be understood as the world account status of the parallel chain. Each update only needs to update the world account status. The occupied disk space is greatly reduced compared to maintaining all the blocks in the parallel chain. In order to facilitate the consensus on the parallel chain side, a zero-knowledge proof circuit is introduced. The circuit is executed according to a unified logic, and the logic has passed the consensus of the main chain. The original consensus of the parallel chain is based on the main chain. Therefore, the setting of the zero-knowledge proof circuit on the parallel chain side simplifies the local consensus. There is no need for multiple consensus nodes to reach a consensus. It only needs the generated zero-knowledge proof to pass the verification.

[0064] Example 3

[0065] A computer device comprises: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method described in Example 1.

[0066] A storage medium storing a computer program, which, when executed by a processor, implements the method described in the above embodiment 1.

[0067] Figure 2 A schematic diagram of the structure of a device provided in this embodiment.

[0068] like Figure 2As shown, as another aspect, the present application also provides a computer device 100, including one or more central processing units (CPU) 101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 102 or the program loaded from the storage part 108 to the random access memory (RAM) 503. In the RAM 103, various programs and data required for the operation of the device 100 are also stored. The CPU 101, the ROM 102, and the RAM 103 are connected to each other through a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0069] The following components are connected to the I / O interface 105: an input section 106 including a keyboard, a mouse, etc.; an output section 107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 108 including a hard disk, etc.; and a communication section 109 including a network interface card such as a LAN card, a modem, etc. The communication section 109 performs communication processing via a network such as the Internet. A driver 110 is also connected to the I / O interface 505 as needed. A removable medium 111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the driver 110 as needed, so that a computer program read therefrom is installed into the storage section 108 as needed.

[0070] In particular, according to the embodiments disclosed in the present application, the method described in the above embodiment 1 can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the method described in any of the above embodiments. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 109, and / or installed from the removable medium 111.

[0071] As another aspect, the present application further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus of the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the method described in the present application.

[0072] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs a specified function or operation, or can be realized by a combination of dedicated hardware and computer instructions.

[0073] The units or modules involved in the embodiments described in the present application may be implemented by software or by hardware. The units or modules described may also be arranged in a processor. For example, each of the units may be a software program arranged in a computer or a mobile smart device, or may be a separately configured hardware device. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0074] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept of the present application. For example, the above features are replaced with the technical features with similar functions disclosed in the present application (but not limited to) to form a technical solution.

Claims

1. A parallel chain system, characterized in that: It includes a main chain and a parallel chain, wherein a zero-knowledge proof circuit and a transaction verification module are deployed on the parallel chain, wherein both the zero-knowledge proof circuit and the transaction verification module are subject to the main chain consensus, wherein a verification key is deployed on the main chain, wherein the verification key is used to verify the zero-knowledge proof generated by the zero-knowledge proof circuit, wherein at least one maintenance node and a plurality of light nodes are provided in the parallel chain, wherein the maintenance node and the light node each maintain a corresponding account system, wherein a transaction database and a temporary block database are deployed in the maintenance node, wherein the temporary block database is used to temporarily store the parallel chain blocks; wherein the transaction verification module is used to verify the parallel chain transaction according to the transaction data of the account system and the parallel chain transaction, wherein the zero-knowledge proof circuit includes a transaction signature verification circuit and a status verification circuit for verifying the account status before and after the transaction is executed, wherein the zero-knowledge proof circuit is used to generate a corresponding zero-knowledge proof according to the block data of the parallel chain block and the corresponding public input, wherein the public input is generated based on the corresponding account system update data, wherein the account system update data is generated based on the execution of the parallel chain transaction in the parallel chain block, and wherein the account system update data is used to update the account system of the parallel chain.

2. A parallel chain system according to claim 1, characterized in that: The maintenance node is also deployed with a block storage database, which stores all parallel chain blocks.

3. A parallel chain consensus method, characterized in that: The method is applicable to the parallel chain system as described in claim 1 above, and the method comprises: The light node sends the parachain transaction to the maintenance node; The maintenance node receives and verifies the parachain transactions and stores the received transactions in the transaction database; wherein the maintenance node verifies the legitimacy of the parachain transactions through the transaction verification module; The maintenance node packages several parallel chain transactions in its transaction database to generate a first block, executes all parallel chain transactions in the first block, updates the parallel chain account system according to the execution results, and stores the first block in a temporary block database; Generate first account system update data according to the execution results of all parallel transactions in the first block, and generate corresponding first public input data based on the first account system update data; wherein the first account system update data is data used for account system update caused by the execution of all parallel transactions in the first block; Constructing first zero-knowledge proof data using block data of the first block and first public input data; The maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain; The main chain verifies the first zero-knowledge proof data based on the verification key and the first public input data. If the verification is successful, the main chain consensus is completed; After completing the main chain consensus, the maintenance node deletes the first block stored in its temporary block database; The light nodes in the parallel chain update the account systems they maintain by synchronizing the first zero-knowledge proof data and the first public input data.

4. A parallel chain consensus method according to claim 3, characterized in that: After completing the main chain consensus, the maintenance node stores the first block in the block storage database before deleting the first block.

5. A parallel chain consensus method according to claim 3, characterized in that: All parallel chain transactions in the transaction database are configured with transaction fees. When the maintenance node packages several parallel chain transactions in the transaction database to generate the first block, the corresponding packaging priority is configured according to the transaction fees of the parallel chain transactions in the transaction database.

6. A parallel chain consensus method according to claim 5, characterized in that: The zero-knowledge proof computing device of the maintenance node is provided with a corresponding device performance score, and devices with different device performance scores are allocated to perform zero-knowledge proof data calculation according to the transaction fees of the parallel chain transactions in the transaction database.

7. A parallel chain consensus method according to any one of claims 3 to 6, characterized in that: In the process of the maintenance node submitting the first zero-knowledge proof data and the first public input data to the main chain, the maintenance node submits the first zero-knowledge proof data and the first public input data to the main chain in batches according to the generation order of the first zero-knowledge proof data and the first public input data.

8. A computer device, characterized in that: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 3 to 7.

9. A storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 3 to 7 is implemented.