The present disclosure relates to the technical field of blockchain, and in particular relates to an improved gossip-protocol-based method, a device, a piece of equipment and a medium for incentivizing block propagation.
Since the concept of Bitcoin was first proposed by Satoshi Nakamoto in 2008, blockchain technology can build a trustworthy data model among network nodes through encryption algorithm, consensus mechanism and chain-based storage structure. At present, blockchain technology has become popular rapidly because of the openness, transparency, immutability, and traceability, and has been widely used in various areas such as the Internet of Things (IoT) and wireless communications. The consensus process serves as the basis for a blockchain system. In the consensus process, the newly generated blocks need a large number of P2P nodes for block verification and propagation, which consumes a lot of resources. The speed at which blocks propagate in the network is crucial for the consensus process and the security of the blockchain. The long-tailed block propagation delay can result in more orphan blocks and forks and make the blockchain vulnerable to attack.
At present, the existing researches on accelerating block propagation in blockchain network can be summarized into three methods: optimizing routing selection, reducing block size, and adjusting the network topology.
The above researches do not take into account the existence of some selfish nodes in blockchain network that refuse to forward blocks to reduce communication consumption. In blockchain network, selfish nodes significantly influence the block propagation process, especially in scenarios such as wireless networks where there may be a large number of resource-constrained nodes. These selfish nodes may refuse to forward blocks to save power, directly delaying the block propagation in the network. Therefore, it calls for an efficient method to incentivize selfish nodes in blockchain network to participate in forwarding blocks, thereby accelerating block propagation and improving the performance of blockchain systems.
The present disclosure provides an improved gossip-protocol-based method, a device, a piece of equipment and a medium for incentivizing block propagation to solve the problems of selfish nodes in current blockchain networks refusing to propagate blocks to reduce communication consumption.
According to the first aspect of the present disclosure, the embodiments provide an improved gossip-protocol-based method for incentivizing block propagation, and the method includes the following steps.
An inv message is received from a block generation node by a first forwarding node, and identity information of the first forwarding node and getData information of the first forwarding node are sent to the block generation node by the first forwarding node after receiving the inv message. A hash value of a block and the identity information of the first forwarding node are signed by the block generation node through the block generation node's own secret key to obtain a first signature, the first signature and the block are sent to the first forwarding node by the block generation node, and the first forwarding node is served as a current forwarding node.
After the block is verified by the first forwarding node, the inv message is sent to a second forwarding node by the first forwarding node. Identity information of the second forwarding node and getData information of the second forwarding node are sent to the first forwarding node by the second forwarding node. The first signature and the identity information of the second forwarding node are signed by utilizing a secret key of the current forwarding node to obtain a second signature. The first signature, the second signature and the block are sent to the second forwarding node by the first forwarding node. The current forwarding node is converted into the second forwarding node, and the block is verified by the second forwarding node, and the block is continuously forwarded after the verification is passed.
A block is started to be generated by the current forwarding node when the block is forwarded by the current forwarding node. A signature chain is constructed by utilizing all the signatures received by the current forwarding node to record a block forwarding path in a case where the current forwarding node generates the next block. The signature chain and block propagation rewards of nodes in the signature chain are embedded into the next block, and the next block is further diffused.
Optionally, in one embodiment of the present disclosure, the block propagation rewards of the nodes in the signature chain include block propagation rewards of all nodes in the signature chain.
Optionally, in one embodiment of the present disclosure, for intermediate forwarding nodes, the signature chain is constructed by signing identity information of a next hop node and signature information generated by a previous hop node by using its own key of the current intermediate forwarding node.
According to the second aspect of the present disclosure, the embodiments provide an improved gossip-protocol-based device for incentivizing block propagation, and the device includes the followings.
A receiving module is configured to receive an inv message from a block generation node, send identity information of a first forwarding node and getData information of the first forwarding node to the block generation node after receiving the inv message, to sign a hash value of a block and the identity information of the first forwarding node by the block generation node by using the block generation node's own secret key to obtain a first signature, and send the first signature and the block to the first forwarding node, wherein the first forwarding node is served as a current forwarding node.
A forwarding module is configured to verify the block, send the inv message to a next forwarding node in a case where the verification is passed, to send identity information of the next forwarding node and getData information of the next forwarding node to the current forwarding node by the next forwarding node, sign the first signature and the identity information of the next forwarding node by utilizing a secret key of the current forwarding node to obtain a second signature, send the first signature, the second signature and the block to the second forwarding node to convert the second forwarding node into the current forwarding node to verify the block, and continuously forward the block after the verification is passed.
A block generating module is configured to start to generate a next block when the block is forwarded by the current forwarding node, construct a signature chain by utilizing all the signatures received by the current forwarding node to record a block forwarding path when the next block is generated, embed the signature chain and block propagation rewards of nodes in the signature chain into a next block, and forward the next block.
Optionally, in one embodiment of the present disclosure, the block propagation rewards of the nodes in the signature chain include block propagation rewards of all nodes in the signature chain.
Optionally, in one embodiment of the present disclosure, for intermediate forwarding nodes, the signature chain is constructed by signing identity information of a next hop node and signature information generated by a previous hop node by using its own key of the current intermediate forwarding node.
According to the third aspect of the present disclosure, the embodiments provide a piece of electronic equipment. The equipment includes a memory, a processor, and a computer program that is stored on the memory and is capable of running on the processor, the processor executes the computer program to implement the method for the improved gossip protocol for the incentivizing block propagation as mentioned in the above embodiments.
According to the fourth aspect of the present disclosure, the embodiments provide a computer readable-storage medium, storing a computer program. The computer program is executed by the processor to implement the method for the improved gossip protocol for the incentivizing block propagation as mentioned in the above embodiments.
An improved gossip-protocol-based method, a device, a piece of equipment and a medium for incentivizing block propagation provided in the embodiments of the present disclosure have the following beneficial effects.
Additional aspects and advantages of the present disclosure will be partially described in the following descriptions, some of which will become apparent from the following descriptions, or can be learned through the practices of the present disclosure.
The above and/or additional aspects and advantages of the present disclosure will become apparent and easily to be understood from the following descriptions of embodiments in conjunction with the accompanying drawings.
The embodiments of the present disclosure are clarified in detail below, and examples of the embodiments are illustrated in the accompanying drawings, where the same or similar reference numerals throughout represent the same or similar elements or components with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present disclosure, and should not be construed as the limit to the present disclosure.
An improved gossip-protocol-based method, a device, a piece of equipment and a medium for incentivizing block propagation in the embodiments of the present disclosure are described below with reference to the accompanying drawings. In view of the problems of selfish nodes refusing to forward blocks in order to save resources in the current blockchain network mentioned in the background technology, the present disclosure provides an improved gossip-protocol-based method for incentivizing block propagation. The method embeds the block propagation rewards to accelerate the block forwarding process and records the block forwarding paths through a signature chain structure to prevent path information from being tampered with. The block structure with an embedded signature chain ensures the reliability of the reward distribution process. A block propagation reward distribution strategy is designed to prevent forwarding nodes from adding virtual identities in the forwarding path, thus incentivizing selfish nodes in the blockchain network to forward blocks and accelerating block propagation in the blockchain network. This effectively improves the performance of the blockchain system.
In one embodiment, an improved gossip-protocol-based method for incentivizing block propagation is provided in the present disclosure, which includes the following steps.
An inv message is received from a block generation node by a first forwarding node, and identity information of the first forwarding node and getData information of the first forwarding node are sent to the block generation node by the first forwarding node after receiving the inv message. A hash value of a block and the identity information of the first forwarding node are signed by the block generation node through the block generation node's own secret key to obtain a first signature, the first signature and the block are sent to the first forwarding node by the block generation node, and the first forwarding node is served as a current forwarding node.
After the block is verified by the first forwarding node, the inv message is sent to a second forwarding node by the first forwarding node. Identity information of the second forwarding node and getData information of the second forwarding node are sent to the first forwarding node by the second forwarding node. The first signature and the identity information of the second forwarding node are signed by utilizing a secret key of the current forwarding node to obtain a second signature. The first signature, the second signature and the block are sent to the second forwarding node by the first forwarding node. The current forwarding node is converted into the second forwarding node, and the block is verified by the second forwarding node, and the block is continuously forwarded after the verification is passed.
A block is started to be generated by the current forwarding node when the block is forwarded by the current forwarding node. A signature chain is constructed by utilizing all the signatures received by the current forwarding node to record a block forwarding path in the case where the current forwarding node generates the next block. The signature chain and block propagation rewards of nodes in the signature chain are embedded into the next block, and the next block is further diffused.
In one embodiment, an improved gossip-protocol-based device for incentivizing block propagation is provided in the present disclosure, which includes the following modules.
A receiving module is configured to receive an inv message from a block generation node, send identity information of a first forwarding node and getData information of the first forwarding node to the block generation node after receiving the inv message, to sign a hash value of a block and the identity information of the first forwarding node by the block generation node by using the block generation node's own secret key to obtain a first signature, and send the first signature and the block to the first forwarding node, wherein the first forwarding node is served as a current forwarding node.
A forwarding module is configured to verify the block, send the inv message to a next forwarding node in the case where the verification is passed, to send identity information of the next forwarding node and getData information of the next forwarding node to the current forwarding node by the next forwarding node, sign the first signature and the identity information of the next forwarding node by utilizing a secret key of the current forwarding node to obtain a second signature, send the first signature, the second signature and the block to the second forwarding node to convert the second forwarding node into the current forwarding node to verify the block, and continuously forward the block after the verification is passed.
A block generating module is configured to start to generate a next block when the block is forwarded by the current forwarding node, construct a signature chain by utilizing all the signatures received by the current forwarding node to record a block forwarding path when the next block is generated, embed the signature chain and block propagation rewards of nodes in the signature chain into a next block, and forward the next block.
Specifically,
As illustrated in
In the embodiments of the present disclosure, after the block is generated by the block generation node, the inv message is sent to the first forwarding node. After the first forwarding node receives the inv message from the block generation node, the first forwarding node requests the block from the block generation node and sends the identity information of the first forwarding node and the getData information to the block generation node.
After the block generation node receives the identity information and getData information from the first forwarding node, the block generation node signs the hash value of the generated block and the identity information of the first forwarding node with the secret key, and sends the signature and the block to the first forwarding node.
In the embodiments of the present disclosure, the first forwarding node verifies the block from the block generation node. It should be noted that the method for verifying the blocks in the embodiments of the present disclosure can use the existing verification methods. For example, verifying whether the payload data in the block to be forwarded contains conflicting data, then verifying whether the block header satisfies the protocol requirements, and eventually determining whether the hash value of the entire block satisfies the difficulty level. The above is merely an example and the specific implementations are not limited.
After each of the intermediate forwarding nodes successfully verifies the block to be forwarded, the forwarding process of the above embodiment is repeated to send the block to the next forwarding node.
It should be noted that in the embodiments of the present disclosure, after receiving the identity information and getData information from the second forwarding node, the first forwarding node uses the first forwarding node's own secret key to sign the signature from the block generation node and the identity information of the second forwarding node, and sends all signatures and the block to the second forwarding node. The second node verifies the received block and continues forwarding the received block after passing the verification.
In the embodiments of the present disclosure, the current forwarding node begins to generate the next block, when the current forwarding node forwards the block to be forwarded. In the case where the next block is generated, the forwarding node constructs a signature chain based on all the received signature information, embeds the signature chain into the next block, and distributes block propagation rewards to all nodes on the signature chain.
It can be understood that the next block generated by the node must include the signature chain and the block propagation reward distributed for the nodes on the signature chain. The block propagation rewards of the nodes in the signature chain include block propagation rewards of all nodes in the signature chain.
For the intermediate forwarding nodes, the signature chain that records the forwarding path information is constructed by singing the combination of the identity information of the next hop node and the signature information generated by the previous hop node by using the current intermediate forwarding node secret key. The path information of block forwarding is recorded by this means.
A signature chain that records the forwarding path information of the previous block, as well as a block propagation reward field distributed to all nodes on the signature chain are added to the block structure embedded with a signature chain. The path information contained in the signature chain must be traceable to the generating node of the previous block, and merely the block containing all the above contents is considered to be valid.
The block propagation reward distribution strategy refers to the rules followed when distributing rewards to the forwarding nodes that assist in forwarding blocks. Specifically, forwarding nodes obtain additional identities through forgery without increasing the rewards they obtain. According to the principles followed by the block propagation reward distribution strategy, two strategies are included, that is, the first is a uniform reward distribution strategy, where all forwarding nodes on the forwarding path ultimately obtain the same reward; whereas the second is a proportional reward distribution strategy, where the reward relation between adjacent forwarding nodes on the forwarding path is that the ratio of the reward obtained by the next forwarding node to the reward obtained by the previous forwarding node is a constant less than 1, which is called as the proportional factor. Reward distribution is implemented by using signatures in the signature chain as credentials and automatically completes when the next block is generated.
The improved gossip-protocol-based method for incentivizing block propagation of the present disclosure is specifically clarified below in combination with one specific embodiment.
As illustrated in
As illustrated in
With reference to
According to the method for an improved gossip-protocol-based method for incentivizing block propagation in the embodiments of the present disclosure, block propagation rewards are embedded through the improved gossip protocol to accelerate the block forwarding process. The designed signature chain structure records block forwarding paths and prevent path information from being tampered with. The blockchain structure is embedded with the signature chain, and the reliability of the reward distribution process is ensured. The designed block propagation reward distribution strategy prevents forwarding nodes from adding pseudonyms in the forwarding path. Therefore, the method of the present disclosure can motivate selfish nodes in the blockchain network to forward blocks and accelerate block propagation in the blockchain network, effectively improving the performance of the blockchain system.
Next, an improved gossip-protocol-based device for incentivizing block propagation proposed according to embodiments of the present disclosure is clarified with reference to the accompanying drawings.
As illustrated in
A receiving module 100 is configured to receive an inv message from a block generation node, and send identity information of a current forwarding node and getData information of the current forwarding node to the block generation node after receiving the inv message, to sign a hash value of a block and the identity information of the current forwarding node by the block generation node using the block generation node's own secret key, and obtain a first signature; send the first signature and the block to the current forwarding node.
A forwarding module 200 is configured to verify the block; send the inv message to a next forwarding node in the case where a verification is passed, to send identity information of the next forwarding node and getData information of the next forwarding node to the current forwarding node by the next forwarding node; sign the first signature and the identity information of the next forwarding node by utilizing a secret key of the current forwarding node to obtain a second signature; send the first signature, the second signature and the block to the next forwarding node, to take the next forwarding node as the current forwarding node to verify the block; continuously forward the block after the verification is passed.
A block generating module 300 is configured to start to generate a next block when the block is forwarded by the current forwarding node, construct a signature chain by utilizing all the signatures received by the current forwarding node to record a block forwarding path, in the case where the current forwarding node generates the next block, embed the signature chain and block propagation rewards of nodes in the signature chain into a next block, and forward the next block.
Optionally, in one embodiment of the present disclosure, the block propagation rewards of the nodes in the signature chain include block propagation rewards of all nodes in the signature chain.
Optionally, in one embodiment of the present disclosure, for intermediate forwarding nodes, the signature chain is constructed by signing identity information of a next hop node and signature information generated by a previous hop node by using an own key of the current forwarding node.
It should be noted that the above explanation and the specification of the improved gossip-protocol-based method for incentivizing block propagation also applies to the improved gossip-protocol-based device for incentivizing block propagation in this embodiment, and will not be described in detail herein.
According to the improved gossip-protocol-based device for incentivizing block propagation proposed in the embodiments of the present disclosure, block propagation rewards are embedded through the improved Gossip protocol to accelerate the block forwarding process. The designed signature chain structure records block forwarding paths and prevent path information from being tampered with. By the blockchain structure embedded with the signature chain, the reliability of the reward distribution process is ensured. The designed block propagation reward distribution strategy prevents forwarding nodes from adding false identities in the forwarding path. Therefore, the method of the present disclosure can motivate selfish nodes in the blockchain network to forward blocks and accelerate block propagation in the blockchain network, effectively improving the performance of the blockchain system.
A memory 801, a processor 802, and a computer program that is stored on the memory 801 and is capable of running on the processor 802.
The processor 802 executes the computer program to implement an improved gossip-protocol-based method for incentivizing block propagation as mentioned in the above embodiments.
Further, the electronic equipment further includes the followings.
Communication interface 803 is configured to communicate between the memory 801 and the processor 802.
Memory 801 is configured to store the computer programs that can run on processor 802.
Memory 801 may include a high-speed RAM memory, as well as a non-volatile memory, such as at least one disk storage.
If the memory 801, processor 802, and communication interface 803 are implemented independently, the communication interface 803, memory 801, and processor 802 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, and the like. For ease of representation, merely one thick line is represented in
Optionally, in a specific implementation, in the case where the memory 801, processor 802, and communication interface 803 are integrated on a single chip, the memory 801, processor 802, and communication interface 803 can communicate with each other through internal interfaces.
The processor 802 may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or be configured to one or more integrated circuits that implement embodiments of the present disclosure.
The embodiments further provide a computer readable storage medium, which stores a computer program. When the computer program is executed by the processor, the computer program implements the above improved gossip-protocol-based method for incentivizing block propagation.
In the descriptions of the specification, the reference terms, such as “one embodiment”, “some embodiments”, “examples”, “specific examples”, or “some examples” mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present disclosure. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials, or characteristics described can be combined in an arbitrary one or N embodiments or examples in an appropriate manner. Moreover, a person skilled in the art can combine and couple the different embodiments or examples described in this specification, as well as the features of different embodiments or examples, without conflicting with each other.
In addition, the terms “first” and “second” are merely used to describe purposes and cannot be understood as indicating or implying relative importance or implying the number of technical features indicated. Therefore, the features that are limited to “first” and “second” can explicitly or implicitly include at least one of these features. In the descriptions of the present disclosure, “N” means at least two, such as two, three, and the like, unless otherwise specified.
One process or method descriptions in a flowchart or otherwise described herein can be understood as representing a module, fragment, or portion of code including one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of the present disclosure includes additional implementations, which may be performed in a substantially simultaneous manner or in reverse order based on the functions involved, without following the order shown or discussed, this should be understood by a person skilled in the art to which the embodiments of the present disclosure belong.
It should be understood that the each part of the present disclosure can be implemented by using hardware, software, firmware, or a combination thereof. In the above implementations, N steps or methods can be implemented by using software or firmware stored in memory and can be executed by a suitable instruction execution system. For example, in the case where the N steps or methods are implemented in hardware as in another implementation, an arbitrary one or a combination of the following techniques known in the art can be used, that is, discrete logic circuits with logic gate circuits for implementing logic functions on data signals, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
Ordinary persons skilled in the art can understand that all or part of the steps carried by the method for implementing the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium, and in the case where the program is executed, one or a combination of the steps of the method embodiment are included.
Number | Date | Country | Kind |
---|---|---|---|
2023105646777 | May 2023 | CN | national |
This application is a Continuation of International Application No. PCT/CN2024/091856 filed on May 9, 2024, which claims priority to Chinese Patent Application No. 2023105646777 on filed May 18, 2023 under 35 U.S.C. § 119, the entire contents of all of which are hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2024/091856 | May 2024 | WO |
Child | 19022585 | US |