Block chain endorsement method and device, electronic equipment, storage medium and program product

By allowing the parachain itself to complete the endorsement and asynchronously execute the secondary endorsement of the main chain, the problem of strong dependence of the parachain on the main chain endorsement node is solved, and the system's security and transaction execution efficiency are improved.

CN119477315APending Publication Date: 2025-02-18MIDEA NETWORK INFORMATION SERVICE (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411629630.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the blockchain's evidence-keeping and traceability business, executing all transactions and endorsing a single chain will affect the execution efficiency of the transaction. Parachains rely heavily on the endorsement nodes of the main chain, which is prone to problems of security and transaction execution time.

Method used

The parachain itself can complete the endorsement function separately, and send the block to be endorsed as a target transaction to the endorsement node in the endorsement main chain for endorsement. The endorsement steps between the main chain and the parallel chain can be performed asynchronously to avoid the impact of the main chain endorsement blocking and affecting parallelism. Chain transaction processing.

Benefits of technology

It improves the security of the system and transaction execution time, reduces the performance loss of the main chain, and further strengthens the security and credibility of the system through secondary endorsement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477315A_ABST
    Figure CN119477315A_ABST
Patent Text Reader

Abstract

The invention provides a block chain endorsement method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of block chains. The method comprises the following steps: acquiring a to-be-endorsed block after node consensus in the parallel chain; the to-be-endorsed block is a block obtained after a node in the parallel chain executes a transaction; and sending the to-be-endorsed block as a target transaction to an endorsement node in an endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the to-be-endorsed block. According to the method, the parallel chain can independently complete a one-time endorsement function, so that the security and transaction execution duration of the whole system are not influenced, and the step of consensus and transaction execution of the nodes in the parallel chain and the step of secondary endorsement with the main chain can be executed asynchronously; therefore, the blocking of the endorsement of the main chain does not affect the processing of the transaction of the parallel chain, and the secondary endorsement is carried out through the main chain, thereby further enhancing the safety and credibility of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain endorsement method, device, electronic device, storage medium and program product. Background Art

[0002] As a distributed ledger system based on cryptographic principles and consensus mechanisms, blockchain provides support for building a decentralized trust network by ensuring the immutability and transparency of data. In the blockchain's evidence storage and traceability business, the amount of data is usually very large, and the throughput of the blockchain is also very high. Therefore, if a single chain is used to execute all transactions and endorse them, the efficiency of transaction execution will be affected.

[0003] At present, the parallel chain technology is used to execute transactions and store data in shards, that is, the parallel chain technology improves the overall performance and throughput of the system by distributing transaction execution and storage to multiple sub-chains, and the main chain is responsible for consensus and endorsement, and the parallel chain is responsible for transaction execution and storage. However, transactions on the parallel chain can only be executed after being endorsed by the main chain. If there is a problem with the endorsement node of the main chain, such as the endorsement node is attacked, fails, or the processing capacity of the main chain is insufficient to cope with the endorsement requirements of all parallel chains, it will affect the security of the entire system and the transaction execution time. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention proposes a blockchain endorsement method, in which the parallel chain itself can also complete the endorsement function once independently, so as not to affect the security of the entire system and the transaction execution time, and the steps of the nodes in the parallel chain reaching consensus and executing the transaction, and the steps of the secondary endorsement with the main chain can be executed asynchronously, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and the secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0005] The present invention also proposes a blockchain endorsement device.

[0006] The invention also provides an electronic device.

[0007] The present invention also provides a storage medium.

[0008] The present invention also provides a computer program product.

[0009] The blockchain endorsement method according to the first aspect of the present invention is applied to a master node in a parallel chain, and the method includes: Obtain the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction; The block to be endorsed is sent as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed.

[0010] According to the blockchain endorsement method of the embodiment of the present invention, the block to be endorsed is obtained after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and then the parallel chain will not be too dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; the block to be endorsed is sent as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node can execute the target transaction, so as to endorse the block to be endorsed, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be asynchronously executed with the main chain consensus and execution of the target transaction, that is, the step of secondary endorsement with the main chain can be asynchronously executed, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of the parallel chain endorsement, the secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0011] According to an embodiment of the present invention, obtaining the block to be endorsed after the consensus of the nodes in the parallel chain includes: Obtain the block to be endorsed stored by the master node; The blocks to be endorsed are stored in the following manner: Reach consensus and execute pending transactions to obtain blocks to be endorsed; storing the block to be endorsed; or, Obtain the block to be endorsed synchronized by any other node in the parallel chain except the master node; The block to be endorsed is stored.

[0012] According to an embodiment of the present invention, obtaining the block to be endorsed stored by the master node includes: Determine the next synchronization point based on the current synchronization point; the current synchronization point is used to indicate the height of the endorsed block; The block to be endorsed corresponding to the next synchronization point is obtained; the next synchronization point is used to indicate the height of the block to be endorsed.

[0013] According to an embodiment of the present invention, the obtaining the block to be endorsed corresponding to the next synchronization point includes: Determine the latest block height of the master node; the latest block height is used to indicate the number of blocks to be endorsed; Determine that the next synchronization point is less than or equal to the latest block height, and obtain the block to be endorsed corresponding to the next synchronization point; After sending the block to be endorsed as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, the method further includes: Broadcast the next synchronization point to all nodes in the parallel chain except the master node.

[0014] According to one embodiment of the present invention, the method further includes: Periodically broadcast the current synchronization point to all nodes in the parallel chain except the master node.

