Distributed consensus, replication, and fault tolerance / personal lessonsLesson 16 of 17
Distributed systems · Lesson 16

When replicas can lie

Distinguish crash faults, equivocation, authentication, and Byzantine quorum bounds.

By the end: Explain why crash-tolerant majority reasoning is insufficient against dishonest participants.

A crash is not the most general fault

A crash-fault protocol assumes a participant follows the algorithm until it stops, and preserves required durable state when it recovers. A Byzantine participant may send contradictory messages, invent state, omit selected responses, or collude with others. This model can represent malicious behavior or sufficiently arbitrary corruption; it does not mean every software bug is automatically covered by a deployed protocol.

In a three-member majority system, dishonest B can support value x to A and incompatible y to C. Both pairs intersect at B, but that intersection carries no honest restraint. Authentication can establish that B sent each message. It cannot make B tell the truth or stop an authorized B from signing contradictory statements. Such contradictory behavior is called equivocation.

Identify which statement a dishonest replica can contradict

The crash model made a shared voter useful because the voter obeyed its recorded restrictions. Byzantine reasoning removes that premise for some members. A faulty server can remember its earlier vote perfectly and still issue an incompatible vote. Faster disks and more retries do not repair that failure. The question becomes whether enough other participants must have followed restrictions that exclude the conflicting result. This changes both the counts and the messages needed to justify a decision.

Consider a separate paper example with three replicas named P, Q, and R. P receives a proposed log entry assigning a package to courier Ada. R receives a proposal assigning that same package and position to courier Bo. Q sends each recipient a matching vote. If each recipient counts its own vote plus Q, each obtains two votes. Neither recipient needs to invent a message or miscount an identity. The failure is that the only shared member, Q, can violate the restriction on supporting incompatible entries. This is a counterexample to that two-vote rule, not a complete execution of a named Byzantine protocol.

Authentication restricts a different capability. Assume signatures cannot be forged and P's private signing key remains secret. Q then cannot produce a vote that verifies as P's signature. Q can still sign contradictory votes with Q's own key. A verifier must check the claimed sender, the signature, and what the signed message actually covers. An authentic vote for position 18 in one configuration must not become a vote for position 19 in another. The protected contents therefore need the relevant instance, configuration, proposal, and protocol stage, rather than the proposed value alone.

Even a valid signature does not show that the signer saw an authentic prerequisite. Suppose Q claims that every peer has approved its proposal but supplies only its own signed assertion. That assertion proves Q made the claim. It does not supply the peers' approvals. Protocols that transfer evidence must specify which authenticated messages constitute evidence and how recipients verify them. An honest server cannot safely treat a leader's summary of other votes as equivalent to the votes unless a justified mechanism supports that substitution.

For a guided inspection, write two columns headed message authenticity and permitted protocol inference. Put Q's conflicting signed votes in the first column. In the second, record that the conflict is attributable to Q, but neither vote establishes a decision by itself. Then imagine Q refuses to send further messages. Evidence of equivocation may support investigation or removal under a separate policy. It does not force Q to cooperate, and removal must not silently change which configurations can authorize decisions. The membership problem from recovery remains present even after the faulty member is identified.

Derive an honest intersection

Consider a common Byzantine quorum construction with n=3f+1 replicas and quorums of size 2f+1, where at most f replicas are faulty. Two such quorums intersect in at least f+1 members. Since at most f of those can be faulty, at least one intersecting member is honest. For f=1, use four replicas and quorums of three; their overlap is at least two, so one is honest.

An honest common member matters only if the protocol imposes appropriate voting, locking, and view-change rules on it. The count is not a complete Byzantine consensus algorithm. Protocols such as PBFT use multiple message phases and authenticated evidence to preserve decisions across leader changes. Safety and liveness still require their stated fault bounds and network assumptions; a dishonest leader may delay progress until a safe leader-change procedure succeeds.

Derive the quorum requirements before choosing counts

The displayed construction can be derived from two requirements that pull in opposite directions. Let n be the fixed number of replicas, f the largest allowed number of Byzantine replicas, and q the number of distinct votes required for a quorum. For progress without help from faulty replicas, q cannot exceed n minus f. Otherwise faulty members can stop every decision merely by withholding their votes. This is a necessary counting condition for progress, not a guarantee that a network schedule delivers the honest votes.

