Blockchain transaction processing method, system, medium, and device

By introducing a volume overlapping contract voting transaction and dispute resolution mechanism in the alliance chain system, the problem that the alliance chain is difficult to meet the performance requirements of high-frequency transactions is solved, the reasonable determination and fairness of the executor and observer are achieved, and the efficiency and security of blockchain transaction processing are improved.

WO2025130946A1PCT designated stage expired Publication Date: 2025-06-26CHINA UNIONPAY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140431
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-19
Filing Date
2024-12-18
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

The existing alliance chain distributed network is difficult to meet the performance requirements of high-frequency transactions. The L1 network is separated from the L2 network, and the L2 executor cannot be changed efficiently when the L2 executor is incorrect, resulting in a reduced transaction processing efficiency.

Method used

By introducing a volume overlapping contract voting transaction in the alliance chain system, the first node serves as an executor to package the second layer of network transactions into batches and on the chain, and the second node serves as an observer to initiate dispute resolution transactions when the status is illegal, ensuring the reasonable determination and fairness of the executor and the observer, thereby improving transaction processing efficiency.

Benefits of technology

Through deep binding and highly coupled executor and observer nodes, the transaction processing efficiency of the layer 2 network is improved, the security and controllability of the system are ensured, and the latency of transaction processing and resource waste are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140431_26062025_PF_FP_ABST
    Figure CN2024140431_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of blockchains, and in particular relates to a blockchain transaction processing method, a system, a medium, and a device. The method comprises: on the basis of a voting transaction of a roll-up contract initiated by all nodes in a consortium blockchain system, the consortium blockchain system is in a roll-up mode; after executing each layer 2 network transaction indicated by the roll-up contract, a first node packages each layer 2 network transaction into a plurality of layer 2 network transaction batch packets, and uploads the layer 2 network transaction batch packets to the consortium blockchain system, the first node being any node in the consortium blockchain system, and the first node being determined as an executor of a layer 2 network by means of a mechanism of the roll-up contract in the consortium blockchain system; and when it is determined that a state corresponding to a layer 2 network transaction batch packet is invalid, a second node initiates a dispute resolution transaction for the layer 2 network transaction batch packet, the second node being at least one node other than the first node in the consortium blockchain system and being used as a node of an observer. In this way, it is ensured that a layer 2 roll-up network is safer, finally improving the overall transaction processing efficiency of the consortium blockchain system.
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain transaction processing method, system, medium and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on December 19, 2023, with application number 202311762228.X and application name "A blockchain transaction processing method, system, medium and device", the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of blockchain technology, and in particular to a blockchain transaction processing method, system, medium and device. Background Art

[0004] Human carbon account-related operations are characterized by high frequency and the participating nodes of the alliance chain are relatively scattered. The existing alliance chain distributed network is difficult to meet the performance requirements.

[0005] Optimistic Convolution is a Layer 2 (L2) protocol designed to scale the throughput of Ethereum's base layer. It reduces the amount of computation on the Ethereum mainchain by processing transactions off-chain, significantly increasing processing speed. Unlike other scaling solutions, such as sidechains, Optimistic Convolution derives its security from the mainnet (by publishing transaction results on-chain) or from the Plasma chain (which also uses fraud proofs to verify transactions on Ethereum but stores transaction data elsewhere). In existing public blockchain technologies, the L1 and L2 networks are relatively separate, and the L2 observer network is generated by the L2 executor in an unfair manner. Furthermore, when errors occur in the L2 executor, efficient and reasonable changes to the L2 nodes cannot be made, resulting in reduced transaction processing efficiency.

[0006] Based on this, there is an urgent need for a blockchain transaction processing method, system, medium and equipment to improve the efficiency of transaction processing. Summary of the Invention

[0007] The embodiments of the present application provide a blockchain transaction processing method, system, medium, and device for improving the efficiency of transaction processing.

[0008] In a first aspect, an embodiment of the present application provides a blockchain transaction processing method, which is applied to a consortium chain system, and the method includes:

[0009] Based on rollup contract voting transactions initiated by all nodes in the consortium chain system, the consortium chain system is in rollup mode. After executing each layer 2 network transaction indicated by the rollup contract, the first node packages the layer 2 network transactions into multiple layer 2 network transaction batches and uploads them to the consortium chain system. The first node is any node in the consortium chain system and is determined as a layer 2 executor through the rollup contract mechanism in the consortium chain system.

[0010] For any second-layer network transaction batch package on the executor chain, the second node initiates a dispute resolution transaction for the second-layer network transaction batch package when determining that the status corresponding to the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system other than the first node that serves as an observer.

[0011] Through this approach, the first node is a native node within the consortium chain system, not an executor designated by any operator. Instead, it is determined by the consensus mechanism, thus ensuring the legitimacy of the executor's selection. Nodes other than the executor become observer nodes, and their selection also passes through the consortium chain's consensus mechanism, preventing the observer from being completely controlled by the executor. Furthermore, the deep binding and high coupling between executors and observer nodes makes the second-layer convolutional network more secure and controllable, ultimately improving the transaction processing efficiency of the second-layer network.

[0012] In one possible implementation, after initiating the dispute resolution transaction for the layer 2 network transaction batch, the process further includes:

