PBFT distributed identity consensus method and block chain system

By adopting the PBFT distributed identity consensus method and hash commitment mechanism in the blockchain system, the problem of performance and scalability challenges of blockchain in large-scale IoT environments is solved, and a high-performance, reliability and scalability blockchain system is realized, ensuring data consistency and security.

CN119814271APending Publication Date: 2025-04-11SHANGHAI DATA GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411893188.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-11

Smart Images

  • Figure CN119814271A_ABST
    Figure CN119814271A_ABST
Patent Text Reader

Abstract

The invention relates to a PBFT distributed identity consensus method and a block chain system.The method divides nodes in the block chain system into running nodes and standby nodes, the running nodes participate in the consensus process and provide authentication service of external nodes, and the standby nodes wait for activation after registration, do not participate in consensus of a current epoch and keep a monitoring state; preparing the next time to activate and participate; the distributed identity consensus adopts a PBFT protocol to maintain a structure of a main operation node and a plurality of copy operation nodes; the consensus content is standardized into three primitives of proposal, verification and execution, the proposal is called by the main running node, and operation and parameters thereof are packaged into a proposal and broadcasted to other copy running nodes; performing operation verification on the replica running node; and executing operation according to the parameters after consensus conditions are met. Compared with the prior art, the method has the advantages that efficient system consistency random transfer is provided, and the robustness and flexibility of the block chain system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to blockchain technology, and in particular to a PBFT distributed identity consensus method and a blockchain system. Background Art

[0002] Blockchain technology, as a key area of ​​technological innovation in recent years, has demonstrated its unique value in many industries. This technology provides a decentralized and tamper-proof data management framework that not only ensures data security and transparency, but also verifies and records transactions without a central authority through a consensus mechanism. Blockchain is widely used in financial services, supply chain management, smart contracts, and identity authentication, solving problems such as data leakage and identity theft, and significantly reducing the security risks that may exist in centralized systems.

[0003] However, despite the high security provided by blockchain, it faces performance and scalability challenges in the Internet of Things (IoT) environment that handles large-scale device identity management. For example, Bitcoin and Ethereum systems are difficult to apply to application scenarios that require fast and large-scale processing due to limitations in their design, such as the energy-intensive Proof-of-Work (PoW) consensus mechanism and limited number of transactions per second (TPS).

[0004] However, this rapid technological evolution and widespread deployment of devices also brings a series of challenges, identity management and data security are part of them. Traditional centralized identity management systems, although widely adopted, have the following disadvantages due to their reliance on central servers or certification authorities:

[0005] 1. Single point failure risk: Centralized systems may lead to single point failures. Once a problem occurs in the central server, the security and availability of the entire system will be affected. Several IoT service providers have experienced large-scale service suspensions due to cloud failures.

[0006] 2. Scalability and performance limitations: With the rapid increase in the number of devices, centralized systems face performance bottlenecks when processing a large number of device requests. In an era when data output is still growing rapidly, this greatly limits the system's scalability.

[0007] 3. Data privacy and security issues: Centrally stored identity information can easily become a target of cyber attacks, increasing the risk of data leakage.

[0008] To overcome these limitations, research and practice focus is shifting towards decentralized solutions. Blockchain technology has become an important candidate for solutions due to its consensus mechanism that ensures data immutability and transparency. Although there are some existing solutions combined with blockchain, these systems still face many problems:

[0009] 1. Dependence on Internet connection: Most blockchain implementations rely on continuous Internet connection to maintain network synchronization and data consistency.

[0010] 2. Poor functional compatibility: Existing blockchain solutions are often difficult to integrate with other systems.

[0011] 3. Lack of scalability: Many existing solutions do not provide an open development platform, making it difficult to customize additional functions and system expansion. Summary of the invention

[0012] The purpose of the present invention is to provide a PBFT distributed identity consensus method and blockchain system, which not only inherits the core advantages of the blockchain, but also significantly improves the performance and reliability of the system through a dynamic node adjustment mechanism and a secure main operation node transfer mechanism, so that it can effectively adapt to the needs of large-scale distributed environments.

[0013] The purpose of the present invention can be achieved by the following technical solutions:

[0014] A PBFT distributed identity consensus method for a blockchain system, wherein the method divides the nodes in the blockchain system into running nodes and standby nodes, wherein the running nodes participate in the consensus process and provide authentication services for external nodes, and the standby nodes wait for activation after completing registration, do not participate in the consensus of the current epoch, maintain a listening state, and prepare to activate and participate in the next epoch;

[0015] The distributed identity consensus adopts the PBFT protocol, selects a main running node through the PBFT protocol, and maintains a structure of a main running node and multiple replica running nodes;

