CN112532581A - Improved PBFT consensus method based on consensus participation and transaction activity - Google Patents

Improved PBFT consensus method based on consensus participation and transaction activity Download PDF

Info

Publication number
CN112532581A
CN112532581A CN202011152332.3A CN202011152332A CN112532581A CN 112532581 A CN112532581 A CN 112532581A CN 202011152332 A CN202011152332 A CN 202011152332A CN 112532581 A CN112532581 A CN 112532581A
Authority
CN
China
Prior art keywords
consensus
node
nodes
message
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011152332.3A
Other languages
Chinese (zh)
Inventor
毛志来
孙惠平
傅玉峰
陈钟
虞丽
朱俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Chenkuo Network Technology Co ltd
Peking University
Original Assignee
Nanjing Chenkuo Network Technology Co ltd
Peking University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Chenkuo Network Technology Co ltd, Peking University filed Critical Nanjing Chenkuo Network Technology Co ltd
Priority to CN202011152332.3A priority Critical patent/CN112532581A/en
Publication of CN112532581A publication Critical patent/CN112532581A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of block chains, consensus mechanisms and PBFT (basic transmission context) application, and particularly discloses an improved PBFT consensus method based on consensus participation and transaction activity, which comprises the following steps of 1, initializing nodes, numbering the nodes and setting the initial value of the credibility of the nodes to be 0; step 2, the client sends a transaction request to the main node until the first main node switching is reached; step 3, running the optimized view switching protocol to select a main node; and 4, processing the client request based on the optimized view switching protocol and the optimized consistency consensus protocol. The invention has the beneficial effects that: the randomness and the safety of the master node election are enhanced, and the attack of malicious nodes is effectively resisted; simplifying the complexity of node communication according to the credibility of the main node; the window period is set, so that the fairness of the honest nodes participating in the consensus process is improved; and taking the node transaction activity as the node rights and interests, and exciting the active nodes to maintain the safety and stability of the block chain network.

Description

