# The Evolution and Optimization Strategies of a PBFT Consensus Algorithm for Consortium Blockchains
## 4 Analysis of the Improved PBFT Consensus Algorithm
### An Optimized Consensus Algorithm Based on an Optimistic Mechanism
At this point, node 2 collects \(2f+1=5\) identical prepare messages and submits message <m, v, n>. However, the other nodes will receive either {m, m, m, m, m', m'} or {m', m, m, m', m', m'}. Since they fail to receive \(2f+1=5\) identical prepare messages, they will not submit the message, and these nodes will issue a view-change request. The newly selected primary node will collect \(2f+1\) view-change requests to determine the submission status of message <m, v, n>. At this point, there will be view-change requests from nodes 1, 3, 4, 5, and 6, and none of them will have submitted <m, v, n>. The new primary node will assume that <m, v, n> has not been submitted by any node. However, node 2 has already submitted <m, v, n>, and the new primary node will initiate a new consensus message <m, v + 1, n> or renumber message m as k <m, v + 1, k>. This results in a conflict between the already-submitted message <m, v, n> from node 2 and the newly initiated consensus message. As a result, the system's consistency and security are weakened. The specific consensus process where the primary node causes consistency errors and undermines system security in the two-phase consensus is shown in Figure 12 below. (In the figure below, x represents a node encountering a Byzantine problem, and the arrows indicate communication messages being sent between nodes). Figure 12: A case diagram of a PBFT algorithm primary node consistency error. In the traditional three-phase confirmation of PBFT, the commit phase is used to ensure that incomplete requests, such as request \(m\), can still be executed even after a primary node switch. Specifically, if replica \(i\) in view \(v\) executed request \(m\) with number \(n\), replica \(j\) in view \(v+1\) can also execute request \(m\) with the same number \(n\), thereby avoiding inconsistent primary nodes from sending two different transaction messages under the same sequence number. To address the aforementioned primary node consistency errors, scholars both domestically and internationally have proposed modifications based on specific application scenarios or the introduction of incentive mechanisms to maintain the primary node's reliability. These modifications include reducing the PBFT consensus protocol from three phases to two phases, or simplifying the PBFT commit phase, to minimize consensus communication overhead and enhance efficiency. [PERSON] et al. [108] introduced a consensus mechanism that combines Proof of Stake (PoS) with Practical Byzantine Fault Tolerance (PBFT). This approach effectively reduces the influence of harmful nodes, encompassing both solitary validators and leaders, while ensuring optimal performance. The model encourages integrity by integrating trust scores and reward systems as essential elements in the processes of block validation and ordering. [PERSON]  
mizing communication protocols to improve PBFT's architecture can effectively enhance its overall performance. This provides researchers with a continuous path for optimization. The findings of this survey are summarized below, along with potential future directions for research.