A blockchain consensus method with high TPS

By electing summary nodes and endorsement nodes in the blockchain system, signing and disseminating transactions, the problem of blockchain TPS improvement staying in theory is solved, the rapid confirmation of transactions and system fairness is achieved, and the risk of forking is reduced , improves the actual transaction speed of blockchain.

CN114049117BActive Publication Date: 2024-12-06ZHEJIANG DIGITAL QIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111280973.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2024-12-06
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

The existing blockchain consensus mechanisms, such as POW, POS and DPOS, are difficult to effectively increase the number of transaction confirmations per second (TPS) of blockchain, and the nodes are not motivated to transmit and share transaction information, resulting in the improvement of TPS in actual applications. Stay in theory.

Method used

A new blockchain consensus method is adopted to generate summary nodes through periodic elections, summarize nodes exchange high signatures, endorse nodes to sign transactions and obtain processing fees, summarize nodes compete to propagate blocks, ensure transactions are quickly put on the chain, and reduce forks Risk, improve the fairness and efficiency of blockchain systems.

Benefits of technology

It improves the actual transaction confirmation speed of blockchain, enhances the motivation for nodes to transmit transactions, reduces the risk of forking, improves the fairness and user experience of blockchain systems, and promotes the actual improvement of TPS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114049117B_ABST
    Figure CN114049117B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of blockchain technology, and in particular to a blockchain consensus method with high TPS, including: periodically electing several summary nodes, and the summary nodes exchanging height signatures; signing for transaction-associated endorsement nodes in the first stage; in the second stage, the summary nodes respectively establish blocks of the current height, broadcast the blocks to blockchain nodes, and the blockchain nodes verify and propagate the blocks after the associated signatures, and the blockchain nodes determine the winning blocks according to the judgment order of containing a large number of transactions and generating blocks early; sending blocks that meet the conditions of the number of associated signatures to several summary nodes, first collecting blocks that meet the signatures of a preset number of summary nodes as the final blocks to be broadcast, and several summary nodes exchanging signatures of the next block height to start the next block. The substantial effect of the present invention is: enabling transaction information to be actively propagated and shared by nodes, effectively improving the TPS of the blockchain system in practice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blockchain, and in particular to a blockchain consensus method with high TPS. Background Art

[0002] The consensus mechanism is the rule for blockchain nodes to obtain the right to record blocks, and is the core of blockchain technology. Since blockchain is a decentralized system, the nodes are parallel and equal, so the consensus mechanism needs to solve the problems of normal operation and fairness of the blockchain system, as well as the problem of unified blockchain version and accounting efficiency. Through the consensus mechanism, nodes that provide resources to maintain the blockchain will receive corresponding rewards, and malicious nodes that damage the blockchain system will be punished. The main consensus mechanisms currently include POW, POS, DPOS and DAG, among which POW is criticized by the industry for its high energy consumption. POS is not decentralized enough and its security is questionable. DPOS is the consensus mechanism that is currently used more frequently. The DPOS mechanism makes block generation faster and more energy-efficient in the form of voting delegation. However, since there is no benefit for nodes to participate in voting, most nodes are not very enthusiastic about voting, resulting in the potential safety hazard of the blockchain system being controlled by a small number of active nodes. TPS is the full name of Transaction Per Second, which refers to the number of transactions confirmed per second on the blockchain. In the POW mechanism, miners are busy generating blocks that meet the proof-of-work conditions and have no motivation to wait for new transactions. Therefore, it takes a long time for transactions to be put on the chain, and the system's TPS is also the lowest. In the POS and DPOS mechanisms, the accounting nodes are ranked. If a node with the right to record accounts later has a transaction information, the node with the right to record accounts later will not share the transaction information with the node with the current right to record accounts, so that the transaction information can be put on the chain earlier. That is, the nodes that have not obtained the right to record accounts have insufficient motivation to spread and share transaction information. In the case that the transaction cannot be transmitted to the node with the current right to record accounts in time, the transaction still cannot be packaged into the block in time. It can be seen that the improvement in block efficiency achieved by the POS and DPOS mechanisms is only a theoretical improvement in the TPS that the blockchain can support. In practical applications, due to the low enthusiasm of nodes to transmit and share transaction information, the improvement of TPS remains in theory. Therefore, it is necessary to study a consensus mechanism in which nodes can actively transmit transactions and enable transactions to be packaged into blocks in time. Summary of the invention

