Blockchain system transaction signature verification method and system

CN116318703BActive Publication Date: 2025-09-12SHANGHAI WANXIANG BLOCK CHAIN CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310027181.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-09
Publication Date
2025-09-12
Estimated Expiration
2043-01-09

AI Technical Summary

Technical Problem

[0002]在联盟链系统中,联盟链信息处理节点需要耗费大量时间来验证每笔交易的签名,从而影响区块链网络的交易处理速度问题

Benefits of technology

[0029] 1. The present invention greatly reduces the time and CPU consumption of information signing and verification, improves the efficiency of cryptographic signatures in practical applications, and reduces resource consumption;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318703B_ABST
    Figure CN116318703B_ABST
Patent Text Reader

Abstract

The present invention provides a blockchain system transaction signature verification method and system, comprising: step S1: constructing a parent transaction, using the parent transaction to sign other child transactions issued by the same user, and inserting the child transaction hash into the parent transaction; step S2: combining the child transactions and the parent transaction into a network message and broadcasting it; step S3: upon receiving the broadcast network message, the consortium chain information processing node verifies the parent transaction. If the child transaction hash already exists in the current parent transaction, the current child transaction is considered verified. This invention significantly reduces the time and CPU consumption for information signing and verification, improves the efficiency of cryptographic signatures in practical applications, and reduces resource consumption.
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 more specifically, to a method and system for verifying signatures in blockchain system transactions, and more specifically, to a simplified mechanism for verifying signatures in blockchain system transactions. Background Art

[0002] In a consortium blockchain system, consortium chain information processing nodes spend a significant amount of time verifying the signature of each transaction, which impacts the transaction processing speed of the blockchain network. In practical applications, most consortium chains use a single account to sign transactions, which places pressure on the chain on a few nodes, or even a single node.

[0003] Patent document CN111445239A (application number: 202010086005.6) discloses a blockchain-based signature verification method, including the following steps: S1. Construct a smart contract for signature verification authenticity and publish it to the blockchain, and the blockchain is synchronized to each node; S2. Each node includes a computing unit, and the instruction set of the computing unit includes an RSA signature verification instruction; S3. RSA signature verification logic corresponding to the RSA signature verification instruction is deployed in the virtual machine of the blockchain; S4. For each node in the blockchain network, the node calls the smart contract through the computing unit when executing a business initiation transaction; S5. The node triggers the execution of the RSA signature verification logic through the computing unit according to the RSA signature verification instruction in the smart contract to perform an RSA signature verification operation on the business signature, and gives the transaction authenticity result based on the verification result; S5. The blockchain synchronizes the transaction authenticity result to each node, which has the advantage of enabling the blockchain to support RSA signature verification operations by default.

[0004] Verifying the signature of information consumes a lot of time and CPU, and this cannot be simplified through cryptographic means, even for information from the same account. Therefore, the present invention proposes to aggregate the proof information of multiple messages into one message and perform only one verification. This is because signing multiple messages has the same proof effect as signing multiple messages with one message, and no unnecessary time-consuming operations are required. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a blockchain system transaction signature verification method and system.

[0006] A blockchain system transaction signature verification method provided by the present invention includes:

[0007] Step S1: Construct a parent transaction, use it to sign other child transactions issued by the same user, and put the hash of the child transaction into the parent transaction;

[0008] Step S2: Collect the child transaction and the parent transaction into a network message and broadcast it;

[0009] Step S3: After receiving the broadcast network message, the alliance chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified.

[0010] Preferably, step S1 adopts the following methods: the client constructs a parent transaction based on a certain number of transactions, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction; or, the client caches a certain number of transactions locally. When the number of transactions cached locally reaches a preset value, the alliance chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of transactions cached locally, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction.

[0011] Preferably, the step S3 adopts:

[0012] Step S3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction;

[0013] Step S3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transaction from the parent transaction and cache the current hash list locally;

[0014] Step S3.3: When verifying the signature of a sub-transaction, determine whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, skip the signature verification and mark it as verified.

[0015] Preferably, when the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block.

[0016] Preferably, when a new node enters the network and needs to verify the signature of a transaction, the parent transaction is verified based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

[0017] A blockchain system transaction signature verification system provided by the present invention includes:

[0018] Module M1: Constructs a parent transaction, uses it to sign other child transactions issued by the same user, and places the hash of the child transactions into the parent transaction;

[0019] Module M2: collects the sub-transactions and parent transactions into a network message and broadcasts it;

[0020] Module M3: After receiving the broadcast network message, the alliance chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified.

[0021] Preferably, the module M1 adopts: the client constructs a parent transaction based on a certain number of transactions, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction; or, the client caches a certain number of transactions locally. When the number of transactions cached locally reaches a preset value, the alliance chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of transactions cached locally, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction.

[0022] Preferably, the module M3 adopts:

[0023] Module M3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction;

