CN111131181B - Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method - Google Patents

Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method Download PDF

Info

Publication number
CN111131181B
CN111131181B CN201911235811.9A CN201911235811A CN111131181B CN 111131181 B CN111131181 B CN 111131181B CN 201911235811 A CN201911235811 A CN 201911235811A CN 111131181 B CN111131181 B CN 111131181B
Authority
CN
China
Prior art keywords
node
nodes
block
algorithm
representative
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.)
Active
Application number
CN201911235811.9A
Other languages
Chinese (zh)
Other versions
CN111131181A (en
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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201911235811.9A priority Critical patent/CN111131181B/en
Publication of CN111131181A publication Critical patent/CN111131181A/en
Application granted granted Critical
Publication of CN111131181B publication Critical patent/CN111131181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L63/145Countermeasures against malicious traffic the attack involving the propagation of malware through the network, e.g. viruses, trojans or worms
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a block chain dynamic DPoS (dual port operation system) consensus method based on a credit mechanism and a DPBFT (dual port bidirectional forwarding table) algorithm, belonging to the technical field of block chains. The method comprises the following steps: s1, initializing the credit record of the nodes of the whole network; s2, counting the credit weight ticket number and the number of the supporting nodes of each node, selecting the nodes of TN before the ticket number is ranked to form Pool, and selecting the nodes of n before the ranking from the Pool as representative nodes; s3 represents the node and generates the random sequence through shuffling algorithm, confirms the cause of the problem and makes processing measure through DPBFT algorithm, until all the representative nodes of a sequence finish producing the block; s4 a round of block production is to be completed, and a new block output sequence is generated by the shuffling algorithm until the next operation cycle or the number of candidate nodes is less than the threshold TNM. The invention reduces the influence of malicious nodes on the system in the DPOS voting process and the block production process by introducing a credit mechanism and improves the enthusiasm of the nodes in the whole network participating in the consensus process.

Description

Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method
Technical Field
The invention belongs to the technical field of block chains, and relates to a block chain Dynamic DPoS (dual-purpose hybrid automatic transmission) consensus method based on a credit mechanism and a DPBFT (Dynamic Byzantine Fault Tolerance algorithm).
Background
The blockchain is used as a core technology for supporting the running of the bitcoin, has become a hot spot concerned at present by virtue of a decentralized structure, transparent data disclosure and non-falsification, and can share great splendid attire in the aspects of economy, cross-border payment, internet of things and the like.
The block chain platform can be divided into five layers of a network layer, a consensus layer, a data layer, an intelligent contract layer and an application layer on the whole. The great point of the block chain technology is the consensus mechanism thereof, and the mutual trust problem among the nodes is solved on the idea of decentralization. The block chain has a plurality of nodes, each node can not depend on centralized authority, and large-scale efficient cooperation can still be completed due to a consensus mechanism.
In the block chain network environment, there are servers which run normally, servers which have faults and servers which have destroyers, and the core of the consensus algorithm is to form consensus on the network state among normal nodes to avoid the fault servers or the destroyer servers. In 1999, the PBFT algorithm was proposed by Miguel Castro and Barbara Liskov, published by Practical Byzantine Fault Tolerance, using a three-phase submission protocol for solving the Byzantine problem. The algorithm also has a number of applications in private chain and federation chain scenarios where strong consistency is required. In 2008, the china smart proposed a first blockchain consensus mechanism: proof-of-work (POW) workload certification mechanism to solve the current trouble of who has accounting authority of the blockchain network. However, it is fast to find that the common recognition mechanism is energy-consuming and still causes centralization after being held by a large pool. In 2011, a digital money enthusiast named Quantum mechanics proposed the Proof-of-stamp (POS) rights and interests mechanism in Bitcointalk, which, when fully discussed, proved to be viable. POW is more than spelling, while POS is simply more than spelling who has coins in hand, and the more coins in hand, the higher the probability of obtaining accounting qualification, thus also bringing with it a centralized problem. In 8 months 2012, the cryptocurrency Sunny King issued Peercoin (Point and Point currency, PPC), and the ore digging mode thereof adopted the mode of combining POW and POS. After the currency counting, a new star currency (NVC), a black currency (BLK), and the like adopt POS. Among these coins, black coins made some optimization to the point-to-point coins, issued a POS2.0 white paper, the most important of which was to replace the age of the coin with the balance (i.e., how many coins there were in the miner's hand). In 9 months 2013, a user named BCNext initiates a post in the bitjointalk forum, declares that a brand new pure POS currency is to be issued, and later, the user named next, NXT for short, is a future currency. In 8 months 2013, the bit stock (Bitshares) project of BM started and brought a new consensus mechanism: freed Proof Of Stake (DPoS), i.e., the Proof Of authorized shares. It is a modern national agency, but not every selection area is distributed with how many representative seats, but the nodes with a certain number of tokens are used as candidates, then all nodes vote and compete, the current selection before the number of votes 101 is obtained as a representative, and the representative is responsible for generating blocks. The representatives take turns to generate blocks, and the profit (transaction fee) is divided equally. Later, another entry of BM, EOS, also adopted the consensus mechanism of DPoS, but reduced the original 101 accounting nodes to 21. However, the DPoS mechanism also has many drawbacks, such as: for malicious nodes generated during the operation of a block chain system, the DPoS has no good processing measures, only hopes that the malicious nodes are eliminated in the subsequent representative node election in a voting mode, and cannot be immediately processed after the malicious behaviors are generated; the representative nodes should theoretically be generated based on more node elections, but DPoS has no good means to deactivate the full network nodes to participate in the election process.
The PBFT algorithm was used as a fault-tolerant technique in the field of distributed computing in the early days, mainly for solving the problem of distributed network consistency, and also can be used in a block chain system, but is limited only in private chains and alliance chains, while in public chain systems, the main consensus algorithms are POW, POS and DPoS. The three recognition mechanisms have advantages and disadvantages respectively, for example, POW has complete mathematical proofs, theoretically, the most safe and relatively simple realization are realized, but the POW has great defects in energy consumption, block-out time and transaction capacity, while POS has problems of greater safety risk, great network flow pressure when electing nodes, rich and poor, and the like, while DPOS reduces the number of electing nodes to reduce the network pressure, but has the influence of controlling the network by nodes with more tokens and the inconvenience that malicious nodes need to be voted and rejected again.
Therefore, a new method for identifying blockchains is needed to reduce the influence of malicious nodes on the system during the selection of representative nodes and the generation of blocks.
Disclosure of Invention
In view of this, the present invention provides a block chain dynamic DPoS consensus method based on a reputation mechanism and a DPBFT algorithm, so as to solve the problems that a malicious node cannot be prevented and timely processed in an original block chain DPoS consensus algorithm to cause a potential safety hazard to a system, and the initiative of participation of a node in a global network in a consensus process is not high.
In order to achieve the purpose, the invention provides the following technical scheme:
a block chain dynamic DPoS common identification method based on a credit mechanism and a DPBFT algorithm introduces a node credit mechanism and a DPBFT algorithm, promotes the difficulty of becoming a representative node through the credit mechanism, thereby reducing the possibility of operating the node, confirms the irreversibility of each block through the DPBFT algorithm, dynamically adds or deletes the node without influencing the normal operation of a system in the block production process, can timely process malicious nodes and error nodes, and forcibly kick out a representative node set. The consensus method specifically comprises the following steps:
s1: during the operation period of the block chain system, each day is called an operation period, and before each operation period is started, block chain whole network node credit records and product block turns t are initialized;
s2: the nodes of the whole network use shares obtained by mortgage of the property of the held account to vote for the nodes supported by the nodes (Approval Voting), the system combines node credit records to count credit weight votes and support node numbers (the total number of the nodes voted for the nodes) obtained by each node, the nodes of TN before the votes are ranked are used as candidate nodes to form a candidate Pool, and the nodes of n before the votes are selected from the Pool as representative nodes in the process of consensus according to the support node numbers of each candidate node;
s3: generating a random sequence by representative nodes through a shuffling algorithm, then producing blocks according to the sequence, confirming the irreversibility of the produced blocks through a dynamic PBFT algorithm, and carrying out corresponding treatment measures on the condition that the current representative nodes do not produce blocks according to time or fail to produce the blocks until all the representative nodes of one sequence finish producing the blocks;
s4: and when one round of (round) block production is finished, generating a new block outlet sequence by the representative node in the sequence through a shuffling algorithm, continuing to step S2 until the next operation period or the number of candidate nodes is less than the threshold value TNM, and continuing to step S1.
Further, the step S1 specifically includes the following steps:
s11: node reputation record mirThe historical error frequency of the node i in the process of producing the block as the representative node due to the reason r is the failure of producing the block, and the reasons of the failure of producing the block are divided into two types: one is a cause set R with serious consequences1This isPart of records always participate in the calculation of reputation weights of all operation periods along with the nodes; another is a less-consequential set of causes R2This part of the record is cleared at the beginning of each run cycle, i.e. mir=0,r∈R2Only participating in the calculation of the reputation weight of the node in the current operation period, and not following the node to the next operation period;
s12: and (4) clearing the production block round t, namely t is 0.
Further, the step S2 specifically includes the following steps:
s21: in the initial stage of the running period, each share of each account allows each valid node to be voted, this process is called an advance voting (approval voting), and after the voting is finished, the system calculates the weighted votes obtained by the formula (1) for each node:
Figure BDA0002304846920000031
wherein, N represents the nodes of the whole network,
Figure BDA0002304846920000032
represents the vote number of jth node to ith node, IEiThe cumulative error weight obtained by the i node according to the reputation record is represented and is specifically calculated by the formula (2):
Figure BDA0002304846920000033
wherein R ═ R1∪R2M represents the possible reasons of the witness node i when the production block fails (such as the failure of the production block of the node, network delay, invalid PBFT confirmation and the like), andrindicates the maximum number of times a node can tolerate a failure to produce a block for reason r, QrRepresents the weight (percentage) of the cause R relative to R;
s22: the system counts the total number of the weighted votes of all the nodes, selects the nodes of TN before the total number ranking as candidate nodes to form a candidate pool, and sets the threshold value of the minimum number of the candidate nodes in the candidate pool as TNM;
s23: the system calculates the number of support nodes of each candidate pool node by formula (3):
Figure BDA0002304846920000041
wherein S isiThe total number of votes of the i node is shown, and the vote (i, j) shows whether the jth node votes, which is specifically shown in formula (4):
Figure BDA0002304846920000042
wherein L represents the threshold value of the effective votes of the node j to the node i in the statistical process, and the votes can be counted into S only when the number of the votes exceeds LiPerforming the following steps;
s24: and selecting the node which supports the node number n before the ranking as a representative node, and updating the candidate node number TN of the candidate pool.
Further, the step S3 specifically includes the following steps:
s31: the n representative nodes obtained in step S2 are shuffled in order by a shuffle algorithm (shuffle) to generate a random sequence { x }1,x2,x3,...,xn-1,xn};
S32: in sequence order, representing node xiThe block is produced, and the confirmation and error processing of the block are carried out through a DPBFT algorithm in the block production process, which specifically comprises the following steps:
s321: if node xiGenerating block, distributing the block information to other representative nodes { x }1,x2,...,xi-1,xi+1,...,xnAt position, each representative node obtains a confirmation result through a PBFT algorithm and feeds back the result to the node xiAfter the irreversibility of the node is confirmed, the node is added into a block chain, and the next node continues the current step;
s322: if node xiM for the node if no block is produced for the reason rirValue plus 1, and node xiFrom the sequence { x1,x2,x3,...,xn-1,xnIs removed, if mir>MirNode xiThe current operation period is internally invalid;
s323: if the candidate node TN in the candidate pool is not less than TNM, randomly selecting a node y from pool, and obtaining a new block output sequence { y, x1,x2,...,xi-1,xi+1,...,xnAt this time, the number of candidate nodes in the candidate pool is decreased progressively, and the next node xi+1Continuing with step S321; if TN<TNM, keeping the current block sequence unchanged, not removing error node, not adding new node, next node xi+1Step S321 is continued.
Further, the step S4 specifically includes the following steps:
s41: one representative node produces a block sequence { x1,x2,x3,...,xn-1,xnIn represents node x currentlyi=xnWhen the block production is finished, the block production is finished in one round (round), and the round number t of the block production is recorded and is added by 1; in the operation period, when one round of block production is completed and TN in the candidate pool is more than or equal to TNM, the step S3 is continued; if TN<TNM, ending the current operation period, entering the next operation period in advance, and continuing to step S2;
s42: and completing the production of the block round, ending the current operation period, entering the next operation period, and continuing to the step 2.
The invention has the beneficial effects that: the invention enhances the control strength of the representative nodes by introducing the credit mechanism of the nodes, increases the difficulty that the nodes with the malicious behaviors become the representative nodes again, and can effectively prevent the nodes with the excessive times of failed production blocks from becoming the representative nodes again during the operation of the system, thereby improving the safety of the system; by adopting the dynamic PBFT consensus algorithm, the generated block can be confirmed more quickly, malicious nodes in the running process of the system can be eliminated dynamically and timely, the adverse effect on the current round is avoided, the consensus achievement speed is improved, and the stability of the system is ensured. Compared with the prior art, the method has the following advantages:
(1) the credit value of the node is introduced as a reference index in the voting process, and the credit value does not conflict with the conventional token mechanism and cannot influence each other.
(2) The invention realizes the dynamic property of DPoS by dynamically introducing the PBFT, can immediately process malicious nodes in the consensus process, does not need to wait for next voting to eliminate the malicious nodes, and improves the security of the consensus method.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
fig. 1 is an overall flowchart of a block chain dynamic DPoS consensus method according to the present invention;
FIG. 2 is a detailed flow chart of representative node selection and dynamic production of blocks according to the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Referring to fig. 1 to fig. 2, as shown in fig. 1, a block chain dynamic DPoS consensus method based on a reputation mechanism and DPBFT is provided, and the basic idea of the method is as follows: firstly, defining the reputation value of the running period for all nodes participating in the consensus process of the blockchain system, which specifically comprises the following steps: the method comprises the steps of recording M as the number of block failure times of a representative node in a historical block production process, recording the maximum value M of the number of failure times allowed by default of a system, initially recording a reason set R of possible block failure of the representative node by the system, and distributing different weights Q according to different damage degrees caused by each reason. And then the nodes of the whole network start voting for the supported nodes, the credit vote count of each node is obtained by the initial vote count of the nodes and the credit value parameter calculation, the credit vote count is used as an effective vote count to participate in the election of the representative node, the credit value of the node is initialized after the voting is finished, and certain special records are reserved. After the representative node produces the blocks, the representative node quickly confirms each block through a DPBFT algorithm, qualified blocks are added into a block chain, invalid blocks or representative nodes which cannot produce the blocks are processed by the DPBFT algorithm, and credit behaviors of the invalid blocks or the representative nodes are recorded as reference bases for next election of the representative nodes.
The detailed flow of the block chain dynamic DPoS consensus method is shown in fig. 2, and the specific steps are implemented as follows:
step 1: in the initial stage of each operation period (RT, the default value is 1 day), acquiring block chain whole network node credit records and initialization records, wherein t is 0 representing the number of rounds of a block produced by a node in the current operation period;
in each operation period, each node initializes a credit record maintained by itself, wherein the credit is a record that the node as a representative node may cause block production or verification failure in the process of producing the block and verifying the block due to the following reasons (R): the representative node fails to generate a block (r) within a predetermined time1) The block representing node production is confirmed as an invalid block (r)2) Network problems cause the representative node to fail the production block (r)3) And others (r)4) Wherein r is1、r2Belonging to a fatal error R1The remainder being R2. Setting the severity of damage to the blockchain for each causeAnd (3) setting the weight ratio (Q in percentage), then setting the maximum value M of each problem reason which can be tolerated by each node allowed by the blockchain system, and recording the node in real time in each running period as a number M representing the failure times of the node in the production block process due to R. The details are shown in table 1 below:
TABLE 1 cause and associated weight proportion table in blockchain production
Cause of problem (R) Weight ratio (Q) Threshold value (M) Number of recordings (m)
Can not generate block 40% 10 0
DPBFT acknowledgement invalidation 30% 10 0
Network problem 20% 10 0
Others 10% 10 0
Step 2: selecting representative nodes
Before the first round of producing blocks in each operation cycle, the election of the representative node is carried out, and the election rule is as follows: firstly, recording M according to the error times of the node in the current operation period as a representative node production block stored in each node credit record, and calculating the credit weight IE of the node by combining the error reason R corresponding to the threshold M and M set by a system and the weightiCalculate IEiMeanwhile, the nodes of the whole network vote for the supported nodes through the held shares, each share of each account allows to cast a vote, and the number of votes cast by the nodes supported is
Figure BDA0002304846920000071
After the voting is finished, according to the voting situation
Figure BDA0002304846920000072
Obtaining the initial ticket number I obtained by the node IiThen combined with the reputation weight IE of the nodeiAnd obtaining the final effective reputation weight. And performing descending sorting on the credit weight votes of each node, selecting nodes of TN (total number) before ranking in the sequence as candidate nodes, adding the candidate nodes into a candidate Pool, setting a lower threshold value TNM of the candidate nodes of the Pool, and then obtaining a representative node finally participating in consensus through the voter support number vote (i, j) of each node.
The algorithm for this step is described as follows: inputting: voting record of node N of whole network
Figure BDA0002304846920000073
Cause of problem R, weight ratio QrThreshold value Mir(ii) a And (3) outputting: representing a set n of nodes. The method comprises the following specific steps:
step 1: m according to node recordirUsing the formula
Figure BDA0002304846920000074
Calculating the reputation weight of each node;
step 2: according to
Figure BDA0002304846920000075
Using the formula
Figure BDA0002304846920000076
Obtaining the initial fare obtaining number of the node;
step 3: using formula Vi=Ii*(1-IEi) Obtaining the credit weight ticket number of the node;
step 4: to ViSorting, selecting nodes of TN (total number) before the ranking of the votes as candidate nodes to form a candidate pool, and setting a threshold value TNM (total number of nodes);
step 5: to the candidate node by formula
Figure BDA0002304846920000077
Counting the number of supported people;
step 6: to SiSorting, and selecting the node n before the ticket ranking as a representative node;
step 7: the secondary algorithm is ended.
And step 3: representing node production blocks
The representative nodes obtained in step2 form a representative node set, a random sequence of representative nodes is generated through a shuffling algorithm, blocks are sequentially produced by the representative nodes through the sequence, the block generation may fail due to network delay and other problems in the process of producing the blocks, at the moment, the blocks can be confirmed and error conditions can be processed through DPBFT, and the actions are added into the node credit record. The method specifically comprises the following steps:
s31: the n representative nodes obtained in step S2 are shuffled in order by a shuffle algorithm (shuffle) to generate a random sequence { x }1,x2,x3,...,xn-1,xn};
S32: in sequence order, representing node xiThe block is produced, and the confirmation and error processing of the block are carried out through a DPBFT algorithm in the block production process, which specifically comprises the following steps:
s321: if node xiGenerating block, distributing the block information to other representative nodes { x }1,x2,...,xi-1,xi+1,...,xnAt position, each representative node obtains a confirmation result through a PBFT algorithm and feeds back the result to the node xiAfter the irreversibility of the node is confirmed, the node is added into a block chain, and the next node continues the current step;
s322: if node xiM for the node if no block is produced for the reason rirValue plus 1, and node xiFrom the sequence { x1,x2,x3,...,xn-1,xnIs removed, if mir>MirNode xiThe current operation period is internally invalid;
s323: if the candidate node TN in the candidate pool is not less than TNM, randomly selecting a node y from pool, and obtaining a new block output sequence { y, x1,x2,...,xi-1,xi+1,...,xnAt this time, the number of candidate nodes in the candidate pool is decreased progressively, and the next node xi+1Continuing with step S321; if TN<TNM, keeping the current block sequence unchanged, not removing error node, not adding new node, next node xi+1Step S321 is continued.
The step3 may be executed in a circulating manner until the current representative node sequence completely completes a product block (including a product block failure), which is called a round of product block end, and when a round of product block ends, the following condition may be determined:
if the current operation period is not finished yet, a) if TN in the candidate pool is not less than TNM, repeating the step 3; b) if TN is less than TNM, ending the current operation period in advance, entering the next operation period, and continuing the step 2;
and (5) after the current operation period is finished, entering the next operation period and continuing to the step 2.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (3)