[0016] The consensus content is standardized into three primitives: proposal, verification, and execution. The proposal is called by the main running node, which packages the operation and its parameters into a proposal and broadcasts it to other replica running nodes; the replica running nodes verify the operation; and the operation is executed according to the parameters after the consensus conditions are met.

[0017] When the blockchain system is initialized, a main operation node starts the network and processes the first epoch; at the end of each epoch, the main operation node stops publishing proposals, packages the registration information of this round into a block, broadcasts a settlement message to all nodes, marking the end of the epoch, and starts the settlement consensus; the standby node receives messages in the Pre-Prepare stage of each round of consensus and responds in the Commit stage.

[0018] The master running node is selected based on a unique random number in each epoch, and the random number is generated using a hash commitment mechanism.

[0019] The selection process of the main operation node is specifically as follows:

[0020] Assuming that the number of malicious nodes that the blockchain system can tolerate is f, before the Prepare phase of the settlement consensus begins, other nodes submit their own hash commitments to the main running node of the current round. After receiving f+1 hash commitments, the main running node broadcasts the commitment set consisting of the selected hash commitments to all nodes; when the node receives the commitment set, it includes the committed hash value in the Prepare message and broadcasts it, thus entering the Prepare phase; in the process of broadcasting the Commit message, the node selected by the main running node for commitment discloses the original data in its Commit message; when 2f+1 Commit messages are received and all commitments are revealed, the epoch settlement begins;

[0021] Through the above process, each node independently calculates a consistent random number, and determines the main running node for the next round based on the random number.

[0022] If a node selected by the main running node refuses to disclose its original data within the specified time, the node will be regarded as a malicious node and removed.

[0023] The tolerable number of malicious nodes f is one third of the number of replica nodes and rounded down.

[0024] Each registration is considered a transaction, including external node registrations and registrations attempting to join the network consensus system.

[0025] The registration includes two methods: proof-of-work registration and certificate registration, which are used for deployment in untrusted network environments and trusted environment deployments respectively.

[0026] The consensus condition is specifically that more than two-thirds of the replica running nodes agree.

[0027] A blockchain system based on PBFT distributed identity consensus is used to implement the method described. The system includes three general components: a data storage layer, a network communication layer, and a cryptographic component. The general components cooperate with other blockchain components and the identity chain to jointly implement the identity information processing and consensus mechanism of the distributed ledger; wherein,

[0028] The data storage layer provides an interface to store and read identity information and blocks that meet the interface standards; the network communication layer provides P2P and broadcast interfaces through the basic authentication service provided by the identity chain, which is used for direct calls to the consensus and communication protocols developed subsequently, without the need to redesign the underlying message encoding and socket management; the cryptographic component provides directly callable symmetric encryption, signature, signature verification, and cryptographic commitment functions, among which the network communication layer uses the cryptographic component to sign all messages by default; the identity chain performs block consensus on identity information through the default PBFT protocol provided by the system, wherein the identity information is packaged in the block as a transaction, accepted by each node after consensus processing, and stored locally through the data storage layer.

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

[0030] 1. The present invention combines the commitment and reveal phases of hash commitment into the four-round consensus broadcast of PBFT, so that the system can complete the consistent random transfer of the distributed system without sacrificing security and only needs to add one round of broadcast.

[0031] 2. The present invention standardizes the consensus content into three primitives: proposal, verification and execution. The proposal is called by the master node, and the operation and its parameters are packaged into a proposal and broadcast to other running nodes. Verification runs on the replica node, and execution runs after the consensus conditions are met and is executed according to the parameters. The consensus logic and execution method are decoupled, which ensures the consistency of the blockchain results, while enhancing the robustness and flexibility of the system design and significantly improving the scalability of the system.

[0032] 3. The present invention creates a blockchain system that can be used for development, research and application deployment, and provides development interfaces for transaction structure, consensus logic, storage mode, sharding mechanism, etc. Compared with the existing blockchain development (such as HyperLedgerFabric), which requires several months of code reading costs, this system can be quickly started within a few days and provides a more flexible development space, filling the gap in lightweight and scalable blockchain applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the distributed identity consensus process of the present invention;

[0034] Figure 2 This is a schematic diagram of the blockchain system structure of the present invention. DETAILED DESCRIPTION

[0035] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0036] This embodiment first provides a PBFT distributed identity consensus method for a blockchain system. Figure 1 As shown in the figure, this method divides the nodes in the blockchain system into running nodes and standby nodes. Running nodes participate in the consensus process and provide authentication services for external nodes. When the blockchain system is initialized, a main running node starts the network and processes the first epoch. After completing registration, the standby node waits for activation, does not participate in the consensus of the current epoch, remains in a listening state, and prepares to activate and participate in the next epoch.

[0037] The distributed identity consensus adopts the PBFT protocol, through which a main running node is selected. The entire distributed network maintains a structure of one main running node and multiple replica running nodes.