[0015] According to one embodiment of the present invention, sending the block to be endorsed as a target transaction to an endorsement node in the endorsement main chain of the parallel chain includes: Determine a target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain; Sending the target transaction to the endorsement node in the endorsement main chain; Determine whether the endorsement main chain successfully endorses the target transaction, and store the transaction hash value together with the identification information of the endorsement main chain in a main chain endorsement certificate data structure; the main chain endorsement certificate data structure is used to check whether the endorsement of the block to be endorsed is successful.

[0016] According to an embodiment of the present invention, determining the target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain includes: Based on the transaction hash value of the block to be endorsed on each of the endorsement main chains, respectively determine the target transaction corresponding to each of the endorsement main chains; The sending the target transaction to the endorsement node in the endorsement main chain includes: For any of the target transactions, the target transaction is sent to a random endorsement node in the endorsement main chain corresponding to the target transaction.

[0017] According to one embodiment of the present invention, the parallel chain has a main chain management contract, and the main chain management contract is used for the parallel chain to add and delete its corresponding endorsement main chain. The main chain management contract is also used for the parallel chain to add and delete its corresponding endorsement node.

[0018] According to one embodiment of the present invention, the transaction hash value and the identification information of the endorsement main chain match the height of the main chain endorsement certificate data structure and the height of the block to be endorsed.

[0019] The blockchain endorsement method according to the second aspect of the present invention is applied to any node in the main chain, and the method includes: Receive a target transaction sent by a master node in a parallel chain; the target transaction is determined based on a block to be endorsed after consensus among nodes in the parallel chain, and the block to be endorsed is a block obtained after the nodes in the parallel chain execute the transaction; Reach consensus and execute the target transaction to endorse the block to be endorsed.

[0020] According to one embodiment of the present invention, the consensus and execution of the target transaction include: Based on the target transaction, determine the account information of the parachain that sends the target transaction; Based on the account management contract and the account information, consensus is reached on the target transaction; the account management contract is used by the main chain to register the parachain account associated with it; Determine that the target transaction consensus is passed and execute the target transaction.

[0021] According to the blockchain endorsement device of the third aspect of the present invention, the device is deployed in the master node of the parallel chain, and includes: A block acquisition module, used to obtain the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction; A transaction sending module is used to send the block to be endorsed as a target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed.

[0022] According to the fourth aspect of the present invention, the blockchain endorsement device is deployed in any node in the main chain, and the device includes: A transaction receiving module, used to receive a target transaction sent by a master node in a parallel chain; the target transaction is determined based on a block to be endorsed after consensus among nodes in the parallel chain, and the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; The transaction execution module is used to reach a consensus and execute the target transaction to endorse the block to be endorsed.

[0023] According to an embodiment of the fifth aspect of the present invention, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, it implements any one of the blockchain endorsement methods described above.

[0024] According to the non-transitory computer-readable storage medium of the sixth aspect embodiment of the present invention, a computer program is stored thereon, and when the computer program is executed by a processor, the blockchain endorsement method as described in any one of the above is implemented.

[0025] According to the computer program product of the seventh aspect of the present invention, it includes a computer program, which, when executed by a processor, implements any of the blockchain endorsement methods described above.

[0026] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: Obtain the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and then the parallel chain will not be too dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; send the block to be endorsed as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node can execute the target transaction, so as to endorse the block to be endorsed, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be executed asynchronously with the main chain consensus and execution of the target transaction, that is, the step of secondary endorsement with the main chain can be executed asynchronously, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of endorsement by the parallel chain, it is endorsed twice through the main chain, thereby further enhancing the security and credibility of the system.

[0027] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 This is one of the flow charts of the blockchain endorsement method provided by an embodiment of the present invention.

[0030] Figure 2 This is the second flow chart of the blockchain endorsement method provided in an embodiment of the present invention.

[0031] Figure 3 This is the third flow chart of the blockchain endorsement method provided in an embodiment of the present invention.

[0032] Figure 4 This is the fourth flow chart of the blockchain endorsement method provided in an embodiment of the present invention.

[0033] Figure 5It is one of the structural schematic diagrams of the blockchain endorsement device provided in an embodiment of the present invention.

[0034] Figure 6 This is the second structural schematic diagram of the blockchain endorsement device provided in an embodiment of the present invention.

[0035] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradicting each other.

[0038] At present, the main chain is responsible for consensus and endorsement, while the parachain is responsible for transaction execution and storage. However, the parachain is strongly dependent on the main chain. Parachain transactions can only be executed after being endorsed by the main chain, that is, the endorsement node of the main chain has become the key node of the system. If there is a problem with the endorsement node of the main chain, such as the endorsement node is attacked, fails, or the processing capacity of the main chain is insufficient to cope with the endorsement requirements of all parachains, it will affect the security and reliability of the entire system. For example, as the business expands, the number of parachains gradually increases, and the main chain will become a performance bottleneck. Especially in the case of large transaction volume, the processing capacity of the main chain may not be enough to cope with the endorsement requirements of all parachains, resulting in longer transaction confirmation time and affecting user experience. This centralized risk weakens the decentralized characteristics of blockchain.

[0039] Based on the above problems, the present invention proposes the following embodiments. Figure 1-Figure 4Describe the blockchain endorsement method of the present invention.