[0003] The technical problem to be solved by the present invention is that there is currently a lack of a practical and effective consensus mechanism to improve the TPS of blockchain. A blockchain consensus method with high TPS is proposed. This consensus method enables most nodes involved in maintaining the blockchain system to gain benefits and have a high enthusiasm for transmitting transaction information within the blockchain system, so that transaction information can be confirmed by the blockchain more quickly.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a blockchain consensus method with high TPS, including: blockchain nodes periodically elect several aggregation nodes, several aggregation nodes exchange the height signatures to be produced, so as to collect a preset number of height signatures; in the first stage, the endorsement node signatures are associated with the transaction, and the transactions that meet the number of endorsement node signatures are sent to one or more of the aggregation nodes, and the endorsement nodes will obtain a part of the transaction fee; in the second stage, several aggregation nodes respectively establish blocks of the current height according to the transactions they receive, and the established blocks contain reward transactions and the collected height signatures, and broadcast the blocks to the blockchain. Blockchain nodes, blockchain nodes verify and associate signatures and then propagate blocks. At this time, the blocks generated by several aggregation nodes will compete for propagation in the blockchain nodes. The blockchain nodes determine the winning blocks according to the judgment order of containing more transactions and generating blocks earlier. The blockchain nodes will only propagate the winning blocks; as the second stage progresses, after a blockchain node associates the signature, the block will meet the conditions of the number of associated signatures, and the block will be sent to several aggregation nodes. The aggregation nodes sign the blocks and pass them to each other. The block that first gathers the signatures of the preset number of aggregation nodes will be broadcast as the final block. Several aggregation nodes exchange signatures of the next block height and start the next block generation.

[0005] Preferably, the number of block transactions is calculated according to the transfer-out account, that is, transfer transactions from the same account to multiple accounts are counted as one transaction in the transaction quantity statistics. When the aggregation node establishes a block, the transactions transferred from the same account are regularized, and the receiving account and amount table are associated with the transfer-out account, and the total transfer amount is calculated. The transfer-out account, the total transfer amount, the receiving account and the amount table constitute one regularized transaction.

[0006] Preferably, in the first stage, after the node receiving the transaction information and the transaction signature information verifies the transaction and the transaction signature, it constructs a transaction body, wherein the transaction body includes the transaction information, the transaction signature information, the timestamp and the endorsement node table; the node signs the transaction information and writes it into the endorsement node table, and sends the transaction body to several other blockchain nodes; when the blockchain node receives the transaction body, it verifies the transaction information and the transaction signature, and then signs the transaction information and writes it into the endorsement node table, and determines whether the endorsement node table is full. If not, the transaction body is sent to several other blockchain nodes. If the endorsement node table is full, the transaction body is sent to any of the selected aggregation nodes.

[0007] Preferably, the block generated by the summary node includes a block header, a block body and an additional body, wherein the block header includes a block height, a hash value of the previous block, a timestamp and a hash value of the current block, and the block body includes a reward transfer transaction, transaction information and transaction signature information. The hash value of the current block is set to a null value, and the hash value of the block header and the block body is extracted together, and written into the block header as the hash value of the current block, and the additional body includes all collected transaction bodies; in the second stage, after receiving the broadcasted block, the blockchain node verifies whether the summary node contained in the reward transfer transaction is the currently elected summary node, and then verifies the transaction information and transaction signature information in the block body, and finally verifies the transaction body. After the verification is completed, its own signature is appended to the additional body of the block and the block is broadcasted. When a blockchain node receives multiple broadcasted blocks, it determines whether its own signature is contained in the additional body. If so, it directly forwards the block. If not, it compares the number of transactions contained in the block and discards the block with a smaller number of transactions. If the number of transactions is the same, it compares the timestamps of the block headers and discards the block with a later timestamp. The retained block is the winning block. It appends its own signature to the additional body of the winning block and determines whether the number of signatures associated with the winning block after the signature is appended meets the condition of the number of associated signatures. If not, it forwards the winning block. If so, it sends the winning block to several aggregation nodes.

