# 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 master node is responsible for coordinating the subsequent steps. 2. Pre-prepare phase: The master node broadcasts a pre-prepare message containing the request digest and a unique sequence number. Upon receiving the message, replica nodes verify its authenticity and log it locally, ensuring data consistency across the network. 3. Prepare phase: The replica node sends prepare messages to acknowledge the receipt of the pre-prepare message, including the request summary, sequence number, and formal acknowledgment. The next step is triggered when the node has accumulated a sufficient number of prepare messages. 4. Commit phase: The replica node sends a commit message to inform other nodes that the request has been validated and approved. This message includes the request summary, sequence number, and acknowledgment to reinforce consensus. Once the node receives a sufficient number of commit messages, it can execute the request. 5. Reply phase: the replica node sends a reply message to the client with the execution result. The client confirms a successful execution upon receiving enough reply messages. This phased process enables PBFT to securely and efficiently process transactions while resisting Byzantine faults, enhancing system stability and reliability [84]. Figure 8: The PBFT consensus protocol. Figure 7: The architecture of a blockchain-based traceability system with a PBFT consensus algorithm. 2. View change protocol In the context of blockchain consensus mechanisms [85], such as Practical Byzantine Fault Tolerance (PBFT), the view change protocol serves as an essential fault-tolerance strategy [86]. This mechanism is particularly useful in circumstances where the current leader node becomes unresponsive or fails to act within expected parameters. When the participating nodes detect that the leader does not achieve consensus within a set timeframe, a view change is initiated to facilitate the election of a new leader. This proactive measure not only ensures the smooth continuity of system operations but also significantly enhances the overall fault tolerance of the network. As illustrated in Figure 9, the view change process in PBFT consists of two main phases: the normal consensus phase and the view change phase [87]. (1) Normal Consensus Phase Initially, Node0 acts as the leader, coordinating the consensus process, while other nodes (Node1, Node2, and Node3) participate in validation and voting. If the leader (Node0) fails to reach consensus effectively, the nodes mark it as invalid, triggering the transition to the view change phase. (2) View Change Phase The system initiates the view change mechanism, wherein all nodes collaborate to elect a new leader. In the diagram, Node1 is selected as the new leader, taking over the responsibility of coordinating the consensus process [88]. The newly elected leader synchronizes the network, restoring consensus operations and ensuring blockchain stability. The view change mechanism enhances protocol robustness, keeping the network operational despite node failures or adversarial behavior. Figure 9: A flowchart of the view switching process. Although the Practical Byzantine Fault Tolerance (PBFT) algorithm allows the system to function normally even in the presence of faulty or malicious nodes [89], it has attracted significant attention. However, several issues have been exposed in the practical application of the PBFT algorithm. These deficiencies primarily include the following aspects:  
1. The leader selection mechanism in the PBFT algorithm is relatively arbitrary, which can result in unstable leader performance or an increased risk of attacks from malicious nodes, thereby leading to frequent view changes that impact the system's overall performance. 2. The PBFT consensus algorithm utilizes a three-phase communication model. While it ensures the security of consensus, the communication overhead significantly increases in large-scale networks, which reduces the overall efficiency of the system. 3.