CN109964242B - Block chain consensus method based on trust relationship - Google Patents

Block chain consensus method based on trust relationship Download PDF

Info

Publication number
CN109964242B
CN109964242B CN201880004217.6A CN201880004217A CN109964242B CN 109964242 B CN109964242 B CN 109964242B CN 201880004217 A CN201880004217 A CN 201880004217A CN 109964242 B CN109964242 B CN 109964242B
Authority
CN
China
Prior art keywords
node
trust
nodes
consensus
block
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
CN201880004217.6A
Other languages
Chinese (zh)
Other versions
CN109964242A (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.)
Peking University Shenzhen Graduate School
Original Assignee
Peking University Shenzhen Graduate School
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 Peking University Shenzhen Graduate School filed Critical Peking University Shenzhen Graduate School
Publication of CN109964242A publication Critical patent/CN109964242A/en
Application granted granted Critical
Publication of CN109964242B publication Critical patent/CN109964242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is applicable to the field of Internet technology improvement, and provides a block chain consensus method based on trust relationship, which comprises the following steps: s1, quantifying trust relations among nodes according to transaction and block data; s2, constructing a trust relation diagram and generating a trust matrix according to the trust relation among the nodes; s3, iteratively calculating the trust value of each node by using the trust relationship of the nodes of the whole network; s4, randomly selecting a representative node as a master node with accounting rights in each round of consensus, and selecting a plurality of transaction creation blocks from a transaction pool by the master node. By adopting a representative mechanism, the accounting node is specialized, the consensus cost is reduced, the energy consumption is saved, and meanwhile, the efficiency of node consensus and the expansion capability of an algorithm are improved. Representative nodes are selected based on trust relationships, tokens independent of blockchain are avoided, and the account rights are concentrated on a few 'payees'.

Description