[0008] Preferably, a layered broadcast structure is established between blockchain nodes, each layer includes several blockchain nodes, each blockchain node is connected to n1 blockchain nodes or aggregation nodes in the previous layer, and each blockchain node is connected to n2 blockchain nodes in the next layer, n1 and n2 are both greater than 1, and when the aggregation node and other blockchain nodes broadcast, they broadcast to the connected blockchain nodes in the next layer.

[0009] Preferably, in the second stage, the aggregation node sends the established block to several blockchain nodes; after receiving the block, the blockchain node verifies and temporarily stores the block, signs the block hash value and feeds it back to the corresponding aggregation node, and sends the block to the connected n2 next-layer blockchain nodes; when the blockchain node receives the block again, it compares it with the temporarily stored block to obtain the winning block. If the winning block is the temporarily stored block, no operation is performed. Otherwise, the block hash value of the winning block is signed and fed back to the corresponding aggregation node, and the winning block is sent to the connected n2 next-layer blockchain nodes, and the temporarily stored block is replaced with the winning block; when the aggregation node receives the block, the winning block is sent to the next-layer blockchain nodes, and the temporarily stored block is replaced with the winning block. After receiving enough signature feedback, the block and all signatures are broadcast to other aggregation nodes; after verifying the block, other aggregation nodes will broadcast the block hash value signature. After collecting the block hash value signatures of the preset number of aggregation nodes, the block becomes the final block of the current height; several aggregation nodes exchange the signatures of the next block height, and after collecting the preset number of signatures of the next block height, the collected block height signatures are broadcast. After the blockchain node receives the signature of the next block height, it stops broadcasting the block of the current height, and downloads the final block of the current height and the associated block hash value signature from the aggregation node or the upper-layer blockchain node.

[0010] Preferably, the height signatures exchanged by the aggregation nodes include a timestamp, and the latest timestamp among a preset number of height signatures is regarded as the starting time of the current block generation. The timestamps of the blocks established by several aggregation nodes must be in the time period [T1, T2] based on the starting time. Each aggregation node is only allowed to establish one block at each block height. If multiple blocks are established for the same height, only the earliest block whose timestamp satisfies the time period is accepted. After T2, the established blocks are exchanged between several aggregation nodes. After the final block of the current block height is generated, the aggregation node selects the transactions not included in the final block and includes them in the next block.

[0011] The substantial effects of the present invention are as follows: in the present method, the endorsement node enjoys the benefits, so that the transactions uploaded to any blockchain node will be quickly propagated and actively shared with several aggregation nodes with bookkeeping rights. The number of transactions will become an important basis for whether the block can become the final block. Therefore, the aggregation node has the motivation to wait for new transaction information before generating a block, and to include the transaction into the block as much as possible without rushing to generate a block; by reaching a consensus on the block height before generating a block, the fork can be effectively reduced or even avoided, and the cost paid by the blockchain system to deal with the fork problem can be reduced; the nodes in the blockchain system have the motivation to improve their network technology environment, and provide blockchain users with more friendly and convenient transaction chain services, which actually promotes the improvement of blockchain TPS; by regularizing multiple transfer transactions of the same account, the situation of maliciously splitting transactions to increase the number of transactions can be suppressed. Each transaction needs to pay a certain handling fee. It will not be worth the loss for users to help blockchain nodes cheat on the number of transactions, thereby ensuring the fairness of the blockchain system. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a flowchart of the blockchain consensus method according to Example 1.

[0013] Figure 2 This is a schematic diagram of blockchain node connection in Example 1.

[0014] Figure 3 This is a schematic diagram of a method for associating endorsement nodes with transactions according to Example 1.

[0015] Figure 4 Schematic diagram of a block propagation method according to Embodiment 1.

[0016] Among them: 101, summary node. DETAILED DESCRIPTION

[0017] The specific implementation of the present invention will be further described below through specific examples in conjunction with the accompanying drawings.

[0018] Embodiment 1:

