# The Evolution and Optimization Strategies of a PBFT Consensus Algorithm for Consortium Blockchains
## 3 An Introduction to Mainstream Consensus Algorithms
### The Mainstream Consensus Algorithms Used in Consortium Blockchains
#### 3.3.3 PBFT  
The PBFT (Practical Byzantine Fault Tolerance) consensus algorithm is based on Byzantine fault tolerance [79] and is designed to address the problem of Byzantine failures in distributed systems. It reaches consensus through communication and collaboration between nodes to ensure that the system remains secure and consistent even in the presence of faulty nodes. The core idea of the algorithm is to eliminate the influence of faulty or malicious nodes by implementing mutual verification and consensus among multiple nodes, thus ensuring the normal operation of the entire system. Nodes verify messages received from the master node and other nodes, using mechanisms such as signatures and message digests to assess the consistency and legitimacy of the messages. A node moves to the next stage and broadcasts its message to other nodes only when it receives a sufficient number of valid messages (\(2\mathrm{f}+1\) valid messages, where \(\mathrm{f}\) denotes the number of Byzantine nodes). Through the process of collaboration and validation between nodes, PBFT can reach consensus, thus ensuring that the system remains secure and consistent even in the face of Byzantine failures [80]. Current traceability systems mainly rely on centralized databases managed by enterprises or third-party organizations [81]; however, this model has many challenges, such as a high risk of data tampering, lack of transparency, and expensive trust costs. In addition, due to limited data sharing between various links in the supply chain, a complete traceability chain is difficult to establish, which in turn affects the confidence of consumers and regulators. Blockchain technology, with its decentralized architecture, data immutability and traceability features, provides an ideal solution to such problems. The introduction of smart contracts allows transactions to be executed automatically, ensuring the authenticity and tamperability of data on the chain, while reducing reliance on intermediaries and increasing transparency. In addition, multi-node consensus mechanisms, such as PBFT, strengthen data consistency and enhance the security and reliability of the system. Figure 7 illustrates a traceability system based on PBFT. The system comprises four key nodes--producer, transporter, seller, and consumer--that interact via blockchain to store and verify transaction data, enhancing transparency and traceability [82]. (1) PBFT consensus protocol  
The PBFT consensus protocol is the core of the consensus algorithm [83], which is responsible for coordinating all nodes in the network to agree on the order of transaction requests. The consensus process is divided into five phases: request, pre-prepare, prepare, commit and reply, each of which plays a key role in guaranteeing the integrity and reliability of the consensus. Figure 8 visually illustrates the execution of the PBFT consensus protocol. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Author** & **Year** & **Improvement Method** & **Core Mechanism** & **Limitations** \\ \hline \multirow{2}{*}{[PERSON] [76]} & \multirow{2}{*}{2018} & Stream Processing Pipeline & Verifying Kafka’s reliability in high-volume & Focuses on verification rather than \\  & & Performance Analysis & data streams. & introducing improvements. \\ \hline \multirow{2}{*}{[PERSON] [77]} & \multirow{2}{*}{2020} & Comparison of Kafka and Raft & A comparison of fault tolerance mechanisms & Provides comparative insights but does \\  & & Log Replication & and leader election strategies. & not propose new solutions. \\ \hline \multirow{2}{*}{[PERSON] [78]} & \multirow{2}{*}{2022} & Blockchain Consensus & The quantification of Kafka’s resource & Focuses on resource usage analysis \\  & & Resource Analysis & overhead in Hyperledger. & without optimization strategies. \\ \hline \hline \end{tabular}
\end{table} 
Table 8: _Cont._The overall protocol execution process is as follows:  
1. Request phase: the client sends a request to the master node to start the consensus process.