[0013] After the number of dispute resolution transactions for the second-layer network transaction batch package meets the dispute trigger threshold of the roll-up contract, the second-layer network transaction batch package initiated by the first node is stopped from being uploaded to the chain and the dispute resolution mode is entered.

[0014] In the above approach, not just any dispute resolution transaction on an observer node can trigger the dispute resolution mode. Instead, the dispute resolution threshold of the rollup contract must be met. This prevents malicious observer nodes from triggering dispute resolution and disrupting transactions in the normal rollup mode.

[0015] One possible implementation method is to enter the dispute resolution mode, including:

[0016] Receiving an update transaction initiated by at least one second node; the state update transaction is used to indicate an update of the state corresponding to the second-layer network transaction batch package and the state corresponding to other second-layer network transaction batch packages that are uploaded to the chain after the second-layer network transaction batch package;

[0017] After the number of updated transactions for the second-layer network transaction batch package meets the update number threshold of the cascade contract, the status corresponding to the second-layer network transaction batch package on the chain and the status corresponding to the second-layer network transaction batch package on the chain after the second-layer network transaction batch package are changed.

[0018] Through this approach, the Layer 2 transaction batches on the chain can be modified based on the update transaction initiated by the second node, without the first node having to re-upload the Layer 2 transaction batches. This reduces the interaction between the first node and the blockchain node, improves the efficiency of dispute resolution, and can quickly restore the blockchain system to unwind mode to continue processing transactions sent by the client, thereby improving the efficiency of blockchain system transaction processing.

[0019] In one possible implementation, after changing the status of the on-chain layer 2 network transaction batch package and the status of the subsequent on-chain layer 2 network transaction batch package, the process further includes:

[0020] After successfully reconstructing the second-layer network transaction batch package, the first node restores the roll-up mode through the roll-up contract.

[0021] In a possible implementation, the method further includes:

[0022] After the first node fails to successfully reconstruct the second-layer network transaction batch package, a third node is re-consensused as the executor; the third node is any node in the alliance chain system except the first node.

[0023] In the above method, since the first node failed to successfully reconstruct the second-layer network transaction batch package, it may indicate that the first node is malicious or a fatal error occurred in the transaction processing of the first node. Therefore, reconstructing the second-layer network transaction batch package will consume a lot of time. In order to ensure the transaction processing requirements of the client, a new consensus is reached and the third node is used as the executor.

[0024] In a possible implementation, before packaging the layer-2 network transactions into a layer-2 network transaction batch package, the following steps are further included:

[0025] The first node initiates an appointment transaction request; the appointment transaction request is used to apply to serve as an executor;

[0026] After satisfying the mechanism of the rolled-up contract in the alliance chain system, the first node is determined to be the executor and the other nodes in the alliance chain system are determined to be observers.

[0027] Through the above method, the determination of executor and observer nodes is realized, and this process is completed on the basis of alliance chain consensus, which ensures the fairness of executor and observer determination and ensures that observer nodes cannot be arbitrarily specified, thereby enhancing the security of the entire system.

[0028] In one possible implementation, the layer 2 network transaction batch package includes a first state root corresponding to each layer 2 network transaction;

[0029] The second node determines that the status corresponding to the layer 2 network transaction batch package is illegal, including:

[0030] The second node determines a second state root based on each layer 2 network transaction in the layer 2 network transaction batch package, and determines that the state corresponding to the layer 2 network transaction batch package is illegal if the first state root and the second state root are different.

[0031] In one possible implementation, after the number of updated transactions for the layer-2 network transaction batch package meets the update number threshold of the wrapping contract, modifying the layer-2 network transaction batch package on the chain includes:

[0032] After the number of update transactions for the second-layer network transaction batch package meets the first threshold of the cascade contract and the number of identical second state roots in the update transactions meets the second threshold, the first state root of the second-layer network transaction batch package on the change chain is changed to the second state root.

[0033] Through the above method, a single observer node is not allowed to initiate a transaction to stop operation. Instead, the first state root of the second-layer network transaction batch package on the chain is changed to the second state root only after the number of identical second state roots meets the second threshold, thereby avoiding malicious attacks and ensuring the smooth operation of the system as much as possible.

[0034] In a second aspect, an embodiment of the present application provides a blockchain transaction processing system, the system comprising a first node and a second node;

[0035] a first node, configured to, based on the rollup contract of the consortium chain system in a rollup mode, package each layer-two network transaction indicated by the rollup contract into a layer-two network transaction batch package and upload the package to the consortium chain system after executing the layer-two network transactions indicated by the rollup contract; the first node is any node in the consortium chain system and is determined as a layer-two network executor by the consensus mechanism of the consortium chain system;

[0036] The second node is used to initiate a dispute resolution transaction for any second-layer network transaction batch package on the executor chain when it is determined that the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system that serves as an observer except the first node.

[0037] In a third aspect, an embodiment of the present application provides a blockchain transaction processing device, which can execute the aforementioned transaction processing method, and the device includes:

[0038] a processing module configured to, based on the rollup contract of the consortium chain system being in a rollup mode, package each layer-two network transaction indicated by the rollup contract into a layer-two network transaction batch package and upload the package to the consortium chain system after executing the layer-two network transactions indicated by the rollup contract; the first node being any node in the consortium chain system and being determined as a layer-two network executor by a consensus mechanism of the consortium chain system;

