A method to improve the security of blockchain system based on hybrid consensus algorithm of PoW+PoS

By introducing the PoS chain for voting signature in the Conflux tree diagram blockchain system, the deficiencies in confirmation speed and security of the PoW blockchain system are solved, achieving 100% finality of transaction confirmation and resistance to 51% attacks. , significantly improving the security of the blockchain.

CN115442379BActive Publication Date: 2024-10-25SHANGHAI TREE-GRAPH BLOCKCHAIN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211104106.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2024-10-25
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The existing PoW blockchain system has shortcomings in confirmation speed and security. It is especially difficult to achieve 100% security in terms of 51% attacks, and is especially vulnerable to attacks in scenarios with low computing power.

Method used

Introducing a hybrid consensus algorithm based on PoW+PoS. By introducing an independently running PoS chain into the Conflux tree diagram blockchain system, the pivot block is voted and signed regularly to ensure that only blocks with enough signatures are used as The final confirmed pivot block is added to the main chain to enhance the security of the blockchain.

Benefits of technology

Add security protection to the consensus state through PoS voting, ensuring that the finality of transaction confirmation reaches 100%. Even in the face of 51% attacks, it will not succeed, significantly reducing the possibility of attacks and enhancing the security of the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442379B_ABST
    Figure CN115442379B_ABST
Patent Text Reader

Abstract

A method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS, including confirming the pivot block in the Conflux tree graph blockchain through the heaviest subtree rule based on the PoW consensus mechanism, introducing an independently running PoS chain under the Conflux PoW mechanism; the consensus participants of the PoS chain will vote and sign the initially confirmed pivot block in the Conflux tree graph blockchain within a regular round cycle; in each regular round, if the pivot block with enough signatures is the initially confirmed pivot block, then the initially confirmed pivot block is determined to be the final confirmed pivot block, if the pivot block with enough signatures is not the initially confirmed pivot block, the block with enough signatures in the PoS vote is the final confirmed pivot block and is added to the main chain in the Conflux tree graph blockchain. Therefore, the present invention adds an extra layer of security protection to the system through PoS voting, and can improve the confirmation of the PoW chain that is close to 100% but can never reach 100% to fully reach 100% confirmation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data processing and information technology, and more specifically, to a device and method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS, a readable storage medium and a data processing terminal. Background Art

[0002] The existing tree graph blockchain uses the proof-of-work (PoW) mechanism to ensure the security of the system, which has the advantages of decentralization, no access permission, and high reliability. However, the PoW mechanism also has inherent shortcomings such as slow transaction confirmation and the inability to reach 100% confirmation information, which are difficult to overcome.

[0003] See also Figure 1 , Figure 1 The figure shows a tree diagram of the pivot confirmation rule under the existing Conflux Pow consensus, where the pivot represents the main chain block in the Conflux blockchain system. Prior to the present invention, the blockchain of the Conflux tree graph blockchain system was based on the PoW consensus mechanism, and the confirmation of its pivot block was confirmed by the heaviest subtree rule, that is, for a block in an Epoch, the subtree weight of each block was calculated, and the block with the largest weight was selected as the pivot block of the main chain.

[0004] Those skilled in the art know that the confirmation rules under the PoW mechanism can only be used to indirectly infer the consensus results and choices of block producers for the above blocks after a block is generated by observing the generation of subsequent blocks. Therefore, in order to avoid the impact caused by random errors, it is necessary to wait for a sufficiently long time; and even if the waiting time is long enough and the computing power of most block producers is honest / rational, the finality (immutability) of the consensus results confirmed under the PoW mechanism can only approach 100%, and can never achieve strict 100% security, which poses some hidden dangers to certain scenarios with extremely high security requirements (such as those involving large amounts of assets).

[0005] For example, the commonly said “digital currency requires 6 blocks to be confirmed” strictly means “when the attacker controls 10% of the digital currency computing power, the probability of generating 6 digital currency blocks before the honest block producer is less than one in ten thousand”.

[0006] In fact, even though digital currency has been running for more than ten years, there is still theoretically the possibility that an attacker could launch a 51% attack on the digital currency network and rewrite all historical digital currency transactions. However, such an attack would require astronomical costs and has no practical significance.

