🔄 PBFT Phases: Pre-Prepare, Prepare, Commit

Understand the three-phase protocol for Byzantine agreement

🔄 The Three-Phase Protocol

PBFT reaches consensus through a carefully orchestrated three-phase protocol: Pre-Prepare, Prepare, and Commit. Each phase ensures that honest nodes agree on the order of requests even in the presence of Byzantine faults.

Protocol Overview

👑

Primary Node

One node is designated as primary (leader) for each view. Primary orders client requests and initiates consensus.

🔢

Sequence Numbers

Each request gets a unique sequence number ensuring total ordering of all operations.

🗳️

Voting Rounds

Replicas vote in each phase. Need 2f+1 votes (quorum) to proceed, where f is max faulty nodes.

🎬 Interactive: Phase Simulator

Watch how consensus progresses through each phase:

Current Phase: Pre-Prepare

Primary node broadcasts request to all replicas

Message Complexity

O(n) - One message to each replica

1

Client sends request to primary

2

Primary assigns sequence number

3

Primary broadcasts PRE-PREPARE message

4

Replicas verify message authenticity

Why Three Phases?

1

Pre-Prepare

Establishes order

Primary proposes sequence number. Ensures all nodes process requests in same order.

2

Prepare

Agreement to order

Replicas vote on proposed order. Achieves "prepared" state with 2f+1 votes.

3

Commit

Commitment

Replicas commit to execution. Final vote ensures everyone will execute at this sequence.

🔐

Safety Guarantee

The three-phase protocol guarantees that if any honest replica commits a request at sequence number n, then no honest replica will commit a different request at sequence number n, even if f replicas are Byzantine.

Mathematical Proof

With n = 3f + 1 total nodes, need 2f + 1 votes in each phase. Any two quorums overlap by at least f + 1 nodes, guaranteeing at least one honest node in common.