[0039] A determination module is used to initiate a dispute resolution transaction for any second-layer network transaction batch package on the executor chain when it is determined that the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system other than the first node that serves as an observer.

[0040] In one possible implementation, the determination module is further configured to stop uploading the second-layer network transaction batch package initiated by the first node to the chain and enter the dispute resolution mode after the number of dispute resolution transactions for the second-layer network transaction batch package meets the dispute trigger threshold of the cascade contract.

[0041] In one possible implementation, the transaction processing apparatus further includes a receiving module configured to receive an update transaction initiated by at least one second node; the status update transaction is configured to indicate an update of the status corresponding to the layer-2 network transaction batch package and the status corresponding to other layer-2 network transaction batch packages uploaded to the chain after the layer-2 network transaction batch package;

[0042] After the number of updated transactions for the second-layer network transaction batch package meets the update number threshold of the cascade contract, the status corresponding to the second-layer network transaction batch package on the chain and the status corresponding to the second-layer network transaction batch package on the chain after the second-layer network transaction batch package are changed.

[0043] In one possible implementation, the update module is further configured to, after changing the status corresponding to the on-chain Layer 2 network transaction batch package and the status corresponding to the subsequent on-chain Layer 2 network transaction batch package, further include:

[0044] After successfully reconstructing the second-layer network transaction batch package, the first node restores the roll-up mode through the roll-up contract.

[0045] In one possible implementation, the determination module is further used to re-consensus on a third node as an executor after the first node fails to successfully reconstruct the second-layer network transaction batch package; the third node is any node in the alliance chain system except the first node.

[0046] In a possible implementation, the determination module is further configured for the first node to initiate an appointment transaction request; the appointment transaction request is used to apply to serve as an executor;

[0047] After satisfying the mechanism of the rolled-up contract in the alliance chain system, the first node is determined to be the executor and the other nodes in the alliance chain system are determined to be observers.

[0048] In one possible implementation, the layer 2 network transaction batch package includes a first state root corresponding to each layer 2 network transaction;

[0049] The processing module is specifically configured to, by the second node, determine a second state root based on each layer 2 network transaction in the layer 2 network transaction batch package; if the first state root and the second state root are different, determine that the state corresponding to the layer 2 network transaction batch package is illegal.

[0050] In one possible implementation, the update module is further configured to change the first state root of the layer 2 network transaction batch package on the chain to the second state root after the number of update transactions for the layer 2 network transaction batch package meets a first threshold of the rolled-up contract and the number of identical second state roots in the update transactions meets a second threshold.

[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is run, any one of the methods in the first aspect above is executed.

[0052] In a fifth aspect, an embodiment of the present application provides a computing device, comprising: a memory for storing program instructions; a processor for calling the program instructions stored in the memory and executing the method of any one of the designs in the above-mentioned first aspect according to the obtained program.

[0053] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when running on a processor, implements the method in any one of the designs in the first aspect above.

[0054] The beneficial effects of the second to sixth aspects mentioned above can be specifically referred to the beneficial effects that can be achieved by any design of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] FIG1 exemplarily shows a schematic diagram of a scenario architecture provided by an embodiment of the present application;

[0056] FIG2 exemplarily illustrates a flowchart of a blockchain transaction processing method provided in an embodiment of the present application;

[0057] FIG3 exemplarily shows a flow chart of entering a roll-up mode according to an embodiment of the present application;

[0058] FIG4 exemplarily shows a schematic diagram of a dispute resolution model provided in an embodiment of the present application;

[0059] FIG5 exemplarily shows a schematic diagram of a re-consensus process provided in an embodiment of the present application;

[0060] FIG6 exemplarily shows a flow chart of a transaction processing method provided in an embodiment of the present application;

[0061] FIG7 exemplarily shows a flow chart of another transaction processing method provided in an embodiment of the present application;

[0062] FIG8 exemplarily shows a schematic diagram of a blockchain transaction processing system provided in an embodiment of the present application;

[0063] FIG9 exemplarily shows a schematic diagram of a blockchain transaction processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0065] In blockchain-based personal carbon account technology solutions, operations related to personal carbon accounts are high-frequency, and the participating nodes of consortium chains are relatively dispersed. Existing distributed consortium chain networks struggle to meet performance requirements. Furthermore, from the perspective of supporting common business scenarios, existing consortium chain deployment models struggle to meet high-frequency trading demands, significantly limiting innovation in blockchain business models. Therefore, efforts are underway to expand capacity from a Layer 2 network perspective.

[0066] Optimistic Convolutions are a Layer 2 (L2) protocol designed to scale the throughput of Ethereum's base layer. They reduce the amount of computation required on the Ethereum mainchain by processing transactions off-chain, significantly increasing processing speed. Unlike other scaling solutions, such as sidechains, Optimistic Convolutions derive their security from the mainnet (by publishing transaction results on-chain) or from Plasma chains (which also use fraud proofs to verify transactions on Ethereum but store transaction data elsewhere).