[0007] However, for other PoW blockchain systems, when the total network computing power is low, 51% attacks may occur. Especially when the development of public chains has spawned some computing power rental platforms, switching PoW computing power from a large computing power platform to a blockchain platform with small computing power can easily cause 51% attacks. In the history of blockchain, Ethereum Classic, Grin and Verge have all experienced 51% attacks. Summary of the invention

[0008] The purpose of the present invention is to provide a method and device for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS. The present invention is based on the Conflux tree graph blockchain system and proposes a method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS.

[0009] To achieve the above object, the technical solution of the present invention is as follows:

[0010] A method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS, comprising the following steps:

[0011] Step S1: Based on the PoW consensus mechanism, the pivot block in the Conflux tree graph blockchain is confirmed by the heaviest subtree rule. That is, for each block in an Epoch, the subtree weight of each block is calculated, and the block with the largest weight is selected as the initial confirmation pivot block of the main chain;

[0012] Step S2: Introduce an independently running PoS chain under the Conflux PoW mechanism; the consensus participants of the PoS chain vote and sign the initial confirmation pivot block in the Conflux tree graph blockchain in a regular round;

[0013] Step S3: In each regular round of PoS voting, if a block with enough signatures is the pivot block initially confirmed on the PoW chain, then the pivot block initially confirmed on the PoW chain is determined to be the final confirmed pivot block. If a block with enough signatures is not the pivot block initially confirmed on the PoW chain, then the block with enough signatures is the pivot block finally confirmed by the system and is added to the main chain of the Conflux tree graph blockchain as a pivot block.

[0014] Furthermore, each of the periodic Rounds may be spaced at intervals of 60 blocks, or may be other values, such as 120 blocks or 150 blocks.

[0015] To achieve the above object, the technical solution of the present invention is as follows:

[0016] A secure transaction execution device for a blockchain system, comprising:

[0017] The initial block confirmation module, based on the PoW consensus mechanism, confirms the pivot block in the Conflux tree graph blockchain through the heaviest subtree rule. That is, for a block in an Epoch, the subtree weight of each block is calculated, and the block with the largest weight is selected as the initial confirmation pivot block of the main chain;

[0018] The voting signature module introduces an independently running PoS chain under the Conflux Pow mechanism; the consensus participants of the PoS chain will periodically (with Round as the period, Round represents the block height at a certain interval) vote to sign the initial confirmation pivot block in the Conflux tree graph blockchain;

[0019] The final block confirmation module, in each regular Round cycle, if a pivot block with enough signatures is the initial confirmed pivot block, then the initial confirmed pivot block is determined to be the final confirmed pivot block; if a pivot block with enough signatures is not the initial confirmed pivot block, the block with enough signatures is selected as the pivot block and serves as the pivot block of the Conflux tree graph blockchain main chain.

[0020] To achieve the above object, the present invention also involves the following technical solutions:

[0021] A readable storage medium stores executable instructions, wherein the executable instructions are used to execute the above-mentioned method for improving the security of a blockchain system based on a hybrid consensus algorithm based on PoW+PoS.

[0022] To achieve the above object, the present invention also involves the following technical solutions:

[0023] A data processing terminal is used as a consensus node of a P2P network to receive, verify consensus and store blocks in the P2P network, and the data processing terminal includes:

[0024] The above-mentioned readable storage medium;

[0025] A processor that retrieves and executes executable instructions in the readable storage medium to execute a method for improving the security of a blockchain system based on a hybrid consensus algorithm based on PoW+PoS.

[0026] To achieve the above object, another technical solution of the present invention is as follows:

[0027] A P2P network, wherein the consensus node of the P2P network is the above-mentioned data processing terminal.

[0028] It can be seen from the above technical solution that in order to deal with the possible threats brought by the 51% attack, the present invention introduces an independently operated PoS chain under the Conflux PoW mechanism. The consensus participants of the PoS chain will regularly sign the pivot blocks of the tree graph structure. The pivot blocks with enough signatures should be selected into the pivot chain by all PoW block producers, even if its brother blocks have greater weight.

[0029] In short, the method for improving the security of the blockchain system based on the hybrid consensus algorithm of PoW+PoS proposed in the present invention aims at the problem that the PoW blockchain network cannot resist 51% attack. By introducing an independently running PoS chain into the system, the PoS chain specifies a pivot block, and all PoW block producers should follow it. Even if there is a 51% computing power attack on the whole network at this time, all block producers also follow the block specified by PoS, that is, even if the simple 51% computing power requirement is met, the attack cannot be successful, thereby enhancing the security of the PoW blockchain, that is, adding an extra layer of security protection to the consensus state through PoS voting, while resisting 51% attack, it also simplifies the transaction confirmation rules, so that the finality of transaction confirmation is better, from close to but not equal to 100% to the actual 100%.