[0019] A blockchain consensus method with high TPS, please see the attached Figure 1The method includes: step A01) blockchain nodes periodically elect several aggregation nodes 101, and several aggregation nodes 101 exchange the height signatures to be generated, so as to collect a preset number of height signatures; step A02) in the first stage, the endorsement node signatures associated with the transaction are sent to one or more of the aggregation nodes 101, and the endorsement nodes will obtain a part of the transaction fee; step A03) in the second stage, several aggregation nodes 101 respectively establish blocks of the current height according to the transactions they receive, and the established blocks contain reward transactions and the collected height signatures, and broadcast the blocks to the blockchain nodes, and the blockchain nodes verify and After the associated signature, the block is propagated. At this time, the blocks generated by several aggregation nodes 101 will compete for propagation in the blockchain nodes. The blockchain nodes determine the winning block according to the judgment order of the number of transactions contained and the earliest generated block. The blockchain nodes will only propagate the winning block; Step A04) As the second stage proceeds, after a blockchain node associates the signature, the block will meet the conditions of the number of associated signatures, and the block will be sent to several aggregation nodes 101. The aggregation nodes 101 sign the block and pass it to each other. The block that first gathers the signatures of the preset number of aggregation nodes 101 will be broadcast as the final block. Several aggregation nodes 101 exchange signatures of the next block height and start the next block generation.

[0020] Blockchain nodes, also known as miners, are nodes that can connect to the blockchain intranet and participate in blockchain maintenance with a certain degree of professionalism. Blockchain nodes can also access the Internet. Blockchain users are in an Internet environment. Blockchain users publish their wallet addresses on the blockchain and retain their wallet private keys. The so-called wallet is a pair of public and private keys in an asymmetric encryption algorithm, and the wallet address is generally a public key. Users generate transactions, which include the transfer-out account, transfer-out amount, and transfer-in wallet address. Using the private key to sign the transaction hash can indicate the identity and the true transfer intention. By passing the transaction and transaction signature through the Internet to any blockchain node, the transaction can be confirmed by the blockchain system within a period of time, forming transaction information that cannot be revoked or tampered with. The process of reaching a consensus between blockchain nodes on which transactions are included in a block and unifying the blockchain version is the consensus process, which is controlled by the consensus mechanism. Among the current consensus mechanisms, the DPOS mechanism with a higher TPS generates 101 representative nodes through voting. The representative nodes have a ranking and obtain the right to produce blocks in order. Therefore, there is no competition between nodes, and the time for blocks to reach consensus is relatively short, with a block being generated in about 3 seconds. The reason why the DPOS consensus mechanism can support a higher TPS is that the maximum size of each block is 30M, and 30M can accommodate a maximum of 10,000 transactions and transaction signature data. Therefore, the calculated TPS that the DPOS consensus mechanism can support is as high as 10,000. But this is a theoretical TPS value. In actual applications, the TPS of blockchains using the DPOS mechanism is much lower than this value. The reason is that blockchain users are distributed in different regions and network environments, and their transactions and transaction signatures will be sent to different blockchain nodes. If the blockchain node that receives the transaction and transaction signature does not have the right to record, it has no motivation to pass the transaction. To solve this problem, current blockchains have established transaction pools, and multiple blockchain nodes can access the transaction pool. However, there are not many blockchain users who know the address of the transaction pool and send transactions and transaction signatures to the transaction pool. In practice, blockchain users are indirectly connected to blockchain nodes through third-party software, third-party plug-ins, etc. If third-party software and plug-ins intercept transaction information, it will cause the transaction to be delayed in being confirmed by the blockchain system. Normally, third-party software and plug-ins will not intercept transactions, but send them to the transaction pool in order to complete the confirmation as soon as possible. However, if a third party has a node with accounting rights in the blockchain system, it will have the motivation to intercept transactions and package transactions into blocks only when its own node obtains accounting rights, thereby obtaining a large number of transaction fees. When there are enough users of third-party software and plug-ins, the transaction fees will be considerable. At this time, the third party will have enough motivation to establish a blockchain node or reach cooperation with existing nodes in the blockchain system. And only nodes that can win the vote can obtain benefits, which makes other blockchain nodes lack the motivation to vote.Therefore, the industry still believes that the DPOS mechanism has security risks. This is because the current consensus mechanisms all ignore the connection channels between blockchain users and blockchains, and focus on the consistency issues between blockchain nodes. The development of blockchain systems is inseparable from providing convenient and fast services to blockchain users. Based on this, this embodiment proposes a new consensus method. In this method, blockchain nodes that do not obtain accounting rights can also obtain benefits by verifying and endorsing transactions and transaction signatures. The verification of transactions is mainly to verify whether the transfer account has sufficient balance to realize the transfer. The verification of transaction signatures is to verify whether the transaction is false. The blockchain user extracts the hash value of the transaction and signs the hash value of the transaction with the wallet private key. The endorsement node uses the wallet's public key, that is, the wallet address to decrypt the transaction hash value, extract the transaction hash value for comparison, and if it is consistent, the verification is passed. If it is inconsistent, the transaction-related data is discarded. After verification, associate your own signature with the transaction and send it to any other blockchain node. When receiving transactions sent by other nodes, if the signature of the associated endorsement node does not reach the preset value, the most favorable processing method for the node is to quickly verify the transaction, associate its own signature with the transaction, and then send it to other blockchain nodes. In order to avoid the blockchain node being offline, it is advisable to send it to multiple blockchain nodes at this time. Each endorsement node hopes that the transaction endorsed by it can eventually be included in the block, so as to obtain profit distribution. Therefore, when receiving a transaction, it will be verified and signed as soon as possible, and then transmitted and shared. Therefore, the blockchain node will be motivated to disclose its address and method of receiving transactions on the Internet, and provide convenient user operation methods. Ultimately, from a practical perspective, the connection between users and blockchains will be smoother.