[0024] Module M3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transactions from the parent transaction and cache the current hash list locally;

[0025] Module M3.3: When verifying the signature of a sub-transaction, determine whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, skip the signature verification and mark it as verified.

[0026] Preferably, when the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block.

[0027] Preferably, when a new node enters the network and needs to verify the signature of a transaction, the parent transaction is verified based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The present invention greatly reduces the time and CPU consumption of information signing and verification, improves the efficiency of cryptographic signatures in practical applications, and reduces resource consumption;

[0030] 2. This invention can significantly improve the TPS of the entire alliance chain network and enhance the value of the alliance chain in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:

[0032] Figure 1 Flowchart of the transaction signature verification method in the blockchain system. DETAILED DESCRIPTION

[0033] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0034] Example 1

[0035] A blockchain system transaction signature verification method provided by the present invention includes:

[0036] Step S1: Construct a parent transaction, use it to sign other child transactions issued by the same user, and put the hash of the child transaction into the parent transaction;

[0037] Step S2: Collect the child transaction and the parent transaction into a network message and broadcast it;

[0038] Step S3: After receiving the broadcast network message, the alliance chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified.

[0039] Specifically, step S1 adopts: the client constructs a parent transaction based on a certain number of transactions, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction; or, the client caches a certain number of transactions locally. When the number of transactions cached locally reaches a preset value, the alliance chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of transactions cached locally, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction.

[0040] Specifically, the step S3 adopts:

[0041] Step S3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction;

[0042] Step S3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transaction from the parent transaction and cache the current hash list locally;

[0043] Step S3.3: When verifying the signature of a sub-transaction, determine whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, skip the signature verification and mark it as verified.

[0044] Specifically, when the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block.

[0045] Specifically, when a new node enters the network and needs to verify the signature of a transaction, it verifies the signature of the parent transaction based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

[0046] A blockchain system transaction signature verification system provided by the present invention includes:

[0047] Module M1: Constructs a parent transaction, uses it to sign other child transactions issued by the same user, and places the hash of the child transactions into the parent transaction;

[0048] Module M2: collects the sub-transactions and parent transactions into a network message and broadcasts it;

[0049] Module M3: After receiving the broadcast network message, the alliance chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified.

[0050] Specifically, the module M1 adopts: the client constructs a parent transaction based on a certain number of transactions, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction; or, the client caches a certain number of transactions locally. When the number of transactions cached locally reaches a preset value, the alliance chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of transactions cached locally, uses the parent transaction to sign other child transactions issued by the same user, and puts the hash of the child transaction into the parent transaction.

[0051] Specifically, the module M3 adopts:

[0052] Module M3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction;

[0053] Module M3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transactions from the parent transaction and cache the current hash list locally;

[0054] Module M3.3: When verifying the signature of a sub-transaction, determine whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, skip the signature verification and mark it as verified.

[0055] Specifically, when the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block.

[0056] Specifically, when a new node enters the network and needs to verify the signature of a transaction, it verifies the signature of the parent transaction based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

[0057] Example 2

[0058] Example 2 is a preferred example of Example 1

[0059] The present invention provides a blockchain system transaction signature verification method, such as Figure 1 As shown, the client constructs a special transaction (parent transaction) to sign other transactions (child transactions) issued by the same user and puts the hash of the child transaction into the parent transaction. Finally, these transactions (child transactions and parent transactions) are collected and broadcast in a network message. After receiving this network message, the alliance chain information processing node will perform some simple checks on each transaction. If a parent transaction is found, it will be verified immediately. The hash of the child transaction contained in the parent transaction will be cached and recorded. After completing the first round of simple checks, the transaction verification step will be entered. Before verifying the transaction, the cache will be queried. If there is a parent transaction endorsing it, the verification will be skipped directly and marked as verified.

[0060] Specifically, the blockchain system transaction signature verification method includes:

[0061] Parent-child transaction casting steps: The casting method can be divided into active casting steps and passive casting steps;

[0062] Active minting step: When the client or proxy generates a transaction, if there are frequent transactions with the same address requesting to send transactions, a parent transaction will be generated for the batch of transactions after the transaction accumulation reaches a certain threshold and packaged in the same network message. Whether to use parent-child transactions, the sending threshold and the maximum waiting time can be configured by yourself;

[0063] Passive casting step: After the user sends a transaction, the transaction information is temporarily cached locally. When the user frequently sends transactions to the information processing node, the node will determine that this batch of transactions can be cast into parent-child transactions. The node collects the hashes of this batch of transactions into a list and sends it to the corresponding user. After the user determines that this batch of transactions is indeed the transaction in his own cache pool, he generates a parent transaction for this batch of transactions and sends it to the node.