[0038] The consensus content is standardized into three primitives: proposal, verification, and execution. The proposal is called by the main operation node, which packages the operation and its parameters into a proposal and broadcasts it to other replica operation nodes; the replica operation node verifies the operation; after the consensus conditions are met (more than two-thirds of the replica operation nodes agree), the operation is executed according to the parameters to ensure the consistency and efficiency of the system. The main operation node also handles external registration requests to enhance the system's responsiveness to new devices.

[0039] The blockchain system provides two methods: proof-of-work registration and certificate registration, which are used for deployment in untrusted network environments and trusted environments respectively. This allows the system to be compatible with various existing authentication systems and can also be deployed in environments without authentication solutions.

[0040] Each registration is considered a transaction, including external node registrations and registrations attempting to join the network consensus system.

[0041] At the end of each epoch, the main running node stops publishing proposals, packages the registration information of this round into a block, broadcasts a settlement message to all nodes, marking the end of the epoch and starting the settlement consensus; the standby node receives the message in the Pre-Prepare phase of this round of consensus process and responds in the Commit phase.

[0042] The main running node is selected based on the unique random number in each epoch. The random number generation adopts the hash commitment mechanism to ensure that the random number generation is both secure and stable.

[0043] Assuming that the number of malicious nodes that the blockchain system can tolerate is f, before the Prepare phase of the settlement consensus begins, other nodes submit their respective hash commitments to the main running node of the current round. After receiving f+1 hash commitments c, the main running node broadcasts the commitment set C consisting of the selected hash commitments to all nodes; when the node receives the commitment set C, it includes the committed hash value Hash(C) in the Prepare message and broadcasts it, thus entering the Prepare phase; in the process of broadcasting the Commit message, the node selected by the main running node for commitment discloses the original data in its Commit message; all nodes will only start to execute epoch settlement after receiving 2f+1 Commit messages and all commitments c are revealed.

[0044] In particular, if the selected node refuses to disclose its original data within the specified time, the node will be considered a malicious node and removed from the system. This design ensures that even if there are malicious nodes, as long as at least one node in the committed node set is honest, the randomness of the system can still be guaranteed.

[0045] Through the above process, each node independently calculates a consistent random number, so that the master node for the next round can be determined without any additional communication except for collecting commitments. Every time the master node changes, a new public key and random number are recalculated and generated to ensure that the random number of each cycle is unique.

[0046] In this embodiment, the tolerable number of malicious nodes f is one third of the number of replica nodes and rounded down.

[0047] This embodiment also provides a blockchain system based on PBFT distributed identity consensus, which is used to implement the method described above. The system includes the core functions of the blockchain system, including data writing, network communication, and various cryptographic components, such as signature, encryption, and commitment mechanisms. These functions ensure the system's data immutability, transaction security, and network integrity.

[0048] like Figure 2 As shown, the system includes three common components: data storage layer, network communication layer and cryptography component. The common components work together with other blockchain components and identity chains to realize the identity information processing and consensus mechanism of the distributed ledger.

[0049] The data storage layer provides an interface to store and read identity information and blocks that meet the interface standards. The network communication layer provides a simple and flexible P2P and broadcast interface through the basic authentication service provided by the identity chain, which is used for direct calls of consensus and communication protocols developed later, without the need to redesign the underlying message encoding and socket management. The cryptographic component provides directly callable symmetric encryption, signature, signature verification, and cryptographic commitment functions. Among them, the network communication layer uses the cryptographic component by default to sign all messages.

[0050] The system also provides a comprehensive blockchain framework and a set of callable classic blockchain components, and implements a blockchain dedicated to identity services through this distributed ledger, called the "identity chain". The identity chain uses the default PBFT protocol provided by the system to perform block consensus on identity information, where identity information is packaged in blocks as transactions, accepted by each node after consensus processing, and stored locally through the data storage component. The identity chain not only serves the system internally, but also provides basic support for communication and other consensus mechanisms. In this way, the identity chain becomes a key hub in the multi-chain system, making data and information exchange between different blockchains fast and secure, thereby enhancing the interoperability and stability of the entire blockchain network, and providing a solid foundation for the implementation and verification of new blockchain systems and consensus mechanisms.

[0051] In addition, the system provides a highly decoupled blockchain system skeleton - such as Figure 2 The replacement of any component in the structural design diagram does not require additional modifications to other components, which allows new designs to be implemented and verified more quickly. Users can flexibly modify and configure modules such as consensus logic, transaction structure, and block structure according to their needs, thereby conducting personalized research and development work.

[0052] This design lowers the technical threshold - the originally closely connected components enable more researchers and developers to participate in the innovation and application of blockchain technology.

