Skip to main content

Lecture 11: More Paxos — Whiteboard Descriptions

These are text descriptions of the whiteboard PDF from the lecture on April 22, 2026. See also the whiteboard PDF and the notes.

These materials were drafted by AI based on the live whiteboard PDF and audio transcript from the corresponding lecture and then reviewed and edited by course staff. They may contain errors. Please let us know if you spot any.

Protocol Overview (recap from last time)

Diagram: A message-sequence chart with five vertical participant lines labeled left-to-right: P (proposer), A_1, A_2, A_3 (three acceptors), and L (learner). Time flows downward. A horizontal dashed line partway down splits the chart into two phases, annotated on the right as phase 1 (above) and phase 2 (below).

  • Phase 1: P sends 1a(r) to each of A_1, A_2, A_3. Each acceptor replies 1b(r, summary) back to P. One reply is annotated summary = null.
  • Phase 2: P sends 2a(r, v) to each acceptor, and each acceptor sends 2b(r, v) onward to the learner L.

Phase 1

  • 1a = prepare
  • 1b = prepare response

Protocol:

  • proposer picks a round # r
  • send 1a(r) to all acceptors
  • acceptors respond with 1b(r, summary)
    • summary:
      • "I have never voted in round < r"
      • new today: the highest #'d vote in a previous round: 2b(r', v')
  • importantly, by sending a 1b message, acceptors also promise never again to vote in smaller rounds

Phase 2

  • 2a = Accept
  • 2b = AcceptResponse (sent to learner)

Protocol:

  • proposer waits for a majority of 1b
  • look at all 1b msgs
    • if all have summary = null, then propose any value
    • new today: otherwise, propose the value from the highest round number received
  • send 2a(r, v) to all acceptors
  • acceptors send 2b(r, v) to learner if they can

Learner

  • waits for a majority of 2b msgs (all in the same round)

Chosen

  • chosen(r, v) = there is a majority of acceptors who have sent 2b(r, v) msgs
  • chosen(v) = there is a round r such that chosen(r, v)

Example: Two Proposers, Overlapping Rounds

Diagram: A message-sequence chart with six participant lines labeled left-to-right: P_1, P_2, A_1, A_2, A_3, L. Time flows downward. The chart traces a scenario in which round 1 is partially accepted before round 2 begins.

  • Near the top of A_3's line, a vertical ellipsis () indicates prior activity, followed by an arrow labeled 2b(1, v_1) going from A_3 to L. (That is, A_3 has already voted for v_1 in round 1.)
  • P_2 then runs phase 1 of round 2: arrows labeled 1a(2) go from P_2 to A_1, A_2, and A_3.
  • Replies:
    • A_1 and A_2 both send 1b(2, null) back to P_2 (they never voted in previous rounds).
    • A_3 sends 1b(2, (1, v_1)) back to P_2 (A_3's highest prior vote was for v_1 in round 1).
  • If the 1b messages from A_1 and A_2 are delivered to P_2, then P_2 has a majority of 1b messages with null summary, giving P_2 permission to propose any value it likes.
  • On the other hand, if A_3's 1b message is received by P_2 before A_2's, then it will contain a non-null summary in its majority of 1b messages, so it will propose the value from A_3's earlier vote.

Fault handling

Diagram: A larger message-sequence chart showing the whole timeline, again with participants P_1, P_2, A_1, A_2, A_3, L.

  • Round 1, driven by P_1:
    • P_1 sends 1a(1) to A_1, A_2, A_3.
    • A_1 and A_2 both reply 1b(1, null) to P_1.
    • P_1 sends 2a(1, v_1) to A_1, A_2, A_3.
    • All three acceptors send 2b(1, v_1) to L. But the message gets dropped (small red X).
  • Round 2, driven by P_2:

    • P_2 sends 1a(2) to the acceptors.
    • A_1 and A_2 both reply 1b(2, (1, v_1)) to P_2
      • the summary reports the previously accepted value v_1 from round 1.
    • P_2 sends 2a(2, v_1) to the acceptors, reusing v_1 because of the non-null summary.
    • An acceptor sends 2b(2, v_1) to L.
  • The value can be chosen multiple times, but Paxos guarantees it will always be the same value chosen.

Votes Table

Diagram: A table with rows labeled by rounds (on the left, under the label "rounds") and columns labeled by acceptors A_1, A_2, A_3.

rounds A_1 A_2 A_3
1, v_1
2, v_2
  • Row 1, v_1: A_3 voted, A_1 and A_2 did not.
  • Row 2, v_2: A_2 and A_3 voted, A_1 did not.

Proposing different values in different rounds

Diagram: A message-sequence chart with three acceptor lines A_1, A_2, A_3 on the left and a learner line L on the right. Small vertical ellipses above A_2 and A_3 indicate prior activity. Three arrows head rightward to L, stacked top to bottom:

  • 2b(1, v_1) — from A_3 to L.
  • 2b(2, v_2) — from (an acceptor, shown starting between A_2 and A_3) to L.
  • 2b(3, {v_1, v_2}) — from A_1 to L, indicating that either v_1 or v_2 could be proposed as its value in round 3.

With only three acceptors, a third different value accepted by at least one acceptor is not possible.