[0030] In addition, the method proposed in this invention for improving the security of blockchain systems based on a hybrid consensus algorithm based on PoW+PoS is also applicable to blockchain systems with other PoW mechanisms. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The figure shows the execution result of the parallel control algorithm using optimistic concurrency control in the prior art.

[0032] Figure 2 The figure shows the execution result of the parallel control algorithm using the deterministic submission order in the prior art.

[0033] Figure 3 The figure is a schematic diagram of the method for improving the security of the blockchain system based on the hybrid consensus algorithm of PoW+PoS of the present invention.

[0034] Figure 4 A schematic diagram of a preferred embodiment of the present invention is shown in FIG. DETAILED DESCRIPTION

[0035] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0036] See also Figure 2 , Figure 2The figure shows a flow chart of a method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS. Figure 2 As shown, the method is used to improve the security of the blockchain system, which includes the following steps:

[0037] Step S1: Based on the PoW consensus mechanism, the pivot block in the Conflux tree graph blockchain is confirmed by the heaviest subtree rule. That is, for each block in an Epoch, the subtree weight of each block is calculated, and the block with the largest weight is selected as the initial confirmation pivot block of the main chain;

[0038] Step S2: Introduce an independently running PoS chain under the Conflux PoW mechanism; the consensus participants of the PoS chain will periodically (with Round as the period, Round represents the interval block height) vote and sign the initial confirmation pivot block in the Conflux tree graph blockchain;

[0039] Step S3: In each regular Round cycle, if a pivot block with enough signatures is the initial confirmed pivot block, then the initial confirmed pivot block is determined to be the final confirmed pivot block. If a block with enough signatures is not the initial confirmed pivot block, the block with enough signatures is selected by PoS as the final confirmed pivot block and serves as the main chain block in the Conflux tree graph blockchain.

[0040] See also Figure 3 , Figure 3 The figure shows a schematic diagram of the pivot confirmation rule of PoW+PoS in an embodiment of the present invention. Figure 3 As shown, the present invention introduces a PoS chain based on the above PoW mechanism, which is responsible for voting on the Pivot blocks generated by PoW. The consensus participants of the PoS chain will regularly vote and sign the pivot blocks of the tree graph structure.

[0041] The pivot block with enough voting signatures is finally confirmed as the block of the main chain of the tree graph blockchain, even if its brother block has a larger weight, so as to avoid a simple 51% attack. For a successful attack, not only 51% of the computing power is required, but also most of the votes need to be obtained, that is, the attack on the PoS network needs to meet more than 2 / 3 of the staked tokens in the entire network to complete the attack, which greatly increases the cost of the attack for the attacker. Therefore, the method of the present invention can greatly reduce the possibility of attack and ensure the security of the blockchain.

[0042] Example 1

[0043] See also Figure 4 , Figure 4 The figure shows a scenario in which PoS is attacked by 51% of PoW in the Epoch 4 stage, but PoS votes to designate block D as the Pivot block. Figure 4 As shown, the PoS consensus mechanism proposed in the present invention designates a block D as the pivot block by voting. Even if the blockchain encounters a 51% attack and attempts to replace the current main chain, the PoS vote designates the original block D, resulting in the scenario where the PoW unilateral 51% attack fails.

[0044] In an embodiment of the present invention, the execution steps are as follows:

[0045] First, the blockchain is running normally. For the blocks in Epoch 4, according to the heaviest subtree rule under the PoW mechanism, the Pivot block is block D. The order of the main chain blocks from the genesis block G to the current block is: GABCD;

[0046] Second, the attacker launches a 51% attack, attempting to fork a new chain JKL from block B to replace the CDEF block behind the current block B;

[0047] Third, at the same time, the vote of the PoS chain happens to fall within the Round 1 cycle. Before the attacker's chain has completed the confirmation of block J, the PoS vote is for block D in Round 1. If the D vote passes at this time, block D will be finally confirmed as the pivot block in this Round. Other PoW block producers must follow and produce blocks after block D, thereby invalidating the attacker's 51% attack.

