Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b2662ef
host-spec: Update BABE clock adjustment
FlorianFranzen Apr 14, 2020
b984715
host-spec: Minor cleanup in Babe chapter
FlorianFranzen Jul 9, 2020
bbc98a4
host-spec: Move SCALE dictionary to own definition
FlorianFranzen Jul 10, 2020
18e1048
host-spec: Update Babe Consensus Messages
FlorianFranzen Jul 17, 2020
2ce2083
host-spec: Update babe relative time constants
FlorianFranzen Jul 17, 2020
2bd4ea4
host-spec: cosmetic cleanups
FlorianFranzen Sep 2, 2020
57cb639
host-spec: fix various typos in consensus chapter
FlorianFranzen Sep 15, 2020
66c4f9c
host-spec: small clarifications in consensus chapter
FlorianFranzen Sep 16, 2020
c43a7c3
host-spec: Move text into remarks
FlorianFranzen Nov 18, 2020
6876b95
changing sync epoch to sync period non-overlapping
drskalman Nov 18, 2020
94a33c5
host-spec: Use unified way to refer to definitions
FlorianFranzen Nov 19, 2020
95f0379
host-spec: Add note about current state of relative time algo
FlorianFranzen Nov 19, 2020
7a27385
host-spec: Update Babe relative time algorithm
FlorianFranzen Nov 24, 2020
aadac89
host-spec: Add note about incorrect naming in substrate
FlorianFranzen Nov 24, 2020
db142d7
host-spec: Add todo on how to collect block arrival times
FlorianFranzen Nov 24, 2020
cb06d5c
host-spec: Moving definitions and references
FlorianFranzen Nov 24, 2020
ff71da5
runtime-spec: use latexmk for builds
FlorianFranzen Nov 25, 2020
4601662
runtime-spec: algorithm2e -> algorithmicx
FlorianFranzen Nov 25, 2020
f3e4303
runtime-spec: Add Babe randomness computation
FlorianFranzen Nov 25, 2020
beaa5e9
runtime-spec: Def. -> Definition
FlorianFranzen Nov 25, 2020
98a2bdf
ci: add latexmk for runtime-spec builds
FlorianFranzen Nov 25, 2020
458d603
ci: migrate from ::set-env to GITHUB_ENV
FlorianFranzen Nov 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
runtime-spec: Add Babe randomness computation
  • Loading branch information
FlorianFranzen committed Nov 25, 2020
commit f3e4303e2e87073ef4819cd053c4eb37fc0a1690
22 changes: 22 additions & 0 deletions runtime-spec/c03-consensus.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
\chapter{Consensus}

\section{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 $\mathcal{E}_n$ is enacted in $\mathcal{E}_{n+1}$. The randomness in this digest is computed based on the all the VRF outputs up to including Epoch $\mathcal{E}_{n-2}$ while the authority set is based on all transaction included up to Epoch $\mathcal{E}_{n-1}$.

The computation of the randomeness seed is described in Algorithm \ref{algo-epoch-randomness} which uses the concept of epoch subchain as described in host specification and the value $d_B$, which is the VRF output computed for slot $s_B$.

\begin{algorithm}[H]
\caption{\textsc{Epoch-Randomness}($n>2$: epoch index)}
\label{algo-epoch-randomness}
\begin{algorithmic}[1]
\State \Init $\rho \leftarrow \phi$
\For{$B$ in \textsc{SubChain}($\mathcal{E}_{n-2}$)}
\State $\rho \leftarrow \rho || d_B$
\EndFor
\State \Return $\textsc{Blake2b}(\textsc{Epoch-Randomness}(n-1)||n||\rho)$
\end{algorithmic}
\end{algorithm}

1 change: 1 addition & 0 deletions runtime-spec/runtime-spec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@

\input{c01-extrinsics.tex}
\input{c02-weights.tex}
\input{c03-consensus.tex}

\bibliographystyle{plain}
%\bibliography{references,crypto,rt,grandpa}
Expand Down