[0040] Figure 1 This is one of the flow charts of the blockchain endorsement method provided by the present invention, such as Figure 1 As shown, the blockchain endorsement method includes the following steps 110 and 120. The method is applied to the master node in the parallel chain.

[0041] Step 110, obtain the block to be endorsed after the consensus of the nodes in the parallel chain.

[0042] Among them, the block to be endorsed is the block obtained after the node in the parallel chain executes the transaction. The block to be endorsed is the block obtained after the node in the parallel chain reaches consensus and executes the transaction, so the parallel chain itself can also be regarded as a blockchain with complete functions, that is, the parallel chain can complete the endorsement function alone. That is, the block to be endorsed is obtained after consensus and execution of the transaction to be executed. The transaction to be executed can be a transaction sent by the client received by the master node in the parallel chain. The transaction to be executed can also be a transaction sent by the client received by other nodes in the parallel chain, and then synchronized to the master node by other nodes.

[0043] In one embodiment, considering that the master node in the parallel chain synchronizes one block to be endorsed to the main chain at a time, based on this, the next synchronization point is determined based on the current synchronization point, and the current synchronization point is used to indicate the height of the block that has been endorsed. The block to be endorsed corresponding to the next synchronization point is obtained, and the next synchronization point is used to indicate the height of the block to be endorsed.

[0044] Furthermore, it checks whether it is the master node of the parallel chain. If so, it starts to execute step 110, that is, starts the secondary endorsement process.

[0045] Step 120: Send the block to be endorsed as a target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node can execute the target transaction to endorse the block to be endorsed.

[0046] It should be noted that the block to be endorsed is sent as the target transaction to the endorsing node, so that the nodes in the parallel chain reach consensus and execute the transaction, and the step of reaching consensus with the main chain and executing the target transaction can be executed asynchronously, that is, the step of secondary endorsement with the main chain can be executed asynchronously, that is, the parallel chain sends its own consensus block as a transaction to the main chain for endorsement and these two steps are completely asynchronous. The blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions. From the perspective of the main chain, this is just an ordinary transaction, and it only needs to focus on its own blockchain core logic, which will not affect the security of the entire system and the transaction execution time.

[0047] For the endorsing node, the endorsing node receives the target transaction sent by the main node in the parallel chain; it reaches consensus and executes the target transaction to endorse the block to be endorsed, that is, it performs a second endorsement on the transaction to be executed, so that when endorsing a single chain, it performs a second endorsement through the main chain, thereby further enhancing the security and credibility of the system.

[0048] In addition, since the steps of consensus and transaction execution by nodes in the parallel chain can be executed asynchronously with the steps of consensus and execution of target transactions by the main chain, based on this, the nodes in the parallel chain can consensus and execute multiple pending transactions to obtain a block to be endorsed, thereby achieving only one second-layer endorsement for a batch of transactions. Compared with the existing technology that requires the main chain to endorse each transaction in a batch of transactions separately, the performance loss of the main chain is greatly reduced.

[0049] The blockchain endorsement method provided by the embodiment of the present invention obtains the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and thus the parallel chain will not be too dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; the block to be endorsed is sent as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction, so as to endorse the block to be endorsed, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be asynchronously executed with the main chain consensus and execution of the target transaction, that is, the step of secondary endorsement with the main chain can be asynchronously executed, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of the parallel chain endorsement, the secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0050] Based on any of the above embodiments, in the method, the above step 110 includes: Obtain the block to be endorsed stored by the master node.

[0051] It should be understood that after the nodes in the parallel chain reach consensus and execute the transactions to be executed, the resulting blocks to be endorsed will be stored.

[0052] Accordingly, in one embodiment, the blocks to be endorsed are stored in the following manner: Reach consensus and execute pending transactions to obtain blocks to be endorsed; and store the blocks to be endorsed.

[0053] Here, the transaction to be executed can be a transaction sent by a client and directly received by the master node in the parallel chain, or it can be a transaction sent by a client and directly received by other nodes in the parallel chain, and then synchronized to the master node by other nodes.

[0054] In addition, since the steps of node consensus and transaction execution in the parallel chain can be executed asynchronously with the steps of consensus and execution of the target transaction in the main chain, based on this, consensus is reached and multiple pending transactions are executed to obtain an endorsement area, so that only one second-layer endorsement is required for a batch of transactions. Compared with the existing technology that requires the main chain to endorse each transaction in a batch of transactions separately, the performance loss of the main chain is greatly reduced.

[0055] Furthermore, the block to be endorsed is synchronized to all nodes in the parallel chain except the master node.

[0056] Accordingly, in another embodiment, the blocks to be endorsed are stored in the following manner: Obtain the block to be endorsed synchronized by any node in the parallel chain except the master node; and store the block to be endorsed.

[0057] It should be understood that each node of the parallel chain will synchronize the block obtained by the latest executed transaction. That is, the block to be endorsed is obtained by consensus and execution of the transaction to be executed by any node other than the master node.

[0058] The blockchain endorsement method provided by the embodiment of the present invention, through the above-mentioned manner, no matter whether the block to be endorsed is obtained by consensus of the master node in the parallel chain and execution of transactions, or by consensus of other nodes in the parallel chain and execution of transactions, it is ultimately the master node in the parallel chain that sends the target transaction corresponding to the block to be endorsed to the endorsing node, thereby preventing multiple nodes in the parallel chain from repeatedly sending target transactions to the endorsing node, thereby reducing performance loss.