For safety based on an honest intersection, two quorums must share more than f members. Their minimum overlap is twice q minus n when that number is positive. Requiring twice q minus n to exceed f gives the honest-intersection condition. Combining it with q no greater than n minus f requires n to exceed three times f for this construction. At the smallest integer membership, n is three times f plus one and q is twice f plus one. These counts follow from this argument's requirements, not from the word consensus alone.

Use a separate paper case with ten members and a bound of three faulty members. Seven votes can be collected without faulty help because seven honest members remain. Two sets of seven in a universe of ten share at least four members. Even if all three faulty members are in that overlap, one honest member remains. Now lower the threshold to six. Two six-member sets can overlap in only two members, and both could be faulty. Lowering the threshold helps a proposal collect responses but removes the stated honest-intersection guarantee.

Raising the threshold has the opposite cost. Requiring eight of those ten members produces a larger overlap, but the three faulty members can all stay silent and leave only seven responders. No amount of honest message delivery can then satisfy the threshold. Safety and progress cannot be assessed by asking only whether a quorum is large. The fault bound and the required communication conditions must appear beside the threshold. These are invented membership calculations; the table below retains its smaller comparison so the identities remain visible.

An honest intersection still leaves a logical obligation to explain. Honest replicas may vote for different proposals at different stages or leadership views under a protocol's release rules. A shared honest signer is useful only if the two allegedly conflicting certificates would require that signer to do something forbidden. A certificate here means a verifiable collection of messages satisfying a specified threshold and stage. Before accepting an argument that two certificates cannot coexist, identify their stages, the restrictions on their honest signers, and whether leader changes preserve those restrictions. The arithmetic supplies a possible honest witness. It does not specify that witness's obligations.

Work through the model

ModelMembersQuorumsMinimum overlapHonest overlap with one liar
Crash majorityA B CA B and B CB onlyCould be zero
Byzantine constructionA B C DA B C and B C DB and CAt least one
An honest intersection is a necessary part of this construction, not a complete proof of a Byzantine protocol.

Carry decision evidence through a leader change

Read the model table as a comparison of intersections. In its crash-majority row, B is the whole intersection, so dishonest B can supply no restraint. In its Byzantine-construction row, the shared identities are B and C. Under the stated bound of one faulty member, they cannot both be dishonest. The table does not say which shared member is honest, which proposal it supported, or what messages later leaders must collect. Those missing details are exactly where the protocol rules must connect overlap to safety.

To examine that connection without pretending to implement PBFT, consider an abstract evidence-transfer problem on paper. A proposal for position 25 has acquired messages that impose a continuing restriction on some honest replicas. Its proposer then disappears before notifying a client. A replacement leader cannot assume that absence of a client response means the position is undecided. The earlier messages may exist on other machines, just as a Paxos value can be chosen before any learner discovers it. The new leader needs protocol-defined evidence about earlier restrictions before it can safely propose for that position.

A lock is a participant's protocol state restricting which conflicting proposals it may support. Calling it a lock does not specify when it forms or when it can change. A useful safety explanation must state what messages establish the lock, what later evidence permits a change, and why that change cannot discard an already protected decision. If a timeout alone erases the restriction, a delayed old decision and a new proposal can coexist. If no evidence can ever change a tentative restriction, conflicting incomplete attempts may prevent progress forever. Safe release rules address both cases.

Leader replacement therefore needs more than selecting the next machine's name. Participants must transfer sufficient evidence, and the replacement must choose a proposal compatible with that evidence. A faulty participant may omit its own earlier messages. A faulty replacement may conceal reports it received. The protocol needs verifiable selection rules and enough honest reporters that hiding Byzantine reports cannot hide every relevant obligation. These statements describe what a proof must establish. They are not a claim that the quorum table executes message phases, locks, or view changes.

Try changing only the timing in this paper case. First let the old leader crash before any honest replica acquires a restriction. Then let it disappear after the protocol has established protected decision evidence but before replying. The replacement may receive similar client complaints in both cases, but its safety obligations differ. Next delay one honest report while delivering several faulty reports promptly. Counting the fastest replies as truth can produce the wrong inference. Progress requires appropriate communication conditions and a functioning replacement procedure, while safety must account for delayed evidence. No timeout duration turns a missing report into proof that an earlier restriction never existed.

Know what the bound does and does not cover