[0048] According to the patent requirements of this invention, the PoW block producer will follow the D block to produce blocks, that is, the attacker's attempt to replace the CDEF after the B block with the JKL chain through a 51% attack is shattered, and the main chain still develops according to the GABCDEF chain. The changes in the main chain of the attacker's 51% attack are shown in the dotted arrow in the figure.

[0049] In an embodiment of the present invention, a readable storage medium is also proposed, storing executable instructions, which are used to execute the above-mentioned method for improving the security of the blockchain system based on the hybrid consensus algorithm of PoW+PoS.

[0050] In an embodiment of the present invention, a data processing terminal is also proposed, which is used to serve as a consensus node of a P2P network, receive, consensus verify and store blocks in the P2P network, and the data processing terminal includes a readable storage medium and a processor as described above; the processor retrieves and executes executable instructions in the readable storage medium to execute a method for improving the security of a blockchain system based on a hybrid consensus algorithm based on PoW+PoS.

[0051] In addition, the present invention also proposes a P2P network, wherein the consensus node of the P2P network is the aforementioned data processing terminal.

[0052] Those of ordinary skill in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware (e.g., a processor) through a program, and the program can be stored in a readable storage medium, such as a read-only memory, a disk, or an optical disk. All or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module in the above embodiment can be implemented in the form of hardware, such as implementing its corresponding functions through an integrated circuit, or in the form of a software function module, such as implementing its corresponding functions through a processor executing a program / instruction stored in a memory. The embodiments of the present invention are not limited to any particular form of combination of hardware and software.

[0053] The above-described embodiments are only preferred embodiments of the present invention, and the embodiments are not intended to limit the patent protection scope of the present invention. Therefore, any equivalent structural changes made using the description and drawings of the present invention should also be included in the protection scope of the present invention.

Claims

1. A method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS, characterized in that: The steps include: Step S1: Based on the PoW consensus mechanism, the pivot block in the Conflux tree graph blockchain is confirmed by the heaviest subtree rule. That is, for each block in an Epoch, the subtree weight of each block is calculated, and the block with the largest weight is selected as the initial confirmation pivot block of the main chain; Step S2: Introduce an independently running PoS chain under the Conflux PoW mechanism; The consensus participants of the PoS chain vote and sign the initial confirmation pivot block in the Conflux tree graph blockchain in units of a regular round; Step S3: In each regular round of PoS voting, if a block with enough signatures is the pivot block initially confirmed on the PoW chain, then the pivot block initially confirmed on the PoW chain is determined to be the final confirmed pivot block. If a block with enough signatures is not the pivot block initially confirmed on the PoW chain, then the block with enough signatures is the pivot block finally confirmed by the system and is added to the main chain of the Conflux tree graph blockchain as a pivot block.

2. The method according to claim 1, characterized in that: Each of the regular rounds is spaced 60 blocks, 120 blocks, or 150 blocks apart.

3. A secure transaction execution device for a blockchain system, characterized in that: include: The initial block confirmation module, based on the PoW consensus mechanism, confirms the pivot block in the Conflux tree graph blockchain through the heaviest subtree rule. That is, for a block in an Epoch, the subtree weight of each block is calculated, and the block with the largest weight is selected as the initial confirmation pivot block of the main chain; The voting signature module introduces an independently running PoS chain under the Conflux PoW mechanism; The consensus participants of the PoS chain will periodically vote and sign the initial confirmation pivot block in the Conflux tree graph blockchain in a round cycle; where a round represents a block height at a certain interval; The final block confirmation module, in each regular Round cycle, if a pivot block with enough signatures is the initial confirmed pivot block, then the initial confirmed pivot block is determined to be the final confirmed pivot block; if a pivot block with enough signatures is not the initial confirmed pivot block, the block with enough signatures is selected as the pivot block and serves as the pivot block of the Conflux tree graph blockchain main chain.

4. A readable storage medium storing executable instructions, wherein the executable instructions are used to execute the method for improving the security of a blockchain system based on a hybrid consensus algorithm of PoW+PoS as described in claim 1.

5. A data processing terminal, used as a consensus node of a P2P network, to receive, verify consensus and store blocks in the P2P network, the data processing terminal comprising: The readable storage medium according to claim 4; A processor that retrieves and executes executable instructions in the readable storage medium to execute a method for improving the security of a blockchain system based on a hybrid consensus algorithm based on PoW+PoS.

6. A P2P network, characterized in that: The consensus node of the P2P network is the data processing terminal described in claim 5.