[0059] Based on any of the above embodiments, considering that one block to be endorsed is endorsed at a time, based on this, in the method, the step of obtaining the block to be endorsed stored by the master node includes: Determine the next synchronization point based on the current synchronization point; the current synchronization point is used to indicate the height of the endorsed block; The block to be endorsed corresponding to the next synchronization point is obtained; the next synchronization point is used to indicate the height of the block to be endorsed.

[0060] It should be noted that the next synchronization point is determined based on the current synchronization point to obtain the block to be endorsed corresponding to the next synchronization point, so as to endorse the new block to be endorsed. In other words, if the block to be endorsed corresponding to the next synchronization point has been endorsed by the main chain, the value of the current synchronization point becomes the value of the next synchronization point.

[0061] In a specific embodiment, the current synchronization point is incremented by 1 to obtain the next synchronization point.

[0062] Here, the next synchronization point is used to indicate the height of the block to be endorsed, based on which it can be determined which block is currently to be endorsed.

[0063] The blockchain endorsement method provided by the embodiment of the present invention, through the above method, performs secondary endorsement on a block to be endorsed at a time, that is, after completing the endorsement of a block to be endorsed, the next block to be endorsed is endorsed, ensuring that no block to be endorsed is missed, and also ensuring that a block to be endorsed is not repeatedly endorsed multiple times, thereby ensuring system security and reducing performance loss.

[0064] Based on any of the above embodiments, in the method, obtaining the block to be endorsed corresponding to the next synchronization point includes: Determine the latest block height of the master node; Determine that the next synchronization point is less than or equal to the latest block height, and obtain the block to be endorsed corresponding to the next synchronization point.

[0065] The latest block height is used to indicate the number of blocks that need to be endorsed. That is, the latest block height is used to indicate the number of blocks obtained after the nodes in the parallel chain reach consensus and execute transactions. The latest block height is the latest block height of the master node.

[0066] It should be noted that, when the next synchronization point is less than or equal to the latest block height, it means that there are still unendorsed blocks to be endorsed, so the blocks to be endorsed corresponding to the next synchronization point are obtained to endorse the blocks to be endorsed.

[0067] Accordingly, after sending the block to be endorsed as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, the method further includes: The next synchronization point is broadcast to all nodes in the parallel chain except the master node. Based on this, the synchronization point data of all nodes in the parallel chain is ensured to be consistent (that is, the current synchronization point of each node is consistent). Even if the master node in the parallel chain changes, the latest block height and synchronization point data are synchronized between the nodes, and the block to be endorsed corresponding to the next synchronization point is obtained only when it is determined that the next synchronization point is less than or equal to the latest block height. Therefore, it can be further ensured that the block to be endorsed is not missed, and it is also ensured that a block to be endorsed is not endorsed multiple times.

[0068] It should be noted that after broadcasting the next synchronization point to other nodes, other nodes will use the value of the next synchronization point as the value of the current synchronization point. That is, the current synchronization point of all nodes in the parallel chain except the master node can be the value of the next synchronization point. And the current synchronization point of the master node also needs to be updated, that is, the current synchronization point of the master node is updated to the value of the next synchronization point.

[0069] Furthermore, after sending the block to be endorsed as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, and ensuring that the endorsement main chain is successfully endorsed, the next synchronization point is broadcast to all nodes in the parallel chain except the master node.

[0070] The blockchain endorsement method provided by the embodiment of the present invention ensures that the synchronization point data of all nodes in the parallel chain remain consistent in the above manner. Even if the master node in the parallel chain changes, since the latest block height and synchronization point data are synchronized between the nodes, and the block to be endorsed corresponding to the next synchronization point is obtained only when it is determined that the next synchronization point is less than or equal to the latest block height, it can further ensure that the block to be endorsed is not missed, and it can also ensure that a block to be endorsed is not endorsed multiple times, thereby further ensuring the security of the system and further reducing performance loss.

[0071] Based on any of the above embodiments, the method further includes: The current synchronization point is periodically broadcast to all nodes in the parallel chain except the master node. Based on this, the current synchronization point is periodically broadcasted to further ensure that the synchronization point data of all nodes in the parallel chain remain consistent, that is, to ensure that the current synchronization points of all nodes in the parallel chain remain consistent, thereby further ensuring that no blocks to be endorsed are missed, and that no multiple endorsements are repeated for a block to be endorsed.

[0072] Furthermore, first check whether the parallel chain is associated with the endorsed main chain. If so, periodically broadcast the current synchronization point to all nodes in the parallel chain except the main node.

[0073] Furthermore, after the parallel chain is started (goes online), the current synchronization point will first be broadcast to all nodes in the parallel chain except the master node, and then the current synchronization point will be periodically broadcast to all nodes in the parallel chain except the master node.

[0074] Accordingly, the method further comprises: Receive the current synchronization point broadcasted by any node in the parallel chain except the master node. That is, the current synchronization point of the master node can also be broadcasted by other nodes.

[0075] It should be understood that each node in the parallel chain periodically broadcasts its current synchronization point, further ensuring that the synchronization point data of all nodes in the parallel chain remains consistent, thereby further ensuring that no blocks to be endorsed are missed, and also ensuring that a block to be endorsed is not endorsed multiple times.

[0076] The blockchain endorsement method provided by the embodiment of the present invention, through the above-mentioned method, each node in the parallel chain periodically broadcasts its own current synchronization point, further ensuring that the synchronization point data of all nodes in the parallel chain remain consistent, thereby further ensuring that no blocks to be endorsed are missed, and also ensuring that a block to be endorsed is not repeatedly endorsed multiple times, thereby further ensuring system security and further reducing performance loss.