[0067] Optimistic convolution is an approach to scaling Ethereum that involves moving computation and state storage off-chain. Optimistic convolution executes transactions off-chain but publishes the transaction data to the mainnet as calldata. Optimistic convolution operators bundle multiple off-chain transactions into large batches before submitting them to Ethereum. This approach spreads fixed costs across multiple transactions in each batch, reducing fees for end clients.

[0068] Figure 1 illustrates a schematic diagram of a scenario architecture provided by an embodiment of the present application. As shown in Figure 1, L1 represents the original blockchain network (Layer 1), and L2 represents the Layer 2 extended network or service (Layer 2). The L2 executor, acting as an intermediary network, provides L2 blockchain clients with fast blockchain transaction functionality, including contract deployment, transaction request execution, and information query. The L2 observer, a machine operated by the intermediary operator, is customized by the operator and operates autonomously. It executes transactions and batches the executed transaction data and transaction results, which are then uploaded to the L1 blockchain network. The L2 observer, designated by the L2 executor operator, verifies the legitimacy of the uploaded transaction execution results. When an illegal transaction is detected, a single L2 observer can initiate a challenge through an L1 smart contract. Through multiple rounds of information exchange with the L1 executor, it first identifies the faulty Layer 2 transaction batch, then identifies the faulty transaction within the faulty Layer 2 transaction batch, and then identifies the faulty instruction in the faulty transaction. The L1 smart contract then executes the instruction and determines its legitimacy.

[0069] During this process, the L2 observer continues to generate new Layer 2 transaction batches. If the smart contract determines that a previous Layer 2 transaction batch is incorrect, all subsequent Layer 2 transaction batches will be deemed incorrect. Once the L2 executor has corrected the errors, it will re-execute the transactions in these Layer 2 transaction batches, generate new Layer 2 transaction batches, and then package and upload them to the blockchain. For example, within a certain time period, the L2 executor packages B1, B2, B3, B4, and B5 for blockchain. At time T1, the L2 observer detects an error in Layer 2 transaction batch B1. Based on the smart contract's specifications, the L2 observer re-executes or otherwise corrects the transactions or instructions in Layer 2 transaction batch B1 to create Layer 2 transaction batch B1', which is then re-uploaded to the blockchain. Subsequently, the data corresponding to Layer 2 transaction batches B2, B3, B4, and B5 will be recalculated and uploaded to the blockchain. During this process, even if the transaction requests from B2, B3, B4, and B5 are correct, they will be executed repeatedly, wasting computing resources. Furthermore, the multiple interactions between the executor and observer will result in a longer update cycle for the consortium chain, reducing the overall processing efficiency of transaction requests.

[0070] Furthermore, the L1 and L2 networks are relatively disconnected. The L2 observer network is generated by the L2 executor, which is unfair. Furthermore, when an L2 executor encounters an error, it is impossible to efficiently and reasonably modify the L2 nodes, which in turn reduces transaction processing efficiency.

[0071] Based on this, the embodiment of the present application provides a blockchain transaction processing method, which is used to improve the transaction dispute resolution mechanism in the alliance chain second-layer network and improve the efficiency of transaction processing.

[0072] FIG2 exemplarily illustrates a flowchart of a blockchain transaction processing method provided in an embodiment of the present application, which is applied to a consortium chain system. As shown in FIG2 , the method includes:

[0073] Step 201: Based on the rollup contract voting transactions initiated by all nodes in the consortium chain system, the consortium chain system is in rollup mode. After executing each layer 2 network transaction indicated by the rollup contract, the first node packages the layer 2 network transactions into multiple layer 2 network transaction batches and uploads them to the consortium chain system. The first node is any node in the consortium chain system and is determined as the layer 2 executor through the rollup contract mechanism in the consortium chain system.

[0074] The rollup contract is deployed in the consortium blockchain system. For example, the rollup contract can be created and deployed by the first node. Based on the consensus mechanism of the consortium blockchain system, other nodes confirm the legitimacy of the rollup contract. After that, the rollup contract takes effect and the blockchain system enters rollup mode.

[0075] FIG3 exemplarily shows a schematic diagram of a process for entering a roll-up mode according to an embodiment of the present application. As shown in FIG3 , the process includes:

[0076] Step 301: Node A creates and deploys a rollup contract in the consortium chain system.

[0077] Step 302: Node B, Node C, and Node D confirm the legitimacy of the rolled contract.

[0078] Step 303: The roll-up contract takes effect and the alliance chain system enters the roll-up mode.

[0079] It should be noted that Node A, Node B, Node C, and Node D are all nodes in the alliance chain system. Node A can be the node that wants to become an executor. Node A creates a roll-up contract and deploys it in the alliance chain system. Other nodes in the alliance chain confirm the legitimacy of the roll-up contract based on the consensus mechanism of the alliance chain. After that, the roll-up contract takes effect and the alliance chain system enters the roll-up mode.

[0080] Node A becomes the first node and begins to execute the second-layer network transactions indicated by the rollup contract, such as transfer transactions. After executing multiple transactions, it packages the transaction data and transaction results into a second-layer network transaction batch package and uploads it to the consortium chain system.

[0081] Step 202: For any Layer 2 transaction batch package on the executor chain, a second node, upon determining that the status corresponding to the Layer 2 transaction batch package is illegal, initiates a dispute resolution transaction for the Layer 2 transaction batch package; the second node is at least one observer node in the consortium chain system other than the first node.

