Fibonacci Group Consensus Algorithm Based on Node Evaluation Mechanisms
Abstract
:1. Introduction
2. Design of SP-PBFT Consensus Algorithm
2.1. Algorithm Improvement Proposal
- (1)
- Pre-preparation: the master node sends <<Pre-prepare,v,h,H(B),P>,B> message to all the backup nodes, and the backup nodes receive the provided Pre-prepare message.
- (2)
- Preparation 1: The backup node i returns the <<Prepare-1,v,h,H(B),i>,Votet(Bh,i)> message to the master node after receiving the Prepare message, and the master node receives the provided Prepare-1 message.
- (3)
- Confirmation 1: If the master node receives 2f + 1 consistent Prepare-1 messages from different backup nodes, i.e., the master node has 2f + 1 (possibly including its own) affirmative votes on block Bh, it can immediately synchronize block Bh and broadcast the message <<Commit-1,v,h,H(B),p>,Cert(Bh)>> to all the backup nodes, and if the backup node receives the Commit-1 message before t1, it can synchronize block Bh, and the backup node receives the provided Commit-1 message.
- (4)
- Preparation 2: If backup node i does not receive a Commit-1 message before t1, it broadcasts a <<Prepare-2,v,h,H(B),i>,Votet(Bh,i)> message to all other consensus nodes, which receive the provided Prepare-2 message.
- (5)
- Confirm 2: If backup node i receives a Prepare-2 message and a Commit-1 message, it broadcasts a <<Commit-2,v,h,H(B),i>,Cert(Bh)> message to all other backups, otherwise it waits until it receives at least 2f + 1 (possibly including its own) consistent Prepare-2 messages, then broadcasts a <<Commit-2,v,h,H(B),i>,VoteSet(Bh,i)> message to all other consensus nodes, and if the backup receives a Commit-2 message containing the block certificate or receives at least 2f + 1 consistent Commit-2 messages containing the vote set prior to t2, they can synchronize the block Bh, and the backup node receives the provided Commit-2 message.
2.2. Algorithm Notation
- (1)
- The algorithm contains a total of n nodes; the set of consensus nodes is denoted by R, including master and slave nodes; the ith consensus node is denoted by Ri; and the set of candidate nodes is denoted by s.
- (2)
- The algorithm has certain requirements on the number of nodes; if there are f Byzantine nodes in the system, the total number of all the nodes must be made larger than 3f + 1 to accomplish the consensus, which is usually made equal to 3f + 1 under experimental conditions to reduce the load on the system.
- (3)
- Meanings of the symbols in the system: v: view number; p: master node; h: block height; B: block; H(B): summary of block B; Bh: block B has height h; Vote(Bh,i): votes on block Bh generated by node i; VoteSet(Bh,i): node i receives a set of votes on block Bh; Cert(Bh): a block certificate, which contains on block Bh at least 2f + 1 favorable votes, can be used to verify the validity of block Bh.
2.3. Node Evaluation Mechanism
Algorithm 1 Node Reputation Value Initialization. |
Input: Time, Report, Trade, Credit, C, times, R, S; 1: Begin 2: set R = {Ri| 0 ≤ i ≤ |R| − 1} 3: for Ri∈R 4: Ri. Time = 0; 5: Ri. Report = 0; 6: Ri. Trade = 0; 7: Ri. Credit = 0; 8: Value = Report + Trade + Credit − Time; 9: end for 10: set S = {Si| 0 ≤ i ≤ |S| − 1} 11: for Si∈S 12: Si. Time = 0; 13: Si. Report = 0; 14: Si. Trade = 0; 15: Si. Credit = 0; 16: Value = Report + Trade + Credit − Time; 17: end for 18: set C = 0; 19: set times = 0; 20: end Output: R, S, Value, V, times; |
Algorithm 2 Consensus Node Selection. |
Input: Time, Report, Trade, Credit, C, times, R, S; 1: Begin 2: for Ri∈R 3: Value = Report + Trade + Credit − Time; 4: end for 5: if (Ri. Value < C)||(Ri == S&&Ri ∉R) //Determine whether the reputation value of Ri node exceeds the consensus node reputation value threshold 6: set temp = Ri; 7: set Ri = S. max; 8: S. max = temp; 9: times = times + 1; 10: for S. max∈S //Place the eliminated consensus nodes in the candidate node set and sort them by reputation value 11: if(S[i] < S[i − 1]) 12: S [0] = S[i]; 13: for (j = i − 1; S [0] < S[j]; --j) 14: S[j + 1] = S[j]; 15: S[j + 1] = S [0]; 16: end for 17: end if 18: end for 19: end if 20: end Output: R, S, Value, times; |
2.4. Fibonacci Grouping
- (1)
- Enthusiasm: The Fibonacci function ensures that every node has the opportunity to become a consensus node, rather than only nodes with high reputation values having the opportunity to participate in consensus. This can improve the enthusiasm of nodes to become consensus nodes.
- (2)
- Mathematical proof: The properties of the Fibonacci sequence may make the analysis and proof of the algorithm simpler, allowing for fast computation and transmission between nodes, thereby reducing communication complexity and improving consensus efficiency.
- (3)
- Performance balance: Fibonacci sequences have certain mathematical characteristics that can provide appropriate thresholds while pursuing performance balance. In consensus algorithms, performance balancing is an important consideration to ensure high throughput and low latency.
- (4)
- Threshold adjustment: The Fibonacci sequence can be used to dynamically adjust the number of nodes participating in consensus. This is beneficial for adapting to different network conditions, node failure rates, and security requirements.
- (5)
- Simplicity: The Fibonacci sequence can simplify algorithm implementation to a certain extent, as it provides a simple way to adjust the number of voting rounds and confirmation stage.
2.4.1. Consensus Node Selection
2.4.2. Master Node Selection
3. Analysis of Theoretical and Experimental Results
3.1. Theoretical Analysis
3.1.1. Security Analysis
3.1.2. Consensus Efficiency Analysis
- (1)
- The consensus protocol is optimized by using the idea of speculation. When the system has no delay, only the optimistic mode is executed to reduce the communication complexity.
- (2)
- Secondly, a node evaluation mechanism is proposed to calculate the reputation value according to the historical behavior of the node so that the consensus nodes are well-behaved nodes and the probability of view switching is reduced.
- (3)
- The Fibonacci group consensus is proposed, and only half of the nodes in each group are selected to participate in the consensus, which reduces the number of nodes participating in the consensus and fundamentally improves the efficiency of consensus.
3.1.3. Feasibility Analysis
- (1)
- Reduce latency: The performance of PBFT is affected by the latency of network communication and message delivery. Reducing the number of nodes participating in consensus can reduce the load on message delivery and communication, thereby reducing the overall consensus latency.
- (2)
- Reduce computing costs: Consensus algorithms require participating nodes to perform calculations, signatures, and other operations. Reducing the number of nodes can reduce computational costs and resource consumption.
- (3)
- Simplify coordination: A smaller number of nodes may simplify the coordination process of consensus protocols and reduce complexity.
- (1)
- Security considerations: The PBFT algorithm is a fault-tolerant consensus algorithm that can tolerate a certain number of Byzantine errors (malicious behavior). Reducing the number of nodes may reduce the system’s ability to resist attacks. However, this article not only has a pessimistic mode but also proposes a node evaluation mechanism, which scores based on the historical behavior of nodes. The malicious nodes detected using this method cannot successfully participate in consensus and can only react to the consensus process. Therefore, reducing the number of nodes can ensure that the system is still safe enough to tolerate a certain number of malicious nodes.
- (2)
- Distributed: One of the advantages of PBFT is its distributed nature, which can achieve consensus in a decentralized environment. Reducing the number of nodes may lead to centralization risk and reduce the distributed nature of the system. However, this article proposes an improved PBFT consensus algorithm based on the node-grouping reputation model. By arranging all nodes in descending order of reputation values and grouping them according to the Fibonacci function, consensus nodes are selected within the group, thus solving the problem of node reputation accumulation in reputation-mechanism-based consensus algorithms. Each participating node is not the same and will be evaluated based on historical behavior. This reduces the degree of system centralization and enhances the enthusiasm of nodes to become consensus nodes.
3.2. Analysis of Experimental Results
3.2.1. Throughput
3.2.2. Time Delay Analysis
3.2.3. Fault Tolerance
3.2.4. Communication Complexity
3.3. Comparison of Related Consensus Algorithms
- (1)
- The SP-PBFT algorithm introduces a node evaluation mechanism, which applies rewards or penalties based on historical node behavior. This mechanism serves to enhance the security of the consensus process.
- (2)
- The SP-PBFT algorithm offers the capability to identify Byzantine nodes, consequently reducing the likelihood of these malicious nodes participating in the consensus process. This contributes to the system’s robustness and optimization of the view-switching protocol, ultimately leading to enhanced consensus speed.
- (3)
- The SP-PBFT algorithm reduces the communication overhead in the network, adopts the speculative method to optimize the consensus protocol, and the communication complexity required to reach consensus in the optimistic mode is reduced from O(n2) to O(n).
- (4)
- The SP-PBFT algorithm introduces Fibonacci grouping, which, when combined with the reputation value within the node evaluation mechanism, facilitates the selection of master and consensus nodes. This strategic combination reduces the volume of nodes involved in the consensus process, leading to a fundamental enhancement in consensus efficiency.
4. Conclusions and Outlook
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Etemadi, N.; Van Gelder, P.; Strozzi, F. An ISM Modeling of Barriers for Blockchain/Distributed Ledger Technology Adoption in Supply Chains towards Cybersecurity. Sustainability 2021, 13, 4672. [Google Scholar] [CrossRef]
- Ali, O.; Ally, M.; Dwivedi, Y. The state of play of blockchain technology in the financial services sector: A systematic literature review. Int. J. Inf. Manag. 2020, 54, 102199. [Google Scholar] [CrossRef]
- Balamurugan, S.; Ayyasamy, A.; Joseph, K.S. IoT-Blockchain driven traceability techniques for improved safety measures in food supply chain. Int. J. Inf. Technol. 2021, 14, 1087–1098. [Google Scholar] [CrossRef]
- Feng, C.; Liu, B.; Yu, K.; Goudos, S.K.; Wan, S. Blockchain-Empowered Decentralized Horizontal Federated Learning for 5G-Enabled UAVs. IEEE Trans. Ind. Inform. 2022, 18, 3582–3592. [Google Scholar] [CrossRef]
- Wang, T.; Hua, H.; Wei, Z.; Cao, J. Challenges of blockchain in new generation energy systems and future outlooks. Int. J. Electr. Power Energy Syst. 2022, 135, 107499. [Google Scholar] [CrossRef]
- Leng, J.; Zhou, M.; Zhao, J.L.; Huang, Y.; Bian, Y. Blockchain Security: A Survey of Techniques and Research Directions. IEEE Trans. Serv. Comput. 2022, 15, 2490–2510. [Google Scholar] [CrossRef]
- Xiong, H.; Chen, M.; Wu, C.; Zhao, Y.; Yi, W. Research on Progress of Blockchain Consensus Algorithm: A Review on Recent Progress of Blockchain Consensus Algorithms. Future Internet 2022, 14, 47. [Google Scholar] [CrossRef]
- Suripeddi, M.K.S.; Purandare, P. Blockchain and GDPR—A Study on Compatibility Issues of the Distributed Ledger Technology with GDPR Data Processing. J. Phys. Conf. Ser. 2021, 1964, 042005. [Google Scholar] [CrossRef]
- Li, Y.; Yang, G.; Susilo, W.; Yu, Y.; Au, M.H.; Liu, D. Traceable Monero: Anonymous Cryptocurrency with Enhanced Accountability. IEEE Trans. Dependable Secur. Comput. 2021, 18, 679–691. [Google Scholar] [CrossRef]
- Kim, H. Adjusting the Block Interval in PoW Consensus by Block Interval Process Improvement. Electronics 2021, 10, 2135. [Google Scholar] [CrossRef]
- Saad, M.; Qin, Z.; Ren, K.; Nyang, D.; Mohaisen, D. e-PoS: Making Proof-of-Stake Decentralized and Fair. IEEE Trans. Parallel Distrib. Syst. 2021, 32, 1961–1973. [Google Scholar] [CrossRef]
- Xu, H. Consensus protocol based on DPOS and aggregate signature. In Proceedings of the 2022 3rd International Conference on Computer Vision, Image and Deep Learning & International Conference on Computer Engineering and Applications (CVIDL & ICCEA), Changchun, China, 20–22 May 2022; pp. 1028–1035. [Google Scholar]
- Yang, J.; Jia, Z.; Su, R.; Wu, X.; Qin, J. Improved Fault-Tolerant Consensus Based on the PBFT Algorithm. IEEE Access 2022, 10, 30274–30283. [Google Scholar] [CrossRef]
- Wang, S.; Li, Z.; Jia, Z. Improved PBFT consensus algorithm for randomly selecting main nodes. Comput. Appl. Softw. 2022, 39, 299–306. [Google Scholar]
- Fang, Y.; Deng, J.Q.; Cong, L.H.; Liu, C.Y. An improved PBFT blockchain consensus algorithm based on ring signature. Comput. Eng. 2019, 45, 32–36. [Google Scholar]
- Zhang, M.; Wang, B. Improving Byzantine fault tolerance consensus algorithm based on recommended trust model. Comput. Appl. Res. 2023, 40, 667–670. [Google Scholar]
- Ren, X.; Tong, X.; Zhang, W. PBFT consensus algorithm based on trust evaluation model. J. Shanxi Univ. (Nat. Sci. Ed.) 2023, 46, 108–118. [Google Scholar]
- Qin, W. PBFT Consensus Algorithm Based on Node Partition Clustering. Inf. Technol. Informatiz. 2023, 274, 65–69. [Google Scholar]
- Caldarola, F.; d’Atri, G.; Zanardo, E. Neural Fairness Blockchain Protocol Using an Elliptic Curves Lottery. Mathematics 2022, 10, 3040. [Google Scholar] [CrossRef]
- Patel, D.; Sanghvi, H.; Jadav, N.; Gupta, R.; Tanwar, S.; Florea, B.; Taralunga, D.; Altameem, A.; Altameem, T.; Sharma, R. BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety. Mathematics 2022, 10, 3195. [Google Scholar] [CrossRef]
- Apostu, S.; Panait, M.; Vasa, L.; Mihaescu, C.; Dobrowolski, Z. NFTs and Cryptocurrencies—The Metamorphosis of the Economy under the Sign of Blockchain: A Time Series Approach. Mathematics 2022, 10, 3218. [Google Scholar] [CrossRef]
- Leng, J.; Zhou, M.; Zhao, J.L.; Huang, Y.; Bian, Y. Progress in Blockchain BFT Consensus Algorithm Research. Comput. Sci. 2022, 49, 329–339. [Google Scholar]
- Xiao, B.; Li, Z.; Li, X. Consensus algorithm based on the importance of Fibonacci grouping. Comput. Digit. Eng. 2021, 49, 2509–2513+2525. [Google Scholar]
- APPEL, A.W. Verification of a Cryptographic Primitive: SHA-256. Proc. Soc. Inf. Biliol. 2015, 37, 1–31. [Google Scholar] [CrossRef]
Classification | Characteristic | Advantage |
---|---|---|
Optimistic mode | Node behavior does not apply any protective measures to resist malicious node attacks without delay and with the main node secure | Quickly reach consensus and reduce communication complexity |
Pessimistic mode | When there is a delay in node behavior or when the main node is a malicious node, protective measures are added to the algorithm to resist malicious node attacks | Being able to identify Byzantine nodes in the system and improve the security of the consensus process |
Comparison of Consensus Algorithms | Speculation | Reduce the Number of Consensus Nodes | Communication Complexity |
---|---|---|---|
PBFT | × | × | O(n2) |
T-PBFT | × | × | <O(n2) |
RPBFT | × | × | O(n) |
SP-PBFT | √ | √ | Optimistic mode O(n) or Pessimistic mode O(n2) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shen, X.; Li, X. Fibonacci Group Consensus Algorithm Based on Node Evaluation Mechanisms. Electronics 2023, 12, 3592. https://doi.org/10.3390/electronics12173592
Shen X, Li X. Fibonacci Group Consensus Algorithm Based on Node Evaluation Mechanisms. Electronics. 2023; 12(17):3592. https://doi.org/10.3390/electronics12173592
Chicago/Turabian StyleShen, Xueli, and Xinru Li. 2023. "Fibonacci Group Consensus Algorithm Based on Node Evaluation Mechanisms" Electronics 12, no. 17: 3592. https://doi.org/10.3390/electronics12173592
APA StyleShen, X., & Li, X. (2023). Fibonacci Group Consensus Algorithm Based on Node Evaluation Mechanisms. Electronics, 12(17), 3592. https://doi.org/10.3390/electronics12173592