[0077] Based on any of the above embodiments, in the method, the above step 120 includes: step 121, step 122 and step 123.

[0078] Step 121, determining a target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain.

[0079] Here, the calculation method of the transaction hash value can be set according to actual needs, for example, directly finding the hash value of the block to be endorsed, and determining the hash value as the transaction hash value. Moreover, the transaction hash values ​​of the block to be endorsed on different endorsement main chains are different. For example, the hash value is determined based on the identification information of the block to be endorsed and the endorsement main chain, and the hash value is determined as the transaction hash value. Then, a target transaction can be constructed based on the transaction hash value.

[0080] Step 122: Send the target transaction to the endorsement node in the endorsement main chain.

[0081] In one embodiment, the target transaction is encapsulated into a cross-chain message and sent to an endorsement node in the endorsement main chain.

[0082] Furthermore, after the above step 122, the transaction hash value returned by the endorsement node is received, that is, after the endorsement node receives the target transaction, it will also return the corresponding transaction hash value so that the master node of the parallel chain can know that the endorsement node has successfully received the target transaction.

[0083] Step 123, determine whether the endorsement main chain successfully endorses the target transaction, and store the transaction hash value together with the identification information of the endorsement main chain in the main chain endorsement certificate data structure; the main chain endorsement certificate data structure is used to check whether the endorsement of the block to be endorsed is successful.

[0084] In a specific embodiment, the endorsement main chain verifies whether the target transaction is confirmed to be placed on the disk, that is, the endorsement main chain verifies whether the target transaction is successfully endorsed.

[0085] Here, the identification information of the endorsement main chain is used to uniquely identify the endorsement main chain, for example, it is a chain ID.

[0086] Furthermore, the main chain endorsement certificate data structure is written into the database for subsequent query on whether the second endorsement of each block to be endorsed is successful.

[0087] Furthermore, after the above step 122, the transaction hash value returned by the endorsement node is received, and based on the transaction hash value, the endorsement main chain is checked to see whether the target transaction is successfully endorsed.

[0088] The blockchain endorsement method provided by the embodiment of the present invention determines the target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain in the above manner, so that it can be known by which endorsement main chain the block to be endorsed is endorsed, and the block to be endorsed can be identified, so that when it is determined that the endorsement main chain successfully endorses the target transaction, the transaction hash value and the identification information of the endorsement main chain are stored together in the main chain endorsement certificate data structure, and it can be accurately and quickly checked whether the block to be endorsed is successfully endorsed.

[0089] Based on any of the above embodiments, in the method, the above step 121 includes: Based on the transaction hash value of the block to be endorsed on each of the endorsement main chains, the target transaction corresponding to each of the endorsement main chains is determined respectively.

[0090] Here, the transaction hash values ​​of the block to be endorsed on different endorsement main chains are different. One transaction hash value corresponds to one target transaction.

[0091] Accordingly, the above step 122 includes: For any of the target transactions, the target transaction is sent to a random endorsement node in the endorsement main chain corresponding to the target transaction. Based on this, it only needs to be sent to a random endorsement node in the endorsement main chain, and all endorsement nodes do not need to be endorsed, thereby reducing performance loss.

[0092] Accordingly, after the above step 123, when all endorsement main chains have been endorsed, the main chain endorsement certificate data structure is written into the database for subsequent querying whether each block to be endorsed has been successfully endorsed twice in each endorsement main chain.

[0093] The blockchain endorsement method provided by the embodiment of the present invention can meet the endorsement requirements of multiple endorsement main chains through the above method, thereby further ensuring the security and reliability of the system, and only needs to be sent to a random endorsement node in the endorsement main chain, without the need for all endorsement nodes to endorse, thereby reducing performance loss.

[0094] Based on any of the above embodiments, in this method, the parallel chain has a main chain management contract, and the main chain management contract is used for the parallel chain to add and delete its corresponding endorsement main chain. The main chain management contract is also used for the parallel chain to add and delete its corresponding endorsement node.

[0095] Here, the main chain management contract is the system contract of the parallel chain, so that the relationship between the main chain and the parallel chain can be managed through the main chain management contract, thereby ensuring flexible coordination of the relationship between the main chain and the parallel chain.

[0096] The main chain management contract is used by the parachain to add and delete its corresponding endorsed main chain, that is, the parachain can add the main chain as its own endorsed main chain through the main chain management contract, and the parachain can delete the endorsed main chain through the main chain management contract.

[0097] The main chain management contract is used for the parallel chain to add and delete its corresponding endorsement nodes, that is, the parallel chain can add the endorsement nodes that endorse itself through the main chain management contract, and the parallel chain can delete the endorsement nodes that endorse itself through the main chain management contract.

[0098] Correspondingly, when a parallel chain adds its corresponding endorsement main chain, an event notification will be issued to notify the parallel chain to add the added endorsement main chain into the target main chain list for sending endorsements, which target main chain list includes multiple endorsement main chains to be endorsed.

[0099] Accordingly, in the case where a parachain deletes its corresponding endorsement main chain, an event notification will be issued to notify the parachain to remove the deleted endorsement main chain from the list of target main chains to which endorsements are sent.