[0021] In this embodiment, a consensus is reached on the block height to be generated before the block is generated. A legal block can only be generated after the height signatures of 2 / 3 of the aggregation nodes 101 are collected. Therefore, there will be no forks in the blockchain system due to different block heights of multiple nodes, and eventually the nodes in the blockchain system will need to spend money to eliminate the forks.

[0022] Please see attached Figure 2, the aggregation nodes 101 exchange height signatures. For example, if the aggregation node 101 A has collected SignA(20), SignB(20), SignC(20) and SignD(20), SignA(20) means that the aggregation node 101A signs the height 20. Then the block generated by the aggregation node 101 is associated with {SignA(20), SignB(20), SignC(20), SignD(20)}. Other blockchain nodes use the corresponding aggregation node 101 public key to decrypt and obtain the value 20, that is, the height of the block to be generated. That is, it is determined that the block currently being generated is a block with a block height of 20. Since the number of height signatures of the associated aggregation node 101 exceeds 2 / 3, the blockchain node will determine that the block is a legally generated block and can adopt the competition of the block with a block height of 20. If the height signatures of 2 / 3 of the aggregation nodes 101 are not collected, the blockchain node will directly discard the block.

[0023] Transactions that meet the endorsement of a preset number of endorsement nodes and are transmitted by blockchain nodes are all sent to one or more aggregation nodes 101. Since it is the blockchain node that sends the transaction to the aggregation node 101, the blockchain node knows the communication address of the aggregation node 101, and the transaction is sent quickly. The transactions received by the aggregation nodes 101 may be different or completely the same. Several aggregation nodes 101 generate blocks. If the blocks generated by the aggregation nodes 101 are the same and contain all transactions in the cycle, the block of the aggregation node 101 that completes the block generation first is used as the final block. If the number of transactions is the same and the timestamp is the same, the order of the aggregation nodes 101 determines which block is retained. If the transactions contained in the blocks generated by the aggregation nodes 101 are different, the number of transactions is usually different. At this time, the block containing the largest number of transactions is selected as the final block. In this way, some transactions cannot be confirmed in the current block. However, these transactions are known to all aggregation nodes 101 due to the transmission of the block, and will inevitably be packaged into blocks when the next block is generated. All the aggregation nodes 101 have mastered the transactions that are missed by the current block. In the competition for the next block, the key to determining which aggregation node 101 wins will be how many new transactions the aggregation node 101 has collected afterwards. Therefore, the aggregation nodes 101 are motivated to wait for new transactions to be transmitted to the blockchain system and compete to pack new transactions into the block. Compared with the current blockchain system, which requires increasing the handling fee in order to be packed into the block first, the consensus method of this embodiment, even if the handling fee is low, the blockchain nodes also have sufficient motivation to compete to pack the transactions, and finally improve TPS from a practical perspective, rather than just staying at the theoretical level.

