The protocol for consistent broadcast can be used to implement Byzantine agreement in 2f+3 rounds. Time is divided into f+1 phases, denoted by s in the range 1 to f+1 for the rest of this section. Each phase consists of 2 rounds, and one extra round is needed at the end of the protocol.
Correct processes start by broadcasting an ATTACK! message if their initial
assessment is to attack, i.e. the input bit is 1.
In the remaining phases, the
protocol prescribes that processes
an ATTACK! message if and only
if they have received ATTACK! messages from f+s-1
different processes so far. Notice that the
threshold increases by one every phase. Correct processes ![]()
messages at odd rounds only, i.e., at the first round of
every phase. At the final round, processes decide 1 if they have
received messages from at least 2f+1 different processes.
As before, the inputs to the algorithm (the generals' opinions) are xp, and the outputs are dp. Below is a description of the protocol, which runs concurrently with the protocol for consistent broadcast described before.
Notice that every correct process broadcasts at most once. We now prove the three properties we require: non-triviality, agreement, and limited bureaucracy.
First observe, that if at any round 2s-1, for
, all
correct processes have broadcast, all correct processes will
eventually decide 1. This follows from the correctness property of
consistent broadcast which ensures that a message sent
by a correct process is accepted within after two rounds.
The non-triviality follows since if xp=1 for all
, all
correct processes start by broadcasting, and the observation above
applies. If xp=0 for all
, none of the correct processes
will ever start broadcasting because (a) at round 1 no correct process
broadcasts and (b) the threshold for broadcasting at subsequent phases is
. Therefore no correct process will receive the 2f+1
messages needed to decide on 1.
For the agreement property, we prove that for
we have that
if p decides 1, then all correct processes decide 1. If
dp=1, process p has accepted messages from at least 2f+1
processes by round 2f+3. Let I denote the set of correct
processes from which p has accepted messages; we have
.
If all processes in I had input 1, every correct process accepts f+1 messages at round 3 and then broadcasts, so again, the observation above applies and we are done.
Otherwise, there is a process q for which xq=0. Thus, process
q broadcasts at round 2s-1 for some
, which
means that at round 2s-1, process q has accepted messages from at
least f+s-1 processes other than itself. These messages are
accepted by all other correct processes at round 2s (because of the
relay property of consistent broadcast), and the message from q
itself reaches all other correct processes by round 2s+1 (because of
correctness of consistent broadcast). It follows that at round 2s+1
(phase s+1), each correct process has accepted messages from at
least f+s processes, and thus broadcasts since the new threshold for
phase s+1 is reached (if s<f+1), or decides 1 (if s=f+1).
Finally, the bureaucracy is limited by 2f+3 rounds.