[0082] Continuing with the above example, after node A becomes the first node acting as the executor, nodes B, C, and D become the second nodes acting as observers. When the second nodes determine that the second-layer network transaction batch package is illegal, they initiate a dispute resolution transaction for the second-layer network transaction batch package.

[0083] Exemplarily, at this point the first node no longer continues to receive new transaction requests and only resolves disputes.

[0084] Through this approach, the first node is a native node within the consortium chain system, not an executor designated by any operator. Instead, it is determined by the consensus mechanism, thus ensuring the legitimacy of the executor's designation. Nodes other than the executor become observer nodes, and their identification also passes through the consortium chain's consensus mechanism, preventing the observer from being completely controlled by the executor. Furthermore, the deep binding and high coupling between executors and observer nodes makes the second-layer concatenated network more secure and controllable, ultimately improving the transaction processing efficiency of the consortium chain system.

[0085] In one possible implementation, in the above step 201, before packaging each second-layer network transaction into a second-layer network transaction batch package, the first node initiates an appointment transaction request; the appointment transaction request is used to apply to be an executor; after satisfying the mechanism of the cascading contract in the alliance chain system, the first node is determined to be the executor and the other nodes in the alliance chain system are determined to be observers.

[0086] For example, after the first node initiates an appointment transaction request, it seeks the consent of other nodes. Assuming that the consensus mechanism of the alliance chain is that after more than 2 / 3 of the other nodes agree, the first node becomes the executor and the other nodes automatically become observers.

[0087] Through the above method, the determination of executor and observer nodes is realized, and this process is completed based on the mechanism of rolled contracts in the alliance chain system, which ensures the fairness of the determination of executors and observers, and ensures that observer nodes cannot be arbitrarily specified, thereby enhancing the security of the entire system.

[0088] After the above step 202, that is, after initiating the dispute resolution transaction for the second-layer network transaction batch package, when the number of dispute resolution transactions for the second-layer network transaction batch package meets the dispute triggering threshold of the cascade contract, the second-layer network transaction batch package initiated by the first node is stopped from being uploaded to the chain and the dispute resolution mode is entered.

[0089] In one possible implementation, the layer-two network transaction batch package includes a first state root corresponding to each layer-two network transaction; the first node packages each layer-two network transaction and the first state root corresponding to each layer-two network transaction into a layer-two network transaction batch package and uploads it to the chain; the second node determines a second state root based on each layer-two network transaction in the layer-two network transaction batch package, and if the first state root and the second state root are different, the layer-two network transaction batch package is determined to be illegal.

[0090] For example, any observer node will pull transaction data and transaction results uploaded to the consortium chain system and verify the legitimacy of the first state root of a Layer 2 network transaction batch. Based on the transaction data, the second state root of the Layer 2 network transaction batch is calculated. If the first and second state roots differ, a dispute resolution transaction is initiated, carrying the second state root.

[0091] When multiple observer nodes initiate dispute resolution transactions and meet the dispute trigger threshold of the roll-up contract, for example, when the dispute trigger threshold specified in the roll-up contract is 2 / 3 of the observer nodes initiate dispute resolution transactions, the dispute resolution mode is entered and the second state root is sent to the consortium chain system.

[0092] In the above approach, not just any dispute resolution transaction on an observer node can trigger the dispute resolution mode. Instead, the dispute resolution threshold of the rollup contract must be met. This prevents malicious observer nodes from triggering dispute resolution and disrupting transactions in the normal rollup mode.

[0093] In one possible implementation, after entering the dispute resolution mode, an update transaction initiated by at least one second node is received; the state update transaction is used to indicate an update of the state corresponding to the layer 2 network transaction batch package and the states corresponding to other layer 2 network transaction batch packages uploaded to the chain after the layer 2 network transaction batch package;

[0094] After the number of updated transactions for the second-layer network transaction batch package meets the update number threshold of the cascade contract, the status of the second-layer network transaction batch package on the chain and the second-layer network transaction batch package on the chain after the second-layer network transaction batch package is changed.

[0095] After the update transaction for the second-layer network transaction batch package meets the first threshold of the cascade contract, it is also necessary to determine whether the number of identical second state roots in the update transaction meets the second threshold, and change the first state root of the second-layer network transaction batch package on the chain to the second state root.

[0096] Still taking the example in FIG. 3 as an example, FIG. 4 exemplarily shows a schematic diagram of a dispute resolution model provided in an embodiment of the present application. As shown in FIG. 4 , the dispute resolution model includes the following steps:

[0097] Step 401: Node B, Node C, and Node D send an update transaction to the consortium chain system, which carries the second state root.

[0098] In step 402, the consortium chain system confirms that the number of update transactions meets the update threshold of the rollup contract. For example, the update threshold in the rollup contract is set to 2 / 3 of the number of observer nodes, which is the same as the dispute trigger threshold. In step 401, all nodes sent update transactions to the consortium chain system, meeting the update threshold.