Improved PBFT consensus method based on consensus participation and transaction activity
Technical Field
The invention belongs to the technical field of block chains, consensus mechanisms and PBFT (basic packet data transfer) application, and particularly relates to an improved PBFT consensus method based on consensus participation and transaction activity.
Background
The block chain technology concept is put forward for the first time in 2008, the block chain adopts various technologies in the fields of cryptography, computers and communication, and asymmetric encryption, time stamps, a common recognition mechanism and point-to-point communication are used, so that the problems of low efficiency, high cost and monopoly of data ownership of the existing centralized credit organization are solved, and the block chain is essentially a distributed system and has the characteristics of decentralization and safe credibility. The blockchain technology is considered as a new information technology development direction after the mobile internet, and the establishment of a credit society is promoted, so that the current information internet is converted into a value internet.
As blockchain technology continues to develop, consensus algorithms are also increasingly highlighted by researchers, where how to select consensus algorithms is a core part of blockchain design. The consensus algorithm is the most core technology of the block chain, which affects the performance of the block chain system, and the current consensus algorithm can be divided into three categories, namely public chain consensus, private chain consensus and alliance chain consensus according to the type of the block chain. Research on consensus algorithms has been started for a long time, such as Proof of Work (POW), Proof of rights of interest (POS), the practical byzantine fault-tolerant algorithm PBFT, which is the most widely applied league chain consensus mechanism, and the Raft algorithm.
The PBFT algorithm aims at solving the problem of how to ensure the consistency and the correctness of final decision under the condition that malicious nodes exist in the whole system, the algorithm is based on state machine copy replication, each state machine copy can store service states, legal requests of users are met, not only can transactions be completed, but also different types of operations can be realized, and the algorithm can carry out consensus on transmitted messages to obtain a global sequence. In the case that the malicious nodes are not higher than the total number 1/3, the algorithm can simultaneously guarantee the safety and the activity, and the algorithm reduces the complexity of the Byzantine fault-tolerant algorithm from an exponential level to a polynomial level O (N) for the first time2). All nodes in the PBFT algorithm are divided into three types, namely a client, a main node and a replica node, the process is divided into a consistency protocol, a view change protocol and a checkpoint protocol, wherein the consistency protocol is divided into three stages: a PRE-preparation phase (PRE-PREPARE), a preparation phase (PREPARE), and an acknowledgement phase (COMMIT).
The election mode of the main nodes in the PBFT algorithm is that the main nodes are sequentially taken as the main nodes in turn according to numbers, the election mode of the main nodes is random, the authenticity of the main nodes is not verified after the main nodes are successfully elected, the elected main nodes are probably malicious nodes and have certain potential safety hazards, although the maliciousness of the main nodes is possibly identified by the slave nodes and overturned through view change in the subsequent consensus process, certain loss can still be caused, if the continuously selected main nodes are all malicious nodes, frequent view change can also increase system overhead, system efficiency is reduced, and great waste of system resources can be caused and system safety is reduced. The PBFT has no penalty mechanism for the malicious master node, only the view is switched to change the master node, and the Byzantine node still stays in the network, so the improvement is needed in the practical application of the block chain, and in addition, the high-intensity network communication and network transmission overhead in the three-stage negotiation of the PBFT consistency protocol also needs to be further improved and optimized.
Accordingly, in view of the above problems, the present invention provides an improved PBFT consensus method based on consensus participation and transaction liveness.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide an improved PBFT consensus method based on consensus participation and transaction activity, which optimizes a view switching mechanism of a PBFT algorithm and enhances the randomness and the safety of master node election so as to enhance the capability of resisting malicious node attacks, and optimizes message transmission in the running process of a consistency protocol based on the credibility value of the master node election so as to reduce message complexity and network overhead.
The technical scheme is as follows: the invention provides an improved PBFT consensus method based on consensus participation and transaction activity, which comprises the following steps of 1, initializing nodes, numbering the nodes in a network by N integers of { 0, 1, 2, …, | N | -1}, and initializing the credibility values of the nodes to 0 point. And 2, the client sends a transaction request to the main node, the main node numbers the request message after receiving the request, and the traditional PBFT protocol is operated at the starting stage of the block chain network until the main node is switched for the first time. And 3, running the optimized view switching protocol to select the main node. And 4, processing the client request based on the optimized view switching protocol and the optimized consistency consensus protocol.
In the technical scheme, the step 3 includes a view switching time point, a view switching reference window W and a master node selection mechanism, wherein an algorithm of the view switching time point triggers view switching except for exception of the master node, and in the context of application that a node can dynamically join a quitted block chain, in order to avoid excessive centralization of blocks and maintain certain random security, an attempt switching protocol is run once every time period T; the method comprises the steps that a reference window W is switched in a view, the reliability value is a result obtained by accumulation after a plurality of rounds of consensus processes, in order to give consideration to new nodes, fairness is enhanced, meanwhile, the node reliability should reflect the latest state of the nodes, the influence of historical liveness on the current state is reduced, a window period W is set, W = nT, n is an integer, and the reliability is calculated according to the behavior of the nodes in the window period W; the main node selection mechanism has the advantages that the credibility is an important index for measuring the integrity of the nodes, when the view switching and the main node selection are carried out, a cryptographic lottery algorithm with weighted probability is adopted, the rights and interests of the nodes are the credibility of the nodes, the higher the credibility is, the higher the probability of selection is, so that the occurrence of malicious nodes and fault nodes selection can be reduced, and the occurrence of failure in the consensus process is reduced.
In the technical scheme, the consensus participation degree, the transaction activity, the reliability of the nodes and the two-layer block link structure in the step 3 are calculated by the following method, wherein the duplicate nodes participate in the primary block in the system to generate the consensus plus 1 point, and when the duplicate nodes generate the byzantine errors such as downtime and inconsistency with the final consensus result, the missed-recording blocks, the voting errors, the abnormal-recording blocks and the like, the total mark participation value is 1 point; the node serving as a main node successfully packs the blocks and completes one-time block generation consensus, and the consensus takes part in the score of 3; when the block cannot be generated successfully, if the copied node suspects to be a malicious node, the view conversion is triggered to be deducted for 5 points, and other situations, such as node downtime, communication unsmooth, long delay, block failure and the like, are deducted for 3 points; transaction activity, wherein the transaction activity value A is the number of transactions participated by the node; the credibility value R is obtained by weighted addition calculation according to the consensus participation value and the transaction active value, and the calculation method of the credibility value R is as follows: r = k a + (1-k) P (0< k < 1); the PBFT three-stage communication consensus process is required to be executed to ensure that the block chain network forms a consistent result when the credibility calculation is executed each time; the main Block (Key Block) is used for recording the identity and the credibility value of the nodes participating in consensus, and the result of the nodes trying to switch protocols when the consensus nodes operate to obtain the main node, and the Micro Block (Micro Block) is a Block for recording the consensus nodes operating the consensus protocol packaging transaction.
In step 4, the optimized consistency protocol execution process is as follows: (1) client send request (request): the customer service end sends a REQUEST message to the main node in the format of REQUEST, o, t, c, as in the REQUEST phase of the PBFT algorithm, wherein o is a REQUEST execution state machine, t is a time stamp, and c represents the number of the client; (2) a PRE-preparation stage (PRE-preparation) of an optimized consistency protocol, wherein a main node generates a PRE-preparation message after receiving a request sent by a client and broadcasts the PRE-preparation message to all consensus nodes, and the message format is as follows < < PRE-PREPARE, v, n, d, g, >, r, m >, wherein r is the credibility value of the nodes and g is the result of hash calculation performed on r; (3) optimized coherence protocol preparation phase (prepare): the replica node will generate a preparation message for the feedback, and sends the message to the master node, the message format is < PREPARE, v, n, d, i >, i is the node number, meanwhile, the nodes write the pre-preparation message and the preparation message into the log file, the main node receives the messages of all the replica nodes, and finds out the PRE-preparation message < < PRE-PREPARE, v, n, d, g >, r, m > stored locally according to the v and n values of the prefix message for comparison, judges whether the values corresponding to the field d are the same or not, once the transaction information is tampered, if the Hash value d of the node is changed, the master node ends the execution of the consensus and sends a termination message to each node, wherein the message comprises the inconsistent node number of the message, and a PBFT traditional consistency protocol is restarted once to finish the consensus; (4) and a consistency protocol optimization confirmation phase (COMMIT), wherein the master node receives feedback information of the preparation phase sent by all the consensus copy nodes, and under the condition that all the feedback information are completely the same, the master node generates a confirmation message and broadcasts the confirmation message to all nodes in the network, the message format is < COMMIT, v, n, d, a >, wherein a is determined addition information and indicates that the master node confirms addition, after all the nodes receive the confirmation message, the secondary transaction information is added into a local memory, the messages of all the copy nodes receive submission (COMMIT) information of the master node, and find out locally stored PRE-preparation messages < < PRE-PARE, v, n, d, g >, r, m > according to the v and n values of the COMMIT message, compare, judge whether the value corresponding to the field d is the same, and once the transaction information is tampered, its Hash value d must change, the replica node will attempt to initiate a view switch.
In the technical scheme, after a new master node election protocol is executed in the step 4, the running consensus protocol is determined according to the reliability value of the master node in election, a threshold value TV is preset by the system, and if the master node reliability value R > = TV, the optimized consistency consensus protocol is run; if the master node trustworthiness value R < TV, the conventional three-stage PBFT consensus process is still running.
In the technical solution, the consistency protocol of the consensus algorithm in step 4 needs to complete two times of node communication with complexity o (n) in the operation process.
Compared with the prior art, the improved PBFT consensus method based on the consensus participation degree and the transaction activity degree has the beneficial effects that: 1. the randomness safety of the master node election is enhanced, and the attack of malicious nodes is effectively resisted; 2. the complexity of node communication is simplified according to the credibility of the main node, and the communication responsibility is simplified; 3. the window period is set, so that the fairness of the honest nodes participating in the consensus process is improved; 4. and taking the node transaction activity as the node rights and interests, and exciting the active nodes to maintain the safety and stability of the block chain network.
Drawings
FIG. 1 is a schematic diagram of a workflow structure of an improved PBFT consensus method based on consensus participation and transaction activity according to the present invention;
FIG. 2 is a block chain structure diagram of an improved PBFT consensus method based on consensus participation and transaction activity according to the present invention;
FIG. 3 is a schematic diagram of an optimized consensus protocol execution process for an improved PBFT consensus method based on consensus participation and transaction activity.
Detailed Description
The invention is further elucidated with reference to the drawings and the embodiments.
Examples
The improved PBFT consensus method based on the consensus participation degree and the transaction activity degree as shown in the figure 1, the figure 2 and the figure 3 comprises the following steps of 1, carrying out initialization work on nodes, numbering the nodes in the network by N integers of { 0, 1, 2, …, | N | -1}, and initializing the credibility value of the nodes to 0 point. And 2, the client sends a transaction request to the main node, the main node numbers the request message after receiving the request, and the traditional PBFT protocol is operated at the starting stage of the block chain network until the main node is switched for the first time. And 3, running the optimized view switching protocol to select the main node. And 4, processing the client request based on the optimized view switching protocol and the optimized consistency consensus protocol.
Further preferably, the step 3 includes a view switching time point, a view switching reference window W, and a master node selection mechanism, where an algorithm of the view switching time point triggers view switching except that the master node is abnormal, and in the context of a blockchain application that a node may dynamically join in to exit, in order to avoid generating excessive centralization of a block and maintaining a certain random security, a protocol trying to switch is run once every time period T; the method comprises the steps that a reference window W is switched in a view, the reliability value is a result obtained by accumulation after a plurality of rounds of consensus processes, in order to give consideration to new nodes, fairness is enhanced, meanwhile, the node reliability should reflect the latest state of the nodes, the influence of historical liveness on the current state is reduced, a window period W is set, W = nT, n is an integer, and the reliability is calculated according to the behavior of the nodes in the window period W; the main node selection mechanism has the advantages that the credibility is an important index for measuring the integrity of the nodes, when the view switching and the main node selection are carried out, a cryptographic lottery algorithm with weighted probability is adopted, the rights and interests of the nodes are the credibility of the nodes, the higher the credibility is, the higher the probability of selection is, so that the occurrence of malicious nodes and fault nodes selection can be reduced, and the occurrence of failure in the consensus process is reduced.
Further preferably, in the step 3, the common recognition participation, the transaction activity, the credibility, and the block chain structure of two layers are: the method for calculating the consensus participation value P comprises the following steps that the copy node participates in a primary block in the system to generate consensus plus 1 point, and when a Byzantine error such as downtime occurs in the copy node and is inconsistent with a final consensus result, the 1 point is deducted by a missed-recording block, a voting error, an abnormal-recording block and the like; the node serving as a main node successfully packs the blocks and completes one-time block generation consensus, and the activity integral is added for 3 minutes in the cycle of consensus; when the block cannot be generated successfully, if the copied node suspects to be a malicious node, the view conversion is triggered to be deducted for 5 points, and other situations, such as node downtime, communication unsmooth, long delay, block failure and the like, are deducted for 3 points; transaction activity, wherein the transaction activity value A is the number of transactions participated by the node; the credibility of the node is calculated by weighted addition of the consensus participation value and the transaction active value, and the calculation method of the credibility value R is as follows: r = k a + (1-k) P (0< k < 1); the PBFT three-stage communication consensus process is required to be executed to ensure that the block chain network forms a consistent result when the credibility calculation is executed each time; as shown in fig. 2, a new Block chain structure is shown, where a main Block (Key Block) is used to record identities and reliability values of nodes participating in consensus, results of nodes trying to switch protocols when the consensus nodes operate to obtain the main node, and a Micro Block (Micro Block) is used to record a Block where the consensus nodes operate a consensus protocol packed transaction.
Further preferably, in step 4, the optimized consistency protocol is executed as follows: (1) client send request (request): the customer service end sends a REQUEST message to the main node in the format of REQUEST, o, t, c, as in the REQUEST phase of the PBFT algorithm, wherein o is a REQUEST execution state machine, t is a time stamp, and c represents the number of the client; (2) a PRE-preparation stage (PRE-preparation) of an optimized consistency protocol, wherein a main node generates a PRE-preparation message after receiving a request sent by a client and broadcasts the PRE-preparation message to all consensus nodes, and the message format is as follows < < PRE-PREPARE, v, n, d, g, >, r, m >, wherein r is the credibility value of the nodes and g is the result of hash calculation performed on r; (3) optimized coherence protocol preparation phase (prepare): the replica node will generate a preparation message for the feedback, and sends the message to the master node, the message format is < PREPARE, v, n, d, i >, i is the node number, meanwhile, the nodes write the pre-preparation message and the preparation message into the log file, the main node receives the messages of all the replica nodes, and finds out the PRE-preparation message < < PRE-PREPARE, v, n, d, g >, r, m > stored locally according to the v and n values of the prefix message for comparison, judges whether the values corresponding to the field d are the same or not, once the transaction information is tampered, if the Hash value d of the node is changed, the master node ends the execution of the consensus and sends a termination message to each node, wherein the message comprises the inconsistent node number of the message, and a PBFT traditional consistency protocol is restarted once to finish the consensus; (4) and a consistency protocol optimization confirmation phase (COMMIT), wherein the master node receives feedback information of the preparation phase sent by all the consensus copy nodes, and under the condition that all the feedback information are completely the same, the master node generates a confirmation message and broadcasts the confirmation message to all nodes in the network, the message format is < COMMIT, v, n, d, a >, wherein a is determined addition information and indicates that the master node confirms addition, after all the nodes receive the confirmation message, the secondary transaction information is added into a local memory, the messages of all the copy nodes receive submission (COMMIT) information of the master node, and find out locally stored PRE-preparation messages < < PRE-PARE, v, n, d, g >, r, m > according to the v and n values of the COMMIT message, compare, judge whether the value corresponding to the field d is the same, and once the transaction information is tampered, its Hash value d must change, the replica node will attempt to initiate a view switch.
Further preferably, in step 4, after the new master node election protocol is executed, the operated consensus protocol is determined according to the reliability value of the master node in the election, the system presets a threshold value TV, and if the master node reliability value R > = TV, the optimized consensus protocol is operated; if the master node trustworthiness value R < TV, the conventional three-stage PBFT consensus process is still running.
Further preferably, the consistency protocol of the consensus algorithm in step 4 needs to complete two times of node communication with complexity o (n) during the operation process. The design of the algorithm ensures that the algorithm can still finish consensus under the condition that Byzantine nodes exist in the network; the reliability of the nodes is quantized and applied to view switching, if the reliability of the nodes selected to be the main node in the view switching is high, the copy nodes do not need to broadcast messages to other copy nodes in the period of prefix and commit, a PBFT consistency protocol is optimized, and an algorithm can achieve consensus after the communication of the nodes with the complexity of O (n) is completed.
The invention discloses an improved PBFT consensus method based on consensus participation and transaction activity, which applies credibility to a view switching process as a method for randomly generating a main node by node interest weighting, and selects different consistency protocols to operate according to the credibility of the main node, thereby further reducing the message complexity of the consensus process.
The invention discloses an improved PBFT consensus method based on consensus participation and transaction activity, which is an open PBFT consensus protocol based on which nodes can join and quit.
The difference between the improved PBFT consensus method based on the consensus participation degree and the transaction activity degree and the traditional technology is as follows: 1. adding the transaction activity of the node into the evaluation of the node credit, and further exciting the node to improve the stability to participate in the block chain consensus process in an honest way; 2. the grouping method according to the node credibility value or the credibility value is not adopted, so that the complicated operation of the grouping method is avoided, the nodes can participate in the processes of main node election and consensus, and certain node participation and decentralization are ensured; 3. the probability of the node becoming a main node is determined according to the reliability of the node, so that the node with high honesty and reliability can be ensured to play a larger role in consensus to maintain the stability of the block chain network; 4. and the consistency process is optimized according to the credibility value of the main node, so that the safety is ensured, and the network overhead and pressure are reduced.
The foregoing is only a preferred embodiment of this invention and it should be noted that modifications can be made by those skilled in the art without departing from the principle of the invention and these modifications should also be considered as the protection scope of the invention.

