CN115065468A - PBFT consensus optimization method based on grouping reputation value - Google Patents
PBFT consensus optimization method based on grouping reputation value Download PDFInfo
- Publication number
- CN115065468A CN115065468A CN202210829750.4A CN202210829750A CN115065468A CN 115065468 A CN115065468 A CN 115065468A CN 202210829750 A CN202210829750 A CN 202210829750A CN 115065468 A CN115065468 A CN 115065468A
- Authority
- CN
- China
- Prior art keywords
- node
- consensus
- nodes
- pbft
- message
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000005457 optimization Methods 0.000 title claims abstract description 18
- 238000012795 verification Methods 0.000 claims description 5
- 238000012216 screening Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 abstract description 5
- 230000007423 decrease Effects 0.000 abstract 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
针对联盟链中所采用最多的PBFT共识算法,当节点数量增多,算法时延变长,吞吐量降低和主节点选择随意的问题,提出一种基于分组信誉值的PBFT共识优化方法。对全网节点进行分组,便于在节点的选择上做了相应的筛选,控制参与共识算法节点的数量;每个节点组通过将Vague集点对点的投票值转化为模糊集的具体值作为节点信誉值,选择每个组内最高信誉值的节点作为代表节点参与共识;在共识节点中使用可验证随机函数随机选取主节点,增加主节点的不可预测性;最后,为了减少节点间的通信频率,简化了共识过程。通过实验测试表明,GV‑PBFT算法能够有效减小共识时延和提高吞吐量。Aiming at the problems of the most used PBFT consensus algorithm in the alliance chain, when the number of nodes increases, the algorithm delay becomes longer, the throughput decreases and the selection of master nodes is arbitrary, a PBFT consensus optimization method based on group reputation value is proposed. The nodes of the entire network are grouped to facilitate the selection of nodes and to control the number of nodes participating in the consensus algorithm; each node group converts the point-to-point voting value of the Vague set into the specific value of the fuzzy set as the node reputation value , select the node with the highest reputation value in each group as the representative node to participate in the consensus; use the verifiable random function to randomly select the master node in the consensus node, increase the unpredictability of the master node; finally, in order to reduce the communication frequency between nodes, simplify the consensus process. Experimental tests show that the GV‑PBFT algorithm can effectively reduce the consensus delay and improve throughput.
Description
技术领域technical field
本发明属于区块链共识机制领域,具体为一种基于分组信誉值的PBFT共识优化方法。The invention belongs to the field of blockchain consensus mechanism, and specifically relates to a PBFT consensus optimization method based on group reputation value.
背景技术Background technique
共识算法在区块链系统中有着非常重要的作用,它保证了节点上数据的正确性和一致性。目前共识算法也有很多,工作量证明(POW)、权益证明(POS)和复制和容错(raft)是常用的共识算法,但都存在一定问题,POW存在消耗算力和资源浪费的问题;POS存在中心化,共识效率不够的问题;Raft存在高并发场景下性能差的问题。在联盟链中使用最多的共识算法之一就是实用拜占庭容错算法(PBFT),它有非常高的事务吞吐量。但它算法本身也存在着一些问题,当节点数目增多时,PBFT需要点对点进行通信传递,其性能急剧下降,其次,PBFT依赖主节点,但其主节点选取随意,很容易选取到恶意节点最为主节点,从而也会影响系统效率。The consensus algorithm plays a very important role in the blockchain system, which ensures the correctness and consistency of the data on the nodes. At present, there are many consensus algorithms. Proof of Work (POW), Proof of Stake (POS) and replication and fault tolerance (raft) are commonly used consensus algorithms, but they all have certain problems. POW has the problem of consuming computing power and wasting resources; POS exists Centralization and insufficient consensus efficiency; Raft has the problem of poor performance in high concurrency scenarios. One of the most used consensus algorithms in consortium chains is Practical Byzantine Fault Tolerance (PBFT), which has very high transaction throughput. However, its algorithm itself has some problems. When the number of nodes increases, PBFT needs to communicate point-to-point, and its performance drops sharply. Secondly, PBFT relies on the master node, but its master node is selected arbitrarily, and it is easy to select malicious nodes as the most dominant node. nodes, which will also affect the system efficiency.
对此,国内外的研究学者也对现有的一些共识算法进行了研究和改进。陈子豪等人提出通过聚类算法对节点进行划分层次,先进行组内共识然后在进行组外共识,来减少共识的通信次数。吴宇森等人提出通过改进的Raft共识算法先在组内进行共识,然后组外再由各组长根据组内共识结果进行PBFT共识。Zheng X等人提出利用C4.5对节点分类,选择具有高信任级别的节点作为主要共识组,其他节点作为次共识组,先在次共识组进行PBFT共识后在主共识组进行第二次PBFT共识确认,同时引入积分投票机制来确定领导者节点进行共识。LI等人提出在节点中采用随机函数来选取部分节点参与共识,从而减少了PBFT通信次数,提高算法效率。但以上研究对节点信誉值评估的过程只考虑了对节点的正面影响没有考虑节点的负面影响,判断不够准确。In this regard, scholars at home and abroad have also studied and improved some existing consensus algorithms. Chen Zihao et al. proposed to divide the nodes into layers through a clustering algorithm, and first perform the consensus within the group and then perform the consensus outside the group to reduce the number of consensus communications. Woo Yusen et al. proposed to use the improved Raft consensus algorithm to first conduct consensus within the group, and then outside the group, each group leader will conduct PBFT consensus according to the consensus result within the group. Zheng X et al. proposed to use C4.5 to classify nodes, select nodes with high trust level as the main consensus group, and other nodes as the secondary consensus group, first perform PBFT consensus in the secondary consensus group and then perform the second PBFT in the main consensus group Consensus confirmation, and a point voting mechanism is introduced to determine the leader node for consensus. Li et al. proposed to use a random function in the nodes to select some nodes to participate in the consensus, thereby reducing the number of PBFT communications and improving the efficiency of the algorithm. However, the above research only considers the positive impact on the node and does not consider the negative impact of the node in the process of evaluating the reputation value of the node, and the judgment is not accurate enough.
发明内容SUMMARY OF THE INVENTION
针对现有技术的不足,本发明提供了一种基于分组信誉值的PBFT共识优化方法。In view of the deficiencies of the prior art, the present invention provides a PBFT consensus optimization method based on group reputation value.
一种基于分组信誉值的PBFT共识优化方法,具体步骤如下:A PBFT consensus optimization method based on group reputation value, the specific steps are as follows:
步骤1:对全网节点进行分组,便于在节点的选择上做了相应的筛选,控制参与共识算法节点的数量;Step 1: Group the nodes of the entire network to facilitate the selection of nodes and control the number of nodes participating in the consensus algorithm;
步骤1.1:在网络中的所有节点都会被保存在一份列表中,根据列表上节点的地址标识,从而把节点划分成若干节点组,且每个小组的节点数是存在一个上限的,设上限值为L;Step 1.1: All nodes in the network will be stored in a list. According to the address identification of the nodes on the list, the nodes are divided into several node groups, and the number of nodes in each group has an upper limit. The limit is L;
步骤1.2:当网络中出现新的节点a时,它需要向周边发送自己的公钥P,接着节点a进入等待状态,Step 1.2: When a new node a appears in the network, it needs to send its own public key P to the surrounding, and then node a enters the waiting state,
步骤1.3:网络中的其他节点b在收到a的请求信息后,首先确认自己所在的小组的节点数字未达到上限L,再将接受a加入所在小组的信息放入事件中,向周围节点传递,表示该节点已加入本小组;Step 1.3: After the other node b in the network receives the request information from a, it first confirms that the number of nodes in its own group does not reach the upper limit L, and then puts the information of accepting a to join the group in the event and transmits it to the surrounding nodes , indicating that the node has joined the group;
步骤1.4:节点a收到接受加入信息后,确认加入该小组,并再次发生回执信息,表示自己接受成功;Step 1.4: After receiving the acceptance information, node a confirms to join the group, and the receipt information occurs again, indicating that the acceptance is successful;
步骤1.5:节点b收到该信息后向全网节点广播,更新小组节点列表,且将最新列表同步至节点a中,a接着同步全网的所有数据信息;Step 1.5: After receiving the information, node b broadcasts it to the nodes of the entire network, updates the group node list, and synchronizes the latest list to node a, and then a synchronizes all data information of the entire network;
步骤2:每个节点组通过将Vague集点对点的投票值转化为模糊集的具体值作为节点信誉值,选择每个组内最高信誉值的节点作为代表节点参与共识,即共识节点;Step 2: Each node group converts the point-to-point voting value of the Vague set into the specific value of the fuzzy set as the node reputation value, and selects the node with the highest reputation value in each group as the representative node to participate in the consensus, that is, the consensus node;
所述将Vague集转化为模糊集的具体值作为节点信誉值,具体公式如下:The specific value of converting the Vague set into the fuzzy set is used as the node reputation value, and the specific formula is as follows:
其中,[tP(x),1-fP(x)]一般代表x的模糊值;使用投票模型来解释Vague集的概念,表示当支持票的票数多余不支持票的票数时,投弃权票的人可能更倾向于支持的一方,反之就是更倾向于不支持的一方;λ是一个常数,λ>0通常取1;Among them, [t P (x), 1-f P (x)] generally represents the fuzzy value of x; the voting model is used to explain the concept of the Vague set, which means that when the number of supporting votes exceeds the number of non-supporting votes, abstain from voting The person who votes may be more inclined to the side that supports, and vice versa is more inclined to the side that does not support; λ is a constant, λ>0 usually takes 1;
步骤3:在共识节点中使用可验证随机函数随机选取主节点,增加主节点的不可预测性;Step 3: Use a verifiable random function in the consensus node to randomly select the master node to increase the unpredictability of the master node;
在共识节点中根据可验证随机函数选取主节点,具体步骤如下:In the consensus node, the master node is selected according to the verifiable random function. The specific steps are as follows:
步骤3.1:每个共识节点将私钥Sk和消息X作为输入,生成随机数y和证明函数Proof;Step 3.1: Each consensus node takes private key Sk and message X as input to generate random number y and proof function Proof;
步骤3.2:判断共识节点是否为主节点,如果满足如下公式的条件就返回YES,成为主节点;Step 3.2: Determine whether the consensus node is the master node, if it meets the conditions of the following formula, it will return YES and become the master node;
当某一个节点验证成为主节点后,其他共识节点为从节点;When a node is verified as the master node, other consensus nodes are slave nodes;
步骤4:通过GV-PBFT算法在共识节点间进行共识,实现全局共识;Step 4: Consensus is achieved among consensus nodes through GV-PBFT algorithm to achieve global consensus;
所述GV-PBFT算法基于PBFT算法通过信誉值计算,在信誉高的代表节点中随机选择作为主节点,增加了主节点为诚实节点的概率,将三阶段算法优化改为两阶段,取消提交阶段从而得到的;The GV-PBFT algorithm calculates the reputation value based on the PBFT algorithm, and randomly selects the representative nodes with high reputation as the master node, which increases the probability of the master node being an honest node. The three-stage algorithm optimization is changed to two stages, and the submission stage is cancelled. thus obtained;
步骤4.1:客户端c向共识节点发送请求消息<REQUEST,o,t,c,X>;其中o表示请求的具体操作,t表示请求的时间戳,X为客户端选择的随机值;Step 4.1: Client c sends a request message <REQUEST, o, t, c, X> to the consensus node; where o represents the specific operation of the request, t represents the timestamp of the request, and X is a random value selected by the client;
步骤4.2:当共识节点验证自己为主节点时,在视图v中为这个请求分配一个序列号n,并向其他从节点广播一个pre-prepare消息<<PRE-PREPARE,v,n,d><Verify<Pk,y,Proof>,m>,其中v为视图编号,m为客户端请求消息,d为消息m的摘要,Pk为主节点的公钥,y为主节点生成的随机数,Proof为主节点生成的证明函数;Step 4.2: When the consensus node verifies that it is the master node, it assigns a sequence number n to the request in view v, and broadcasts a pre-prepare message to other slave nodes <<PRE-PREPARE, v, n, d>< Verify<Pk, y, Proof>, m>, where v is the view number, m is the client request message, d is the digest of message m, Pk is the public key of the master node, y is the random number generated by the master node, Proof The proof function generated by the master node;
步骤4.3:从节点收到主节点发送的消息,从节点验证主节点身份和消息的有效性;消息验证通过,每个从节点向除自己外的其他共识节点发送一个prepare消息<PREPARE,v,n,d,i>,其中i为节点编号;Step 4.3: The slave node receives the message sent by the master node, and the slave node verifies the master node's identity and the validity of the message; if the message verification passes, each slave node sends a prepare message to other consensus nodes except itself < PREPARE, v, n, d, i>, where i is the node number;
步骤4.4:每个共识节点验证收到的消息,收到除自己外的不同共识节点发送的2f个有效消息时,将向客户端发送回应消息;客户端收到f+1相同的回复消息<REPLY,v,t,c,i,r>,共识完成。Step 4.4: Each consensus node verifies the received message, and when it receives 2f valid messages sent by different consensus nodes except itself, it will send a response message to the client; the client receives the same response message of f+1< REPLY, v, t, c, i, r>, the consensus is complete.
本发明有益技术效果:Beneficial technical effects of the present invention:
本发明引入Vague集转化为模糊集的具体值作为节点信誉值作为选取代表节点的依据,更好降低恶意节点被选为共识节点的概率。引入可验证随机函数选择主节点,增加了主节点的不可预测性,提高系统安全性。简化了原PBFT算法的共识过程,将三阶段算法优化改为两阶段,取消提交阶段,从而减少节点间的通信频率,提高算法性能。The present invention introduces the specific value of the Vague set converted into the fuzzy set as the node reputation value as the basis for selecting the representative node, and better reduces the probability of the malicious node being selected as the consensus node. The introduction of a verifiable random function to select the master node increases the unpredictability of the master node and improves system security. The consensus process of the original PBFT algorithm is simplified, the three-stage algorithm optimization is changed to two stages, and the submission stage is cancelled, thereby reducing the communication frequency between nodes and improving the algorithm performance.
附图说明Description of drawings
图1本发明一种基于分组信誉值的PBFT共识优化方法的流程图。Fig. 1 is a flow chart of a method for optimizing PBFT consensus based on group reputation value of the present invention.
图2本发明一种基于分组信誉值的PBFT共识优化方法中GV-PBFT的算法流程图。FIG. 2 is an algorithm flow chart of GV-PBFT in a PBFT consensus optimization method based on group reputation value of the present invention.
图3本发明实施例PBFT算法流程图。FIG. 3 is a flowchart of a PBFT algorithm according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明做进一步说明;The present invention will be further described below in conjunction with the accompanying drawings and embodiments;
本发明针对联盟链中原有的PBFT共识算法时延长、吞吐量高和主节点选择随意的问题提出一种基于分组信誉值的PBFT共识优化算法。算法首先对节点进行动态分组,在组内根据Vague集的得分作为每个节点信誉值选出代表节点,有代表节点进行全局共识,因为Vague集融入投票中的三种情况更符合现实,可以更准确的对节点做出评价,减少异常节点的参与。在代表节点中使用可验证随机函数随机确定主节点,使主节点不可预测,保护系统安全。由于信誉评价增加了主节点为诚实节点的概率,所以可以将共识过程简化为两阶段,以减少通信次数。The invention proposes a PBFT consensus optimization algorithm based on group reputation value to solve the problems of time extension, high throughput and random selection of main nodes in the original PBFT consensus algorithm in the alliance chain. The algorithm first dynamically groups nodes, and selects representative nodes in the group according to the score of the Vague set as the reputation value of each node. There are representative nodes for global consensus, because the three situations in which the Vague set is integrated into the voting are more realistic and can be more realistic. Accurately evaluate nodes and reduce the participation of abnormal nodes. Use a verifiable random function in the representative node to randomly determine the master node, making the master node unpredictable and protecting the security of the system. Since reputation evaluation increases the probability that the master node is an honest node, the consensus process can be simplified into two stages to reduce the number of communications.
本发明提供了一种基于分组信誉值的PBFT共识优化方法,解决了原PBFT共识机制节点数量增多,共识吞吐量低,时延长和主节点选择随意的问题。如附图1所示,具体步骤如下:The invention provides a PBFT consensus optimization method based on group reputation value, which solves the problems of the original PBFT consensus mechanism that the number of nodes increases, the consensus throughput is low, the time is prolonged, and the main node is selected arbitrarily. As shown in Figure 1, the specific steps are as follows:
步骤1:对全网节点进行分组,便于在节点的选择上做了相应的筛选,控制参与共识算法节点的数量;Step 1: Group the nodes of the entire network to facilitate the selection of nodes and control the number of nodes participating in the consensus algorithm;
步骤1.1:在网络中的所有节点都会被保存在一份列表中,根据列表上节点的地址标识,从而把节点划分成若干节点组,且每个小组的节点数是存在一个上限的,设上限值为L;Step 1.1: All nodes in the network will be stored in a list. According to the address identification of the nodes on the list, the nodes are divided into several node groups, and the number of nodes in each group has an upper limit. The limit is L;
步骤1.2:当网络中出现新的节点a时,它需要向周边发送自己的公钥P,接着节点a进入等待状态,Step 1.2: When a new node a appears in the network, it needs to send its own public key P to the surrounding, and then node a enters the waiting state,
步骤1.3:网络中的其他节点b在收到a的请求信息后,首先确认自己所在的小组的节点数字未达到上限L,再将接受a加入所在小组的信息放入事件中,向周围节点传递,表示该节点已加入本小组;Step 1.3: After the other node b in the network receives the request information from a, it first confirms that the number of nodes in its own group does not reach the upper limit L, and then puts the information of accepting a to join the group in the event and transmits it to the surrounding nodes , indicating that the node has joined the group;
步骤1.4:节点a收到接受加入信息后,确认加入该小组,并再次发生回执信息,表示自己接受成功;Step 1.4: After receiving the acceptance information, node a confirms to join the group, and the receipt information occurs again, indicating that the acceptance is successful;
步骤1.5:节点b收到该信息后向全网节点广播,更新小组节点列表,且将最新列表同步至节点a中,a接着同步全网的所有数据信息;Step 1.5: After receiving the information, node b broadcasts it to the nodes of the entire network, updates the group node list, and synchronizes the latest list to node a, and then a synchronizes all data information of the entire network;
步骤2:每个节点组通过将Vague集点对点的投票值转化为模糊集的具体值作为节点信誉值,选择每个组内最高信誉值的节点作为代表节点参与共识,即共识节点;Step 2: Each node group converts the point-to-point voting value of the Vague set into the specific value of the fuzzy set as the node reputation value, and selects the node with the highest reputation value in each group as the representative node to participate in the consensus, that is, the consensus node;
所述将Vague集转化为模糊集的具体值作为节点信誉值,具体公式如下:The specific value of converting the Vague set into the fuzzy set is used as the node reputation value, and the specific formula is as follows:
其中,[tP(x),1-fP(x)]一般代表x的模糊值;使用投票模型来解释Vague集的概念,表示当支持票的票数多余不支持票的票数时,投弃权票的人可能更倾向于支持的一方,反之就是更倾向于不支持的一方;λ是一个常数,λ>0通常取1;Among them, [t P (x), 1-f P (x)] generally represents the fuzzy value of x; the voting model is used to explain the concept of the Vague set, which means that when the number of supporting votes exceeds the number of non-supporting votes, abstain from voting The person who votes may be more inclined to the side that supports, and vice versa is more inclined to the side that does not support; λ is a constant, λ>0 usually takes 1;
比如有10个人进行投票,假设P是U中的一个Vague集,x∈U并且Vague的值为[0.5,0.9],所以tp(x)=0.5,fp(x)=1-0.9=0.1,那么Vague的值为[0.5,0.9]说明投支持票的人有5个,投不支持票的人有1个,4个人弃权;For example, there are 10 people voting, assuming that P is a Vague set in U, x ∈ U and the value of Vague is [0.5, 0.9], so t p (x) = 0.5, f p (x) = 1-0.9 = 0.1, then the value of Vague is [0.5, 0.9], indicating that there are 5 people who voted for it, 1 person who voted not, and 4 people abstained;
步骤3:在共识节点中使用可验证随机函数随机选取主节点,增加主节点的不可预测性;Step 3: Use a verifiable random function in the consensus node to randomly select the master node to increase the unpredictability of the master node;
在共识节点中根据可验证随机函数选取主节点,具体步骤如下:In the consensus node, the master node is selected according to the verifiable random function. The specific steps are as follows:
步骤3.1:每个共识节点将私钥Sk和消息X作为输入,生成随机数y和证明函数Proof;Step 3.1: Each consensus node takes private key Sk and message X as input to generate random number y and proof function Proof;
步骤3.2:判断共识节点是否为主节点,如果满足如下公式的条件就返回YES,成为主节点;Step 3.2: Determine whether the consensus node is the master node, if it meets the conditions of the following formula, it will return YES and become the master node;
当某一个节点验证成为主节点后,其他共识节点为从节点;When a node is verified as the master node, other consensus nodes are slave nodes;
步骤4:通过GV-PBFT算法在共识节点间进行共识,实现全局共识;如附图2所示;Step 4: Consensus is achieved among consensus nodes through the GV-PBFT algorithm to achieve global consensus; as shown in Figure 2;
所述GV-PBFT算法基于PBFT算法通过信誉值计算,在信誉高的代表节点中随机选择作为主节点,增加了主节点为诚实节点的概率,将三阶段算法优化改为两阶段,取消提交阶段从而得到的;The GV-PBFT algorithm calculates the reputation value based on the PBFT algorithm, and randomly selects the representative nodes with high reputation as the master node, which increases the probability of the master node being an honest node. The three-stage algorithm optimization is changed to two stages, and the submission stage is cancelled. thus obtained;
步骤4.1:客户端c向共识节点发送请求消息<REQUEST,o,t,c,X>;其中o表示请求的具体操作,t表示请求的时间戳,X为客户端选择的随机值;Step 4.1: Client c sends a request message <REQUEST, o, t, c, X> to the consensus node; where o represents the specific operation of the request, t represents the timestamp of the request, and X is a random value selected by the client;
步骤4.2:当共识节点验证自己为主节点时,在视图v中为这个请求分配一个序列号n,并向其他从节点广播一个pre-prepare消息<<PRE-PREPARE,v,n,d><Verify<Pk,y,Proof>,m>,其中v为视图编号,m为客户端请求消息,d为消息m的摘要,Pk为主节点的公钥,y为主节点生成的随机数,Proof为主节点生成的证明函数;Step 4.2: When the consensus node verifies that it is the master node, it assigns a sequence number n to the request in view v, and broadcasts a pre-prepare message to other slave nodes <<PRE-PREPARE, v, n, d>< Verify<Pk, y, Proof>, m>, where v is the view number, m is the client request message, d is the digest of message m, Pk is the public key of the master node, y is the random number generated by the master node, Proof The proof function generated by the master node;
步骤4.3:从节点收到主节点发送的消息,从节点验证主节点身份和消息的有效性;消息验证通过,每个从节点向除自己外的其他共识节点发送一个prepare消息<PREPARE,v,n,d,i>,其中i为节点编号;Step 4.3: The slave node receives the message sent by the master node, and the slave node verifies the master node's identity and the validity of the message; if the message verification passes, each slave node sends a prepare message to other consensus nodes except itself < PREPARE, v, n, d, i>, where i is the node number;
步骤4.4:每个共识节点验证收到的消息,收到除自己外的不同共识节点发送的2f个有效消息时,将向客户端发送回应消息;客户端收到f+1相同的回复消息<REPLY,v,t,c,i,r>,共识完成。Step 4.4: Each consensus node verifies the received message, and when it receives 2f valid messages sent by different consensus nodes except itself, it will send a response message to the client; the client receives the same response message of f+1< REPLY, v, t, c, i, r>, the consensus is complete.
如附图3所示,可以看到PBFT的三个阶段过程包括预准备、准备和提交。PBFT算法达成共识具体步骤为:As shown in Figure 3, it can be seen that the three-stage process of PBFT includes pre-preparation, preparation and submission. The specific steps for reaching a consensus in the PBFT algorithm are:
在预准备阶段,客户端首先向主节点发送请求。主节点检查并处理客户端的请求,然后向从节点广播预准备消息。每个从节点接收并验证预准备消息的有效性。消息一旦验证正确通过,从节点将接受请求并开始准备阶段。In the preparation phase, the client first sends a request to the master node. The master node checks and processes the client's request, and then broadcasts a prepare message to the slave nodes. Each slave node receives and verifies the validity of the prepared message. Once the message is verified correctly, the slave node will accept the request and begin the preparation phase.
在准备阶段,每个从节点向其他节点传递消息,同时他们也接受其他从节点发送过来的消息并核对消息的有效性。当从节点从不同的从节点获得2f有效的准备消息时,准备阶段结束,其中f为恶意节点数。In the preparation phase, each slave node transmits messages to other nodes, and at the same time, they also receive messages from other slave nodes and check the validity of the messages. The preparation phase ends when the slave node obtains 2f valid prepare messages from different slave nodes, where f is the number of malicious nodes.
在提交阶段,每个节点向其他节点广播提交消息进行验证,一旦处于准备阶段的节点接收到包括其他自身在内的消息数量等于或大于2f+1,它将向客户端发送回复消息。当客户端收到回复消息,客户收到相同回复消息的f+1时,达成共识。In the commit phase, each node broadcasts a commit message to other nodes for verification, and once a node in the preparation phase receives a number of messages including other itself equal to or greater than 2f+1, it will send a reply message to the client. When the client receives a reply message and the client receives f+1 of the same reply message, a consensus is reached.
原有的PBFT共识算法有预准备、准备和提交三个阶段,提交阶段是为了确保有足够的可信的节点完成提案的验证。当主节点是诚实节点的情况下,两阶段就可以达成共识,不需要提交阶段。而GV-PBFT算法通过信誉值计算,在信誉高的代表节点中随机选择作为主节点,增加了主节点为诚实节点的概率,所以GV-PBFT算法将三阶段算法优化改为两阶段,取消提交阶段。GV-PBFT在吞吐量和时延方面比原有的PBFT都有所提高。简化了原PBFT算法的共识过程,将三阶段算法优化改为两阶段,取消提交阶段,从而减少节点间的通信频率,提高算法性能。The original PBFT consensus algorithm has three stages: pre-preparation, preparation and submission. The submission stage is to ensure that there are enough trusted nodes to complete the verification of the proposal. When the master node is an honest node, consensus can be reached in two phases, and no commit phase is required. The GV-PBFT algorithm calculates the reputation value and randomly selects the representative nodes with high reputation as the master node, which increases the probability that the master node is an honest node. Therefore, the GV-PBFT algorithm optimizes the three-stage algorithm to two stages, and cancels the submission. stage. GV-PBFT has improved both throughput and delay than the original PBFT. The consensus process of the original PBFT algorithm is simplified, the three-stage algorithm optimization is changed to two stages, and the submission stage is cancelled, thereby reducing the communication frequency between nodes and improving the algorithm performance.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210829750.4A CN115065468B (en) | 2022-07-15 | 2022-07-15 | A PBFT consensus optimization method based on group reputation value |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210829750.4A CN115065468B (en) | 2022-07-15 | 2022-07-15 | A PBFT consensus optimization method based on group reputation value |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115065468A true CN115065468A (en) | 2022-09-16 |
CN115065468B CN115065468B (en) | 2024-04-30 |
Family
ID=83205655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210829750.4A Active CN115065468B (en) | 2022-07-15 | 2022-07-15 | A PBFT consensus optimization method based on group reputation value |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115065468B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115664684A (en) * | 2022-12-27 | 2023-01-31 | 湖南工商大学 | Consensus protocol operation method, device and related equipment fused with digital evidence |
CN117408718A (en) * | 2023-12-14 | 2024-01-16 | 南京邮电大学 | A PBFT optimization method for large-scale pharmaceutical traceability |
CN117478684A (en) * | 2023-11-10 | 2024-01-30 | 山东大学 | Multi-chain reputation-based consensus mechanism |
CN117879860A (en) * | 2023-12-01 | 2024-04-12 | 中国民航信息网络股份有限公司 | Trusted data verification processing method, device and equipment based on blockchain |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110493198A (en) * | 2019-07-26 | 2019-11-22 | 北京工业大学 | A method of it is attacked based on Sybil in PBFT algorithm defence block chain is improved |
WO2020138606A1 (en) * | 2018-12-28 | 2020-07-02 | 연세대학교 산학협력단 | Fault-tolerant consensus method for eliminating obstacle factors of consensus in blockchain network |
CN114003584A (en) * | 2021-11-02 | 2022-02-01 | 贵州大学 | Byzantine fault-tolerant consensus method based on evolutionary game |
WO2022027531A1 (en) * | 2020-08-03 | 2022-02-10 | 西安电子科技大学 | Blockchain construction method and system, and storage medium, computer device and application |
-
2022
- 2022-07-15 CN CN202210829750.4A patent/CN115065468B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020138606A1 (en) * | 2018-12-28 | 2020-07-02 | 연세대학교 산학협력단 | Fault-tolerant consensus method for eliminating obstacle factors of consensus in blockchain network |
CN110493198A (en) * | 2019-07-26 | 2019-11-22 | 北京工业大学 | A method of it is attacked based on Sybil in PBFT algorithm defence block chain is improved |
WO2022027531A1 (en) * | 2020-08-03 | 2022-02-10 | 西安电子科技大学 | Blockchain construction method and system, and storage medium, computer device and application |
CN114003584A (en) * | 2021-11-02 | 2022-02-01 | 贵州大学 | Byzantine fault-tolerant consensus method based on evolutionary game |
Non-Patent Citations (2)
Title |
---|
包振山;王凯旋;张文博;: "基于树形拓扑网络的实用拜占庭容错共识算法", 应用科学学报, no. 01, 30 January 2020 (2020-01-30) * |
赖英旭;薄尊旭;刘静;: "基于改进PBFT算法防御区块链中sybil攻击的研究", 通信学报, no. 09, 25 September 2020 (2020-09-25) * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115664684A (en) * | 2022-12-27 | 2023-01-31 | 湖南工商大学 | Consensus protocol operation method, device and related equipment fused with digital evidence |
CN115664684B (en) * | 2022-12-27 | 2023-04-18 | 湖南工商大学 | Consensus protocol operation method, device and related equipment fused with digital evidence |
CN117478684A (en) * | 2023-11-10 | 2024-01-30 | 山东大学 | Multi-chain reputation-based consensus mechanism |
CN117879860A (en) * | 2023-12-01 | 2024-04-12 | 中国民航信息网络股份有限公司 | Trusted data verification processing method, device and equipment based on blockchain |
CN117879860B (en) * | 2023-12-01 | 2024-10-08 | 中国民航信息网络股份有限公司 | Trusted data verification processing method, device and equipment based on blockchain |
CN117408718A (en) * | 2023-12-14 | 2024-01-16 | 南京邮电大学 | A PBFT optimization method for large-scale pharmaceutical traceability |
CN117408718B (en) * | 2023-12-14 | 2024-03-08 | 南京邮电大学 | PBFT optimization method for large-scale medicine traceability |
Also Published As
Publication number | Publication date |
---|---|
CN115065468B (en) | 2024-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112039964B (en) | A Node Reputation Consensus Method Based on Blockchain | |
CN115065468A (en) | PBFT consensus optimization method based on grouping reputation value | |
CN108492103B (en) | Joint block chain consensus method | |
CN110784346B (en) | Reputation value-based PBFT consensus system and method | |
CN108269090B (en) | Consensus method and device for block chain system based on non-negotiation random drawing | |
CN113570357B (en) | A Dynamically Hierarchical Efficient PBFT Algorithm | |
CN110677485A (en) | Dynamic layered Byzantine fault-tolerant consensus method based on credit | |
CN109255713A (en) | In a kind of block chain network in certain time period book keeping operation power acquisition methods | |
CN111682942B (en) | A Binary Weighted Byzantine Fault Tolerant Consensus Method Applied to Permissioned Chains | |
CN113660125B (en) | A consensus method and device based on a random trusted committee | |
Yuan et al. | Efficient Byzantine consensus mechanism based on reputation in IoT blockchain | |
CN112636905B (en) | System and method for extensible consensus mechanism based on multiple roles | |
CN113132401B (en) | Block chain-based data processing method and device | |
CN111582843A (en) | Block chain privacy transaction method based on aggregated signature | |
US20220278854A1 (en) | Unity Protocol Consensus | |
CN114615281B (en) | Block chaining and block outputting method based on small-scale committee and PoS protocol confirmation method | |
CN116389149A (en) | Reputation value-based extensible Bayesian-family fault-tolerant consensus method | |
CN116614516A (en) | PBFT consensus method based on reputation improvement | |
CN115766035A (en) | Multi-node consensus method and system | |
CN113422805A (en) | Fragment consensus method based on verifiable random function | |
CN113259179A (en) | Byzantine fault-tolerant consensus method and system based on node scoring | |
CN114301598A (en) | Block chain consensus algorithm, system and storage medium based on hierarchical authority | |
CN117375794A (en) | A cloud-blockchain hybrid consensus method based on Internet of Vehicles | |
CN110555764B (en) | Method and system for block chain consistency under decentralized environment | |
CN114640500B (en) | Service-based alliance chain efficient consensus method |
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 |