CN112541821B - Entrusting equity certification consensus algorithm with dynamic trust - Google Patents
Entrusting equity certification consensus algorithm with dynamic trust Download PDFInfo
- Publication number
- CN112541821B CN112541821B CN202011297188.2A CN202011297188A CN112541821B CN 112541821 B CN112541821 B CN 112541821B CN 202011297188 A CN202011297188 A CN 202011297188A CN 112541821 B CN112541821 B CN 112541821B
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- witness
- block
- value
- 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
Links
- 238000011156 evaluation Methods 0.000 claims abstract description 47
- 238000012795 verification Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000012790 confirmation Methods 0.000 claims description 4
- 125000004122 cyclic group Chemical group 0.000 claims description 3
- 238000005065 mining Methods 0.000 claims description 3
- 238000000638 solvent extraction Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- Strategic Management (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Health & Medical Sciences (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Data Mining & Analysis (AREA)
- Technology Law (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a delegation rights and interests certification consensus algorithm with dynamic trust, which relates to the technical field of block chains and adopts the following scheme for improving the reliability and privacy of consensus nodes on the basis of realizing distributed node consensus: the block chain network defines a trust value attribute and an evaluation value attribute for the nodes and initializes the trust value and the evaluation value of each node; calculating a local trust value for the related nodes based on the trust model and the historical transaction record in the last election period, and further calculating a global trust value of each node; an evaluation criterion which comprehensively considers the number of votes and the trust value is introduced, an evaluation value is calculated for each node, and a witness node is selected to generate a witness node list; and (4) the witness nodes in the witness node list generate a block in turn, ring signature is carried out on the block message, the other witness nodes verify the ring signature and the validity and validity of the block, and whether the block achieves consensus or not is confirmed according to a verification result.
Description
Technical Field
The invention relates to the technical field of block chains, in particular to a delegation rights and interests certification consensus algorithm with dynamic trust.
Background
The blockchain is used as the bottom layer technology of the bitcoin, is essentially a distributed system and comprises various technologies such as cryptography, consensus algorithm, distributed storage, intelligent contracts and the like. It has a number of important properties, such as non-tamper-ability, traceability, decentralization, transparency, etc. The block chain realizes the safe point-to-point transaction between nodes under the condition of no trusted third party by means of the integration and innovation of various technologies, so that the problems of high cost, low efficiency and the like caused by the traditional transaction are solved. One of its key issues is how to ensure agreement between mutually untrusted nodes. The consensus algorithm is an important component of the block chain, the consistency problem can be solved, and the efficiency of the consensus algorithm directly determines the performance of the block chain.
In the blockchain, the consensus algorithm can enable distributed nodes in the distributed system to negotiate whether a transaction or a block is valid, so that a consensus is achieved among the nodes, and valid data is finally written into the blockchain. Nowadays, various consensus algorithms exist, such as a workload certification consensus algorithm, a rights and interests certification consensus algorithm, a delegation rights and interests certification consensus algorithm, and a practical Byzantine fault-tolerant consensus algorithm. The criteria for selecting the consensus algorithm are different for different requirements and application scenarios, but the efficiency and the safety of consensus are important factors for measuring the quality of the consensus mechanism.
Although the existing delegation rights proof consensus algorithm has drastically reduced the time cost of generating a block compared to the workload proof consensus algorithm, the rights proof consensus algorithm. However, due to the mechanism that each witness node generates the block in turn, the identity of the witness is already known, and moreover, the witness node is always fixed and has the right to generate the block for a long time, which will make the block chain system face some threats, such as the witness nodes mutually colluding to initiate a collusion attack.
Therefore, how to further improve the reliability and privacy of the consensus node on the basis of realizing the distributed node consensus is a technical problem to be solved.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides a delegation rights and interests certification consensus algorithm with dynamic trust to solve the problem of how to improve the reliability and the privacy of consensus nodes on the basis of realizing distributed node consensus.
The invention discloses a delegation rights and interests certification consensus algorithm with dynamic trust, which adopts the following technical scheme for solving the technical problems:
a delegation rights certification consensus algorithm with dynamic trust, the implementation process of the algorithm comprises:
step S100, defining a trust value attribute and an evaluation value attribute for a node by the block chain network, and initializing the trust value and the evaluation value of each node in the block chain network;
step S200, calculating a local trust value for a related node by the blockchain network based on a trust model and a historical transaction record in the last election period, and further calculating a unique global trust value of each node in the current election period;
step S300, based on an evaluation criterion of comprehensively considering the number of votes and the trust value, the block chain network calculates an evaluation value for each node, and further selects a witness node according to the evaluation values of all nodes in the block chain network to generate a witness node list;
step S400, the witness nodes in the witness node list generate a block in turn, ring signature is carried out on block messages, the block messages are broadcast to the witness node list, the other witness nodes check the ring signature and the validity and effectiveness of the block, if more than 50% of the witness nodes pass the check and reply a confirmation message, the block achieves consensus, the block is added into a block chain network, and otherwise, the step is executed again when the witness node in the witness node list turns to the next witness node.
Further, in the implementation process of the algorithm, each election period needs to be selected again, when the election period is ended and the next election period is entered, the block chain network circularly performs the operations from step S200 to step S400, and performs the calculation of the unique global trust value, the calculation of the evaluation value, the selection of the witness node and the block output of the witness node again.
Optionally, when step S100 is executed, the blockchain network defines a Trust value attribute Trust and an Evaluation value attribute Evaluation for the node, initializes the Trust value t and the Evaluation value e of each node in the blockchain network based on the following formula,
e=0,
where n is the number of nodes in the blockchain network, and the superscript 1 of t indicates the first election period.
Further optionally, step S200 is executed, and the blockchain network calculates a local trust value c for the relevant node based on the trust model and the historical transaction records in the last election period r-1 ij And then calculating the unique global trust value of each node in the current election periodThe specific operation is as follows:
step S210, in the block chain network, dividing n nodes according to the transaction relation among the nodes, and aiming at a given node i If any node j Receiving a message from a node i Transaction of (2), then node j Partitioning into sets FDTxNeodes i Otherwise, node is used j Division into sets Non-FDTxNeods i At the same time, if any node j With a pointing node i The transaction of (2) is divided into sets of RDTxNudes i Wherein i, j belongs to {1,2,3, \8230:, n }, and i is not equal to j;
step S220, for node i And node j Initializing a local trust value c ij =0;
Step S230, for node i In particular, when and node j When the forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i Direction node j And the number of valid transactions sat (i, j) and the number of invalid transactions unsat (i, j), and calculating an absolute number of valid transactions s ij To obtain a node i To node j Local trust value of c ij The absolute number of valid transactions s ij And a local trust value c ij The expression of (c) is as follows:
s ij =sat(i,j)-unsat(i,j),
wherein i belongs to {1,2,3, \8230;, n }, j takes the value of the set FDTxNeodes i All the nodes in (1);
step S240, for node i To say, when and node j When no forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i To node j All transaction paths and intermediate node of k Combined with local trust value c ij To calculate node i Node pair j Local trust value of c ij Local trust value c ij The expression of (a) is as follows:
wherein, k belongs to {1,2,3,.., n }, k values are all intermediate nodes, and if k values are FDTxNeodes i ∩RDTxNodes j All the nodes in the table are calculated according to the expression to obtain the local trust value c ij Otherwise, iteratively selecting intermediate node k And on the local trust value c ij Performing iterative computation;
step S250, node for block chain network i Based on node u To node i Local trust value of c ui And node in last election period r-1 u Global trust value ofObtaining the unique global trust value of each node in the current election period rThe global trust valueThe expression of (c) is as follows:
wherein i, u ∈ {1,2, 3.., n }, and r takes a value from the second election period.
Further optionally, when step S300 is executed, the blockchain network performs the evaluation criterion f for each node based on a comprehensive consideration of the number of votes and the trust value i Calculating an evaluation value e i And according to the evaluation values e of all nodes in the block chain network u The witness node is selected to generate a witness node list Witnessnodes]The method comprises the following specific operations:
step S310, defining and initializing an empty witness node list Witnessnodes [ ] and a votes collection votes [ ];
step S320, for any node i If the node is authorized based on the self rights and interests j Voting is performed, then the node j The number of votes obtained is equal to the sum of the number of coins held by the voting node, and the expression of the number of votes obtained is as follows:
votes j =∑coin(node i ),
wherein j is an element {1,2, 3.., n }, and n is the number of nodes in the blockchain network, coin (node) i ) Representing a node i Number of coins held, node i Taking values as all pairs of nodes j A node which has voted;
step S330, for n nodes of the block chain network i Based on a total consideration of votes i And the global trust value in the current election period rTo calculate the latest evaluation value e i The evaluation criterion f and the evaluation value e i The expression of (a) is as follows:
wherein,i ∈ {1,2,3, \ 8230;, n }, n being the number of nodes in the blockchain network, votes i Representing a node i Obtaining the number of votes;
step S340, the nodes are sorted according to the evaluation values e [ ] of all the nodes, the first N nodes are selected to become witness nodes, and a witness node list Witnessnodes [ ] is added.
Further optionally, when step S400 is executed, the witness nodes in the witness node list generate a block in turn, and perform ring signature on the block message, where the specific operations are as follows:
step S411, the block chain network selects a large prime number p and a hash function H: {0,1} * →{0,1} n One random number alpha epsilon Z p * And calculate g 0 =g α mod p to obtain a common parameter params, which is expressed as follows:
params=<G 1 ,G 2 ,g,g 0 ,p,e>,
wherein, G 1 ,G 2 Are two cyclic groups of order p,is a generator, e: G 1 ×G 1 →G 2 Is a bilinear pairing;
step S412, witness node list Witnessnodes [ 2 ]]All witness nodes in (1) form a ring by self-organization, a witness node i Address of the unique Address information i As its identity information ID i Composition identity information set R = { ID = { ID } 1 ,ID 2 ,…,ID n };
Step S413, aiming at witness node list Witnessnodes [ 2 ]]All witness nodes in (1) select random numbersNode as witness i And calculatesAs a witness node node i Wherein i ∈ {1,2,3, \8230;, n }, n is the number of nodes in the blockchain network;
step S414, witness node list Witnessnodes [ 2 ]]The witness nodes in the system have the right of generating blocks in turn, and the node of the current block s Generating a block, and generating a block message m, wherein the expression of the block message m is as follows:
m=<HASH(PreBlock),TimeStamp,D,nonce,MerkleTreeRoot,Txs>,
the HASH (prebock) represents the HASH of the previous block, the TimeStamp represents a TimeStamp, the D represents the mining difficulty value set by the system, the nonce represents a random value, the MerkLeTreeroot represents the Merkle tree root, and the Txs represents some transactions;
step S415, the node of the current block output node s Generating a ring signature sigma using a ring signature scheme for the entire block of information rs The ring signature σ rs The generation process of (2) is as follows:
(1) Calculate H = H (m | | | R),
(2) For i e {1,2,. N } \ s, s representing the current out-blocking node, z is chosen randomly i ∈Z p * For i e {1, 2.. Times, n }, r is randomly selected i ∈Z p * ,
(5) Outputting a Ring signature σ for a Block message m rs ={(σ 1 ,r 1 ),(σ 2 ,r 2 ),..,(σ n ,r n ),m}。
Further optionally, when step S400 is executed, the signed block message is broadcast to the witness node list, and the other witness nodes check the validity and validity of the ring signature and the block, which specifically includes:
step S421, calculate H = H (m | | | R);
if so, the signature is accepted,
if the signature is not true, the signature is not accepted,
the number of witness nodes that accepted the signature and returned the confirmation message is then counted.
Preferably, the trust model is an EigenTrust trust model, and the EigenTrust trust model can be applied to a P2P network and can safely and effectively calculate the trust value of a peer point in the network.
Compared with the prior art, the trust authority certification consensus algorithm with dynamic trust has the following beneficial effects:
(1) On one hand, the invention introduces EigenTrust trust model and the transaction history record in the last election period, can safely and effectively calculate the global trust value of all nodes in the block chain network, and the global trust value dynamically changes along with the change of the history transaction record in the last election period, on the other hand, introduces the evaluation criterion of comprehensively considering the vote number and the trust value, and selects the prover node by calculating the evaluation value of each node, thereby ensuring that the node with higher trust degree and recognition degree has greater election advantages and improving the reliability of the prover node;
(2) In the process of carrying out ring signature on a block message, unique address information of a witness node is added as identity information, so that only a verifier knowing the identity information of all witness nodes can check the ring signature, and meanwhile, the verifier can only verify whether the ring signature is from the inside of a ring, and cannot effectively determine the specific identity of a signer, namely, only can verify whether the ring signature is from the witness nodes in a witness list, and cannot determine which witness node, thereby ensuring the privacy and unconditional anonymity of the signer;
(3) The number of nodes included in the block chain network is not limited, the number of selected witness nodes can be set, and under the condition that the number of the block chain network nodes is large, the number of the nodes participating in consensus can be relatively small, so that certain expandability is achieved.
Drawings
FIG. 1 is a flow chart of a method according to a first embodiment of the present invention.
Detailed Description
In order to make the technical solutions, technical problems to be solved, and technical effects of the present invention more clearly apparent, the following description clearly describes the technical solutions of the present invention in combination with specific embodiments.
The first embodiment is as follows:
with reference to fig. 1, this embodiment provides a delegation rights and interests certification consensus algorithm with dynamic trust, where the implementation process of the algorithm includes:
step S100, the block chain network defines a trust value attribute and an evaluation value attribute for the nodes, and initializes the trust value and the evaluation value of each node in the block chain network, specifically:
in the step, the defined Trust value attribute Trust and Evaluation value attribute Evaluation are used for initializing the Trust value t and the Evaluation value e of each node in the block chain network based on the following formula,
e=0,
where n is the number of nodes in the blockchain network, and the superscript 1 of t indicates the first election period.
Step S200, the block chain network calculates a local trust value c for the related node based on historical transaction records in an election period r-1 on the EigenTrust trust model ij And then calculating the unique global trust value of each node in the current election periodThe specific operation is as follows:
step S210, in the block chain network, dividing n nodes according to the transaction relation among the nodes, and aiming at a given node i If any node j Receiving a message from a node i Transaction of (2), then node j Partitioning into sets FDTxNeodes i Otherwise, node is used j Division into sets Non-FDTxNeods i At the same time, if any node j With pointing node i The transaction of (2) is divided into sets of RDTxNudes i Wherein i, j belongs to {1,2,3, \8230:, n }, and i is not equal to j;
step S220, for node i And node j Initializing a local trust value c ij =0;
Step S230, for node i In particular, when and node j When the forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i Direction node j And the number of valid transactions sat (i, j) and the number of invalid transactions unsat (i, j), and calculating an absolute number of valid transactions s ij To obtain a node i To node j Local trust value of c ij The absolute number of valid transactions s ij And a local trust value c ij The expression of (c) is as follows:
s ij =sat(i,j)-unsat(i,j),
wherein i belongs to {1,2,3, \8230;, n }, j takes the value of the set FDTxNeodes i All the nodes in (1);
step S240, for node i In particular, when and node j When no forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i To node j All transaction paths and intermediate node of (2) k Combined with local trust value c ij To calculate node i Node pair j Local trust value of c ij Local trust value c ij The expression of (a) is as follows:
wherein k belongs to {1,2,3, \8230;, n }, k takes the value of all intermediate nodes, and if k takes the value of FDTxNeodes i ∩RDTxNodes j All the nodes in the table are calculated according to the expression to obtain the local trust value c ij Otherwise, iteratively selecting intermediate node k And for the local trust value c ij Performing iterative computation;
step S250, node for block chain network i Based on node u Node pair i Local trust value of c ui And node in the last election period r-1 u Global trust value ofObtaining the unique global trust value of each node in the current election period rThe global trust valueThe expression of (a) is as follows:
wherein i, u ∈ {1,2,3, \8230;, n }, r take values from the second election period.
Step S300, based on an evaluation criterion f comprehensively considering the number of votes and the trust value, the block chain network is used for each node i Calculating an evaluation value e i And according to the evaluation values e of all nodes in the block chain network u The witness node is selected to generate a witness node list Witnessnodes]The method comprises the following specific operations:
step S310, defining and initializing an empty witness node list Witnessnodes [ ] and a votes collection votes [ ];
step S320, for any node i If the authorized node is based on the self rights j Voting is performed, then the node j The number of votes obtained is equal to the sum of the number of coins held by the voting node, and the expression of the number of votes obtained is as follows:
votes j =∑coin(node i ),
wherein j is an element {1,2, 3.., n }, n is the number of nodes in the blockchain network, coin (node) i ) Representing a node i Number of coins held, node i Take value as all pairs of nodes j A node that has voted;
step S330, for n nodes of the block chain network i Based on a total consideration of votes i And the global trust value in the current election period rTo calculate the latest evaluation value e i The evaluation criterion f and the evaluation value e i The expression of (c) is as follows:
where i ∈ {1,2, 3., n }, n is the number of nodes in the blockchain network, votes i Representing a node i Obtaining the number of votes;
step S340, sequencing the nodes according to the evaluation values e [ ] of all the nodes, selecting the first N nodes as witness nodes, and adding a witness node list Witnessnodes [ ].
Step S400, the witness nodes in the witness node list generate a block in turn, ring signature is carried out on block messages, the block messages are broadcast to the witness node list, the other witness nodes check the ring signature and the validity and effectiveness of the block, if more than 50% of the witness nodes pass the check and reply a confirmation message, the block achieves consensus, the block is added into the block chain network, and otherwise, the next witness node in the witness node list is turned to execute the step again.
In the process of executing the step S400, the witness nodes in the witness node list generate a block in turn, and perform ring signature on the block message, specifically:
step S411, the block chain network selects a large prime number p and a hash function H: {0,1} * →{0,1} n A random numberAnd calculate g 0 =g α mod p, resulting in a common parameter params, whose expression is as follows:
params=<G 1 ,G 2 ,g,g 0 ,p,e>,
wherein G is 1 ,G 2 Are two cyclic groups of order p,is a generator, e: G 1 ×G 1 →G 2 Is a bilinear pairing;
step S412, witness node list Witnessnodes [ 2 ]]All witness nodes in (1) form a ring by self-organization, a witness node i Address of the unique Address information i As its identity information ID i Forming an identity information set R = { ID = { [ ID ] 1 ,ID 2 ,...,ID n };
Step S413, for witness node list Witnessnodes]All witness nodes in (1) select random numbersNode as witness i And calculatesNode as witness i The public key of (a), wherein,i belongs to {1,2,3,. And n }, wherein n is the number of nodes in the blockchain network;
step S414, witness node list Witnessnodes 2]The witness nodes in the system have the right of generating blocks in turn, and the node of the current block s Generating a block, and generating a block message m, wherein the expression of the block message m is as follows:
m=<HASH(PreBlock),TimeStamp,D,nonce,MerkleTreeRoot,Txs>,
the HASH (prebock) represents the HASH of the previous block, the TimeStamp represents a TimeStamp, the D represents the mining difficulty value set by the system, the nonce represents a random value, the MerkLeTreeroot represents the Merkle tree root, and the Txs represents some transactions;
step S415, the node of the current block output node s Generating a ring signature sigma for the whole block information by using a ring signature scheme rs The ring signature σ rs The generation process of (a) is as follows:
(1) Calculate H = H (m | | | R),
(2) For i ∈ {1, 2., n } \ s, s representing the current out-of-block node, z is chosen randomly i ∈Z p * For i e {1, 2.. Times, n }, r is randomly selected i ∈Z p * ,
(3) For i ∈ {1, 2., n } \ s, s representing the current out-of-block node, the computation is performed
(5) Outputting a Ring signature σ for a Block message m rs ={(σ 1 ,r 1 ),(σ 2 ,r 2 ),..,(σ n ,r n ),m}。
In the process of executing the step S400, the signed block message is broadcast to the witness node list, and the other witness nodes verify the validity and validity of the ring signature and the block, specifically:
step S421, calculating H = H (m | | R);
if the signature is true, the signature is accepted,
if not, the signature is not accepted.
In this embodiment, each election period needs to be performed again with the selection of the witness node, and when the election period is ended and the next election period is entered, the block chain network circularly performs the operations from step S200 to step S400, and performs the calculation of the unique global trust value, the calculation of the evaluation value, the selection of the witness node, and the block output of the witness node again.
In conclusion, the trust certification consensus algorithm with dynamic trust can improve the reliability of the prover node, ensure the privacy and unconditional anonymity of the signer,
the principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.
Claims (4)
1. A delegation rights certification consensus algorithm with dynamic trust, the implementation process of the algorithm comprises:
step S100, the block chain network defines a Trust value attribute Trust and an Evaluation value attribute Evaluation for the nodes, initializes the Trust value t and the Evaluation value e of each node in the block chain network based on the following formula,
e=0,
wherein n is the number of nodes in the blockchain network, and the superscript 1 of t represents a first election period;
step S200, the block chain network calculates a local trust value c for the related node based on the trust model and the historical transaction record in the last election period r-1 ij And then calculating the unique global trust value of each node in the current election periodThe specific operation is as follows:
step S210, in the block chain network, dividing n nodes according to the transaction relation among the nodes, and aiming at a given node i If any node j Receiving a message from a node i Transaction of (2), then node j Partitioning into sets FDTxNeodes i Else, node j Division into sets Non-FDTxNeods i At the same time, if any node j With pointing node i The transaction of (2) is divided into sets of RDTxNudes i Where i, j belongs to {1,2,3, \8230;, n }, and i ≠ j,
step S220, for node i And node j Initializing a local trust value c ij =0,
Step S230, for node i In particular, when and node j When the forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i Direction node j And the number of valid transactions sat (i, j) and the number of invalid transactions unsat (i, j), and calculating an absolute number of valid transactions s ij To obtain a node i Node pair j Local trust value of c ij The absolute number of valid transactions s ij And a local trust value c ij The expression of (a) is as follows:
s ij =sat(i,j)-unsat(i,j),
wherein i belongs to {1,2,3, \8230;, n }, j takes the value of the set FDTxNeodes i Is determined by the node(s) in (c),
step S240, for node i In particular, when and node j When no forward direct transaction exists, inquiring the slave node according to the transaction history record in the last election period r-1 i To node j All transaction paths and intermediate node of (2) k Calculating node i Node pair j Local trust value of c ij Local trust value c ij The expression of (a) is as follows:
wherein, k belongs to {1,2,3,.., n }, k values are all intermediate nodes, and if k values are FDTxNeodes i ∩RDTxNodes j All the nodes in the system are calculated according to the expression to obtain a local trust value c ij Otherwise, iteratively selecting intermediate node k And for the local trust value c ij An iterative calculation is performed and the result is,
step S250, aiming at n node of block chain network i Based on node u Node pair i Local trust value of c ui And node in last election period r-1 u Global trust value ofObtaining the unique global trust value of each node in the current election period rThe global trust valueThe expression of (c) is as follows:
wherein i and u are in the range of {1,2, 3.., n }, and r is taken as a value from the second election period;
step S300, based on an evaluation criterion f comprehensively considering the number of votes and the trust value, providing each node with a result of evaluation i Calculating an evaluation value e i And based on the evaluation values e [ 2 ] of all nodes in the block chain network]The witness node is selected to generate a witness node list Witnessnodes [ 2 ]]The method comprises the following specific operations:
step S310, an empty witness node list Witnessnodes [ ] and a votes collection votes [ ] are defined and initialized,
step S320, for any node i If the authorized node is based on the self rights j Voting is performed, then the node j The number of votes obtained is equal to the sum of the number of coins held by the voting nodes, and the expression of the number of votes obtained is as follows:
votes j =∑coin(node i ),
wherein j is an element {1,2, 3.., n }, and n is the number of nodes in the blockchain network, coin (node) i ) Representing a node i Number of coins held, node i Take value as all pairs of nodes j The node that has made the vote may be,
step S330, aiming at n node of block chain network i Based on a total consideration of votes i And the global trust value in the current election period rTo calculate the latest evaluation value e i The evaluation criterion f and the evaluation value e i The expression of (a) is as follows:
wherein i belongs to {1,2,3,. Eta., n }, n isNumber of nodes, votes, in a blockchain network i Representing a node i The number of the obtained votes is counted,
step S340, sequencing the nodes according to the evaluation values e [ ] of all the nodes, selecting the first N nodes as witness nodes, and adding a witness node list Witnessnodes [ ];
step S400, (1) the witness nodes in the witness node list generate a block in turn, and perform ring signature on a block message, wherein the specific operation is as follows:
step S411, the block chain network selects a large prime number p and a hash function H: {0,1} * →{0,1} n A random numberAnd calculate g 0 =g α mod p, resulting in a common parameter params, whose expression is as follows:
params=<G 1 ,G 2 ,g,g 0 ,p,e>,
wherein G is 1 ,G 2 Are two cyclic groups of order p,is a generator, e: G 1 ×G 1 →G 2 Is a bilinear pairing;
step S412, witness node list Witnessnodes [ 2 ]]All the witness nodes in the system self-organize to form a ring, the witness node i Address of the unique Address information i As its identity information ID i Composition identity information set R = { ID = { ID } 1 ,ID 2 ,...,ID n },
Step S413, for witness node list Witnessnodes]All witness nodes in (1) select random numbersNode as witness i And calculatesNode as witness i Wherein i ∈ {1,2, 3.., n }, n being the number of nodes in the blockchain network;
step S414, witness node list Witnessnodes 2]The witness nodes in the system have the right to generate blocks in turn, and the node of the current block s Generating a block, and generating a block message m, wherein the expression of the block message m is as follows:
m=<HASH(PreBlock),TimeStamp,D,nonce,MerkleTreeRoot,Txs>,
wherein HASH (PreBlock) represents the HASH of the previous block, timeStamp represents a TimeStamp, D represents a mining difficulty value set by a system, nonce represents a random value, merkLeTreeRoot represents a Merkle tree root, txs represents some transactions,
step S415, the node of the current block output node s Generating a ring signature sigma for the whole block information by using a ring signature scheme rs The ring signature σ rs The generation process of (2) is as follows:
(1) Calculate H = H (m | | | R),
(2) For i ∈ {1, 2., n } \ s, s representing the current out-of-block node, z is chosen randomly i ∈Z p * For i e {1, 2.. Times, n }, r is randomly selected i ∈Z p * ,
(5) Outputting a Ring signature σ for a Block message m rs ={(σ 1 ,r 1 ),(σ 2 ,r 2 ),..,(σ n ,r n ),m};
(2) And simultaneously broadcasting the block of information to a witness node list, verifying the legality and validity of the ring signature and the block by other witness nodes, if more than 50% of the witness nodes pass the verification and reply a confirmation message, achieving the consensus of the block, adding the block into a block chain network, and otherwise, turning to the next witness node in the witness node list to execute the step again.
2. The algorithm of claim 1, wherein in the implementation process of the algorithm, each election period needs to re-select the prover node, and when the election period is ended and enters the next election period, the block chain network cyclically performs the operations from step S200 to step S400, and re-performs the calculation of the unique global trust value, the calculation of the evaluation value, the selection of the prover node, and the block export of the prover node.
3. The delegation rights and interests certification consensus algorithm with dynamic trust according to claim 1, wherein in step S400, the signed block message is broadcasted to the prover node list, and the other prover nodes verify the validity and validity of the ring signature and the block, specifically:
step S421, calculating H = H (m | | R);
if so, the signature is accepted,
if not, the signature is not accepted.
4. A delegation rights certification consensus algorithm with dynamic trust according to claim 1, the trust model is characterized by being an EigenTrust trust model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011297188.2A CN112541821B (en) | 2020-11-18 | 2020-11-18 | Entrusting equity certification consensus algorithm with dynamic trust |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011297188.2A CN112541821B (en) | 2020-11-18 | 2020-11-18 | Entrusting equity certification consensus algorithm with dynamic trust |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112541821A CN112541821A (en) | 2021-03-23 |
CN112541821B true CN112541821B (en) | 2023-02-28 |
Family
ID=75014269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011297188.2A Active CN112541821B (en) | 2020-11-18 | 2020-11-18 | Entrusting equity certification consensus algorithm with dynamic trust |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112541821B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113132401B (en) * | 2021-04-25 | 2023-06-27 | 深圳大学 | Block chain-based data processing method and device |
CN114386095B (en) * | 2021-12-28 | 2022-09-16 | 中国铁道科学研究院集团有限公司 | Railway signal equipment safety authentication data storage system based on alliance chain |
CN114513517B (en) * | 2022-01-21 | 2024-04-09 | 南京理工大学 | P2P network trust method based on EigenTrust |
CN115378598B (en) * | 2022-05-25 | 2024-05-03 | 北京航空航天大学 | Multi-chain extensible secret election method based on one-time linkable ring signature |
CN115208578B (en) * | 2022-07-07 | 2024-06-25 | 西安电子科技大学 | Unmanned aerial vehicle cluster information consistency sharing method based on blockchain |
CN116074310B (en) * | 2022-10-10 | 2024-04-26 | 重庆邮电大学 | Block chain consensus method based on improved entrusting right evidence of ring signature |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819022A (en) * | 2019-01-11 | 2019-05-28 | 华侨大学 | A kind of block chain common recognition method based on credit appraisal |
CN110198213A (en) * | 2019-04-01 | 2019-09-03 | 上海能链众合科技有限公司 | A kind of system based on privacy sharing random number common recognition algorithm |
CN111131181A (en) * | 2019-12-05 | 2020-05-08 | 重庆邮电大学 | Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method |
-
2020
- 2020-11-18 CN CN202011297188.2A patent/CN112541821B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819022A (en) * | 2019-01-11 | 2019-05-28 | 华侨大学 | A kind of block chain common recognition method based on credit appraisal |
CN110198213A (en) * | 2019-04-01 | 2019-09-03 | 上海能链众合科技有限公司 | A kind of system based on privacy sharing random number common recognition algorithm |
CN111131181A (en) * | 2019-12-05 | 2020-05-08 | 重庆邮电大学 | Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method |
Non-Patent Citations (3)
Title |
---|
DPOS共识机制的改进方案;高迎, 谭学程;《计算机应用研究》;20201031;全文 * |
Hybrid consensus algorithm based on modified Proof-of-Probability and DPoS;Wang BC, Li ZT and Li HB;《Future Internet》;20200724;全文 * |
基于委托权益证明的区块链共识算法改进研究;龙锐;《中国优秀硕士学位论文全文数据库 信息科技辑》;20200915;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112541821A (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112541821B (en) | Entrusting equity certification consensus algorithm with dynamic trust | |
CN108418689B (en) | Zero-knowledge proof method and medium suitable for block chain privacy protection | |
JP7202358B2 (en) | A computer-implemented method of generating a threshold vault | |
JP7301039B2 (en) | Threshold digital signature method and system | |
EP3685331A1 (en) | Smart contract execution using distributed coordination | |
JP2023109981A (en) | Computer-implemented system and method for authorizing blockchain transaction with low-entropy password | |
CN110730963B (en) | System and method for information protection | |
JP2021516902A (en) | Methods and systems for controlling access and integrity of resources on the blockchain | |
EP3646563A1 (en) | Method, system, and computer program product for determining solvency of a digital asset exchange | |
CN111316615A (en) | System and method for ensuring correct execution of computer program using a mediator computer system | |
WO2019043589A1 (en) | Systems and methods for communication, storage and processing of data provided by an entity over a blockchain network | |
CN113111373B (en) | Random number generation method of VBFT (visual basic FT) consensus mechanism and consensus mechanism system | |
CN111819817A (en) | Method and system for block chain implementation for bilinear mapping accumulator-based authorization | |
JP2021510954A (en) | Computer-implemented methods and systems for obtaining digitally signed data | |
WO2019198548A1 (en) | Blockchain network and establishment method therefor | |
CN114463009B (en) | Method for improving transaction security of large-scale energy nodes | |
CN109104410B (en) | Information matching method and device | |
Larriba et al. | Distributed trust, a blockchain election scheme | |
Wu et al. | Distributed Timestamp Mechanism Based on Verifiable Delay Functions. | |
CN116349203A (en) | Identifying denial of service attacks | |
Bezuidenhout et al. | Permissionless blockchain systems as pseudo-random number generators for decentralized consensus | |
WO2021147283A1 (en) | Transaction sender supervision method and system | |
Sakho et al. | Privacy protection issues in blockchain technology | |
JP7073240B2 (en) | Blockchain management system, blockchain management method and blockchain management program | |
CN116961917A (en) | ECDSA-based multiparty cooperative threshold signature method, device and system |
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 |