Claims (6)

1. An improved PBFT consensus method based on consensus participation and transaction activity is characterized in that: comprises the following steps of (a) carrying out,
step 1, initializing nodes, numbering the nodes in the network by N integers of { 0, 1, 2, …, | N | -1}, and initializing the credibility values of the nodes to 0 point;
step 2, the client sends a transaction request to the main node, the main node numbers the request message after receiving the request, and the traditional PBFT protocol is operated at the starting stage of the block chain network until the main node is switched for the first time;
step 3, running the optimized view switching protocol to select a main node;
and 4, processing the client request based on the optimized view switching protocol and the optimized consistency consensus protocol.
2. The improved PBFT consensus method based on consensus participation and transaction activity according to claim 1, wherein step 3 comprises a view switching time point, a view switching reference window W and a master node election mechanism, wherein an algorithm of the view switching time point except for the master node exception triggering view switching runs an attempt switching protocol once every time period T in order to avoid the generation of block excessive centralization and maintain certain random security in the context of a blockchain application in which a node can dynamically join and exit; the method comprises the steps that a reference window W is switched in a view, the reliability value is a result obtained by accumulation after a plurality of rounds of consensus processes, in order to give consideration to new nodes, fairness is enhanced, meanwhile, the node reliability should reflect the latest state of the nodes, the influence of historical liveness on the current state is reduced, a window period W is set, W = nT, n is an integer, and the reliability is calculated according to the behavior of the nodes in the window period W; the credibility is an important index for measuring the integrity of the nodes, when the view switching and election of the main nodes are carried out, a weighted probabilistic cryptography lottery algorithm is adopted, the interest of the nodes is the credibility of the nodes, the higher the credibility is, the higher the probability of selection is, so that the occurrence of malicious nodes and fault nodes being selected can be reduced, and the occurrence of failure in the consensus process is reduced.
3. The improved PBFT consensus method based on consensus participation and transaction activity as claimed in claim 2, wherein in the step 3, the consensus participation, the transaction activity, the reliability of the node, and the two-layer block chain structure are calculated by adding 1 point to the consensus participation value P of the replica node in the system, and when the replica node has a Byzantine error such as a downtime and is inconsistent with the final consensus result, a missed block, a voting error, an abnormal block record and the like, a 1 point is deducted; the node serving as a main node successfully packs the blocks and completes one-time block generation consensus, and the consensus takes part in the score of 3; when the block cannot be generated successfully, if the copied node suspects to be a malicious node, the view conversion is triggered to be deducted for 5 points, and other situations, such as node downtime, communication unsmooth, long delay, block failure and the like, are deducted for 3 points; transaction activity, wherein the transaction activity value A is the number of transactions participated by the node; and the credibility value R is obtained by weighted addition of the consensus participation value and the transaction active value, and the calculation method of the credibility value R is as follows: r = k a + (1-k) P (0< k < 1); the PBFT three-stage communication consensus process is required to be executed to ensure that the block chain network forms a consistent result when the credibility calculation is executed each time; the main Block (Key Block) is used for recording the identity and the credibility value of the nodes participating in consensus, and the result of the nodes trying to switch protocols when the consensus nodes operate to obtain the main node, and the Micro Block (Micro Block) is a Block for recording the consensus nodes operating the consensus protocol packaging transaction.
4. The improved PBFT consensus method based on consensus engagement and transaction liveness of claim 1, wherein: in step 4, the optimized consistency protocol execution process is as follows:
(1) client send request (request): the customer service end sends a REQUEST message to the main node in the format of REQUEST, o, t, c, as in the REQUEST phase of the PBFT algorithm, wherein o is a REQUEST execution state machine, t is a time stamp, and c represents the number of the client;
(2) a PRE-preparation stage (PRE-preparation) of an optimized consistency protocol, wherein a main node generates a PRE-preparation message after receiving a request sent by a client and broadcasts the PRE-preparation message to all consensus nodes, and the message format is as follows < < PRE-PREPARE, v, n, d, g, >, r, m >, wherein r is the credibility value of the nodes and g is the result of hash calculation performed on r;
(3) optimized coherence protocol preparation phase (prepare): the replica node will generate a preparation message for the feedback, and sends the message to the master node, the message format is < PREPARE, v, n, d, i >, i is the node number, meanwhile, the nodes write the pre-preparation message and the preparation message into the log file, the main node receives the messages of all the replica nodes, and finds out the PRE-preparation message < < PRE-PREPARE, v, n, d, g >, r, m > stored locally according to the v and n values of the prefix message for comparison, judges whether the values corresponding to the field d are the same or not, once the transaction information is tampered, if the Hash value d of the node is changed, the master node ends the execution of the consensus and sends a termination message to each node, wherein the message comprises the inconsistent node number of the message, and a PBFT traditional consistency protocol is restarted once to finish the consensus;
(4) and a consistency protocol optimization confirmation phase (COMMIT), wherein the main node receives feedback information of the preparation phase sent by all the consensus replica nodes, and under the condition that all the feedback information are completely the same, the main node generates a confirmation message and broadcasts the confirmation message to all nodes in the network, the message format is < COMMIT, v, n, d, a >, wherein a is confirmation addition information which indicates that the main node confirms addition, all the nodes add the secondary transaction information into a local memory after receiving the confirmation message, all the replica nodes receive COMMIT (COMMIT) information of the main node, find a locally stored PRE-preparation message < < PRE-PREE, v, n, d, g >, r, m > according to the v and n values of the COMMIT message, compare, judge whether the value corresponding to the field d is the same, and once the transaction information is tampered, its Hash value d must change, the replica node will attempt to initiate a view switch.
5. The improved PBFT consensus method based on consensus engagement and transaction liveness of claim 1, wherein: in the step 4, after the new master node election protocol is executed, the operated consensus protocol is determined according to the reliability value of the master node in the election, the system presets a threshold value TV, and if the master node reliability value R > = TV, the optimized consistency consensus protocol is operated; if the master node trustworthiness value R < TV, the conventional three-stage PBFT consensus process is still running.
6. The improved PBFT consensus method based on consensus engagement and transaction liveness of claim 5, wherein: in the step 4, the consistency protocol of the recognition algorithm needs to complete two times of node communication with the complexity of o (n) in the operation process.
CN202011152332.3A 2020-10-26 2020-10-26 Improved PBFT consensus method based on consensus participation and transaction activity Pending CN112532581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011152332.3A CN112532581A (en) 2020-10-26 2020-10-26 Improved PBFT consensus method based on consensus participation and transaction activity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011152332.3A CN112532581A (en) 2020-10-26 2020-10-26 Improved PBFT consensus method based on consensus participation and transaction activity