[0100] Accordingly, when a parallel chain adds its corresponding endorsement node, an event notification will be issued to notify the parallel chain to add the added endorsement node to the node list of the corresponding endorsement main chain, which node list includes multiple endorsement nodes to be endorsed.

[0101] Accordingly, in the event that a parallel chain deletes its corresponding endorsement node, an event notification will be issued to notify the parallel chain to remove the deleted endorsement node from the node list of the corresponding endorsement main chain.

[0102] It should be noted that when a parachain is initially created, it can be associated with or not associated with one or more endorsed main chains. Furthermore, the associated main chain information includes the endorseable nodes in the endorsed main chain.

[0103] In addition, it should be noted that whether to associate with the endorsement main chain is decided by the parallel chain itself. It can be associated at the beginning of creation or in the subsequent stages, and the endorsement node in the endorsement main chain can be changed.

[0104] The blockchain endorsement method provided in the embodiment of the present invention can realize the management of the relationship between the main chain and the parallel chain through the main chain management contract in the above manner, without the need for complex governance and management mechanisms to coordinate the relationship between the main chain and the parallel chains, thereby ensuring the overall coordination and stability of the system. Compared with the strong dependence of the parallel chain on the main chain, the parallel chain in the embodiment of the present invention can flexibly bind or withdraw from one or more main chains through contracts, thereby improving the expansion flexibility of the parallel chain.

[0105] Based on any of the above embodiments, the transaction hash value and the identification information of the endorsement main chain match the height of the main chain endorsement certificate data structure and the height of the block to be endorsed.

[0106] In one embodiment, the transaction hash value and the identification information of the endorsement main chain are at the same height in the main chain endorsement certificate data structure as the height of the block to be endorsed.

[0107] The blockchain endorsement method provided by the embodiment of the present invention can accurately and quickly check whether the block to be endorsed is successfully endorsed based on the height of the block to be endorsed through the above method.

[0108] To facilitate understanding of the above embodiments, a specific embodiment is used for description. Figure 2 As shown, first, any target node other than the master node in the parallel chain receives the transaction to be executed sent by the client, and secondly, the target node synchronizes the transaction to be executed to the master node in the parallel chain, and then the master node in the parallel chain reaches a consensus and executes the transaction to be executed to obtain the block to be endorsed, and then the master node in the parallel chain stores the block to be endorsed, and then the master node in the parallel chain synchronizes the block to be endorsed to the target node in the parallel chain, and then the target node stores the block to be endorsed. The above steps are processed asynchronously with the following steps, which include: first, the master node in the parallel chain obtains the block to be endorsed corresponding to the next synchronization point, then the master node in the parallel chain builds the target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain, then the master node in the parallel chain sends the target transaction to the endorsement node in the endorsement main chain, then the master node in the parallel chain receives the transaction hash value returned by the endorsement node, and the endorsement node consensus and executes the target transaction, then the master node in the parallel chain determines that the endorsement main chain successfully endorses the target transaction, and stores the transaction hash value together with the identification information of the endorsement main chain in the main chain endorsement certificate data structure, then the master node in the parallel chain updates the current synchronization point (that is, redefines the current synchronization point as the value of the next synchronization point) and broadcasts it to other nodes in the parallel chain.

[0109] To facilitate understanding of the above embodiments, a specific embodiment is used for description. Figure 3As shown, the secondary endorsement step includes: first, determining the latest block height of the next synchronization point and the main node in the parallel chain, and secondly, determining whether the next synchronization point is less than or equal to the latest block height. If so, obtaining the block to be endorsed corresponding to the next synchronization point, and determining the target transaction corresponding to each endorsement main chain based on the transaction hash value of the block to be endorsed on each endorsement main chain. For any target transaction, the target transaction is sent to a random endorsement node in the endorsement main chain corresponding to the target transaction. If not, returning to the step of determining the latest block height of the next synchronization point and the main node in the parallel chain, after that, determining that each endorsement main chain has successfully endorsed the target transaction, storing each transaction hash value together with the identification information of each endorsement main chain in the main chain endorsement certificate data structure, and storing the main chain endorsement certificate data structure in the database, and finally, updating the current synchronization point (i.e., re-determining the current synchronization point as the value of the next synchronization point) and broadcasting the next synchronization point (i.e., broadcasting the value of the next synchronization point to other nodes so that other nodes use the value of the next synchronization point as the current synchronization point).

[0110] Based on any of the above embodiments, the present invention also provides a blockchain endorsement method. Figure 4 This is the fourth flow chart of the blockchain endorsement method provided by the present invention, such as Figure 4 As shown, the blockchain endorsement method includes the following steps 410 and 420. The method is applied to any node in the main chain.

[0111] Step 410, receiving the target transaction sent by the master node in the parallel chain.

[0112] The target transaction is determined based on the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction. The determination method of the target transaction can refer to the above embodiments, which will not be repeated here.

[0113] Step 420: consensus and execute the target transaction to endorse the block to be endorsed.

[0114] Reach consensus and execute the target transaction, that is, to endorse the transaction to be executed twice, so that when the parallel chain endorses it, it will be endorsed again through the main chain, thereby further enhancing the security and credibility of the system.