[0024] The number of block transactions is calculated based on the transfer-out account, that is, the transfer-out transactions from the same account to multiple accounts are counted as one transaction in the transaction quantity statistics. When the aggregation node 101 creates a block, the transactions transferred from the same account are regularized, and the receiving account and amount table are associated with the transfer-out account, and the total transfer amount is calculated. The transfer-out account, the total transfer amount, the receiving account and the amount table constitute one regularized transaction.

[0025] In order to facilitate the association of the endorsement node signature with the transaction, this embodiment provides a structured transaction body. Figure 3 , including: step B01) in the first stage, after receiving the transaction information and transaction signature information, the node verifies the transaction and transaction signature, and then constructs the transaction body, which includes the transaction information, transaction signature information, timestamp and endorsement node table; step B02) the node signs the transaction information and writes it into the endorsement node table, and sends the transaction body to several other blockchain nodes; step B03) when the blockchain node receives the transaction body, it verifies the transaction information and transaction signature, and then signs the transaction information and writes it into the endorsement node table, and determines whether the endorsement node table is full. If not, the transaction body is sent to several other blockchain nodes. If the endorsement node table is full, the transaction body is sent to any of the selected aggregation nodes 101. Other association methods can also be used to complete it.

[0026] The block generated by the aggregation node 101 includes a block header, a block body and an additional body. The block header contains the block height, the hash value of the previous block, the timestamp and the hash value of this block. The block body includes the reward transfer transaction, transaction information and transaction signature information. The hash value of this block is set to a null value, and the hash value of the block header and the block body is extracted together, and written into the block header as the hash value of this block. The additional body includes all the collected transaction bodies; in the second stage, after receiving the broadcasted block, the blockchain node verifies whether the aggregation node 101 contained in the reward transfer transaction is the currently elected aggregation node 101, and then verifies the transaction information and transaction signature information in the block body, and finally verifies the transaction body, and the verification is completed Then, add your own signature to the additional body of the block and broadcast the block; the blockchain node receives multiple broadcasted blocks, determines whether the additional body contains your own signature, if it does, directly forwards the block, if not, compares the number of transactions contained in the block, discards the block with a smaller number of transactions, and if the number of transactions is the same, compares the timestamp of the block header, discards the block with a later timestamp, and the retained block is the winning block. Add your own signature to the additional body of the winning block, and determine whether the number of signatures associated with the winning block after the additional signature meets the condition of the number of associated signatures. If not, forward the winning block, and if it does, send the winning block to several aggregation nodes 101. The block node provided in this embodiment is only an example structure. A variety of block structures are disclosed in the prior art, which can be used in this embodiment. If the block structure does not contain an additional body, the content in the additional body in this embodiment is sent to the blockchain node together with the block, and it is notified that the content has an association relationship with the block. The additional body is only used to determine the winning block. When the block is confirmed, the additional body can be deleted. To be on the safe side, it is recommended to keep several heights of the appendage, such as keeping 6 heights of the appendage.

[0027] A layered broadcast structure is established between blockchain nodes. Each layer includes several blockchain nodes. Each blockchain node is connected to n1 blockchain nodes of the previous layer or the aggregation node 101. Each blockchain node is connected to n2 blockchain nodes of the next layer. Both n1 and n2 are greater than 1. When the aggregation node 101 and other blockchain nodes broadcast, they broadcast to the connected blockchain nodes of the next layer.

[0028] In order to improve the communication efficiency between blockchain nodes, this embodiment provides a specific broadcast method. Figure 4, including: step C01) in the second stage, the aggregation node 101 sends the established block to several blockchain nodes; step C02) after receiving the block, the blockchain node verifies and temporarily stores the block, signs the block hash value and feeds it back to the corresponding aggregation node 101, and sends the block to the connected n2 next-layer blockchain nodes; step C03) when the blockchain node receives the block again, it compares it with the temporarily stored block to obtain the winning block. If the winning block is the temporarily stored block, no operation is performed. Otherwise, the block hash value of the winning block is signed and fed back to the corresponding aggregation node 101, and the winning block is sent to the connected n2 next-layer blockchain nodes, and the temporarily stored block is replaced with the winning block; step C04) when the aggregation node After 101 receives a sufficient number of signature feedbacks, it broadcasts the block and all signatures to other aggregation nodes 101; step C05) other aggregation nodes 101 verify the block and broadcast the block hash value signature. After collecting the block hash value signatures of a preset number of aggregation nodes 101, the block becomes the final block of the current height; step C06) several aggregation nodes 101 exchange signatures of the next block height. After collecting a preset number of signatures of the next block height, the collected block height signatures are broadcast. After the blockchain node receives the signature of the next block height, it stops broadcasting the block of the current height and downloads the final block of the current height and the associated block hash value signature from the aggregation node 101 or the upper layer blockchain node.