Block chain consensus method based on trust relationship
Technical Field
The invention belongs to the field of internet technology improvement, and particularly relates to a block chain consensus method based on trust relationship.
Background
With the technological revolution and industry revolution in the field of global information technology, the Internet gradually develops from the information Internet to the value Internet. In the "information internet" age, information on a network is public and transparent, but also becomes unreliable due to random tampering, and third party institutions are required to provide trust assurance. Once the trusted third party platform is closed, the trust it provides is foamed. To solve the trust problem generated in the development process of the internet, the blockchain technology has been developed.
The blockchain technology is an integrated application mode of technologies such as a distributed data storage system, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and can realize trust and value transfer which cannot be realized by the traditional internet on the internet. Based on the principle of cryptography rather than the characteristic of credit, any agreed parties can directly trade without the participation of a third party intermediary. On the other hand, there is little single point of failure in the blockchain, and the data on the chain is stored on numerous machine nodes worldwide, making the data "stable", "trusted" and "untampered", which re-imparts a value to the data on the network that can be trusted.
Blockchains have the feature of decentralizing, and each node in the network needs to follow a protocol, called a consensus protocol or consensus algorithm, to ensure consistency of the node data. Consensus algorithms are a key part of blockchain technology, directly affecting the security and performance of blockchain products. A safe and efficient consensus protocol is an important research problem in the blockchain field. The PoW consensus algorithm in the bit coin system creatively realizes the data consistency among nodes in an unreliable decentralization network, realizes the complete decentralization of the system through the calculation power demonstration and has the advantages of simplicity and easiness in realization, but also has the defects of resource waste and poor performance. In addition, in the application of small blockchain network scale, a few nodes can master more than 50% of calculation force, so that the PoW consensus is changed from decentralization degradation to centralization, and even the safety of the consensus is influenced, and therefore, the PoW consensus is generally adopted in the application scene of large node number. The PoS consensus algorithm in the point coin system solves the defect of resource waste of the PoW consensus through a rights and interests proving mechanism, but similar to the fact that the computing power of the PoW consensus is concentrated on a few nodes, the PoS consensus can be degraded into a centralized consensus because of the rights and interests are concentrated. The DPoS consensus algorithm in the bit strand system provides an authorized share proving mechanism based on PoS consensus, the nodes authorize own rights to other nodes, the first 101 nodes with highest rights become representative nodes, the rights of the representative nodes are identical, and the representative nodes acquire accounting rights in turn. The representative mechanism reduces the running cost of the network and can increase the block generation rate.
Although blockchain consensus has been evolving, performance is still very limited and it is difficult to achieve second-level consensus. Research and development efforts have begun to divert the eye towards traditional distributed consensus algorithms. The Paxos algorithm proposed by Leslie Lamport in 1990 is currently the most effective messaging-based consistency algorithm and is the most commonly used algorithm in engineering practice. Paxso can efficiently achieve data consistency between nodes, but it cannot allow malicious nodes to break the consensus process, and thus can only be employed in trusted intranets. In 1999, castro and Liskov proposed PBFT consensus algorithms that tolerate less than 1/3 of the number of malicious nodes than all nodes in the network, under which system throughput can reach over 10 ten thousand. The super ledger project verifies the possibility of PBFT consensus in a alliance chain network with very few malicious nodes, and achieves good effect. However, the PBFT consensus itself O (n 2 ) The communication cost of the PBFT protocol limits the network scale of the blockchain, and the performance of the PBFT protocol is rapidly reduced along with the increase of the number of nodes, so that the scalability of the PBFT protocol is poor. The domestic termite block chain development team provides a dBFT protocol, the accountant is selected through rights and interests, and the accountant achieves consensus through the Bayesian fault tolerance algorithm, so that the running cost of the network is reduced, and the efficiency of the consensus algorithm is improved. Existing consensus algorithms that introduce representation mechanisms are limited to the use of a blockchain-applied token mechanism and cannot be used in some blockchain systems where tokens are not present.
In 9 months of 2015, after the soldier's project formally holds for one year, onchain issues a white paper of the soldier's consensus algorithm, and an improved bayer fault tolerance algorithm, namely licensed BFT (dBFT), is proposed as a consensus mechanism module applicable to a blockchain system.
The dBFT consensus is formed after improvement on the basis of the PBFT consensus, the response mode of the original C/S architecture is modified to be suitable for the P2P mode of the peer-to-peer network, and the nodes can enter and exit dynamically. The nodes select the billing persons according to the rights and then the billing persons agree through the Bayesian fault tolerance algorithm. dBFT consensus sets the system node to two roles: a normal node and an accounting node. The accounting node is an important node in the consensus process and is responsible for collecting and serializing transaction messages in the network and recording a distributed account book maintained by the whole network; the common node does not participate in the consensus process, and only uses the system to transfer accounts, trade and the like and receive data in the account book, but can see the complete consensus process. The initial state consistency of the nodes is achieved through block synchronization and view replacement. The dBFT system operates in a time synchronized state, each round of consensus generating a block within a time interval, each block being generated potentially from a different view. In one view, one node acts as a bargained (leader) and the other nodes act as bargained (followers), and when the bargain is supported by block authentication beyond a certain number of bargained, a new block consensus can be achieved. dBFT consensus is applicable to federation chains and private chains, and the problem of authentication of the identity of the consensus node is solved by introducing a digital certificate.
The dBFT consensus has the main advantages that firstly, specialized billing personnel are adopted, so that the efficiency of block generation is improved, and the method has good expandability; second, billing is done cooperatively by multiple people, each block having finalization and not bifurcation.
The above consensus also has certain drawbacks. First, the selection of the relying interests and tokens on behalf of the node. Secondly, after 1/3 or more billing people stop working, the system cannot provide service, and when 1/3 or more billing people act in combination, and all other billing people are just divided into two network islands, the malicious billing people can cause the system to diverge, but can leave cryptographic evidence.
The Larimer team proposed the DPoS white book and its first application, bitshares, in month 3 of 2014. Since the bitcoin system employing the PoW consensus becomes more and more centralized due to the advent of the mine pool and ASIC mining machine, the decentralization initiative of "one CPU one ticket" has been offset to some extent, so Larimer team believes that decentralization of the PoS consensus may rely on a number of representatives rather than all stakeholders, all stakeholders voting together for representatives. The DPoS consensus expects to re-return the accounting rights to those holding digital money, and each person holding a bit stock of money BTS votes on candidate representatives in the whole system resource, with the 101 individuals obtaining the maximum number of votes becoming representatives, alternately obtaining the rights to package the blocks in a random unpredictable order. All representatives will receive 10% of the transaction fee equivalent to an average block, and if an average block contains 100 fees, a representative will receive 1 fee. It is understood that the rights are equally distributed among 101 CPUs, and each CPU is exactly equal in rights to each other. DPoS consensus is similar to the us conference regime, except that the election process occurs at any time, so that billing and verification nodes in DPoS consensus are scaled down from worldwide to a number of nodes, which can achieve seconds delay. However, the entire consensus mechanism is token dependent and for some security, a large number of block acknowledgements are required, and 51% of the 100 blocks after a transaction is written to a block are produced, which can be considered secure on the backbone.
In terms of resistance to attacks, since the rights obtained by the first 100 representatives are identical, it is not possible to concentrate the rights on one single representative by obtaining more than 1% of votes. Because there are only 100 representatives, it is conceivable that an attacker would in turn perform a denial of service attack on each representative who obtains the accounting rights. Fortunately, the threat of this particular attack is easily mitigated due to the fact that each representative's identity is its public key rather than an IP address. This makes targeting DDoS attacks more difficult. While potential direct connections between representatives would make it more difficult to prevent them from creating tiles.
The main advantages of the consensus algorithm are that firstly, the number of the nodes participating in verification and accounting is greatly reduced, the waste of calculation force is further reduced on the basis of POS consensus, and the cost of network operation is reduced; second, the consensus flow is small, and the expandability is good.
The above consensus also has certain drawbacks. First, the entire consensus mechanism is also token dependent, and many commercial applications do not require the presence of tokens. Secondly, as the consensus is an improvement on the PoW consensus, the low-output block speed characteristic of the PoW consensus is inherited, and the system throughput is small.
Disclosure of Invention
The invention aims to provide a block chain consensus method based on trust relationship, which aims to solve the technical problems.
The invention is realized in such a way, a block chain consensus method based on trust relationship comprises the following steps:
s1, quantifying trust relations among nodes according to transaction and block data;
s2, constructing a trust relation diagram and generating a trust matrix according to the trust relation among the nodes;
s3, iteratively calculating the trust value of each node by using the trust relation of the nodes in the whole network, wherein the trust value is in a functional formula: t (T) i =C T T i-1
S4, randomly selecting a representative node as a master node with accounting rights in each round of consensus, and selecting a plurality of transaction creation blocks from a transaction pool by the master node;
wherein C represents a trust matrix, T i Representing the node trust value vector after the ith iteration, T i-1 Representing the trust value vector after the i-1 th iteration.
The invention further adopts the technical scheme that: most of the attacks in the blockchain are related to transactions and blocks, including creating spurious transactions, broadcasting invalid transactions, creating spurious blocks, and broadcasting invalid blocks.
The invention further adopts the technical scheme that: the node i receives the valid transaction and valid transaction sent by the node j in the step S1The effective block increases the trust of node i to node j, and otherwise decreases the trust. The trust degree calculation formula is as follows
Figure BDA0002047306030000061
Wherein g ij Indicating that node i receives the valid transaction and block number sent by node j, u ij The node i receives the invalid transaction and block number sent by the node j, and the beta represents the penalty coefficient of the invalid data.
The invention further adopts the technical scheme that: in step S2, in order to prevent the malicious node from giving higher trust values to other malicious nodes and giving lower trust values to the normal node, the selection of the trust representative node is affected, and thus the method is used
Figure BDA0002047306030000062
Regularizing trust values among nodes to obtain a final trust matrix C n×n The method comprises the steps of carrying out a first treatment on the surface of the Wherein c ij Representing normalized trust value of node i to node j, t ij Representing the trust level of node i to node j, and n represents the total number of nodes of the network.
The invention further adopts the technical scheme that: the trust relationship matrix constructed in the step S2 has random, irreducible and aperiodic properties, so that the node trust value matrix T is iterated i =C T T i-1 Can converge.
The invention further adopts the technical scheme that: the trust value between the nodes in the step S3 is influenced by the interactive transaction and block data and dynamically changes along with time within the range of 0 to 1; the k nodes with high trust values are selected as representative nodes, and each representative node has an opportunity to obtain the accounting right.
The invention further adopts the technical scheme that: in the step S3, a representative node is selected according to the trust relationship, the representative node participates in the fault-tolerant Bayesian protocol, and the professional accounting node improves the expansibility of the consensus protocol.
The invention further adopts the technical scheme that: taking network transmission delay into consideration in step S4, creating a block to final joining block chain interval of
Figure BDA0002047306030000071
Block generation period->
Figure BDA0002047306030000072
So that the other nodes have received the previous block data at the beginning of the new round of consensus.
The invention further adopts the technical scheme that: the step S4 considers that the blockchain network has relative stability for a period of time, and updates the representative period t 0 The method is far longer than the period t of block creation, and the consensus efficiency is improved.
The invention further adopts the technical scheme that: and in the step S4, the representative nodes create blocks through a fault-tolerant Bayesian protocol, and then spread the blocks to other nodes in the blockchain network, and the nodes ensure the final consistency of the node data according to the rule that the longest chain is the main chain.
The beneficial effects of the invention are as follows: and selecting partial nodes as representative nodes participating in consensus according to the trust relationship among the nodes by adopting a representative mechanism. The delegate selection is a periodic behavior, meaning that any node will have the opportunity to become a delegate node, get accounting rights and create blocks, as long as it works strictly honest, thus having better decentralization properties than the rights-based delegate mechanism. By adopting a representative mechanism, the accounting node is specialized, the consensus cost is reduced, the energy consumption is saved, and meanwhile, the efficiency of node consensus and the expansion capability of an algorithm are improved. By monitoring the effectiveness of the transaction and block data interacted between the nodes, the node with high trust value is selected as the representative node, the token system is not relied on, and the defect that the accounting right is concentrated on a small number of 'people with money' is avoided. The trust value is formed by iteration convergence of a trust matrix, is essentially a probability, is the basis of judgment of a certain node by the nodes of the whole network, and has relative stability. The trust relationship between nodes changes slowly, so the update period on behalf of the nodes is much longer than the generation period of the block. On the other hand, the number of representative nodes is relatively fixed, meaning that the number of nodes in the network does not affect the efficiency of running the fault tolerant bayer protocol between representative nodes.
Drawings
Fig. 1 is a network model diagram of a consensus algorithm provided in an embodiment of the present invention.
FIG. 2 is a flow chart of a trust relationship based blockchain consensus method provided by an embodiment of the present invention.
Fig. 3 is a schematic diagram of a consensus algorithm provided in an embodiment of the present invention.
Detailed Description
The blockchain is a distributed architecture, a plurality of computing mechanisms connected with each other pair-wise and equi-network, coordinate operation according to a consensus protocol, and jointly process requests submitted by users. As shown in fig. 1, in the peer-to-peer network, each node is in a peer-to-peer position, and is a server and a client, and has the same function. For a peer-to-peer network, typically the number of nodes is not fixed, and nodes may join or leave the network at any time. In addition, there may be some untrustworthy malicious nodes in the network, and the malicious byesting node may refuse to respond to the interaction information of other nodes, or even falsely respond to the requests of other nodes. In order to reduce the cost of the consensus and improve the efficiency of the consensus, the consensus algorithm selects a part of nodes with high trust values to participate in the consensus through the trust relationship among the nodes, and the part of nodes become representative nodes. The network model in the algorithm therefore contains four nodes, namely a common node, a bayer node, a common representative node and a bayer representative node. The encryption technology is used between the nodes to ensure the communication safety, each message contains a key signature, an abstract and verification information, the Bayesian node cannot crack the encrypted message through violence, and cannot forge the signature and find the message with the same abstract.
The flow of the consensus protocol is shown in fig. 2. The method comprises four parts of (1) quantifying trust relations among nodes, (2) generating a trust relation graph and a trust matrix, (3) calculating node trust values and selecting representative nodes and (4) generating a protocol by blocks. The node establishes a trust relationship by monitoring the transaction and block information of the adjacent nodes, and quantizes the trust relationship into a real number between 0 and 1, and the larger the value is, the higher the trust degree is. When the nodes send effective transaction and block information to other nodes, the trust degree between the nodes is improved, and otherwise, the trust degree is reduced. And then constructing a trust relationship graph through the trust relationship among nodes of the whole network, and generating a trust relationship matrix. And then analogizing the nodes with the web pages by referring to the concept of the search engine web page ordering, analogizing the trust relationship between the nodes with the hyperlink relationship between the web pages, and iteratively calculating the trust value for each node. K nodes with high trust values are selected as representative nodes, have the opportunity to acquire accounting rights and create blocks. The Bayesian and the busy-family protocol with 1/3 fault tolerance capability is operated between the representative nodes, so that the safety and the usability of the consensus algorithm are ensured.
As shown in fig. 2 and 3, the flow chart of the block chain consensus method based on trust relationship provided by the present invention is as follows:
step S1, quantifying trust relations between nodes according to transaction and block data; trust relationships are inherently difficult to define, and highly trusted nodes in a computer system are typically nodes that can independently, safely and reliably perform specified functions in a particular environment. Since transactions and chunks are the most important data in the blockchain, the consensus method quantifies trust relationships between nodes based on the transaction and chunk data interacted between the nodes. In a blockchain network, nodes conduct transaction and interaction of blockdata at all times, continuously process transaction requests submitted by users, verify the validity of the transactions, and broadcast the valid transactions to other nodes. Most of attack actions of the blockchain are related to transactions and blocks, and malicious actions such as creating false transactions, broadcasting invalid transactions, creating false blocks and broadcasting invalid blocks mainly exist, so that the common algorithm is effective in realizing quantification of trust relations between nodes according to transactions and block data. The node will count the data information interacted by the adjacent nodes during the running process, and it is assumed that node i receives g from node j for a certain period of time ij Valid transactions and blocks, receive u ij And invalid transactions and blocks, the trust of the node i to the node j is shown in the formula (1). Beta represents a penalty factor for invalid data, which is adjustable, typically greater than 1, indicating that receipt of invalid data has a greater impact on the trust value than receipt of valid data. Due to blockchainThe network is typically large, there are many nodes that do not interact with each other, and the trust relationship is quantified as 0.5.
Figure BDA0002047306030000101
According to the description of the trust relationship between the nodes in the formula (1), the trust degree of the node i on the node j is increased when the node i receives the effective transaction and the effective block sent by the node j, and otherwise, the trust degree is reduced.
S2, constructing a trust relation diagram and generating a trust matrix according to the trust relation among the nodes; in the world wide web, web pages are linked to each other by means of hyperlinks, and more valuable web pages are typically linked by many web pages, and conversely are rarely linked. The search engine sorts the related web pages according to the link relation among the web pages, and presents the related web pages to the user in proper sequence. The invention refers to a web page link relation graph, the nodes are analogous to web pages, the trust relation is analogous to hyperlink relation, and the trust relation graph is established according to the mutual trust relation of the nodes.
The trust relationship graph is a directed graph in which the weight of an edge represents the degree of trust between two vertices corresponding to the edge. The trust relation matrix D between the nodes can be obtained according to the information relation graph n×n Where n represents the total number of nodes of the network, each element d of the matrix ij Representing the trust level of node i to node j. In order to prevent malicious nodes from giving higher trust values to other malicious nodes, giving lower trust values to normal nodes, influencing the selection of trust representative nodes, regularizing trust values among nodes by using a formula (2) to obtain a final trust matrix C n×n . Each element represents a direct trust relationship between nodes, the relationship value with high trust is close to 1, the relationship value with low trust is close to 0, and the relationship value with little interaction between nodes is close to 0.5.
Figure BDA0002047306030000111
Step S3, iteratively calculating the trust value of each node by using the trust relationship of the nodes of the whole network; the node can obtain the direct trust relationship between other nodes by directly monitoring the behaviors of the other nodes, and further can iteratively calculate the trust value of each node by using the trust relationship of the nodes in the whole network, as shown in a formula (3). Wherein C represents the trust matrix, T i Representing node trust value matrix after the ith iteration, T i-1 And representing the node trust value matrix after the i-1 th iteration.
T i =C T T i-1 (3)
It can be proved that the iterative relationship of the formula (3) can be finally converged, and the convergence result is the trust value of all nodes calculated according to the trust relationship of the nodes of the whole network. K nodes with high trust values are selected as representative nodes, and have the opportunity to obtain accounting rights.
Step S4, randomly selecting a representative node as a master node with accounting rights in each round of consensus, and selecting a plurality of transaction creation blocks from a transaction pool by the master node; only the representative node participates in the consensus process, and the common node cannot create a block, but can see the complete consensus process. A round of consensus includes two parts, namely selecting a master node and creating a block. First, a node is randomly selected from the representative nodes as a master node. Only the representative node selected as the master node has the accounting rights and can create the block. The block is then passed through the checks of other representative nodes and is eventually added to the blockchain. Assuming that the number of nodes participating in the consensus protocol is k, and f is the number of the tolerant malicious Bayesian nodes
When the node is started, the block data is firstly synchronized by other nodes in the network. The node monitors the incoming transaction, independently verifies the validity of the transaction, stores the valid transaction in a transaction pool and broadcasts the valid transaction to other nodes, and discards the invalid transaction. After the node obtains the accounting right, a plurality of transaction forming blocks are selected from the transaction pool, and the hash value of the parent block is recorded in the block header so as to ensure the ordering of the blocks. . When the transaction pool is empty and no effective transaction exists, empty blocks are generated according to the normal period. Taking into account the delay of network transmission, from creation of a block to final joining to a zoneThe interval of the block chains is
Figure BDA0002047306030000121
Block generation period->
Figure BDA0002047306030000122
So that other nodes have received the previous block data at the beginning of a round of consensus.
The block data is agreed between consensus nodes to undergo three phases, pre-preparation, preparation and Commit, respectively.
(1) Pre-Precure stage
The master node obtaining the accounting right sends a Pre-Precure request to all the consensus nodes, wherein the request message comprises the height h of the current block, the view v, the number p of the master node, the block and the signature block of the block p . After receiving the Pre-preparation request of the master node, the node verifies the accuracy of the message. If the Pre-preparation request is not legal, a change of view is proposed, and the master node is reselected. When the node receives legal PrePrePrecure request, it will send Precure request to other nodes, and itself enters Precure state. The preparation request comprises the height h of the current block, the view v, the number i of the node and the signature block of the block i
(2) Prepare stage
When the node receives 2f Prepaper messages, the node enters a Commit state and sends Commit messages to other nodes, wherein the Commit messages comprise the height h of the current block, the view v, the number i of the node and the signature block of the block i
(3) Commit phase
When the node receives 2f Commit messages, the round of consensus is considered complete, writing the block into the blockchain.
The Pre-Precure message contains a complete block, the node will locally store the content of the block which is the current consensus after receiving the Pre-Precure message of the master node, and the hash value is used to replace the block in the subsequent Precure stage and Commit stage, thereby reducing the communication cost. And finally, the consistency of block data among the consensus nodes is realized through the negotiation voting of the three stages. Only blocks that agree among the representative nodes can be broadcast to other nodes of the blockchain network.
And selecting partial nodes as representative nodes participating in consensus according to the trust relationship among the nodes by adopting a representative mechanism. The delegate selection is a periodic behavior, meaning that any node will have the opportunity to become a delegate node, get accounting rights and create blocks, as long as it works strictly honest, thus having better decentralization properties than the rights-based delegate mechanism.
By adopting a representative mechanism, the accounting node is specialized, the consensus cost is reduced, the energy consumption is saved, and meanwhile, the efficiency of node consensus and the expansion capability of an algorithm are improved. By monitoring the effectiveness of the transaction and block data interacted between the nodes, the node with high trust value is selected as the representative node, the token system is not relied on, the defect that the accounting right is concentrated on a small number of 'people with money' is avoided, and the method has wide application prospect.
The trust value is formed by iteration convergence of a trust matrix, is essentially a probability, is the basis of judgment of a certain node by the nodes of the whole network, and has relative stability. The trust relationship between nodes changes slowly, so the update period on behalf of the nodes is much longer than the generation period of the block. On the other hand, the number of representative nodes is relatively fixed, meaning that the number of nodes in the network does not affect the efficiency of running the fault tolerant bayer protocol between representative nodes.
In order to strictly guarantee the safety of consensus, the fault-tolerant Bayesian algorithm is required to have a fault-tolerant capacity of 1/3. However, the representative nodes are not completely randomly selected, but are strictly filtered based on trust relationships among the nodes, and the trust values of the representative nodes are larger than those of other nodes in the network, so that the representative nodes have fault tolerance capability higher than 1/3.
A trust mechanism is introduced into a blockchain in the blockchain, and as transaction and block are the most important data, the consensus method provides a quantization method applicable to trust relations among nodes of the blockchain network according to the transaction and block data interacted among the nodes. Each node independently judges the trust values of other nodes, and different nodes may have different trust values for the same node. The trust values between nodes are affected by the interactive transaction and block data, and dynamically vary over time in the range of 0 to 1. However, the trust value of any node is not absolutely reliable, and is essentially a probability that other nodes determine.
And iteratively converging to obtain the trust value of the nodes of the whole network by using the trust relationship among the nodes. The node with the high trust value is selected as the representative node and has the opportunity to obtain the accounting right. The representative node generally has a higher trust value, so that the decentralization characteristic is improved, and the safety and the reliability of the system are enhanced. This approach of representative node selection is independent of the token hierarchy, avoiding the disadvantage of the collection of accounting rights to a small number of "people with money".
The communication cost of the fault-tolerant Bayesian protocol cannot be used in a large-scale blockchain network, and has poor expansibility. The trust-based consensus mechanism algorithm provided by the invention, from another aspect, specializes the accounting node through a trust mechanism, improves the trust degree of the accounting node, avoids the fault-tolerant Bayesian consensus of the whole network, and improves the expansibility and efficiency of the consensus.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (7)