[0115] In the blockchain endorsement method provided by the embodiment of the present invention, the target transaction is determined based on the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and thus the parallel chain will not be overly dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; the target transaction sent by the main node in the parallel chain is received, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be asynchronously executed with the steps of consensus and execution of the target transaction of the main chain, that is, the step of secondary endorsement with the main chain can be asynchronously executed, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of endorsement by the parallel chain, secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0116] Based on any of the above embodiments, in the method, the above step 420 includes: Based on the target transaction, determine the account information of the parachain that sends the target transaction; Reaching consensus on the target transaction based on the account management contract and the account information; Determine that the target transaction consensus is passed and execute the target transaction.

[0117] In one embodiment, the target transaction is signed with the account information of the parallel chain. For the parallel chain master node, it determines the target transaction corresponding to the endorsement main chain based on the transaction hash value of the block to be endorsed on each endorsement main chain and the account information of the parallel chain.

[0118] Here, the account management contract is used for the main chain to register the parachain account associated with it. Based on this, the relationship between the main chain and the parachain can be managed through the account management contract, thereby ensuring flexible coordination of the relationship between the main chain and the parachain. In one embodiment, the account management contract is a system contract.

[0119] Furthermore, any node in the main chain can use the main chain administrator account to register the parachain account associated with it through the account management contract.

[0120] In a specific embodiment, the registered account information is determined based on the account management contract, and the registered account information is matched with the account information. If the match is successful, the consensus is successful, that is, the certificate endorsed by the registered account information.

[0121] The blockchain endorsement method provided by the embodiment of the present invention can manage the relationship between the main chain and the parallel chain through the account management contract in the above manner, without the need for complex governance and management mechanisms to coordinate the relationship between the main chain and the parallel chains, thereby ensuring the overall coordination and stability of the system. Compared with the strong dependence of the parallel chain on the main chain, the parallel chain in the embodiment of the present invention can flexibly bind or withdraw from one or more main chains through contracts, thereby improving the expansion flexibility of the parallel chain; at the same time, the main chain can quickly realize endorsement through the above manner, thereby reducing performance loss.

[0122] The blockchain endorsement device provided by the present invention is described below. The blockchain endorsement device described below and the blockchain endorsement method described above can be referenced to each other.

[0123] Figure 5 This is one of the structural diagrams of the blockchain endorsement device provided by the present invention, such as Figure 5 As shown, the blockchain endorsement device deployed in the master node in the parallel chain includes a block acquisition module 510 and a transaction sending module 520.

[0124] The block acquisition module 510 is used to obtain the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction.

[0125] The transaction sending module 520 is used to send the block to be endorsed as a target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed.

[0126] The blockchain endorsement device provided by the embodiment of the present invention obtains the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and thus the parallel chain will not be too dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; the block to be endorsed is sent as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node can execute the target transaction, so as to endorse the block to be endorsed, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be asynchronously executed with the main chain consensus and execution of the target transaction, that is, the step of secondary endorsement with the main chain can be asynchronously executed, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of the parallel chain endorsement, the secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0127] Figure 6 This is the second structural diagram of the blockchain endorsement device provided by the present invention, such as Figure 6 As shown, the blockchain endorsement device deployed at any node in the main chain includes a transaction receiving module and a transaction execution module.

[0128] The transaction receiving module 610 is used to receive the target transaction sent by the master node in the parallel chain; the target transaction is determined based on the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction.

[0129] The transaction execution module 620 is used to reach a consensus and execute the target transaction to endorse the block to be endorsed.

[0130] In the blockchain endorsement device provided by the embodiment of the present invention, the target transaction is determined based on the block to be endorsed after the consensus of the nodes in the parallel chain, and the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction, so that the parallel chain itself can also complete the endorsement function once independently, and thus the parallel chain will not be overly dependent on the main chain, that is, the transaction of the parallel chain can be executed after endorsing itself, so as not to affect the security of the entire system and the transaction execution time; the target transaction sent by the main node in the parallel chain is received, so that the steps of the nodes in the parallel chain consensus and execution of the transaction can be asynchronously executed with the steps of consensus and execution of the target transaction of the main chain, that is, the step of secondary endorsement with the main chain can be asynchronously executed, so that the blocking of the main chain endorsement will not affect the processing of the parallel chain's own transactions, and thus will not affect the security of the entire system and the transaction execution time, and in the case of endorsement by the parallel chain, secondary endorsement is performed through the main chain, thereby further enhancing the security and credibility of the system.

[0131] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the blockchain endorsement method applied to the master node in the parallel chain, the method comprising: obtaining the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction; the block to be endorsed is sent as the target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed. Alternatively, a blockchain endorsement method applied to any node in the main chain is executed, the method comprising: receiving a target transaction sent by a main node in a parallel chain; the target transaction is determined based on a block to be endorsed after consensus among nodes in the parallel chain, the block to be endorsed being a block obtained after the nodes in the parallel chain execute a transaction; consensus is reached and the target transaction is executed to endorse the block to be endorsed.

[0132] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0133] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute a blockchain endorsement method applied to a master node in a parallel chain, the method comprising: obtaining a block to be endorsed after consensus among nodes in the parallel chain; the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; the block to be endorsed is sent as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed. Alternatively, a blockchain endorsement method applied to any node in the main chain is executed, the method comprising: receiving a target transaction sent by a master node in a parallel chain; the target transaction is determined based on the block to be endorsed after consensus among nodes in the parallel chain, the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; consensus and execution of the target transaction to endorse the block to be endorsed.