[0099] In step 403, the consortium chain system determines whether the second state root is consistent. If so, the state root in the second-layer network transaction batch package of the block on the chain is updated to the second state root. For example, if the second state root sent by node B, node C, and node D are all the same, the state root in the second-layer network transaction batch package on the chain is directly updated to the second state root. If the second state root sent by node C and node D is the same, then the update quantity threshold of 2 / 3 is still met, and the state root in the second-layer network transaction batch package on the chain is also directly updated to the second state root.

[0100] Through this approach, based on the update transaction initiated by the second node, the Layer 2 transaction batch on the pending chain can be modified without the first node having to re-upload subsequent Layer 2 transaction batches. This reduces the interaction between the first node and the blockchain node, improves the efficiency of dispute resolution, and can quickly restore the blockchain system to unwind mode to continue processing transactions sent by the client, thereby improving the efficiency of blockchain system transaction processing.

[0101] For example, after the alliance chain system updates the state root in the second-layer network transaction batch package on the chain to the second state root, the first node can monitor that the state root on the alliance chain has changed, so the first node will reconstruct the second-layer network transaction batch package. The result of reconstructing the second-layer network transaction batch package is to update the state root of this second-layer network transaction batch package to be consistent with the state root recorded in the alliance chain system.

[0102] An error occurred in the Layer 2 transaction batch package of the first node. This may be due to an error in the code logic of the first node's transaction execution, or it may be due to the first node being a malicious node. When reporting the Layer 2 transaction batch package, it changed the state root of one of the Layer 2 transaction batch packages. Although the front and back of this Layer 2 transaction batch package are correct, the malicious second node can change the state root of the intermediate Layer 2 transaction batch package.

[0103] Exemplarily, after successfully reconstructing the second-layer network transaction batch package, the first node can restore the roll-up mode through the roll-up contract.

[0104] On the other hand, if the first node fails to successfully reconstruct the second-layer network transaction batch package, the third node will be re-consensused as the executor; the third node is any node in the alliance chain system except the first node.

[0105] In the above method, since the first node failed to successfully reconstruct the second-layer network transaction batch package, it may indicate that the first node is malicious or a fatal error occurred in the transaction processing of the first node. Therefore, reconstructing the second-layer network transaction batch package will consume a lot of time. In order to ensure the transaction processing requirements of the client, a new consensus is reached and the third node is used as the executor.

[0106] FIG5 exemplarily shows a schematic diagram of a re-consensus process provided in an embodiment of the present application. As shown in FIG5 , the re-consensus process includes the following steps:

[0107] Step 501: The third node initiates an appointment transaction request;

[0108] Step 502: Node C and Node D agree to the third node's appointment transaction request.

[0109] In step 503, the third node becomes the executor, and nodes C and D automatically become observers.

[0110] Through the above method, the third node is re-determined as the executor, which avoids the first node taking too much time to reconstruct the second-layer network transaction batch package, thereby improving the efficiency of the blockchain system in processing transactions.

[0111] FIG6 exemplarily shows a flow chart of a transaction processing method provided in an embodiment of the present application. As shown in FIG6 , the method includes the following steps:

[0112] Step 601: A rollup contract voting transaction initiated by all nodes in the consortium chain system, wherein the consortium chain system is in rollup mode;

[0113] Step 602: After executing each of the layer-2 network transactions indicated by the rollup contract, the first node packages the layer-2 network transactions into multiple layer-2 network transaction batches and uploads them to the consortium chain system.

[0114] Step 603: For any Layer 2 network transaction batch package on the executor chain, when the second node determines that the status corresponding to the Layer 2 network transaction batch package is illegal, the second node initiates a dispute resolution transaction for the Layer 2 network transaction batch package;

[0115] Step 604: Receive an update transaction initiated by at least one second node; the state update transaction is used to indicate an update of the state corresponding to the layer 2 network transaction batch package and the states corresponding to other layer 2 network transaction batch packages that are uploaded to the chain after the layer 2 network transaction batch package;

[0116] Step 605: After the number of updated transactions for the layer-2 transaction batch package meets the update number threshold of the cascade contract, change the status of the layer-2 transaction batch package on the chain and the status of the layer-2 transaction batch package on the chain after the layer-2 transaction batch package.

[0117] The above process is described below with reference to a complete embodiment. FIG7 exemplarily shows a flow chart of a transaction processing method provided in an embodiment of the present application. As shown in FIG7 , the method includes the following steps:

[0118] Step 701: Node A creates and deploys a rollup contract in the consortium chain system.

[0119] Step 702: Node B, Node C, and Node D confirm the legitimacy of the rolled contract.

[0120] Step 703: The rollup contract takes effect and the consortium chain system enters rollup mode.

[0121] Step 704: Node A initiates a request for a designated transaction.

[0122] Step 705: Node B, Node C, and Node D agree to Node A's appointment transaction request.

[0123] Step 706: Node A becomes the executor, and nodes B, C, and D automatically become observers.

[0124] Step 707: Node A packages each Layer 2 network transaction and the first state root corresponding to each Layer 2 network transaction into a Layer 2 network transaction batch package and uploads it to the blockchain.

[0125] Step 708: Node B, Node C, and Node D determine a second state root based on each layer 2 network transaction in the layer 2 network transaction batch package. If the first state root and the second state root are different, the layer 2 network transaction batch package is determined to be illegal.

[0126] Step 709: Node B, Node C, and Node D initiate a dispute resolution transaction for the Layer 2 network transaction batch package.