1. The block chain consensus method based on the trust relationship is characterized by comprising the following steps of:
s1, quantifying trust relations among nodes according to transaction and block data;
s2, constructing a trust relation diagram and generating a trust matrix according to the trust relation among the nodes;
s3, iteratively calculating the trust value of each node by using the trust relation of the nodes in the whole network, wherein the trust value is in a functional formula: t (T) i =C T T i-1 Wherein C represents a trust matrix, Y i Representing the node trust value vector after the ith iteration, T i-1 Representation ofNode trust value vector after the i-1 th iteration;
s4, randomly selecting a representative node as a master node with accounting rights in each round of consensus, and selecting a plurality of transaction creation blocks from a transaction pool by the master node;
in the step S1, the node i receives the effective transaction and the effective block sent by the node j, so that the trust degree of the node i to the node j is increased, otherwise, the trust degree is reduced; the trust degree calculation formula is as follows
Figure FDA0004250995430000011
Figure FDA0004250995430000012
Wherein g ij Indicating that node i receives the valid transaction and valid block number sent by node j, u ij The method comprises the steps that the node i receives invalid transactions and invalid block numbers sent by the node j, beta represents a penalty coefficient of invalid data, valid transactions refer to valid unpacked transactions, and invalid angle bits refer to invalid unpacked transactions;
the signal in the step S2 represents the selection of the node by using
Figure FDA0004250995430000013
Regularizing trust values among nodes to obtain a final trust matrix C n×n The method comprises the steps of carrying out a first treatment on the surface of the Wherein c ij Representing normalized trust value of node i to node j, t ij Representing the trust level of node i to node j, and n represents the total number of nodes of the network.
2. The blockchain consensus method as in claim 1, wherein the act of attacking the blockchain includes creating a dummy transaction, broadcasting an invalid transaction, creating a dummy block, and broadcasting an invalid block.
3. The blockchain consensus method of claim 2, wherein trust values between nodes in step S3 are affected by the interactive transaction and the blockdata, dynamically changing over time in a range of 0 to 1; the k nodes with high trust values are selected as representative nodes, and each representative node has an opportunity to obtain the accounting right.
4. A blockchain consensus method according to claim 3, wherein in step S3 the representative node is selected according to a trust relationship and participates in a fault tolerant bayer pattern.
5. The blockchain consensus method as in claim 4, wherein the creating a block to final joining blockchain interval is
Figure FDA0004250995430000021
Block generation period->
Figure FDA0004250995430000022
So that the other nodes have received the previous block data at the beginning of the new round of consensus.
6. The blockchain consensus method as in claim 5, wherein the blockchain network updates the representative period t over a period of time in step S4 0 Is greater than the block generation period t.
7. The blockchain consensus method according to claim 6, wherein the block is created by a fault tolerant bayer protocol between the representative nodes in step S4 and then is diffused to other nodes in the blockchain network, and the nodes implement the node data consistency according to the rule that the longest chain is the main chain.
CN201880004217.6A 2018-05-25 2018-05-25 Block chain consensus method based on trust relationship Active CN109964242B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/088355 WO2019222993A1 (en) 2018-05-25 2018-05-25 Blockchain consensus method based on trust relationship