[0134] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute a blockchain endorsement method applied to a master node in a parallel chain, the method comprising: obtaining a block to be endorsed after consensus among nodes in the parallel chain; the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; the block to be endorsed is sent as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed. Alternatively, a blockchain endorsement method applied to any node in the main chain is executed, the method comprising: receiving a target transaction sent by a master node in a parallel chain; the target transaction is determined based on the block to be endorsed after consensus among nodes in the parallel chain, the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; consensus and execution of the target transaction to endorse the block to be endorsed.

[0135] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the present invention, rather than to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and should be included in the scope of the claims of the present invention.

Claims

1. A blockchain endorsement method, characterized in that: Applied to a master node in a parallel chain, the method comprises: Obtain the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction; The block to be endorsed is sent as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed.

2. The blockchain endorsement method according to claim 1, characterized in that: The obtaining of the block to be endorsed after the consensus of the nodes in the parallel chain includes: Obtain the block to be endorsed stored by the master node; The blocks to be endorsed are stored in the following manner: Reach consensus and execute pending transactions to obtain blocks to be endorsed; storing the block to be endorsed; or, Obtain the block to be endorsed synchronized by any other node in the parallel chain except the master node; The block to be endorsed is stored.

3. The blockchain endorsement method according to claim 2, characterized in that: The obtaining of the block to be endorsed stored by the master node includes: Determine the next synchronization point based on the current synchronization point; the current synchronization point is used to indicate the height of the endorsed block; The block to be endorsed corresponding to the next synchronization point is obtained; the next synchronization point is used to indicate the height of the block to be endorsed.

4. The blockchain endorsement method according to claim 3, characterized in that: The obtaining the block to be endorsed corresponding to the next synchronization point includes: Determine the latest block height of the master node; the latest block height is used to indicate the number of blocks to be endorsed; Determine that the next synchronization point is less than or equal to the latest block height, and obtain the block to be endorsed corresponding to the next synchronization point; After sending the block to be endorsed as a target transaction to an endorsement node in the endorsement main chain of the parallel chain, the method further includes: Broadcast the next synchronization point to all nodes in the parallel chain except the master node.

5. The blockchain endorsement method according to claim 3, characterized in that: The method further comprises: Periodically broadcast the current synchronization point to all nodes in the parallel chain except the master node.

6. The blockchain endorsement method according to claim 1, characterized in that: The step of sending the block to be endorsed as a target transaction to an endorsement node in the endorsement main chain of the parallel chain includes: Determine a target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain; Sending the target transaction to the endorsement node in the endorsement main chain; Determine whether the endorsement main chain successfully endorses the target transaction, and store the transaction hash value together with the identification information of the endorsement main chain in a main chain endorsement certificate data structure; the main chain endorsement certificate data structure is used to check whether the endorsement of the block to be endorsed is successful.

7. The blockchain endorsement method according to claim 6, characterized in that: The determining the target transaction based on the transaction hash value of the block to be endorsed on the endorsement main chain includes: Based on the transaction hash value of the block to be endorsed on each of the endorsement main chains, respectively determine the target transaction corresponding to each of the endorsement main chains; The sending the target transaction to the endorsement node in the endorsement main chain includes: For any of the target transactions, the target transaction is sent to a random endorsement node in the endorsement main chain corresponding to the target transaction.

8. The blockchain endorsement method according to claim 7, characterized in that: The parallel chain has a main chain management contract, which is used by the parallel chain to add and delete its corresponding endorsement main chain. The main chain management contract is also used by the parallel chain to add and delete its corresponding endorsement node.

9. The blockchain endorsement method according to claim 6, characterized in that: The transaction hash value and the identification information of the endorsement main chain match the height of the main chain endorsement certificate data structure and the height of the block to be endorsed.

10. A blockchain endorsement method, characterized in that: Applied to any node in the main chain, the method includes: Receive a target transaction sent by a master node in a parallel chain; the target transaction is determined based on a block to be endorsed after consensus among nodes in the parallel chain, and the block to be endorsed is a block obtained after the nodes in the parallel chain execute the transaction; Reach consensus and execute the target transaction to endorse the block to be endorsed.

11. The blockchain endorsement method according to claim 10, characterized in that: The consensus and execution of the target transaction include: Based on the target transaction, determine the account information of the parachain that sends the target transaction; Based on the account management contract and the account information, consensus is reached on the target transaction; the account management contract is used by the main chain to register the parachain account associated with it; Determine that the target transaction consensus is passed and execute the target transaction.

12. A blockchain endorsement device, characterized in that: A master node deployed in a parallel chain, the device comprising: A block acquisition module, used to obtain the block to be endorsed after the consensus of the nodes in the parallel chain; the block to be endorsed is the block obtained after the nodes in the parallel chain execute the transaction; A transaction sending module is used to send the block to be endorsed as a target transaction to the endorsement node in the endorsement main chain of the parallel chain, so that the endorsement node executes the target transaction to endorse the block to be endorsed.

13. A blockchain endorsement device, characterized in that: Deployed at any node in the main chain, the device includes: A transaction receiving module, used to receive a target transaction sent by a master node in a parallel chain; the target transaction is determined based on a block to be endorsed after consensus among nodes in the parallel chain, and the block to be endorsed is a block obtained after a node in the parallel chain executes a transaction; The transaction execution module is used to reach a consensus and execute the target transaction to endorse the block to be endorsed.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the blockchain endorsement method as described in any one of claims 1 to 11.

15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the blockchain endorsement method as described in any one of claims 1 to 11.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the blockchain endorsement method as described in any one of claims 1 to 11.