  Byzantine agreement (BA) is a distributed consensus problem where $n$
processors want to reach agreement on an $\ell$-bit message or value, but up to
$t$ of the processors are dishonest or faulty. The challenge of this BA problem
lies in achieving agreement despite the presence of dishonest processors who
may arbitrarily deviate from the designed protocol. The quality of a BA
protocol is measured primarily by using the following three parameters: the
number of processors $n$ as a function of $t$ allowed (resilience); the number
of rounds (round complexity, denoted by $r$); and the total number of
communication bits (communication complexity, denoted by $b$). For any
error-free BA protocol, the known lower bounds on those three parameters are
$n\geq 3t+1$, $r\geq t+1$ and $b\geq\Omega(\max\{n\ell, nt\})$, respectively,
where a protocol that is guaranteed to be correct in all executions is said to
be error free. In this work by using coding theory, together with graph theory
and linear algebra, we design a coded BA protocol (termed as COOL) that
achieves consensus on an $\ell$-bit message with optimal resilience,
asymptotically optimal round complexity, and asymptotically optimal
communication complexity when $\ell \geq t\log t$, simultaneously. The proposed
COOL is an error-free and deterministic BA protocol that does not rely on
cryptographic technique. It is secure against computationally unbounded
adversary. With the achievable performance by the proposed COOL and the known
lower bounds, we characterize the optimal communication complexity exponent as
\[\beta^*(\alpha,\delta)=\max\{1+\alpha,1+\delta\}\] for $\beta=
\lim_{n\to\infty}\log b/\log n$, $\alpha=\lim_{n \to \infty} \log \ell/\log n$
and $\delta=\lim_{n\to\infty} \log t/\log n$. This work reveals that coding is
an effective approach for achieving the fundamental limits of Byzantine
agreement and its variants.
