Efficient cross-fragmentation block chain atomic submission method based on pledge transaction
By introducing pledge transactions into cross-segment blockchain transactions, the problems of trust differences between shards and transaction timeliness and throughput are solved, and more efficient and secure cross-segment blockchain atomic submission is achieved.
Patent Information
- Application Number
- CN202510244526.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-03
AI Technical Summary
The existing cross-sanded blockchain transaction methods have not fully solved the problem of trust differences between shards, and transaction timeliness and throughput still need to be improved.
An efficient cross-segment blockchain atomic submission method based on pledge transactions is proposed. By introducing pledge transactions, the fund security of the payee is transformed from a global runtime consensus to a pre-global consensus, and the cross-segment transactions are split into multiple on-chip transactions to improve the security, timeliness and throughput of the system.
Through the on-chain verification of pledge transactions, verification of collection transactions, submission of settlement transactions and processing of unsealed transactions, the atomicity of cross-solid transactions is guaranteed, the timeliness and throughput of transactions is significantly improved, and the trust difference between shards is reduced.
Smart Images

Figure CN120163584A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cryptocurrency systems, and more particularly to an efficient cross-shard blockchain atomic commit method based on staking transactions. Background Art
[0002] With the rapid development of blockchain technology, more and more industries have started to apply this decentralized distributed ledger technology, driving changes in fields such as finance, supply chain, and digital identity. However, the current blockchain network faces some bottlenecks. Specifically, each node in the blockchain network needs to process and verify all transactions, resulting in an overloaded network, increased transaction confirmation time, and a significant decrease in the efficiency of the system. To solve this problem, the sharded blockchain technology has emerged as an important solution.
[0003] The sharded blockchain technology divides the entire blockchain network into multiple smaller "shards", and each shard independently processes part of the transactions or smart contracts, thus achieving parallel processing and improving the processing capacity of the network. Through this method, the performance of the blockchain has been significantly improved, and it can handle more transaction demands.
[0004] On the one hand, the sharded blockchain can significantly improve the transaction throughput. In a traditional blockchain network, all nodes need to process all transaction records, while the sharded blockchain distributes the transaction load to different shards, and each shard independently verifies and stores data. This not only improves the processing efficiency of each node but also overall enhances the throughput of the entire blockchain to meet the needs of large-scale transactions.
[0005] On the other hand, the sharded blockchain effectively reduces network congestion. In a traditional blockchain network, all nodes need to share the same data, and each transaction needs to be broadcast across the entire network, which easily causes network congestion. The sharding technology disperses the transaction data to multiple shards, reducing the data volume and verification workload of each shard, lowering the overall network load, and avoiding network congestion problems in high-concurrency scenarios. Therefore, it is extremely important to design an efficient cross-shard transaction method.
[0006] At present, the existing cross-shard solutions for auxiliary sharded blockchains at home and abroad are mainly divided into three types: those based on multi-phase commit protocols, those based on transaction splitting protocols, and those based on double-chain protocols. The multi-phase commit protocol ensures consistent state updates across different shards during cross-shard transactions through atomic locking. The transaction splitting protocol effectively reduces the cost of cross-shard transactions by splitting the original transaction into multiple sub-transactions or relay transactions. The double-chain protocol improves the throughput and security of the main chain by introducing an auxiliary chain to handle specific business logics and functions. However, in specific implementations, these methods do not fully consider the trust differences between shards, and there is still room for improvement in transaction timeliness and throughput.
[0007] To address the current issues related to cross-shard transactions, the present invention proposes an efficient cross-shard blockchain atomic commit method based on pledge transactions, which transforms the fund security of the payee from global runtime consensus on input UTXOs to pre-global consensus on pledge transactions. By introducing pledge transactions, the original cross-shard transaction is split into multiple intra-shard transactions, greatly improving the security, timeliness, and throughput of the sharding system. Summary of the Invention
[0008] The present invention provides an efficient cross-shard blockchain atomic commit method based on pledge transactions to solve problems such as low security and throughput between shards in traditional cross-shard transactions.
[0009] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0010] An efficient cross-shard blockchain atomic commit method based on pledge transactions is completed by combining an auxiliary chain with a special transaction structure. It includes four stages: pledge transaction submission, pledge transaction usage, pledge transaction settlement, and unlocking. Specifically, it includes the following steps:
[0011] Step S1, pledge transaction submission:
[0012] An idle node generates an intra-shard transaction with an empty recipient using its wallet balance or a part of the balance as a pledge transaction PTX and waits for this transaction to obtain consensus in this shard. The main-chain consensus node regularly reads and validates the pledge transactions from each shard, and the hash of the verified pledge transaction is saved in the main-chain ledger. The pledge transaction submission is completed;
[0013] Step S2, pledge transaction usage:
[0014] The sender queries all unused pledge transactions PTX on the main chain, selects an eligible pledge transaction PTX, and sends a collection transaction CTX to its submitter. The collection transaction CTX contains the hash of the pledge transaction PTX and the original recipient information. After the collection transaction CTX reaches consensus within the shard, the sender obtains the right to use all or part of the amount of the pledge transaction PTX. Subsequently, the sender submits the pledge transaction and the collection transaction to the recipient to prove that the payment has been completed.
[0015] Step S3, Pledge transaction settlement:
[0016] After obtaining the payment proof submitted by the sender, the recipient verifies whether the pledge transaction PTX is included in the main chain ledger and whether the collection transaction CTX is in the sending shard ledger. If the verification is successful, the recipient submits a settlement transaction RTX in the current shard, which is a transaction for transferring funds to the recipient, and the sender is the hash of the pledge transaction PTX. Among them, the payment proof submitted by the sending shard will be submitted to the consensus nodes of the receiving shard. When the receiving shard consensus node adds the settlement transaction to the ledger, the runtime cross-shard transfer process is completed.
[0017] Step S4, Unpledge:
[0018] Submit an unpledge transaction. After submitting the unpledge transaction to the main chain, the submitted pledge transaction PTX can no longer be used to guarantee cross-shard transactions. When the unpledge transaction reaches consensus on the main chain, the pledger submits a settlement transaction RTX in the current shard.
[0019] Furthermore, the specific steps of step S1 are as follows:
[0020] Step S11: An idle node uploads a pledge transaction in this shard, using PTX(a1,x+&,Hash,NULL) to represent a system event, that is, a pledge transaction, which contains the detailed information of the sender (a1), the transfer amount (x), the empty recipient (NULL), and the detailed information of the commission paid by the sender.
[0021] The pledge transaction PTX will be regularly read and verified by the main chain. The transfer amount will be cut in the main chain, and the decomposed different amounts will also generate different hash identifiers as leaf nodes and be stored in the root hash of the main chain block.
[0022] Furthermore, the specific steps of step S2 are as follows:
[0023] Step S21: The sender queries all the unused pledge transactions of this shard on the main chain and submits a collection transaction CTX(a1, x+&, Hash, b1) that meets the conditions to represent a system event, which includes the detailed information of the sender (a1), the transfer amount (x), the null recipient (NULL), the detailed information of the commission paid by the sender, the receiving account information of the recipient (b1), and the hash of the pledge transaction PTX.
[0024] Step S22: The collection transaction CTX is verified by the consensus nodes of the shard and then chained onto the main chain.
[0025] Further, step S3 specifically includes the following steps:
[0026] Step S31: After the collection transaction CTX obtains the main chain consensus, the sender submits a settlement transaction RTX. Among them, RTX(a1, x+&, Hash, b1) represents a system event, which includes the detailed information of the sender (a1), the hash of the pledge transaction PTX, the transfer amount (y), and the receiving account information of the recipient (b1).
[0027] Step S32: The settlement transaction RTX is verified by the consensus nodes of the shard and then chained onto the main chain.
[0028] Further, step S4 specifically includes the following steps:
[0029] The unlocking transaction JTX(Hash, a1, y) represents a system event, which includes the hash information of the pledge transaction PTX on the main chain, the relevant amount (y), the receiving address of the pledger (a1) of this shard, and the relevant unlocking operation.
[0030] Step S42: After the unlocking transaction obtains the main chain consensus, the pledger submits a settlement transaction in the current shard.
[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0032] 1) The efficient cross-shard blockchain atomic commit method based on pledge transactions proposed by the present invention is a fast atomic commit protocol for users to use their idle assets to assist in completing cross-shard transactions. First, an auxiliary chain jointly maintained by all shards is introduced, called the main chain. By forming a global consensus on the main chain for pledge transactions, the atomicity of cross-shard pledge transactions is ensured. Second, a cross-shard transaction protocol based on pledge transactions is designed, and the fund security of the recipient is guaranteed by the pledge transactions on the main chain. The pledge transactions are verified by the consensus nodes on the main chain, and the hash of the verified pledge transaction is saved in the main chain block. The payment proof is submitted to the consensus nodes of the receiving shard for verifying the legality of cross-shard transfers.
[0033] 2) The efficient cross-shard blockchain atomic submission method based on pledge transactions proposed in the present invention ensures the atomicity of cross-shard transactions through on-chain verification of pledge transactions, verification of collection transactions, submission of settlement transactions, and processing of release transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of an overall solution model provided by an embodiment of the present invention, which describes the interaction steps between entities and entities in the cross-shard transaction process.
[0035] Figure 2 It is a pledge transaction chain diagram provided according to the implementation method of this application.
[0036] Figure 3 The experimental results of comparing the transaction user perceived delay between the embodiments of the present invention and other similar solutions in an asynchronous blockchain environment are shown.
[0037] Figure 4 The figure shows the experimental results of comparing the transaction user-perceived delay between the embodiments of the present invention and other similar solutions in a synchronous blockchain environment. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.
[0039] The present invention provides an efficient cross-shard blockchain atomic submission method based on pledge transactions, which core includes three elements: pledge transaction on-chain, cross-shard transaction process, and pledge transaction release and settlement. This embodiment focuses on these three parts, such as Figure 1 As shown, the process can be briefly described as:
[0040] User A1 in Shard A needs to pay X yuan to user B1 in Shard B. First, user A0 in Shard A submits a pledge transaction PTX with an empty payment address during idle time. Subsequently, the main chain consensus node obtains pledge transactions from different shards and verifies them. The verified pledge transaction Hash will be recorded in the next block of the main chain to lock the pledge transaction. Finally, user A1 submits a collection transaction CTX in Shard A. After user B1 sees that the collection CTX takes effect, he submits a settlement transaction RTX in Shard B. The input address of the transaction is the pledge transaction Hash of the main chain.
[0041] Specifically, A1 changes its transfer to user B to a transfer of X to A0, and marks in the newly added field that the prerequisite for this transfer is to occupy X yuan in PTX. Since the pledge transaction submitted by A0 can only be occupied by the collection transaction in shard A, the consensus nodes in shard A can quickly verify whether there is a conflict or the pledge transaction has been exhausted.
[0042] An efficient cross-shard blockchain atomic commit method based on pledge transactions provided in this embodiment is as follows:
[0043] Step S1: Pledge on-chain stage: During idle time, any node user can act as a pledger, and generate an intra-shard transaction PTX with an amount of X and an empty recipient from its wallet balance V (or a part of the balance). 质押者-空 , and then, wait for this transaction to reach consensus (be blocked) in this shard. The main-chain consensus nodes will regularly read the pledge transactions PTX from each shard and verify them. The hash of the verified pledge transaction PTX will be saved in the ledger of the main chain, and the amount balance V of the pledger node (V—X) . Thus, the submission of the pledge transaction PTX is completed.
[0044] The amount in the pledge transaction PTX will be split by the main-chain consensus nodes, and different amounts will generate different hashes as leaf nodes and be saved in the root node. The detailed on-chain pledge transaction is as Figure 2 shown.
[0045] Step S2: Cross-shard transaction process: The source shard sender queries all unutilized pledge transactions PTX in the main chain for this shard, selects a pledge transaction PTX that meets the conditions, and sends a collection transaction CTX with an amount of 发送方-接收方. The collection transaction is the same as an ordinary transaction, except that the unique hash of the pledge transaction and the information of the original recipient need to be added to the extended field. It indicates the intention to obtain the right to use the pledged amount. After the collection transaction CTX reaches consensus within the shard, the sender will obtain the right to use all or part of the amount of the pledge transaction PTX. Subsequently, the sender submits the pledge transaction PTX and the collection transaction CTX to the recipient to prove that the payment has been completed. After obtaining the payment proof submitted by the sender, the recipient first verifies whether the pledge transaction PTX is included in the main chain ledger through the block header information, and secondly verifies whether the collection transaction has been in the sender's shard ledger through the block header information of the shard chain. When the verification is successful, the recipient submits a settlement transaction RTX in the current shard, which is a transaction to transfer funds to the recipient, and the sender is the hash of the pledge transaction. Among them, the payment proof submitted by the sending shard will be submitted to the consensus nodes of the receiving shard. When the collection transaction CTX appears in the ledger of the sender's shard, the receiving shard consensus node then adds the settlement transaction RTX to the ledger. The information that still needs to be filled in the extended field of the pledge transaction RTX transaction is the unique hash of the pledge transaction and other information. In this way, the cross-shard transfer process is completed. The specific flowchart is as Figure 2 shown.
[0046] Step S3: Unpledge and settlement of the pledge transaction: The unpledge operation of the pledge transaction needs to first submit an unpledge transaction to the main chain. After the submission, the pledged transaction can no longer be used to guarantee cross-shard transactions. When the unpledge transaction reaches consensus on the main chain, the pledger submits a settlement transaction in the current shard. The present invention uses the unpledge transaction JTX(Hash,a1,y) to represent a system event, which includes the pledge PTX on the main chain, the transfer amount (y), and the receiving account information of the user (a1) in this shard. The consensus node within the shard can accurately calculate the balance amount of the pledge transaction and transfer it to the pledger by checking the ledger. So far, a complete pledge and unpledge process ends.
[0047] Comparative experiment:
[0048] The present invention is compared with the RapidChain, Monoxide, and Fine-tuned Lock methods in terms of user-perceived latency. Specifically, "Rapidchain: Scaling blockchain via full sharding." by Mahdi Zamanii et al., "Monoxide: Scale out blockchains with asynchronous consensus zones." by Jiaping Wang et al., and "Account migration across blockchain shards using fine-tuned lock mechanism." by Huawei Huang et al.
[0049] A Web server containing typical blockchain interfaces was developed using Python code to simulate the normal operation of the blockchain. By controlling the operation of multiple instances through scripts, the simulation of asynchronous and synchronous multi-shard blockchains was achieved. The interfaces implemented by each instance include functions such as adding transactions, generating blocks, querying block heights, and querying the ledger. To simulate a main chain and ten shard chains, the present invention distinguishes between ledger data and block production frequencies. Among them, the block production frequency of the shard chain is once every 5 seconds, and the block production time of the main chain is once every 15 seconds.
[0050] The real blockchain and Ethereum data were sharded based on the address Hash and filled into the shard chain ledger through scripts to simulate real blockchain data. On this basis, the present invention randomly generates cross-shard transactions and measures the time delay from transaction submission to final confirmation.
[0051] The experimental results are as Figure 3 and Figure 4 shown. In the asynchronous blockchain, the average user-perceived latency of PledgeACS is shortened by 38.6%, 57.65%, and 50.8% respectively compared with the comparison methods, and the shortest cross-shard transaction time is 0.6 s. In the synchronous blockchain, the average user-perceived latency of PledgeACS is shortened by 24.1%, 39.2%, and 34.2% respectively compared with the comparison methods, and the shortest cross-shard transaction time is 5.07 s.
[0052] It can be found from the above evaluation that compared with the typical cross-shard atomic commit protocol, PledgeACS can significantly reduce the user-perceived latency of cross-shard transactions and reduce it to a single consensus cycle.
Claims
1. An efficient cross-shard blockchain atomic submission method based on pledge transactions, characterized in that: The specific steps include: Step S1: Pledge transaction submission: The idle node generates an empty recipient intra-shard transaction with its wallet balance or part of its balance, submits it as a pledge transaction PTX, and waits for the transaction to gain consensus in the shard. The main chain consensus node periodically reads and verifies the pledge transaction from each shard. The verified pledge transaction hash is saved in the main chain ledger, and the pledge transaction submission is completed; Step S2: Pledge transaction usage: The sender queries all unused pledge transactions PTX on the main chain, selects a qualified pledge transaction PTX, and sends a collection transaction CTX to its submitter. The collection transaction CTX contains the hash of the pledge transaction PTX and the original recipient information. After the collection transaction CTX obtains consensus within the chip, the sender obtains the right to use all or part of the amount of the pledge transaction PTX. The sender then submits the pledge transaction and collection transaction to the receiver to prove that it has completed the payment; Step S3: Pledge transaction settlement: After the receiver obtains the payment proof submitted by the sender, it verifies whether the pledge transaction PTX is included in the main chain ledger and whether the collection transaction CTX is in the sending shard ledger. If the verification is successful, the receiver will submit a settlement transaction RTX in the current shard. This is a transaction to transfer money to the receiver, and the sender is the hash of the pledge transaction PTX. Among them, the payment proof submitted by the sending shard will be submitted to the consensus node of the receiving shard. When the consensus node of the receiving shard adds the settlement transaction to the ledger, the cross-shard transfer process at runtime is completed. Step S4: Release the bond: Submit the unbonding transaction. After submitting the unbonding transaction to the main chain, the submitted pledge transaction PTX(a1,x+&,Hash,NULL) can no longer be used to guarantee cross-shard transactions. When the unbonding transaction obtains the main chain consensus, the pledger submits a settlement transaction RTX in the current shard.
2. The method according to claim 1, characterized in that The pledge transaction PTX in step S1 includes the following information: Sender (a1) details, transfer amount (x), empty receiver (NULL), commission details paid by the sender.
3. The method according to claim 1, characterized in that: The collection transaction CTX(a1,x+&,Hash,b1) in step S2 includes the following information: Details of the sender (a1), the transfer amount (x), a null receiver (NULL), details of the commission paid by the sender, the receiver’s (b1) account information, and the hash of the staking transaction PTX.
4. The method according to claim 1, characterized in that: The settlement transaction RTX(a1,x+&,Hash,b1) in step S3 contains the following information: detailed information of the sender (a1), the hash of the pledge transaction PTX, the transfer amount (y), and the receiving account information of the receiver (b1).
5. The method according to claim 1, characterized in that The release transaction JTX (Hash, a1, y) in step S4 includes the following information: hash information of the pledge transaction PTX, the relevant amount (y), the payment address of the pledger (a1) of this shard, and the relevant release operation.
6. A system for implementing any one of the methods of claims 1 to 5, characterized in that: The system includes: An auxiliary chain module to store and verify the hash of the staking transaction, ensuring the atomicity of cross-shard transactions; A sender node, which is used to submit collection transactions and verify pledge transactions; A receiver node that verifies the proof of payment and submits the settlement transaction; A main chain consensus node, which is used to regularly verify pledge transactions and update the main chain ledger; A shard consensus node is used to verify the legitimacy of pledge transactions and collection transactions, and complete cross-shard transactions.
7. The system according to claim 6, characterized in that The auxiliary chain module is the main chain in the cross-shard blockchain, which is used to manage and coordinate the transaction process of each shard.
8. The system according to claim 6, characterized in that The sender node and the receiver node are located in different shards respectively, and cross-shard transaction coordination is performed through the Annex-chain module.
Citation Information
Patent Citations
Transaction processing system and method for backbone-free multi-fragment blockchain
CN111736963A
Data interaction method based on block chain
CN114417377A
Efficient switching authentication method based on social relation in mobile edge computing
CN118764858A
Concurrent transaction processing in a high performance distributed system of record
US20190199515A1
Advanced Transactional Protocols And Ecosystem For Smart Contract Authoring And Deployment
US20220327529A1