Publications (2)

Publication Number Publication Date
CN109964242A CN109964242A (en) 2019-07-02
CN109964242B true CN109964242B (en) 2023-07-14

Family

ID=67023432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880004217.6A Active CN109964242B (en) 2018-05-25 2018-05-25 Block chain consensus method based on trust relationship

Country Status (2)

Country Link
CN (1) CN109964242B (en)
WO (1) WO2019222993A1 (en)

Families Citing this family (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189128B (en) * 2019-06-06 2021-05-14 西安安盟智能科技股份有限公司 Distributed consensus method and device for block rapid generation
CN110535836B (en) * 2019-08-12 2021-10-29 安徽师范大学 Trust block chain consensus method based on role classification
CN110519246B (en) * 2019-08-15 2021-09-28 安徽师范大学 Trust degree calculation method based on trust block chain node
CN110505091B (en) * 2019-08-23 2021-09-10 昆明理工大学 Improved consensus method based on PBFT
CN110661867B (en) * 2019-09-25 2021-07-23 东北大学 Block chain consensus method based on improved workload certification and equity certification
CN112671815A (en) * 2019-10-16 2021-04-16 陈小虎 Byzantine fault-tolerant consensus scheme for unlicensed network
CN110853214B (en) * 2019-11-06 2021-05-11 杭州复杂美科技有限公司 Block generation method, device and storage medium
CN110990490B (en) * 2019-12-19 2023-09-01 京东科技信息技术有限公司 Method, device, equipment and medium for checking in blockchain network
CN111414420B (en) * 2020-03-17 2023-05-26 重庆邮电大学 Improved PBFT block chain consensus method
CN111711711A (en) * 2020-05-28 2020-09-25 北京邮电大学 Block chain-based top-level domain name management and analysis method and system
CN111915294B (en) * 2020-06-03 2023-11-28 东南大学 Safe, privacy-preserving and tradable distributed machine learning framework operation method based on blockchain technology
CN112416905A (en) 2020-07-03 2021-02-26 支付宝(杭州)信息技术有限公司 Block chain consensus method, node and system of badger Byzantine fault-tolerant consensus mechanism
CN112104482B (en) * 2020-08-11 2021-06-29 佛山赛思禅科技有限公司 Consensus method based on parallel voting
CN112583798B (en) * 2020-11-30 2022-11-08 北京八分量信息科技有限公司 Method, device and related product for screening common identification nodes from block chain system
CN114650289B (en) * 2020-12-02 2023-04-14 王志诚 Method and device for block chain consensus
CN112651830B (en) * 2020-12-03 2023-01-24 齐鲁工业大学 Block chain consensus method applied to power resource sharing network
CN112804305B (en) * 2020-12-30 2023-03-31 北京八分量信息科技有限公司 Credible networking method and system of internet node and related product
CN112783976B (en) * 2021-01-05 2024-01-26 上海特高信息技术有限公司 Consensus system for flexible packaging of alliance blockchain
CN112860482B (en) * 2021-01-27 2021-11-12 西南林业大学 Block chain consensus performance optimization method
CN112819433B (en) * 2021-02-01 2024-03-26 北京工业大学 Consensus method for collaborative government block chain
CN112905692B (en) * 2021-02-01 2023-09-29 中国科学院数学与系统科学研究院 Leaf block selection method of block chain system based on directed acyclic graph
CN113051348B (en) * 2021-03-29 2023-11-10 河南向量智能科技研究院有限公司 Group product collaborative design block chain technology data synchronization collaborative method
CN113783947B (en) * 2021-08-26 2024-05-31 浙商银行股份有限公司 Adaptive block chain link point fault tolerance lifting method, device and storage medium
CN113438327B (en) * 2021-08-30 2021-11-30 湖南三湘银行股份有限公司 Consensus algorithm implementation method based on block chain
CN113672987B (en) * 2021-09-06 2023-09-05 上海万向区块链股份公司 Method and system for selecting packet type billing node under PoW mechanism
CN113923217B (en) * 2021-09-30 2024-04-16 中国人民解放军国防科技大学 Asynchronous Bayesian-busy family consensus method and system based on DAG
CN113922965B (en) * 2021-10-09 2024-04-16 筹远(上海)信息科技有限公司 Block chain data consensus method and device in Bayesian scene
CN113965566B (en) * 2021-10-11 2024-05-14 浪潮云信息技术股份公司 BFT consensus algorithm implementation method and system based on Header-Sig stream
CN113961545B (en) * 2021-10-26 2022-04-26 北京市科学技术情报研究所 Block chain-based information value database construction method
CN114189325B (en) * 2021-11-19 2023-09-29 新疆大学 Bayesian-tolerant and scalable method and device with high fault tolerance and storage medium
CN114374520B (en) * 2022-01-06 2023-11-03 上海交通大学宁波人工智能研究院 Trusted and safe lightweight block chain implementation system and method
CN114500046B (en) * 2022-01-26 2024-03-15 南京晓庄学院 Consensus method based on field network and IOTA
CN114332872B (en) * 2022-03-14 2022-05-24 四川国路安数据技术有限公司 Contract document fault-tolerant information extraction method based on graph attention network
CN115021929B (en) * 2022-05-24 2024-02-02 中国电信股份有限公司 Trust management method and device for computing power network, storage medium and electronic equipment
CN114745140B (en) * 2022-06-13 2022-08-23 天津市城市规划设计研究总院有限公司 Urban planning field block chain consensus verification method and system based on aggregation encryption
CN115314513B (en) * 2022-06-16 2023-09-19 北京邮电大学 Trust twinning method based on block chain and related equipment
CN115914225B (en) * 2022-10-28 2024-04-30 三峡大学 Optimization method for Raft consensus algorithm election stage
CN117478300B (en) * 2023-12-27 2024-03-01 湖南天河国云科技有限公司 Cross-chain consensus method and device based on node determination and computer equipment
CN117670329B (en) * 2024-02-01 2024-05-14 中国信息通信研究院 Trust-based transaction method and device in blockchain network
CN117978547B (en) * 2024-03-29 2024-06-07 华东交通大学 TRP-PBFT consensus method, system, storage medium and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10726346B2 (en) * 2016-11-09 2020-07-28 Cognitive Scale, Inc. System for performing compliance operations using cognitive blockchains
CN107391320B (en) * 2017-03-10 2020-07-10 创新先进技术有限公司 Consensus method and device
CN107169765B (en) * 2017-05-11 2020-07-31 电子科技大学 Method for dynamically adjusting block chain consensus based on business trust
CN107819848A (en) * 2017-11-08 2018-03-20 济南浪潮高新科技投资发展有限公司 A kind of internet of things equipment autonomy interconnected method based on block chain
CN108053308A (en) * 2017-12-08 2018-05-18 横琴密达科技有限责任公司 A kind of method and system of monetary device selection and intelligent Trade based on block chain
CN107977340A (en) * 2017-12-27 2018-05-01 邵美 A kind of importance ranking method of block chain trade network node

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism

Also Published As

Publication number Publication date
WO2019222993A1 (en) 2019-11-28
CN109964242A (en) 2019-07-02

Similar Documents

Publication Publication Date Title
CN109964242B (en) Block chain consensus method based on trust relationship
Zhang et al. Security and privacy on blockchain
JP6726367B2 (en) Changing the primary node in a distributed system
JP6732321B2 (en) Execution of recovery processing for network nodes in distributed systems
Eyal Blockchain technology: Transforming libertarian cryptocurrency dreams to finance and banking realities
US11128522B2 (en) Changing a master node in a blockchain system
Barber et al. Bitter to better—how to make bitcoin a better currency
JP2023051935A (en) Method regarding blockchain network
CN110741600A (en) Computer-implemented system and method for providing a decentralized protocol to retrieve encrypted assets
Wei et al. Whopay: A scalable and anonymous payment system for peer-to-peer environments
Hei et al. Practical AgentChain: A compatible cross-chain exchange system
CN112329051A (en) Safe and efficient consensus mechanism implementation method and system
CN110223067B (en) Under-chain one-to-many payment method and system with decentralized characteristic
US20200204338A1 (en) Securing public key cryptographic algorithms
CN111951108A (en) Chain structure design method with intelligent contract block chain with complete picture
CN111466098A (en) Block chain implemented security system and method for blind result selection
Sayeed et al. On the effectiveness of blockchain against cryptocurrency attacks
He et al. Blockchain-based p2p content delivery with monetary incentivization and fairness guarantee
Tyagi et al. Study on blockchain scalability solutions
Zhai et al. BPKI: A secure and scalable blockchain-based public key infrastructure system for web services
Sui et al. AuxChannel: Enabling efficient bi-directional channel for scriptless blockchains
CN113839768B (en) Cross-link communication method based on satellite link relay
CN115664735A (en) Time-controlled encryption anonymous interaction method based on intelligent contract
Kondru et al. Directed acyclic graph-based distributed ledgers—an evolutionary perspective
Reddy et al. Block Chain for Financial Application using IOT

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