forked from w3f/polkadot-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntime-spec.tex
159 lines (135 loc) · 4.93 KB
/
runtime-spec.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
\documentclass[11pt,a4paper]{book}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{color}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[chapter]{algorithm}
\usepackage{algpseudocode} % includes algorithmicx
\usepackage{xargs} % Use more than one optional parameter in new commands
\usepackage{xcolor} % Coloured terxt etc.
\usepackage{calc,ifthen,alltt,theorem,capt-of,makeidx}
\setlength\parindent{0pt}
\newcommand{\SubItem}[1]{
{\setlength\itemindent{15pt} \item[-] #1}
}
\flushbottom
\makeindex
\usepackage{plantuml} %%digarams
\usepackage{tikz}
\tikzset{
font={\fontsize{16pt}{20}\selectfont}}
%\usepackage{fontspec} %%for greek letters in plant uml in case you don't use math
%\setmainfont{CMU Serif}
%%%%%%%%%% Start TeXmacs macros
\newcommand{\assign}{:=}
\newcommand{\cdummy}{\cdot}
\newcommand{\glossaryentry}[3]{\item[{#1}\hfill]#2\dotfill#3}
\newcommand{\nin}{\not\in}
\newcommand{\nobracket}{}
\newcommand{\nosymbol}{}
\newcommand{\tmcodeinline}[2][]{{\ttfamily{#2}}}
\newcommand{\tmem}[1]{{\em #1\/}}
\newcommand{\tmmathbf}[1]{\ensuremath{\boldsymbol{#1}}}
\newcommand{\tmname}[1]{\textsc{#1}}
\newcommand{\tmop}[1]{\ensuremath{\operatorname{#1}}}
\newcommand{\tmrsub}[1]{\ensuremath{_{\textrm{#1}}}}
\newcommand{\tmrsup}[1]{\textsuperscript{#1}}
\newcommand{\tmsamp}[1]{\textsf{#1}}
\newcommand{\tmstrong}[1]{\textbf{#1}}
\newcommand{\tmtextbf}[1]{{\bfseries{#1}}}
\newcommand{\tmtextit}[1]{{\itshape{#1}}}
\newcommand{\tmtextsc}[1]{{\scshape{#1}}}
\newcommand{\tmtextsf}[1]{{\sffamily{#1}}}
\newcommand{\tmtexttt}[1]{{\ttfamily{#1}}}
\newcommand{\tmverbatim}[1]{{\ttfamily{#1}}}
\newenvironment{itemizedot}{\begin{itemize} \renewcommand{\labelitemi}{$\bullet$}\renewcommand{\labelitemii}{$\bullet$}\renewcommand{\labelitemiii}{$\bullet$}\renewcommand{\labelitemiv}{$\bullet$}}{\end{itemize}}
\newenvironment{itemizeminus}{\begin{itemize} \renewcommand{\labelitemi}{$-$}\renewcommand{\labelitemii}{$-$}\renewcommand{\labelitemiii}{$-$}\renewcommand{\labelitemiv}{$-$}}{\end{itemize}}
\newenvironment{theglossary}[1]{\begin{list}{}{\setlength{\labelwidth}{6.5em}\setlength{\leftmargin}{7em}\small} }{\end{list}}
\newenvironment{tmcode}[1][]{\begin{alltt} }{\end{alltt}}
\newcounter{tmcounter}
\newcommand{\custombinding}[1]{%
\setcounter{tmcounter}{#1}%
\addtocounter{tmcounter}{-1}%
\refstepcounter{tmcounter}}
\newtheorem{definition}{Definition}
\newtheorem{notation}{Notation}
\newcommand{\tmfloatcontents}{}
\newlength{\tmfloatwidth}
\newcommand{\tmfloat}[5]{
\renewcommand{\tmfloatcontents}{#4}
\setlength{\tmfloatwidth}{\widthof{\tmfloatcontents}+1in}
\ifthenelse{\equal{#2}{small}}
{\setlength{\tmfloatwidth}{0.45\linewidth}}
{\setlength{\tmfloatwidth}{\linewidth}}
\begin{minipage}[#1]{\tmfloatwidth}
\begin{center}
\tmfloatcontents
\captionof{#3}{#5}
\end{center}
\end{minipage}}
{\theorembodyfont{\rmfamily}\newtheorem{warning}{Warning}}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
%%%%%%%%%% End TeXmacs macros
%% TeXmacs shorthands
\providecommand{\cdummy}{{\cdot}}
\providecommand{\nobracket}{}
\providecommand{\nosymbol}{}
\providecommand{\tmem}[1]{\tmtextit{#1}}
\providecommand{\tmname}[1]{\tmtextsc{#1}}
\providecommand{\tmop}[1]{\ensuremath{\mathrm{#1}}}
\providecommand{\tmrsub}[1]{\tmrsub{\ensuremath{\mathrm{#1}}}}
\providecommand{\tmsamp}[1]{\tmtextsf{#1}}
\providecommand{\tmstrong}[1]{\tmtextbf{#1}}
\providecommand{\tmtextbf}[1]{\tmtextbf{#1}}
\providecommand{\tmtextit}[1]{\tmtextit{#1}}
\providecommand{\tmverbatim}[1]{\tmtexttt{#1}}
\newcommand{\figuretext}{Snippet}
%% Fix theorem numbering
\numberwithin{definition}{chapter}
\numberwithin{notation}{chapter}
%%Review commands
\newcommand{\syed}[2]{{\underline{#1}}\textcolor{orange}{(#2)}}
%% \todo{} command.
%
% Outputs red TODOs in the document. Requires \usepackage{color}.
%
% Usage: \todo{Document the TODO command.}
%
% Comment out second line to disable.
\newcommand{\todo}[1]{}
\renewcommand{\todo}[1]{{\color{red} TODO: {#1}}}
%% AnV commands
\newcommand{\blobB}{\ensuremath{\bar{B}}} %blob
\newcommand{\PoVB}{\ensuremath{PoV_B}} %pov
\newcommand{\paraValidSet}{\ensuremath{\mathcal{V}_\rho}} %parachin validator set
%% Weights commands
\newcommand{\TWF}{\ensuremath{\mathcal{W}}}
\newcommand{\BlankLine}{\item[]}
\newcommand{\Init}{\textbf{Init}~}
\begin{document}
\title{
{\Huge Polkadot Runtime}\\
{\Large Protocol Specification}
}
\author{Web3 Foundation}
\date{}
\maketitle
\tableofcontents
\newpage
\input{c01-extrinsics.tex}
\input{c02-weights.tex}
\input{c03-consensus.tex}
\bibliographystyle{plain}
%\bibliography{references,crypto,rt,grandpa}
\begin{appendix}
\end{appendix}
\end{document}
%%% Local Variables:
%%% mode: LaTeX
%%% latex-run-command: "lualatex -shell-escape \\nonstopmode\\input runtime-spec.tex"
%%% End:
%% needs plantuml and jlatexmath or asciimath
%% PlANTUML_JAR should point to plantuml.jar binary.