[0127] Step 710: After determining that the number of dispute resolution transactions in the Layer 2 network transaction batch package meets the dispute trigger threshold of the rollup contract, the consortium chain system stops uploading the Layer 2 network transaction batch package initiated by the first node and enters the dispute resolution mode.

[0128] Step 711: The consortium chain system receives an update transaction for the Layer 2 network transaction batch package initiated by nodes B, C, and D.

[0129] Step 712: After the number of updated transactions for the Layer 2 transaction batch package meets the update quantity threshold of the wrapping contract, modify the Layer 2 transaction batch package on the chain;

[0130] Step 713: Node A reconstructs the Layer 2 network transaction batch packet.

[0131] Step 714: The alliance chain system returns to the roll-up mode.

[0132] In this approach, the L2 network's executor is not defined by the operator, but requires consensus from the entire L1 network. Observers, excluding the L2 executor, are all L1 network nodes, ensuring fairness. Furthermore, a single observer node is not permitted to initiate a transaction that halts operations, thereby preventing malicious attacks and ensuring the smooth operation of the system.

[0133] Based on the same technical concept, the present application also provides a blockchain transaction processing system. FIG8 exemplarily shows a schematic diagram of a blockchain transaction processing system provided by the present application. The system can execute the aforementioned transaction processing method. As shown in FIG8 , the system includes a first node and a second node;

[0134] a first node, configured to, based on the rollup contract of the consortium chain system in a rollup mode, package each layer-two network transaction indicated by the rollup contract into a layer-two network transaction batch package and upload the package to the consortium chain system after executing the layer-two network transactions indicated by the rollup contract; the first node is any node in the consortium chain system and is determined as a layer-two network executor by the consensus mechanism of the consortium chain system;

[0135] The second node is used to initiate a dispute resolution transaction for any second-layer network transaction batch package on the executor chain when it is determined that the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system that serves as an observer except the first node.

[0136] Based on the same technical concept, the present application also provides a blockchain transaction processing device. FIG9 exemplarily shows a schematic diagram of a blockchain transaction processing device provided by the present application. The device can execute the aforementioned transaction processing method. As shown in FIG9 , the device includes:

[0137] a processing module configured to, based on the rollup contract of the consortium chain system being in a rollup mode, package each layer-two network transaction indicated by the rollup contract into a layer-two network transaction batch package and upload the package to the consortium chain system after executing the layer-two network transactions indicated by the rollup contract; the first node being any node in the consortium chain system and being determined as a layer-two network executor by a consensus mechanism of the consortium chain system;

[0138] A determination module is used to initiate a dispute resolution transaction for any second-layer network transaction batch package on the executor chain when it is determined that the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system other than the first node that serves as an observer.

[0139] In one possible implementation, the determination module is further configured to stop uploading the second-layer network transaction batch package initiated by the first node to the chain and enter the dispute resolution mode after the number of dispute resolution transactions for the second-layer network transaction batch package meets the dispute trigger threshold of the cascade contract.

[0140] In one possible implementation, the transaction processing apparatus further includes a receiving module configured to receive an update transaction initiated by at least one second node; the status update transaction is configured to indicate an update of the status corresponding to the layer-2 network transaction batch package and the status corresponding to other layer-2 network transaction batch packages uploaded to the chain after the layer-2 network transaction batch package;

[0141] After the number of updated transactions for the second-layer network transaction batch package meets the update number threshold of the cascade contract, the status corresponding to the second-layer network transaction batch package on the chain and the status corresponding to the second-layer network transaction batch package on the chain after the second-layer network transaction batch package are changed.

[0142] In one possible implementation, the update module is further configured to, after changing the status corresponding to the on-chain Layer 2 network transaction batch package and the status corresponding to the subsequent on-chain Layer 2 network transaction batch package, further include:

[0143] After successfully reconstructing the second-layer network transaction batch package, the first node restores the roll-up mode through the roll-up contract.

[0144] In one possible implementation, the determination module is further used to re-consensus on a third node as an executor after the first node fails to successfully reconstruct the second-layer network transaction batch package; the third node is any node in the alliance chain system except the first node.

[0145] In a possible implementation, the determination module is further configured for the first node to initiate an appointment transaction request; the appointment transaction request is used to apply to serve as an executor;

[0146] After satisfying the mechanism of the rolled-up contract in the alliance chain system, the first node is determined to be the executor and the other nodes in the alliance chain system are determined to be observers.

[0147] In one possible implementation, the layer 2 network transaction batch package includes a first state root corresponding to each layer 2 network transaction;

[0148] The processing module is specifically configured to, by the second node, determine a second state root based on each layer 2 network transaction in the layer 2 network transaction batch package; if the first state root and the second state root are different, determine that the state corresponding to the layer 2 network transaction batch package is illegal.

[0149] In one possible implementation, the update module is further configured to change the first state root of the layer 2 network transaction batch package on the chain to the second state root after the number of update transactions for the layer 2 network transaction batch package meets a first threshold of the rolled-up contract and the number of identical second state roots in the update transactions meets a second threshold.

[0150] Based on the same technical concept, an embodiment of the present invention further provides a computer program product, which implements the method shown in the above embodiment when the computer program product runs on a processor.

