A blockchain consensus method and related device based on "proposal-endorsement"

By introducing the two-stage consensus protocol of "proposal-endorsement" and the asynchronous block generation and endorsement mechanism, the throughput and security issues of the blockchain system are solved, and a blockchain consensus method with high throughput, low energy consumption and good security is realized.

CN119051833BActive Publication Date: 2025-09-16SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411175182.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-09-16
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing blockchain consensus protocols cannot achieve both high throughput and high security, resulting in insufficient system scalability, low throughput and security risks.

Method used

It adopts a two-stage lightweight and asynchronous consensus protocol based on "proposal-endorsement". Through asynchronous block generation and endorsement mechanisms, it allows multiple nodes to generate blocks asynchronously and in parallel, reducing communication overhead and improving the scalability and security of the system.

Benefits of technology

It improves transaction processing speed, reduces energy consumption, supports running on mobile devices, and improves system throughput and security without sacrificing the principle of decentralization, preventing attacks and data tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119051833B_ABST
    Figure CN119051833B_ABST
Patent Text Reader

Abstract

This application provides a blockchain consensus method and related apparatus based on "proposal-endorsement," introducing asynchronous block generation and endorsement mechanisms. The asynchronous block generation mechanism allows multiple nodes to generate blocks asynchronously and in parallel, avoiding high power consumption and low throughput while maintaining the decentralized and asynchronous nature of the block generation process. This accelerates the block generation speed and improves throughput of the blockchain system. The endorsement mechanism protects the blockchain system from attacks by malicious nodes, enhancing its security. Through a unique two-stage proposer-endorser consensus protocol, this application improves system scalability and throughput without sacrificing decentralization, while maintaining good security against attacks and data tampering. Furthermore, it reduces the cost of the consensus process.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A blockchain consensus method based on "proposal-endorsement", characterized by: Applied to each node of the blockchain system, the method includes: Determine whether the current node is the proposer node corresponding to the h+1th block; where h is the latest block height of the local chain, and the proposer node corresponding to the h+1th block includes at least one node in the blockchain system; If the current node is the proposer node corresponding to the h+1th block, then generate and save an original block with a block height of h+1, and broadcast the original block as the first block to be endorsed in the blockchain system; Upon receiving a second block to be endorsed generated by another node, saving the second block to be endorsed and determining whether the current node is an endorser node corresponding to the second block to be endorsed; If the local node is the endorser node corresponding to the second block to be endorsed, verify the second block to be endorsed, and if the verification passes, generate and broadcast the first endorsement certificate for the second block to be endorsed; Receive a second endorsement certificate generated by another node, and determine the verified block corresponding to the second endorsement certificate; If the blockchain update rules are met, determine each target endorsed block with a block height of h+1 from each block stored by the local node, and determine a valid block from each target endorsed block; wherein the local node obtains at least k endorsement certificates for the target endorsed block, where k is a preset positive integer; The local chain is updated according to the valid block.

2. The method according to claim 1, characterized in that The determining whether the current node is the proposer node corresponding to the h+1th block includes: Obtain a first block hash value and a node public key of the local node; wherein the first block hash value is a block hash value of the hth block in the local chain; Generate a random number, and calculate the sum of the random number and the first block hash value to obtain a first sum value; Based on the comparison result between the node public key and the first sum value, determine whether the current node is the proposer node corresponding to the h+1th block.

3. The method according to claim 2, characterized in that The random number includes a public random seed and a Nonce value; Generating a random number and calculating the sum of the random number and the first block hash value to obtain a first sum value includes: Generating the public random seed and verification certificate based on a verifiable random function, and broadcasting the verification certificate in the blockchain system; wherein the verification certificate is used to verify the validity of the node; Generate the Nonce value based on the proof-of-work function; The public random seed, the Nonce value, and the first block hash value are summed to obtain the first sum value.

4. The method according to claim 1, wherein The determining whether the current node is an endorser node corresponding to the second block to be endorsed includes: Obtaining a second block hash value and a node public key of the local node respectively; wherein the second block hash value is a block hash value of the second block to be endorsed; According to the comparison result of the second block hash value and the node public key, determine whether the current node is the endorser node corresponding to the second block to be endorsed.

5. The method according to any one of claims 1 to 4, characterized in that Determining a valid block in each of the target endorsed blocks includes: Determine at least one candidate block in each of the target endorsed blocks; Based on the expression f = H(b) mod w, calculate the score of each candidate block respectively; where f is the score, H( ) is a preset hash function, b is the candidate block, and w is a preset constant; Determine the maximum value among the scores, and use the candidate block corresponding to the maximum value as the valid block.

6. The method according to claim 5, characterized in that The determining at least one candidate block in each of the target endorsed blocks includes: Obtain the first block hash value, which is the block hash value of the h-th block in the local chain; Extract the third block hash value corresponding to each target endorsed block respectively, where the third block hash value is the block hash value of the previous block pointed to by the target endorsed block; Determine at least one of the candidate blocks in each of the target endorsed blocks; where the third block hash value corresponding to the candidate block is the same as the first block hash value.