[0053] The flexibility of the system architecture is particularly suitable for enterprise environments or research projects that require a high degree of customization. Users can adjust the blockchain infrastructure, such as consensus algorithms, network protocols, or data verification processes, according to specific business needs or research directions. This provides strong support and unlimited possibilities for blockchain applications in multiple fields such as finance, healthcare, and the Internet of Things.

[0054] In summary, the main contributions of the present invention are as follows:

[0055] (1) Providing a scalable and integrated blockchain code platform: The proposed blockchain system breaks through the limitations of traditional blockchain systems in terms of scalability and integration. By introducing an innovative dynamic PBFT node adjustment mechanism, the platform not only supports seamless expansion from small to large scales, but also ensures high performance. This high adaptability enables the present invention to be efficiently extended to various IoT systems.

[0056] (2) Provides secure and efficient dynamic node verification and registration services: Security and efficiency are the core of the blockchain system of the present invention. By designing a high-performance and secure master node transfer mechanism, the security and data consistency of the entire system are ensured. This mechanism combines the random generation technology of hash commitment to complete the transfer of system status safely and efficiently without affecting the consensus speed. This not only improves the system's anti-attack ability, but also ensures the rapid and secure recovery of the network when any node failure or potential security threat occurs.

[0057] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A PBFT distributed identity consensus method for a blockchain system, characterized in that: The method divides the nodes in the blockchain system into running nodes and standby nodes, wherein the running nodes participate in the consensus process and provide authentication services for external nodes, and the standby nodes wait for activation after completing registration, do not participate in the consensus of the current epoch, maintain a listening state, and prepare for activation and participation in the next epoch; The distributed identity consensus adopts the PBFT protocol, selects a main running node through the PBFT protocol, and maintains a structure of a main running node and multiple replica running nodes; The consensus content is standardized into three primitives: proposal, verification, and execution. The proposal is called by the main running node, which packages the operation and its parameters into a proposal and broadcasts it to other replica running nodes; the replica running nodes verify the operation; and the operation is executed according to the parameters after the consensus conditions are met.

2. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: When the blockchain system is initialized, a main operation node starts the network and processes the first epoch; at the end of each epoch, the main operation node stops publishing proposals, packages the registration information of this round into a block, broadcasts a settlement message to all nodes, marking the end of the epoch, and starts the settlement consensus; the standby node receives messages in the Pre-Prepare stage of each round of consensus and responds in the Commit stage.

3. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: The main running node is selected based on a unique random number in each epoch, and the random number is generated using a hash commitment mechanism.

4. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: The selection process of the main operation node is specifically as follows: Assuming that the number of malicious nodes that the blockchain system can tolerate is f, before the Prepare phase of the settlement consensus begins, other nodes submit their own hash commitments to the main running node of the current round. After receiving f+1 hash commitments, the main running node broadcasts the commitment set consisting of the selected hash commitments to all nodes; when the node receives the commitment set, it includes the committed hash value in the Prepare message and broadcasts it, thus entering the Prepare phase; in the process of broadcasting the Commit message, the node selected by the main running node for commitment discloses the original data in its Commit message; when 2f+1 Commit messages are received and all commitments are revealed, the epoch settlement begins; Through the above process, each node independently calculates a consistent random number and determines the main running node for the next round based on the random number.

5. A PBFT distributed identity consensus method for a blockchain system according to claim 4, characterized in that: If a node selected by the main running node refuses to disclose its original data within the specified time, the node will be regarded as a malicious node and removed.

6. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: The tolerable number of malicious nodes f is one third of the number of replica nodes and rounded down.

7. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: Each registration is considered a transaction, including external node registrations and registrations attempting to join the network consensus system.

8. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: The registration includes two methods: proof-of-work registration and certificate registration, which are used for deployment in untrusted network environments and trusted environment deployments respectively.

9. A PBFT distributed identity consensus method for a blockchain system according to claim 1, characterized in that: The consensus condition is specifically that more than two-thirds of the replica running nodes agree.

10. A blockchain system based on PBFT distributed identity consensus, characterized in that: Used to implement the method described in any one of claims 1 to 9, the system includes three general components: a data storage layer, a network communication layer, and a cryptographic component, and the general components cooperate with other blockchain components and the identity chain to jointly implement the identity information processing and consensus mechanism of the distributed ledger; wherein, The data storage layer provides an interface to store and read identity information and blocks that meet the interface standards; the network communication layer provides P2P and broadcast interfaces through the basic authentication service provided by the identity chain, which is used for direct calls to the consensus and communication protocols developed subsequently, without the need to redesign the underlying message encoding and socket management; the cryptographic component provides directly callable symmetric encryption, signature, signature verification, and cryptographic commitment functions, among which the network communication layer uses the cryptographic component to sign all messages by default; the identity chain performs block consensus on identity information through the default PBFT protocol provided by the system, wherein the identity information is packaged in the block as a transaction, accepted by each node after consensus processing, and stored locally through the data storage layer.