ApproximateAgreement

Approximate Agreement with
Optimal Resilience
Abraham, Amit and Dolev
(OPODIS 2004)
Consensus
Processes propose values and must agree on a
common decision value, proposed by some process
1
0
1
1
0
1
0
1
0
before
1
1
1
after
Approximate Agreement
A weakening of the consensus problem
For some ο₯, say 0.25
1
0
1
0.95
0
0
0.75
1
0
before
0.8
1
0.85
after
Approximate Agreement, Formally
Termination: Eventually, every nonfaulty process
decides
ο₯-Agreement: The decisions of nonfaulty
processes are within ο₯ of each other
Validity: The decision of a nonfaulty process is
inside the range of the input values of nonfaulty
processes
Asynchronous message-passing model (complete)
t Byzantine (arbitrary) failures
Must have 𝑛 > 3𝑑
Follows from the same bound for synchronous
consensus in the presence of Byzantine failures
For n = 3, t = 1
p1
p0
p2
1
0
1
0
1
0
p2
p0
p1
Algorithm Structure
Initially, set proposal to your input
In every asynchronous round
β€’ Send current proposal
β€’ Wait for messages from n-t processes
β€’ Trim the t highest values
β€’ Trim the t lowest values
β€’ Set proposal to β€œmiddle” of remaining values
min(trim(1))
max(trim(1))
initial spread
Algorithm Structure
Initially, set proposal to your input
In every asynchronous round
β€’ Send current proposal
β€’ Wait for messages from n-t processes
β€’ Trim the t highest values
β€’ Trim the t lowest values
β€’ Set proposal to β€œmiddle” of remaining values
In each round, the spread of values (max-min) is halved
If initial spread is D, within log2 D/ο₯ rounds spread is ο₯
Why This does not Work when 𝑛 = 5𝑑
0
0
p1
0
p2
(0,0,0,1)
middle= 0
0
Single
Byzantine
process
p0
1
1
p4
(0,1,1,1)
1 middle = 1
p3
Reliable Broadcast: More than Sending
broadcastp(round r, message m)
acceptq(process p, round r, message m)
If p and q are nonfaulty processes, then
Nonfaulty correctness: q performs acceptq(p, r, m)
if and only if p performed broadcastp(r, m) earlier
Uniqueness: If q performs acceptq(z, r, m1) and
p performs acceptp(z, r, m2), then m1 = m2
Reliable Broadcast Algorithm (n >3t)
broadcastp(round r, message m)
send (p,r,m) to all processes
echoq(round r, message m)
if received (p,r,m) from p and never sent (p,r,_)
send (p,r,m) to all processes
if received (p,r,m) from β‰₯ t+1 different processes
and never sent (p,r,_)
send (p,r,m) to all processes
if received (p,r,m) from β‰₯ n-t different processes
acceptq(process p, round r, message m)
Can We Solve Approximate
Agreement? 𝑛 > 4𝑑
proposal = input, r = 1
In every asynchronous round r
β€’ broadcast(r,proposal)
β€’ When accepted (p,r,mp) from n-t processes p
β€’ Trim the t highest values
β€’ Trim the t lowest values
β€’ Set proposal to β€œmiddle” of remaining values
When n > 4t, two nonfaulty processes have 𝑛 βˆ’ 2𝑑
β‰₯ 2𝑑 + 1 values in common
Can We Solve Approximate
Agreement? 𝑛 > 3𝑑
proposal = input, r = 1
In every asynchronous round r
β€’ broadcast(r,proposal)
β€’ When accepted (p,r,mp) from n-t processes p
β€’ Trim the t highest values
β€’ Trim the t lowest values
β€’ Set proposal to β€œmiddle” of remaining values
When n > 3t, faulty processes have only 𝑛 βˆ’ 2𝑑 β‰₯ 𝑑
+ 1 values in common (before trimming)
Byzantine Behavior, 𝑛 = 4, 𝑑 = 1
0
middle= 0 p1
Single
Byzantine
process
0
p2 middle= 0
p0
p3 middle = 1
1
1
When n > 3t, faulty processes have only 𝑛 βˆ’ 2𝑑 β‰₯ 𝑑
+ 1 values in common
Witnesses, when 𝑛 > 3𝑑
Witness for p is a process whose first 𝑛 βˆ’ 𝑑
accepted values were also accepted by p
A nonfaulty process waits for 𝑛 βˆ’ 𝑑 witnesses
for each value
οƒ°Every pair of nonfaulty processes have β‰₯ 𝑑 + 1
common witnesses
οƒ°β‰₯ 1 nonfaulty common witness
οƒ°β‰₯ 𝑛 βˆ’ 𝑑 common accepted values
Knowing When to Stop
β€’ Estimate the spread of the initial values of
nonfaulty processes
β€’ Mitigate influence of Byzantine processes
(who can pretend to have very high / low
values, and then behave correctly)
Next Week
β€’ Multi-dimensional extension of approximate
agreement
β€’ Two papers on this topic, with somewhat
different perspectives