[0029] The height signatures exchanged by the aggregation node 101 include a timestamp. The latest timestamp among the preset number of height signatures is regarded as the starting time of the current block. The timestamps of the blocks established by several aggregation nodes 101 must be in the time period [T1, T2] based on the starting time. Each aggregation node 101 is only allowed to establish one block at each block height. If multiple blocks are established for the same height, only the earliest block with a timestamp that meets the time period is accepted. After T2, the established blocks are exchanged between several aggregation nodes 101. After the final block of the current block height is generated, the aggregation node 101 selects the transactions not included in the final block and includes them in the next block.

[0030] The beneficial technical effects of this embodiment are as follows: in this method, the endorsement node enjoys benefits, so that the transactions uploaded to any blockchain node will be quickly propagated and actively shared with several aggregation nodes 101 with bookkeeping rights. The number of transactions will become an important basis for whether the block can become the final block, so the aggregation node 101 has the motivation to wait for new transaction information before generating a block, and to include transactions in the block as much as possible without rushing to generate a block; by reaching a consensus on the block height before generating a block, forks can be effectively reduced or even avoided, and the cost of the blockchain system to deal with fork problems can be reduced; the nodes in the blockchain system have the motivation to improve their network technology environment and provide blockchain users with more friendly and convenient transaction chain services, which actually promotes the improvement of blockchain TPS; by regularizing multiple transfer transactions of the same account, it can suppress the situation of maliciously splitting transactions to increase the number of transactions. Each transaction needs to pay a certain fee. It will not be worth the loss for users to help blockchain nodes cheat on the number of transactions, thereby ensuring the fairness of the blockchain system.

[0031] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.

Claims

1. A blockchain consensus method with high TPS, characterized in that: include: The blockchain nodes periodically elect several summary nodes, and several summary nodes exchange the height signatures of the blocks to be produced, thereby collecting a preset number of height signatures; In the first phase, the endorsement nodes associated with the transaction sign, and the transaction that meets the number of endorsement node signatures is sent to one or more of the aggregation nodes. The endorsement nodes will receive a portion of the transaction fee. In the second stage, several aggregation nodes respectively create blocks of the current height according to the transactions they receive. The created blocks contain reward transactions and the collected height signatures, and broadcast the blocks to the blockchain nodes. The blockchain nodes verify and associate the signatures and then propagate the blocks. At this time, the blocks generated by several aggregation nodes will compete for propagation in the blockchain nodes. The blockchain nodes determine the winning blocks according to the judgment order of the number of transactions and the earliest generated blocks. The blockchain nodes will only propagate the winning blocks. As the second phase progresses, after a blockchain node associates a signature, the block will meet the conditions for the number of associated signatures, and the block will be sent to several aggregation nodes. The aggregation nodes sign the block and pass it to each other. The block that first gathers signatures that meet the preset number of aggregation nodes will be broadcast as the final block. Several aggregation nodes exchange signatures for the next block height and start the next block generation; A hierarchical broadcast structure is established between blockchain nodes. Each layer includes several blockchain nodes. Each blockchain node is connected to n1 blockchain nodes or aggregation nodes in the previous layer. Each blockchain node is connected to n2 blockchain nodes in the next layer. Both n1 and n2 are greater than 1. When the aggregation node and other blockchain nodes broadcast, they broadcast to the connected blockchain nodes in the next layer. In the second phase, the aggregation node sends the created block to several blockchain nodes; After receiving the block, the blockchain node verifies and temporarily stores the block, signs the block hash value and feeds it back to the corresponding aggregation node, and sends the block to the connected n2 next-layer blockchain nodes; When the blockchain node receives the block again, it compares it with the temporarily stored block to obtain the winning block. If the winning block is a temporarily stored block, no operation is performed. Otherwise, the block hash value of the winning block is signed and fed back to the corresponding aggregation node, and the winning block is sent to the connected n2 next-layer blockchain nodes, replacing the temporarily stored block with the winning block; When the aggregation node receives enough signature feedback, it broadcasts the block and all signatures to other aggregation nodes; After verifying the block, other aggregation nodes will sign the block hash value and broadcast it. After collecting the block hash value signatures of the preset number of aggregation nodes, the block becomes the final block of the current height; Several aggregation nodes exchange signatures of the next block height. After collecting a preset number of signatures of the next block height, the collected block height signatures are broadcast. After the blockchain node receives the signature of the next block height, it stops broadcasting the block of the current height and downloads the final block of the current height and the associated block hash value signature from the aggregation node or the upper-layer blockchain node; The height signatures exchanged by the aggregation nodes include a timestamp. The latest timestamp among the preset number of height signatures is regarded as the starting time of the current block. The timestamps of the blocks established by several aggregation nodes must be in the time period [T1, T2] based on the starting time. Each aggregation node is only allowed to establish one block at each block height. If multiple blocks are established for the same height, only the earliest block with a timestamp that meets the time period is accepted. After T2, the established blocks are exchanged between several aggregation nodes. After the final block of the current block height is generated, the aggregation node selects the transactions not included in the final block and includes them in the next block.