Publications (1)

Publication Number Publication Date
CN112532581A true CN112532581A (en) 2021-03-19

Family

ID=74980415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011152332.3A Pending CN112532581A (en) 2020-10-26 2020-10-26 Improved PBFT consensus method based on consensus participation and transaction activity

Country Status (1)

Country Link
CN (1) CN112532581A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127267A (en) * 2021-04-30 2021-07-16 郑州师范学院 Strong-consistency multi-copy data access response method in distributed storage environment
CN113141414A (en) * 2021-05-07 2021-07-20 大连理工大学 Grouped multi-chain asynchronous consensus method for block chain nodes in CNFS protocol
CN113259179A (en) * 2021-06-18 2021-08-13 杭州云智声智能科技有限公司 Byzantine fault-tolerant consensus method and system based on node scoring
CN113283892A (en) * 2021-05-26 2021-08-20 北京航空航天大学 PoSearch and PBFT fusion consensus algorithm based on voting mechanism
CN113313378A (en) * 2021-05-27 2021-08-27 北京航空航天大学 Credibility model-based block chain consensus mechanism
CN113676541A (en) * 2021-08-23 2021-11-19 南昌航空大学 Improved PBFT consensus method
CN113781218A (en) * 2021-09-03 2021-12-10 桂林电子科技大学 Grouping PBFT consensus algorithm based on feature trust
CN114157672A (en) * 2021-11-29 2022-03-08 北京航空航天大学 S-PBFT simplified consensus protocol operation and parallel optimization method based on PBFT
CN114374520A (en) * 2022-01-06 2022-04-19 上海交通大学宁波人工智能研究院 Trusted and safe lightweight block chain implementation system and method
CN114448997A (en) * 2022-01-04 2022-05-06 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN114463009A (en) * 2022-04-13 2022-05-10 成都理工大学 Method for improving transaction security of large-scale energy node
CN115811525A (en) * 2023-02-09 2023-03-17 杭州合众数据技术有限公司 Data exchange and processing method based on distributed architecture
CN116050725A (en) * 2022-11-08 2023-05-02 华北电力大学 Block chain consensus mechanism construction method for comprehensive energy system operation scheduling
CN117527834A (en) * 2024-01-04 2024-02-06 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism
CN117978547A (en) * 2024-03-29 2024-05-03 华东交通大学 TRP-PBFT consensus method, system, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718805A (en) * 2016-01-25 2016-06-29 福建北卡科技有限公司 Cloud-computing trust management method based on evaluation confidence degree
CN109767199A (en) * 2018-12-10 2019-05-17 西安电子科技大学 PBFT common recognition system and method, block chain data processing system based on prestige
CN111355810A (en) * 2020-03-17 2020-06-30 重庆邮电大学 Improved PBFT consensus method based on credit and voting mechanism
CN111414420A (en) * 2020-03-17 2020-07-14 重庆邮电大学 Improved PBFT block chain consensus method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718805A (en) * 2016-01-25 2016-06-29 福建北卡科技有限公司 Cloud-computing trust management method based on evaluation confidence degree
CN109767199A (en) * 2018-12-10 2019-05-17 西安电子科技大学 PBFT common recognition system and method, block chain data processing system based on prestige
CN111355810A (en) * 2020-03-17 2020-06-30 重庆邮电大学 Improved PBFT consensus method based on credit and voting mechanism
CN111414420A (en) * 2020-03-17 2020-07-14 重庆邮电大学 Improved PBFT block chain consensus method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KAI LEI等: "Reputation-based Byzantine Fault-Tolerance for Consortium Blockchain", 《2018 IEEE 24TH INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS (ICPADS)》, 28 February 2019 (2019-02-28), pages 604 - 611 *
徐治理 等: "一种基于信用的改进PBFT高效共识机制", 《计算机应用研究》 *
徐治理 等: "一种基于信用的改进PBFT高效共识机制", 《计算机应用研究》, vol. 36, no. 9, 30 September 2019 (2019-09-30), pages 2788 - 2791 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127267A (en) * 2021-04-30 2021-07-16 郑州师范学院 Strong-consistency multi-copy data access response method in distributed storage environment
CN113127267B (en) * 2021-04-30 2023-02-17 郑州师范学院 Strong-consistency multi-copy data access response method in distributed storage environment
CN113141414A (en) * 2021-05-07 2021-07-20 大连理工大学 Grouped multi-chain asynchronous consensus method for block chain nodes in CNFS protocol
CN113141414B (en) * 2021-05-07 2022-04-12 大连理工大学 Grouped multi-chain asynchronous consensus method for block chain nodes in CNFS protocol
CN113283892A (en) * 2021-05-26 2021-08-20 北京航空航天大学 PoSearch and PBFT fusion consensus algorithm based on voting mechanism
CN113313378B (en) * 2021-05-27 2023-01-13 北京航空航天大学 Credibility model-based block chain consensus method
CN113313378A (en) * 2021-05-27 2021-08-27 北京航空航天大学 Credibility model-based block chain consensus mechanism
CN113259179A (en) * 2021-06-18 2021-08-13 杭州云智声智能科技有限公司 Byzantine fault-tolerant consensus method and system based on node scoring
CN113676541A (en) * 2021-08-23 2021-11-19 南昌航空大学 Improved PBFT consensus method
CN113676541B (en) * 2021-08-23 2023-06-27 南昌航空大学 Improved PBFT consensus method
CN113781218A (en) * 2021-09-03 2021-12-10 桂林电子科技大学 Grouping PBFT consensus algorithm based on feature trust
CN114157672A (en) * 2021-11-29 2022-03-08 北京航空航天大学 S-PBFT simplified consensus protocol operation and parallel optimization method based on PBFT
CN114448997B (en) * 2022-01-04 2023-11-03 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN114448997A (en) * 2022-01-04 2022-05-06 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN114374520A (en) * 2022-01-06 2022-04-19 上海交通大学宁波人工智能研究院 Trusted and safe lightweight block chain implementation system and method
CN114374520B (en) * 2022-01-06 2023-11-03 上海交通大学宁波人工智能研究院 Trusted and safe lightweight block chain implementation system and method
CN114463009A (en) * 2022-04-13 2022-05-10 成都理工大学 Method for improving transaction security of large-scale energy node
CN116050725A (en) * 2022-11-08 2023-05-02 华北电力大学 Block chain consensus mechanism construction method for comprehensive energy system operation scheduling
CN115811525A (en) * 2023-02-09 2023-03-17 杭州合众数据技术有限公司 Data exchange and processing method based on distributed architecture
CN115811525B (en) * 2023-02-09 2023-06-16 杭州合众数据技术有限公司 Data exchange and processing method based on distributed architecture
CN117527834A (en) * 2024-01-04 2024-02-06 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism
CN117527834B (en) * 2024-01-04 2024-03-26 成都理工大学 Improved PBFT consensus method based on reputation scoring mechanism
CN117978547A (en) * 2024-03-29 2024-05-03 华东交通大学 TRP-PBFT consensus method, system, storage medium and equipment
CN117978547B (en) * 2024-03-29 2024-06-07 华东交通大学 TRP-PBFT consensus method, system, storage medium and equipment

