Explaining PBFT fault tolerance and phases
PBFT requires 3f+1 nodes to tolerate f Byzantine faults because arbitrary faults need two rounds of communication and quorums of size 2f+1 to guarantee overlap of at least f+1 honest nodes, preventing conflicting info from faulty nodes. In contrast, Raft needs only 2f+1 nodes since crash faults cause silent failures allowing a single quorum round without equivocation. PBFT’s three phases work as follows: the primary proposes (pre-prepare), replicas confirm proposal consistency with each other (prepare), then replicas commit once enough confirmations are collected (commit), ensuring consensus despite malicious actors.
Practical Byzantine Fault Tolerance is a protocol in the “state machine replication” family designed to cope not just with crashes but with arbitrary, malicious behaviour by some of the replicas. The model assumes there is a designated leader (the “primary”) and (n) replicas in total, and that up to (f) of them may be faulty in any way, including sending different lies to different peers.
Two properties drive the replica count and the shape of the protocol:
- To make progress you need quorums of replicas to agree on a value. Those quorums have to overlap so that you can’t have two disjoint sets reach incompatible decisions. In the crash‑only model, a quorum of (f{+}1) live nodes out of (2f{+}1) suffices, because failed nodes are simply absent from all quorums. In the Byzantine model you can’t trust the messages you receive, so you require larger quorums.
- A quorum must be large enough that, even if all (f) faulty nodes collude, there are still enough correct nodes in any two quorums to enforce consistency. With (n=3f{+}1) replicas, there are at least (2f{+}1) correct ones. By requiring quorums of size (2f{+}1) in the later phases, any two quorums intersect in at least (f{+}1) replicas, and at least one of those is correct. That correct intersection prevents two conflicting values from both being “committed”.
Raft and Paxos handle only crash faults: a failed node stops participating, it doesn’t fabricate messages. In that simpler model, a majority of (f{+}1) nodes out of (2f{+}1) is enough because majorities overlap by at least one node and there is no risk of equivocation. That’s why the replica count for crash tolerance is (2f{+}1) instead of (3f{+}1).
To achieve agreement in the presence of Byzantine behaviour, PBFT runs each client request through three message rounds:
-
Pre‑prepare: The primary assigns the client’s request a sequence number in the current view and multicasts a pre‑prepare message containing the view, sequence number and a digest of the request. This establishes a unique proposal.
-
Prepare: Each backup that accepts the pre‑prepare re‑broadcasts a prepare message with the same view, sequence number and digest. When a replica collects (2f) matching prepares from distinct replicas plus its own pre‑prepare, it knows that at least (f{+}1) correct replicas have seen the same proposal, and the request is “prepared”.
-
Commit: Once prepared, the replica broadcasts a commit message. When it accumulates (2f{+}1) matching commits from distinct replicas, it knows a quorum has agreed on that sequence number and value. At that point it executes the request and replies to the client.
The two all‑to‑all rounds after the leader’s proposal serve to “lock in” the value across an overlapping quorum of non‑faulty replicas, which is why PBFT needs the larger replica set and quorum sizes compared to crash‑fault‑tolerant protocols.