[0064] Node verification steps: After receiving the parent-child transaction group, the node first polls and performs some simple checks on the transactions, finds the parent transaction and verifies it first. After verifying the parent transaction, it obtains the hash list of its child transactions from the parent transaction and caches this list locally. After completing the first round of checks, it enters the verification step of the remaining child transactions. Before verifying the transaction, it first checks whether the transaction hash already exists in the cache. If it already has a parent transaction endorsing it, the verification is skipped directly and marked as verified.

[0065] Signature verification steps during synchronization: In addition to verifying the signature of transactions when the node is on-chain, new nodes also need to verify the signature of transactions when entering the network. Therefore, when the parent and child transaction groups are on-chain, the transaction groups need to be packaged into the same block. In this way, when the new node synchronizes the block and verifies the signature, it can easily find the corresponding parent transaction, thereby simplifying the signature verification steps of the corresponding child transactions.

[0066] In the alliance chain scenario, there are many cases where fewer user accounts are used to send transactions, so the present invention is very suitable for the alliance chain scenario; in other scenarios, as long as the three conditions of 1. information needs to be verified, 2. verification is time-consuming, and 3. the same account sends information at a high frequency are met, the solution of the present invention can be used to save the time and CPU consumption of user signatures and information recipients' verification. For example: if a user sends 1,000 transactions, the traditional mode requires 1,000 verifications for these 1,000 transactions, which consumes a lot of time and CPU. If the parent-child transaction mode is used, the 1,000 transactions only need to be verified once, saving the time and CPU consumption of 999 verifications. Because transaction verification accounts for a large proportion of the time consumption in blockchain transaction processing, the present invention can greatly improve the TPS of the alliance chain's overall network and enhance the value of the alliance chain in practical applications.

[0067] Those skilled in the art will appreciate that, in addition to implementing the system, device, and various modules provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like by logically programming the method steps. Therefore, the system, device, and various modules provided by the present invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; the modules for implementing various functions can also be considered both software programs for implementing the method and structures within the hardware component.

[0068] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. A blockchain system transaction signature verification method, characterized in that: include: Step S1: Construct a parent transaction, use it to sign other child transactions issued by the same user, and put the hash of the child transaction into the parent transaction; Step S2: Collect the child transaction and the parent transaction into a network message and broadcast it; Step S3: After receiving the broadcast network message, the consortium chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified. Step S1 involves: the client constructing a parent transaction based on a certain number of transactions, using the parent transaction to sign other child transactions issued by the same user, and placing the child transaction hashes into the parent transaction; or, the client caches a certain number of transactions locally. When the number of locally cached transactions reaches a preset value, the consortium chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of locally cached transactions, uses the parent transaction to sign other child transactions issued by the same user, and places the child transaction hashes into the parent transaction. The step S3 adopts: Step S3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction; Step S3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transaction from the parent transaction and cache the current hash list locally; Step S3.3: When verifying the signature of a sub-transaction, determine whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, skip the signature verification and mark it as verified. When the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block; When a new node enters the network and needs to verify the signature of a transaction, it verifies the signature of the parent transaction based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

2. A blockchain system transaction signature verification system, characterized by: include: Module M1: Constructs a parent transaction, uses it to sign other child transactions issued by the same user, and places the hash of the child transactions into the parent transaction; Module M2: collects the sub-transactions and parent transactions into a network message and broadcasts it; Module M3: After receiving the broadcast network message, the consortium chain information processing node verifies the signature of the parent transaction. If the hash of the child transaction already exists in the current parent transaction, the current child transaction has been verified. Module M1 adopts the following methods: the client constructs a parent transaction based on a certain number of transactions, uses the parent transaction to sign other child transactions issued by the same user, and places the hash of the child transactions into the parent transaction; or the client caches a certain number of transactions locally. When the number of transactions cached locally reaches a preset value, the consortium chain information processing node initiates a request to the client. The client constructs a parent transaction based on a certain number of transactions cached locally, uses the parent transaction to sign other child transactions issued by the same user, and places the hash of the child transactions into the parent transaction; The module M3 adopts: Module M3.1: When the consortium chain information processing node receives the broadcast network message, it verifies the signature of the parent transaction; Module M3.2: After verifying the signature of the parent transaction, obtain the hash list of the child transactions from the parent transaction and cache the current hash list locally; Module M3.3: When verifying the signature of a sub-transaction, it determines whether the hash of the current sub-transaction is in the local cache. If the hash of the current sub-transaction is already in the local cache, the signature verification is skipped and marked as verified. When the parent-child transaction group is uploaded to the chain, the parent-child transaction group is packaged into the same block; When a new node enters the network and needs to verify the signature of a transaction, it verifies the signature of the parent transaction based on the parent-child transaction group in the block, thereby completing the verification of the corresponding child transaction.

Citation Information

Patent Citations

  • Signature verification method based on block chain

    CN111445239A

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

    CN112232823A

  • Processing method, device and system for executing batch transactions based on block chain

    CN113706146A