2. A blockchain consensus method with high TPS according to claim 1, characterized in that: The number of block transactions is calculated based on the transfer-out account, that is, the transfer-out transactions from the same account to multiple accounts are counted as one transaction in the transaction quantity statistics. When the aggregation node establishes a block, the transactions transferred from the same account are regularized, and the receiving account and amount table are associated with the transfer-out account, and the total transfer amount is calculated. The transfer-out account, the total transfer amount, the receiving account and the amount table constitute one regularized transaction.

3. A blockchain consensus method with high TPS according to claim 1 or 2, characterized in that: In the first stage, after receiving the transaction information and transaction signature information, the node verifies the transaction and transaction signature, and then constructs the transaction body, which includes the transaction information, transaction signature information, timestamp and endorsement node table; The node signs the transaction information and writes it into the endorsement node table, and sends the transaction body to several other blockchain nodes; When a blockchain node receives a transaction body, it verifies the transaction information and transaction signature, then signs the transaction information and writes it into the endorsement node table, and determines whether the endorsement node table is full. If not, the transaction body is sent to several other blockchain nodes. If the endorsement node table is full, the transaction body is sent to any of the selected aggregation nodes.

4. A blockchain consensus method with high TPS according to claim 3, characterized in that: The block generated by the aggregation node includes a block header, a block body and an additional body. The block header includes the block height, the hash value of the previous block, a timestamp and the hash value of the current block. The block body includes the reward transfer transaction, transaction information and transaction signature information. The hash value of the current block is set to a null value, and the hash value of the block header and the block body is extracted together and written into the block header as the hash value of the current block. The additional body includes all the collected transaction bodies; In the second stage, after receiving the broadcasted block, the blockchain node verifies whether the aggregation node included in the reward transfer to the exchange is the currently elected aggregation node, and then verifies the transaction information and transaction signature information in the block body, and finally verifies the transaction body. After the verification is completed, it appends its own signature to the additional body of the block and broadcasts the block; The blockchain node receives multiple broadcast blocks and determines whether the additional body contains its own signature. If so, it directly forwards the block. If not, it compares the number of transactions contained in the block and discards the block with fewer transactions. If the number of transactions is the same, it compares the timestamps of the block headers and discards the block with the later timestamp. The retained block is the winning block. It appends its own signature to the additional body of the winning block and determines whether the number of signatures associated with the winning block after the signature is appended meets the condition of the number of associated signatures. If not, it forwards the winning block. If so, it sends the winning block to several aggregation nodes.

Citation Information

Patent Citations

  • Block chain consensus mechanism based on a supply chain ecological application scene

    CN109493056A

  • REPB consensus based on block chain backbone plus parallel multi-subchains

    CN109508982A