Similar Documents

Publication Publication Date Title
CN112532581A (en) Improved PBFT consensus method based on consensus participation and transaction activity
CN110784346B (en) Reputation value-based PBFT consensus system and method
CN110730204B (en) Method for deleting nodes in block chain network and block chain system
CN111131209B (en) Improved efficient consensus method, system, computer device and storage medium
CN110727731B (en) Method for adding node in block chain network and block chain system
CN111355810B (en) Improved PBFT consensus method based on credit and voting mechanism
US11018980B2 (en) Data-interoperability-oriented trusted processing method and system
US11157487B2 (en) Trusted storage method and system based on directed acyclic graph structure
Camenisch et al. Internet computer consensus
CN113141414B (en) Grouped multi-chain asynchronous consensus method for block chain nodes in CNFS protocol
CN113570357B (en) Dynamic layered efficient PBFT algorithm
Jalalzai et al. Window based BFT blockchain consensus
CN114048517A (en) Dual channel consensus system and method for blockchains, computer readable storage medium
Wang et al. Byzantine fault tolerant algorithm based on vote
He et al. An improvement of consensus fault tolerant algorithm applied to alliance chain
Huang et al. Workload-based randomization byzantine fault tolerance consensus protocol
Wels Guaranteed-TX: The exploration of a guaranteed cross-shard transaction execution protocol for Ethereum 2.0.
CN116260826A (en) Bayesian-busy fault tolerance consensus method and system in supply chain tracing
CN116170155A (en) PBFT (physical bit stream) improvement-based alliance block chain consensus method
CN115276999B (en) Self-adaptive switching efficient fault-tolerant consensus method based on trust model
Tang et al. Excellent practical byzantine fault tolerance
CN114499874B (en) Bayesian-busy-family fault-tolerant consensus optimization method applied to industrial Internet
Qingshui et al. PBFT algorithm for Internet of Things
Ren et al. Distributed consensus and fault tolerance mechanisms
Chao et al. Fair Byzantine agreements for blockchains

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210319