# The Evolution and Optimization Strategies of a PBFT Consensus Algorithm for Consortium Blockchains
## 3 An Introduction to Mainstream Consensus Algorithms
### The Mainstream Consensus Algorithms of Private Blockchains
#### 3.2.2 Raft  
Raft, a significant advancement in the field of distributed consensus algorithms [51], was introduced by [PERSON] and [PERSON] in 2014. Its primary objective is to enhance the clarity and maintainability of consensus protocols by optimizing the state machine replication process, thereby better meeting the needs of practical engineering practices. The algorithm is based on the Strong Leader model and divides the system's operation into three key modules: leader election, log replication, and safety. During the leader election phase, nodes initiate the election process through a random timeout mechanism. The election process ensures the emergence of a unique leader based on the principles of term (Term) increment and majority voting, effectively coordinating the system's operation. Once the system enters the log replication phase, the leader node takes on the responsibility of receiving client requests and synchronizing log entries to the follower nodes. After the majority of follower nodes confirm the log entries, the leader node can commit the log and update the state machine, driving the continuous evolution of the system's state. In terms of ensuring safety, the Raft mechanism introduces Log Matching and Leader Restriction mechanisms to maintain consistency in the system's state. Even in extreme scenarios where no more than half of the nodes fail, these mechanisms ensure that the system remains stable and operational. The Raft consensus process is shown in Figure 6.  
Figure 6: A Raft consensus schematic diagram. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Author** & **Year** & **Improvement Method** & **Core Mechanism** & **Limitations** \\ \hline \multirow{2}{*}{[PERSON] [44]} & \multirow{2}{*}{2021} & \multirow{2}{*}{Paxos Automated Formal Proof} & Verifies protocol correctness using an automatic theorem proving tool based on structural invariants. & \multirow{2}{*}{Regquires high computational resources for formal verification, limiting its practical adoption.} \\ \hline \multirow{2}{*}{[PERSON] [46]} & \multirow{2}{*}{2022} & \multirow{2}{*}{Relaxed Paxos} & Eases quorum requirements, and a two-phase model reduces synchronization overhead. & \multirow{2}{*}{Looser quorum constraints may lead to weaker fault tolerance} \\ \hline \multirow{2}{*}{[PERSON] [47]} & \multirow{2}{*}{2022} & \multirow{2}{*}{Baxos (Leaderless Multi-Paxos)} & Introduces a random backoff mechanism to avoid single points of failure, enhancing resilience to adversarial attacks. & \multirow{2}{*}{May introduce additional latency due randomized backoff strategy.} \\ \hline \multirow{2}{*}{[PERSON] [47]} & \multirow{2}{*}{2022} & \multirow{2}{*}{Mandator and Sporades} & Combines Multi-Paxos with modular state machine replication to optimize wide-area network request propagation. & \multirow{2}{*}{Complexity increases, requiring more resources for deployment and maintenance} \\ \hline \multirow{2}{*}{[PERSON] [49]} & \multirow{2}{*}{2022} & \multirow{2}{*}{Paxos/Raft/PBFT Performance Comparison} & Uses the NS3 simulator to quantify latency, throughput, and fault tolerance, guiding protocol selection. & \multirow{2}{*}{Provides performance analysis but does not propose optimizations.} \\ \hline \multirow{2}{*}{[PERSON] [50]} & \multirow{2}{*}{2025} & \multirow{2}{*}{Declarative Paxos Specification Framework} & Abstracts Paxos behavior using three-valued modal logic, supporting mathematical rigor and verifiability. & \multirow{2}{*}{The abstraction may limit its practical usability in real-world distributed systems.} \\ \hline \hline \end{tabular}
\end{table} 
Table 5: _Cont._Compared to the theoretical completeness of the Paxos algorithm, the Raft consensus mechanism significantly reduces the complexity of algorithm implementation by clearly defining the roles and state machines (including follower, candidate, and leader roles) and designing an intuitive log replication process. At the same time, Raft demonstrates a comparable performance to Paxos, showcasing a good balance.