Skip to main content

11. Consensus

11.1. BABE digest messages

The Runtime is required to provide the BABE authority list and randomness to the host via a consensus message in the header of the first block of each epoch.

The digest published in Epoch En{\mathcal{{{E}}}}_{{n}} is enacted in En+1{\mathcal{{{E}}}}_{{{n}+{1}}}. The randomness in this digest is computed based on all the VRF outputs up to including Epoch En2{\mathcal{{{E}}}}_{{{n}-{2}}} while the authority set is based on all transaction included up to Epoch En1{\mathcal{{{E}}}}_{{{n}-{1}}}.

The computation of the randomness seed is described in Epoch-Randomness, which uses the concept of epoch subchain as described in host specification and the value dB{d}_{{B}}, which is the VRF output computed for slot sB{s}_{{B}}.

Algorithm 31. Epoch Randomness
    \Require $n > 2$
    \State \textbf{init} $\rho \leftarrow \phi$
    \For{$B$ in \call{SubChain}{$\mathcal{E}_{n-2}$}}
        \State $\rho \leftarrow \rho || d_B$
    \Return \call{Blake2b}{\call{Epoch-Randomness}{$n-1$}$||n||\rho$}

where n{n} is the epoch index.