[0151] Based on the same technical concept, an embodiment of the present invention further provides a computing device, comprising: a memory for storing program instructions;

[0152] The processor is configured to call the program instructions stored in the memory and execute the method shown in the above embodiment according to the obtained program.

[0153] Based on the same technical concept, an embodiment of the present invention further provides a computer-readable storage medium, which implements the method shown in the above embodiment when the computer program product runs on a processor.

[0154] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0155] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0156] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0158] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A blockchain transaction processing method, wherein: Applied to the alliance chain system, the method includes: Based on the roll-up contract voting transaction initiated by all nodes of the alliance chain system, the alliance chain system is in roll-up mode. After executing each layer 2 network transaction indicated by the roll-up contract, the first node packages each layer 2 network transaction into multiple layer 2 network transaction batch packages and uploads them to the alliance chain system; the first node is any node in the alliance chain system and is determined as the executor of the layer 2 network through the roll-up contract mechanism in the alliance chain system; For any second-layer network transaction batch package on the executor chain, the second node initiates a dispute resolution transaction for the second-layer network transaction batch package when it determines that the status corresponding to the second-layer network transaction batch package is illegal; the second node is at least one node in the alliance chain system that serves as an observer except the first node.

2. The method of claim 1, wherein: After initiating a dispute resolution transaction for the layer 2 network transaction batch package, it also includes: After the number of dispute resolution transactions for the layer 2 network transaction batch package meets the dispute triggering threshold of the rolled contract, the layer 2 network transaction batch package initiated by the first node is stopped from being uploaded to the chain and a dispute resolution mode is entered.

3. The method of claim 2, wherein: Enter dispute resolution mode, including: Receive an update transaction initiated by at least one second node; the state update transaction is used to indicate that the state corresponding to the second-layer network transaction batch package and the state corresponding to other second-layer network transaction batch packages that are uploaded to the chain after the second-layer network transaction batch package are updated; After the number of updated transactions for the second-layer network transaction batch package meets the update number threshold of the cascade contract, the state corresponding to the second-layer network transaction batch package on the chain and the state corresponding to the second-layer network transaction batch package on the chain after the second-layer network transaction batch package are changed.

4. The method of claim 3, wherein: After changing the state corresponding to the layer 2 network transaction batch package on the chain and the state corresponding to the layer 2 network transaction batch package on the chain after the layer 2 network transaction batch package, it also includes: After successfully reconstructing the layer 2 network transaction batch package, the first node restores the roll-up mode through the roll-up contract.

5. The method of claim 3, wherein: The method further comprises: After the first node fails to successfully reconstruct the second-layer network transaction batch package, a third node is re-consensused as the executor; the third node is any node in the alliance chain system except the first node.

6. The method according to any one of claims 1 to 5, wherein: Before packaging the layer 2 network transactions into a layer 2 network transaction batch package, the following steps are also included: The first node initiates an appointment transaction request; the appointment transaction request is used to apply to be an executor; After satisfying the mechanism of the rolled contract in the alliance chain system, the first node is determined as the executor and the other nodes in the alliance chain system are determined as observers.

7. The method according to any one of claims 1 to 5, wherein: The second-layer network transaction batch package includes a first state root corresponding to each second-layer network transaction; The second node determines that the state corresponding to the layer 2 network transaction batch package is illegal, including: The second node determines a second state root based on each layer 2 network transaction in the layer 2 network transaction batch package, and if the first state root and the second state root are different, determines that the state corresponding to the layer 2 network transaction batch package is illegal.

8. The method according to any one of claims 1 to 5, wherein: After the number of updated transactions for the layer 2 network transaction batch package meets the update number threshold of the cascade contract, the layer 2 network transaction batch package on the chain is changed, including: After the number of update transactions for the second-layer network transaction batch package meets the first threshold of the cascade contract, and the number of identical second state roots in the update transactions meets the second threshold, the first state root of the second-layer network transaction batch package on the change chain is changed to the second state root.

9. A blockchain transaction processing system, wherein: include: The first node and the second node, based on the roll-up contract voting transaction initiated by all nodes of the alliance chain system, the alliance chain system is in roll-up mode, the first node is used to, after executing each layer 2 network transaction indicated by the roll-up contract, package the layer 2 network transactions into multiple layer 2 network transaction batch packages, and upload them to the alliance chain system; the first node is any node in the alliance chain system and is determined as an executor of the layer 2 network through the roll-up contract mechanism in the alliance chain system; The second node is used to initiate a dispute resolution transaction for any layer-2 network transaction batch package on the executor chain when it is determined that the status corresponding to the layer-2 network transaction batch package is illegal; the second node is at least one node in the alliance chain system that serves as an observer except the first node.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 8 is executed.

11. A computing device, wherein: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 8 according to the obtained program.

Citation Information

Patent Citations

  • Block chain two-layer network expansion method, device and equipment

    CN115987799A

  • Block chain network method and system with expandability

    CN117014448A

  • Block chain transaction processing method and system, medium and equipment

    CN117879897A

  • Blockchain network system expanded based on optimism bedrock and operation method thereof

    KR102564233B1

  • Data processing method in blockchain, and blockchain node

    WO2023207080A1