Back to Module 4 notes

This set practises the SMR argument, the broadcast-versus-update table, the two reductions between consensus and total order broadcast, and the safety/liveness reading of FLP and the majority bound.

Problem 1

Problem 4.1 (Safety or liveness).

Classify each property as safety or liveness (Definition 4.14) and say whether a correct Raft or Paxos implementation may need timing assumptions to guarantee it.

  1. No two nodes decide different values.
  2. Every request submitted by a client to a correct node is eventually applied.
  3. At most one leader exists per term.
  4. A replica never applies log entry 7 before log entry 6.
  5. If a leader is elected, it eventually commits a new entry.

Problem 2

Problem 4.2 (Which updates may use causal broadcast).

Replicas hold an integer , initially . Updates are , , and .

  1. Which pairs among commute? Give a counterexample for each pair that does not.
  2. Client P broadcasts ; client Q, concurrently, broadcasts . Using causal broadcast, replica R1 delivers then , replica R2 delivers then . Compute both final states. Which assumption of Theorem 4.8 fails?
  3. Repeat part 2 with and instead. Do the replicas converge, and why?
  4. Replace causal broadcast by best-effort broadcast in part 3, and suppose R2 receives twice because of a retry. What happens, and which property from the table is missing?

Problem 3

Problem 4.3 (Running the TOB-from-consensus construction).

Three nodes A, B, C run algorithm (2) of Theorem 4.11. Ids sort by sender (A before B before C) and then by sequence number.

  • Before instance 1, A has received , B has , C has . Instance 1 decides C’s proposal.

  • Before instance 2, A has received , B has , C has . Instance 2 decides C’s proposal.

  1. Give each node’s proposal in both instances and the common delivered sequence after instance 2.
  2. Node A received before , but delivers first. Does this violate any property of total order broadcast? Of FIFO-total order broadcast?
  3. Using algorithm (1) on top of this TOB, each node proposed its first message as its consensus value. What does every node decide?
  4. Could instance 2 decide , given these received sets? Could it decide ?

Problem 4

Problem 4.4 (The majority bound for four nodes).

Consider nodes A, B, C, D in the partially synchronous model.

  1. Carry out the proof of Theorem 4.18 for , : name the groups and the three executions, and say exactly which nodes decide what in the final one.
  2. Why does the same argument fail for , ?
  3. A designer proposes: “With , let any 2 nodes form a quorum, but break ties by node id: the group containing A wins.” Explain why this does not escape the theorem. (Hint: what is now?)

Problem 5

Problem 4.5 (Is this sequencer failover correct).

A system implements total order broadcast with a sequencer (Module 2) and automatic failover: if the followers do not hear from the sequencer for 2 seconds, the follower with the lowest id becomes the new sequencer and continues numbering from the highest sequence number it has delivered.

Nodes: sequencer S, followers A, B. S sequences (number 1) and (number 2). reaches A and B. reaches B only; then S is cut off by a network fault for 3 seconds (it is not crashed).

  1. A becomes the new sequencer. Which number does A give to the next message ? What do A and B deliver as message number 2?
  2. Which property of Definition 4.3 is violated, and which property of consensus would have prevented it?
  3. After the fault heals, S is still running and believes it is the sequencer. What further problem appears, and how do terms (Module 5) address it?
  4. Does the 2-second timeout itself cause the safety violation? Relate your answer to the key point of Module 4.