7. The method according to claim 5, characterized in that The method further includes: Receive pre-synchronization information sent by a paired node; the paired node is a node other than the present node in the blockchain system; the pre-synchronization information includes the block headers and scores of each block to be compared, and each block to be compared is a block with a block height in the interval [T - N, T] maintained by the paired node, T is the discontinuous height, and N is a preset length; Compare whether the block headers of the blocks to be compared are the same as the block headers corresponding to the same block height in the local chain in ascending order of block height, until the block headers are different and the fork height is determined, or until all the blocks to be compared are compared; where the fork height is the smallest block height at which the block headers are different; When the fork height m falls within the interval [T - N, T] and the local score is greater than the remote score, send the m-th to h-th blocks in the local chain to the paired node to enable the paired node to synchronize the local chain of the paired node; When the fork height m falls within the interval [T - N, T] and the local score is less than the remote score, send the fork height to the paired node to instruct the paired node to send the m-th to h'-th blocks maintained by the paired node, where h' is the latest block height of the paired node; Receive the m-th to h'-th blocks and update the local chain according to the m-th to h'-th blocks.

8. The method according to claim 7, characterized in that The discontinuous height is the smaller value of h and h'.

9. The method according to claim 8, characterized in that The method further includes: If the fork height m does not fall within the interval [T - N, T], when T < h, send the (T + 1)-th to h-th blocks in the local chain to the paired node to enable the paired node to synchronize the local chain of the paired node; If the fork height m does not fall within the interval [T - N, T], when T = h, send a block acquisition request to the paired node to instruct the paired node to send the (T + 1)-th to h'-th blocks maintained by the paired node, where h' is the latest block height of the paired node; Receive the T+1~h'th block, and update the local chain according to the T+1~h'th block.

10. The method according to claim 7, characterized in that The receiving of pre-synchronization information sent by the paired node includes: Sending a main chain synchronization request to the paired node; Upon receiving the synchronization response message returned by the paired node in response to the main chain synchronization request, sending the latest block height of the node to the paired node; Receive the pre-synchronization information returned by the paired node in response to the latest block height of the local node.

11. The method according to claim 7, characterized in that The method further comprises: In response to a main chain synchronization request sent by a paired node, return a synchronization response message to the paired node; the synchronization response message is used to instruct the paired node to send the latest block height h' of the paired node, and the paired node is a node in the blockchain system other than the current node; According to the relationship between h' and h, determine the discontinuity height T; Determining each block to be compared in the local chain based on the discontinuity height T, and generating pre-synchronization information based on each block to be compared; wherein the pre-synchronization information includes a block header and a score of each block to be compared, and each block to be compared is a block in the local chain with a block height within the interval [TN, T], where N is a preset length; sending the pre-synchronization information to the paired node, and receiving a synchronization comparison result returned by the paired node in response to the pre-synchronization information; If the synchronization comparison result is a block, updating the local chain according to the received block; If the synchronization comparison result is a block height or a block acquisition request, some blocks in the local chain are returned to the paired node.

12. The method according to claim 11, characterized in that If the synchronization comparison result is a block height or a block acquisition request, returning some blocks in the local chain to the paired node includes: If the synchronization comparison result is the fork height m, then sending the m-th to h-th blocks in the local chain to the paired node; If the synchronization comparison result is the block acquisition request, the T+1~hth block in the local chain is sent to the paired node.

13. A blockchain consensus device based on "proposal-endorsement", characterized in that: Applied to each node of the blockchain system, the device includes: A first determination module is configured to determine whether the current node is the proposer node corresponding to the h+1th block; wherein h is the latest block height of the local chain, and the proposer node corresponding to the h+1th block includes at least one node in the blockchain system; a block generation module configured to, if the current node is the proposer node corresponding to the h+1th block, generate and save an original block with a block height of h+1, and broadcast the original block as the first block to be endorsed in the blockchain system; a second determination module configured to, upon receiving a second block to be endorsed generated by another node, save the second block to be endorsed, and determine whether the current node is an endorser node corresponding to the second block to be endorsed; an endorsement module, configured to, if the current node is an endorser node corresponding to the second block to be endorsed, verify the second block to be endorsed, and if the verification passes, generate and broadcast a first endorsement certificate for the second block to be endorsed; An endorsement certificate receiving module, configured to receive a second endorsement certificate generated by another node and determine the verified block corresponding to the second endorsement certificate; a valid block determination module, configured to determine, if blockchain update rules are satisfied, target endorsed blocks with a block height of h+1 from among the blocks stored in the local node, and determine a valid block from among the target endorsed blocks; wherein the local node obtains at least k endorsement certificates for the target endorsed blocks, where k is a preset positive integer; An updating module is configured to update the local chain according to the valid block.

14. A storage medium, characterized in that The storage medium stores computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the "proposal-endorsement"-based blockchain consensus method as described in any one of claims 1 to 12.

15. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the "proposal-endorsement"-based blockchain consensus method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Block generation method and device, block chain node and storage medium

    CN110399424A

  • Consensus method and device, terminal and storage medium

    CN115622713A