The familiar 3f+1 construction is tied to a model, not a universal law for every authenticated synchronous or randomized agreement problem. Stronger timing assumptions, trusted components, or different protocols change what can be achieved. Signatures also need key management and a defined membership. Counting a thousand identities controlled by one adversary as a thousand independent honest machines is a Sybil problem, not fault tolerance.

Agreement among replicas does not prove that the input reflects reality. All honest replicas can consistently process a false sensor report, a fraudulent but authorized request, or buggy application code. Byzantine fault tolerance protects the defined agreement boundary. It does not replace access control, input validation, cryptographic key protection, or independent failure domains. A complete specialist treatment of Byzantine protocols and cryptocurrency consensus is beyond this course; the goal here is to understand their assumptions and claims.

Keep trustworthy agreement separate from trustworthy inputs

Byzantine agreement has an explicit boundary around the replicated service. Suppose honest replicas deterministically process an authenticated instruction to change a delivery address. If the customer's key was stolen, the replicas can agree perfectly on an unauthorized action in the customer's real-world sense. The protocol has not learned who physically held the key. Application authorization must decide which keys may request which transitions, and revocation must define when a key stops having that permission. Agreement then orders those decisions under the chosen contract.

Likewise, replicating a computation does not diversify identical application code. A deterministic bug can make every honest replica calculate the same incorrect invoice. Relative to the replication protocol, those replicas may have followed every prescribed step. Relative to the business specification, the result is wrong. A claim that a system tolerates one Byzantine replica does not establish that it tolerates every common compiler error, compromised software update, or mistaken administrator command. Those events may corrupt more members than the stated bound, or occur outside the agreement boundary entirely.

Recovery also affects the boundary. An honest member that restarts must recover the protocol obligations required by its implementation before voting again. Restoring an old disk image while retaining the same voting identity can make it forget restrictions that other members still rely on. Alternatively, replacing that identity requires a safe configuration transition. A signature key identifies the signer across these events, but does not restore its missing history. The exact persistent records depend on the protocol; this lesson does not prescribe a generic Byzantine recovery file format.

Client observation requires its own rule. A reply from one authenticated replica proves that replica sent the reply, not that the reply reports an agreed and applied result. A Byzantine service must specify the authenticated evidence or matching responses a client needs, and how those responses relate to the committed operation. Read protocols must also prevent a stale state from masquerading as a current result. The earlier lesson's distinction between current authority and an applied prefix remains useful, although Byzantine protocols require their own proof rather than copying Raft's read procedure.

Finally, separate delay from deception when diagnosing progress. A replica that has not answered might be faulty, partitioned, or slow. Honest members cannot infer which explanation holds from silence alone. Authenticated synchronous agreement results use timing assumptions that differ from partially synchronous services, and randomized protocols have different termination statements. The earlier FLP lesson rules out unconditional deterministic termination in its asynchronous crash model; signatures do not simply remove that uncertainty. When reading a Byzantine-system claim, identify the member identities, maximum faulty population, timing assumptions, decision evidence, and protected object. Those details determine whether an honest-intersection calculation is relevant and which failures remain outside the promised guarantee.

Exercises

Does signing a vote solve equivocation?

B signs x for A and y for C. Every signature verifies. Have signatures prevented the conflict?

Hint

Authentication says who made a statement, not whether they obeyed the algorithm.

Worked answer
StatementSignature valid?Compatible with other vote?
B votes xYesNo
B votes yYesNo
Authenticity and honesty are different properties.

No. They can make contradictory votes attributable and verifiable as evidence, but B can still sign both. The protocol needs quorum and locking rules that remain safe despite the allowed dishonest voters.

Tolerate two Byzantine replicas

Under the n=3f+1, q=2f+1 construction, how many members and votes are used for f=2? What honest overlap is guaranteed?

Hint

Subtract total membership from the combined quorum sizes, then subtract possible faulty members.

Worked answer
QuantityCalculationResult
Members3×2+17
Quorum2×2+15
Overlap5+5−73
Honest overlap lower bound3−21
These are counts for the stated model, not a deployment security audit.

Use seven replicas and quorums of five. Two quorums overlap in at least 5+5−7=3 members. With at most two faulty members, at least one shared member is honest. Correct locking and view-change rules are still required.

Sources and further reading

The explanations and worked answers above stand alone. These references provide the original algorithms, assumptions, and deeper proofs; they are not required downloads.