1. A block chain dynamic DPoS consensus method based on a reputation mechanism and a DPBFT algorithm is characterized by specifically comprising the following steps:
s1: during the operation period of the block chain system, each day is called an operation period, and before each operation period is started, block chain whole network node credit records and product block turns t are initialized; the method specifically comprises the following steps:
s11: node reputation record mirThe historical error frequency of the node i in the process of producing the block as the representative node due to the reason r is the failure of producing the block, and the reasons of the failure of producing the block are divided into two types: one is a cause set R with serious consequences1The part of records always participate in the calculation of the reputation weights of all the operation periods along with the nodes; another is a less-consequential set of causes R2This part of the record is cleared at the beginning of each run cycle, i.e. mir=0,r∈R2Only participating in the calculation of the reputation weight of the node in the current operation period, and not following the node to the next operation period;
s12: zero clearing the production block round t, namely t is 0;
s2: the nodes of the whole network use shares obtained by mortgaging account property to vote in favor of the nodes supported by the nodes, the system combines node credit records to count credit weight votes and support node numbers obtained by each node, the nodes of TN before the votes are ranked are used as candidate nodes to form a candidate Pool, and the nodes of n before the votes are selected from the Pool as representative nodes in the process of common identification according to the support node numbers of each candidate node; the method specifically comprises the following steps:
s21: in the initial stage of the running period, each share of each account allows each valid node to be voted, the process is called vote casting, and after the vote casting is finished, the system calculates the weighted vote number for each node through a formula (1):
Figure FDA0003409744800000011
wherein, N represents the nodes of the whole network,
Figure FDA0003409744800000012
represents the vote number of jth node to ith node, IEiThe cumulative error weight obtained by the i node according to the reputation record is represented and is specifically calculated by the formula (2):
Figure FDA0003409744800000013
wherein R ═ R1∪R2Representing the possible reasons for the witness node i to fail in the production zone, MrIndicates the maximum number of times a node can tolerate a failure to produce a block for reason r, QrRepresents the weight of the cause R relative to R;
s22: the system counts the total number of the weighted votes of all the nodes, selects the nodes of TN before the total number ranking as candidate nodes to form a candidate pool, and sets the threshold value of the minimum number of the candidate nodes in the candidate pool as TNM;
s23: the system calculates the number of support nodes of each candidate pool node by formula (3):
Figure FDA0003409744800000014
wherein S isiThe total number of votes of the i node is shown, and the vote (i, j) shows whether the jth node votes, which is specifically shown in formula (4):
Figure FDA0003409744800000021
wherein L represents a statistical processThe threshold value of the effective votes of the middle node j to the node i can be counted into S only when the threshold value exceeds LiPerforming the following steps;
s24: selecting a node which supports n nodes before the node number ranking as a representative node, and updating the number TN of candidate nodes of the candidate pool;
s3: generating a random sequence by representative nodes through a shuffling algorithm, then producing blocks according to the sequence, confirming the irreversibility of the produced blocks through a dynamic PBFT algorithm, and carrying out corresponding treatment measures on the condition that the current representative nodes do not produce blocks according to time or fail to produce the blocks until all the representative nodes of one sequence finish producing the blocks;
s4: and when a round of block production is finished, generating a new block outlet sequence by the representative nodes in the sequence through a shuffling algorithm, continuing to step S3 until the next operation period or the number of candidate nodes is less than the threshold value TNM, and continuing to step S2.
2. The reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method of claim 1, wherein said step S3 specifically comprises the steps of:
s31: the n representative nodes obtained in step S2 are shuffled in order by a shuffling algorithm to generate a random sequence { x }1,x2,x3,...,xn-1,xn};
S32: in sequence order, representing node xiThe block is produced, and the confirmation and error processing of the block are carried out through a DPBFT algorithm in the block production process, which specifically comprises the following steps:
s321: if node xiGenerating block, distributing the block information to other representative nodes { x }1,x2,...,xi-1,xi+1,...,xnAt position, each representative node obtains a confirmation result through a PBFT algorithm and feeds back the result to the node xiAfter the irreversibility of the node is confirmed, the node is added into a block chain, and the next node continues the current step;
s322: if node xiM for the node if no block is produced for the reason rirValue plus 1, and node xiFrom the sequence { x1,x2,x3,...,xn-1,xnIs removed, if mir>MirNode xiThe current operation period is internally invalid;
s323: if the candidate node TN in the candidate pool is not less than TNM, randomly selecting a node y from pool, and obtaining a new block output sequence { y, x1,x2,...,xi-1,xi+1,...,xn}, next node xi+1Continuing with step S321; if TN<TNM, keeping the current block sequence unchanged, not removing error node, not adding new node, next node xi+1Step S321 is continued.
3. The reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method of claim 2, wherein said step S4 specifically comprises the steps of:
s41: one representative node produces a block sequence { x1,x2,x3,...,xn-1,xnIn represents node x currentlyi=xnWhen the production of the blocks is finished, recording the number of times t of the production of the blocks and adding 1 as the completion of the production of the blocks in one round; in the operation period, when one round of block production is completed and TN in the candidate pool is more than or equal to TNM, the step S3 is continued; if TN<TNM, ending the current operation period, entering the next operation period in advance, and continuing to step S2;
s42: and completing the production of the block round, ending the current operation period, entering the next operation period, and continuing to the step 2.
CN201911235811.9A 2019-12-05 2019-12-05 Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method Active CN111131181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911235811.9A CN111131181B (en) 2019-12-05 2019-12-05 Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911235811.9A CN111131181B (en) 2019-12-05 2019-12-05 Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method

Publications (2)

Publication Number Publication Date
CN111131181A CN111131181A (en) 2020-05-08
CN111131181B true CN111131181B (en) 2022-02-08

Family

ID=70496165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911235811.9A Active CN111131181B (en) 2019-12-05 2019-12-05 Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method

Country Status (1)

Country Link
CN (1) CN111131181B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756546A (en) * 2020-06-15 2020-10-09 杭州电子科技大学 Block chain consensus method based on dynamic credit mechanism in Internet of vehicles environment
CN111770103B (en) * 2020-06-30 2021-12-14 中国科学技术大学 Network node security attribute evaluation method based on block chain consensus result feedback
CN112118138B (en) * 2020-09-18 2023-06-23 上海计算机软件技术开发中心 System and method for realizing block chain consensus mechanism
CN112532587B (en) * 2020-11-04 2022-05-10 齐鲁工业大学 PeerTrust-based joint consensus evaluation method for DPos
CN112511338A (en) * 2020-11-09 2021-03-16 迅鳐成都科技有限公司 Block chain consensus network dynamic recovery method, electronic device, system and medium
CN112541821B (en) * 2020-11-18 2023-02-28 齐鲁工业大学 Entrusting equity certification consensus algorithm with dynamic trust
CN112600917B (en) * 2020-12-11 2022-05-03 重庆邮电大学 Reputation-based block chain work proving method
CN112991068B (en) * 2021-05-20 2021-08-20 卓尔智联(武汉)研究院有限公司 Method and device for sharing DPoS (certificate of authority) common identification, electronic equipment and storage medium
CN113313378B (en) * 2021-05-27 2023-01-13 北京航空航天大学 Credibility model-based block chain consensus method
CN113343311A (en) * 2021-06-04 2021-09-03 北京邮电大学 Block chain consensus method and system based on reputation model and digital signature mechanism
CN113256149A (en) * 2021-06-11 2021-08-13 武汉龙津科技有限公司 Block chain node reputation adjusting method and device, electronic equipment and storage medium
CN113407632A (en) * 2021-06-26 2021-09-17 南京搜文信息技术有限公司 PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
CN114189522B (en) * 2021-10-15 2024-04-16 敏博科技(武汉)有限公司 Priority-based blockchain consensus method and system in Internet of vehicles
CN114363352B (en) * 2022-01-05 2023-08-15 青岛理工大学 Cross-chain interaction method of Internet of things system based on block chain
CN114338053B (en) * 2022-03-16 2022-05-13 成都信息工程大学 Dynamic reputation-based block chain consensus method and system
CN116112250A (en) * 2023-01-18 2023-05-12 广东开放大学(广东理工职业学院) PBFT consensus algorithm based on DPoS and dynamic credit mechanism

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node
CN109389541A (en) * 2018-08-21 2019-02-26 广东工业大学 Public good fund management method based on alliance's chain
CN109767199A (en) * 2018-12-10 2019-05-17 西安电子科技大学 PBFT common recognition system and method, block chain data processing system based on prestige
CN110138597A (en) * 2019-04-17 2019-08-16 上海大学 Based on the block chain DPOS of credit score and node clustering common recognition mechanism improved method
CN110351067A (en) * 2019-06-12 2019-10-18 南京理工大学 For the block chain common recognition mechanism of principal and subordinate's multichain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10984134B2 (en) * 2017-07-14 2021-04-20 Microsoft Technology Licensing, Llc Blockchain system for leveraging member nodes to achieve consensus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node
CN109389541A (en) * 2018-08-21 2019-02-26 广东工业大学 Public good fund management method based on alliance's chain
CN109767199A (en) * 2018-12-10 2019-05-17 西安电子科技大学 PBFT common recognition system and method, block chain data processing system based on prestige
CN110138597A (en) * 2019-04-17 2019-08-16 上海大学 Based on the block chain DPOS of credit score and node clustering common recognition mechanism improved method
CN110351067A (en) * 2019-06-12 2019-10-18 南京理工大学 For the block chain common recognition mechanism of principal and subordinate's multichain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于信誉的动态授权PBFT共识机制;李俊清等;《软件》;20190702;第40卷(第5期);全文 *

Also Published As

Publication number Publication date
CN111131181A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111131181B (en) Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method
CN109639837B (en) Block chain DPoS (distributed denial of service) consensus method based on trust mechanism
CN112039964B (en) Node reputation consensus method based on block chain
CN106445711B (en) A kind of Byzantine failure tolerance common recognition method applied to block chain
CN114189421B (en) Leader node election method, system, storage medium and equipment
CN108492103A (en) A kind of alliance&#39;s block chain common recognition method
CN109784926A (en) A kind of virtual plant internal market method of commerce and system based on alliance&#39;s block chain
Solnick Gubernatorial elections in Russia, 1996-1997
Eichengreen et al. The economic impact of European integration
CN111988137B (en) DPoS (dual port service) consensus method and system based on threshold signature and fair reward
CN111090892A (en) Block chain consensus method and device based on VRF and threshold signature
CN111082943B (en) Efficient block chain consensus method
CN111010278B (en) High-fault-tolerance layering consensus method based on DPoS
Abbas et al. Analysis of polkadot: Architecture, internals, and contradictions
CN110138597A (en) Based on the block chain DPOS of credit score and node clustering common recognition mechanism improved method
CN110602705A (en) Improved PBFT consensus method suitable for Internet of vehicles environment
CN113407632A (en) PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
CN110928951A (en) Data sharing and arbitration method based on block chain
CN114362987A (en) Distributed voting system and method based on block chain and intelligent contract
Hisaki Is group lending a good enforcement scheme for achieving high repayment rates?: Evidence from field experiments in Vietnam
CN111461793A (en) Integral chain consensus method based on activity probability selection
CN113038427B (en) Block chain cross-region authentication method based on credit mechanism and DPOS
CN111563278B (en) Improved stock right authorization proving method
CN112599249A (en) Medical data security consensus method based on credit rating classification
CN114745135A (en) Block chain system for energy transaction based on V-raft consensus algorithm

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
GR01 Patent grant
GR01 Patent grant