Skip to content

Commit cd2cdcc

Browse files
authored
Merge branch 'main' into RLP_AUTH-module
2 parents e745082 + 0d416a8 commit cd2cdcc

File tree

185 files changed

+3782
-2789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+3782
-2789
lines changed

block_data/_inputs.tex

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ \section{Block data module}
44
\subsection{Introduction} \label{block data: intro} \input{intro}
55
\subsection{Columns} \label{block data: columns} \input{columns}
66
\subsection{Module call macros} \label{block data: module calls} \input{calls}
7-
8-
\section{Constraints}
9-
\subsection{Shorthands} \label{block data: shorthands} \input{shorthands}
10-
\subsection{Binary constraints} \label{block data: binarities} \input{binarities}
11-
\subsection{Unconditional constraints} \label{block data: unconditional} \input{unconditional}
12-
\subsection{Constancies} \label{block data: constancies} \input{constancies}
13-
\subsection{Heartbeat} \label{block data: heartbeat} \input{heartbeat}
14-
\subsection{Representation} \label{block data: representation} \input{representation}
15-
7+
\section{Generalities} \label{block data: generalities} \input{generalities/_inputs}
168
\section{Computations and checks} \label{block data: computations and checks} \input{computations/_inputs}
17-
189
\section{Lookups} \label{block data: lookups} \input{lookups/_inputs}

block_data/_local.tex

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
\def\locIsPrevConf {\loc{is\_prev}}
1414
\def\locPrevCurrWghtSum {\loc{curr\_prev\_wght\_sum}}
1515

16-
\def\locFlagSum {\loc{flag\_sum}}
17-
\def\locWghtSum {\loc{wght\_sum}}
18-
\def\locInstSum {\loc{inst\_sum}}
19-
\def\locMaxCtSum {\loc{ct\_max\_sum}}
20-
\def\locPhaseEntry {\loc{phase\_entry}}
21-
\def\locSamePhase {\loc{same\_phase}}
22-
\def\locLegalTransitions {\loc{allowable\_transitions}}
23-
\def\locExtractor {\loc{extractor}}
16+
\def\locFlagSum {\loc{flag\_sum}}
17+
\def\locWghtSum {\loc{wght\_sum}}
18+
\def\locInstSum {\loc{inst\_sum}}
19+
\def\locMaxCtSum {\loc{ct\_max\_sum}}
20+
\def\locUpcomingPhaseIsDifferent {\loc{upcoming\_phase\_is\_different}}
21+
\def\locUpcomingPhaseIsTheSame {\loc{upcoming\_phase\_is\_the\_same}}
22+
\def\locUpcomingLegalTransition {\loc{upcoming\_legal\_phase\_transition}}
23+
\def\locExtractor {\loc{extractor}}
24+
\def\locAboutToStartNewBlock {\loc{about\_to\_start\_new\_block}}
2425

2526
\def\ctMaxCoinbase {\redm{\texttt{nRows}_{\texttt{cb}}}}
2627
\def\ctMaxTimestamp {\redm{\texttt{nRows}_{\texttt{ts}}}}
@@ -84,8 +85,8 @@
8485
\def\prevNumberHi {\loc{prev\_NUMBER\_hi}}
8586
\def\prevNumberLo {\loc{prev\_NUMBER\_lo}}
8687

87-
\def\currTimeStampHi {\loc{curr\_TIMESTAMP\_hi}}
88-
\def\currTimeStampLo {\loc{curr\_TIMESTAMP\_lo}}
88+
\def\currTimestampHi {\loc{curr\_TIMESTAMP\_hi}}
89+
\def\currTimestampLo {\loc{curr\_TIMESTAMP\_lo}}
8990
\def\prevTimeStampHi {\loc{prev\_TIMESTAMP\_hi}}
9091
\def\prevTimeStampLo {\loc{prev\_TIMESTAMP\_lo}}
9192

block_data/columns.tex

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
\item $\ct$:
99
counter column; hovers around zero and then cycles from $0$ to $\maxCt$;
1010
\end{enumerate}
11+
We define
12+
\textbf{padding-rows} as those rows where $\iomf \equiv \false$ and
13+
\textbf{non-padding-rows} as those rows where $\iomf \equiv \true$.
1114
We introduce some binary columns linked to the instructions that the present module deals with:
1215
\begin{multicols}{3}
1316
\begin{enumerate}[resume]
@@ -22,27 +25,36 @@
2225
\end{enumerate}
2326
\end{multicols}
2427
\noindent The following columns contain data which is reflected in the \userTxnDataMod{} module.
28+
The acronym ``\bcc'' stands for \textbf{block-constant column}.
2529
\begin{enumerate}[resume, start=13]
2630
\item $\instruction$:
31+
\ccc{}
2732
instruction column;
2833
\item $\coinbase\high$ and $\coinbase\low$:
29-
\ccc{} containing the
30-
coinbase address;
34+
\bcc{} containing the block's
35+
\textbf{coinbase} address;
3136
\item \blockGasLimit{}:
32-
\ccc{} containing the
33-
block gas limit;
37+
\bcc{} containing the block's
38+
\textbf{block gas limit};
3439
\item \basefee{}:
35-
\ccc{} containing the
36-
base fee;
40+
\bcc{} containing the block's
41+
\textbf{base fee};
42+
\item \timestamp{}:
43+
\bcc{} containing the block's
44+
\textbf{timestamp};
45+
\item \numberr{}:
46+
\bcc{} containing the block's
47+
\textbf{(block) number};
3748
\end{enumerate}
3849
The following columns pertain to transaction and block numbers.
3950
\begin{enumerate}[resume]
4051
\item \blockNumberOfFirstBlockInConflation{}:
4152
``conflation-constant'' column containing the block number\footnote{In the sense of the \evm{}} of the first block of this conflation;
4253
\item $\relBlock$:
43-
\ccc{} containing the relative block number;
54+
column containing the relative block number;
55+
the first block of any conflation has $\relBlock \equiv 1$;
4456
\item $\blockDataHi$, $\blockDataLo$:
45-
columns containing block data;
57+
\ccc{}'s containing various block data;
4658
\end{enumerate}
4759
The following columns are used in lookups from the \btcMod{} module into the \wcpMod{} and \eucMod{} modules.
4860
\begin{enumerate}[resume]

block_data/computations/number.tex

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,19 @@
5151
\]
5252
\saNote{}
5353
The above ensures that \inst{NUMBER} is a $\medium$-byte integer.
54-
\item[\underline{\underline{Setting \inst{NUMBER}:}}]
54+
\item[\underline{\underline{Setting \inst{NUMBER} (1/2):}}]
5555
since we include ``the final block of the preceding conflation'' for reference,
5656
special care has to be taken when setting \inst{NUMBER} if the present conflation of blocks contains the genesis block.
5757
\begin{enumerate}
5858
\item
5959
\If $\locIsFirstBlock = 1$ \Then
60-
\begin{enumerate}
61-
\item
62-
we unconditionally impose that
63-
\[
64-
\left\{ \begin{array}{lcl}
65-
\currNumberHi & = & 0 \\
66-
\currNumberLo & = & \blockNumberOfFirstBlockInConflation _{i} \\
67-
\end{array} \right.
68-
\]
69-
\end{enumerate}
60+
we impose that
61+
\[
62+
\left\{ \begin{array}{lcl}
63+
\currNumberHi & = & 0 \\
64+
\currNumberLo & = & \blockNumberOfFirstBlockInConflation _{i} \\
65+
\end{array} \right.
66+
\]
7067
\item
7168
\If $\locIsntFirstBlock = 1$ \Then
7269
we impose that
@@ -77,4 +74,12 @@
7774
\end{array} \right.
7875
\]
7976
\end{enumerate}
77+
\item[\underline{\underline{Setting \inst{NUMBER} (2/2):}}]
78+
we unconditionally impose that
79+
\[
80+
\left\{ \begin{array}{lclr}
81+
\numberr _{i} & = & \currNumberLo \\
82+
\numberr _{i} & = & \blockNumberOfFirstBlockInConflation _{i} + (\relBlock _{i} - 1) & (\sanityCheck) \\
83+
\end{array} \right.
84+
\]
8085
\end{description}

block_data/computations/timestamp.tex

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
We use the following shorthand
1010
\[
1111
\left\{ \begin{array}{lcl}
12-
\currTimeStampHi & \define & \currDataHi \\
13-
\currTimeStampLo & \define & \currDataLo \\
12+
\currTimestampHi & \define & \currDataHi \\
13+
\currTimestampLo & \define & \currDataLo \\
1414
\end{array} \right.
1515
\quad
1616
\left\{ \begin{array}{lcl}
@@ -20,17 +20,23 @@
2020
\]
2121
And we impose the following constraints
2222
\begin{description}
23-
\item[\underline{\underline{Setting \inst{TIMESTAMP}:}}]
24-
we cannot \emph{a priori} constrain \inst{TIMESTAMP};
23+
\item[\underline{\underline{Horizontalization of \inst{TIMESTAMP}:}}]
24+
we impose
25+
\[
26+
\left\{ \begin{array}{lcl}
27+
\currTimestampHi & = & 0 \\
28+
\currTimestampLo & = & \timestamp _{i} \\
29+
\end{array} \right.
30+
\]
2531
\item[\underline{\underline{\inst{TIMESTAMP} upper bound:}}]
2632
\def\rowOffset{\yellowm{0}}
2733
we impose that
2834
\[
2935
\wcpCallToLt{
3036
anchorRow = i ,
3137
relOffset = \rowOffset ,
32-
argOneHi = \currTimeStampHi ,
33-
argOneLo = \currTimeStampLo ,
38+
argOneHi = \currTimestampHi ,
39+
argOneLo = \currTimestampLo ,
3440
argTwoHi = 0 ,
3541
argTwoLo = 256^\yellowm{8} ,
3642
}
@@ -45,8 +51,8 @@
4551
\wcpCallToGt{
4652
anchorRow = i ,
4753
relOffset = \rowOffset ,
48-
argOneHi = \currTimeStampHi ,
49-
argOneLo = \currTimeStampLo ,
54+
argOneHi = \currTimestampHi ,
55+
argOneLo = \currTimestampLo ,
5056
argTwoHi = \prevTimeStampHi ,
5157
argTwoLo = \prevTimeStampLo ,
5258
}

block_data/constancies.tex

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
\subsection{Shorthands} \label{block data: generalities: shorthands} \input{generalities/shorthands}
2+
\subsection{Binary constraints} \label{block data: generalities: binarities} \input{generalities/binarities}
3+
\subsection{Constancy conditions} \label{block data: generalities: constancies} \input{generalities/constancies}
4+
\subsection{\locFlagSum{} and \iomf{} constraints} \label{block data: generalities: flag sum and iomf constraints} \input{generalities/flag_sum_and_iomf}
5+
\subsection{\relBlock{} constraints} \label{block data: generalities: rel block constraints} \input{generalities/rel_block}
6+
\subsection{\ct{} and \maxCt{} constraints} \label{block data: generalities: ct and ct max constraints} \input{generalities/ct_and_ct_max}
7+
\subsection{\instruction{} constraints} \label{block data: generalities: instruction constraints} \input{generalities/inst}
8+
\subsection{Finalization constraints} \label{block data: generalities: finalization} \input{generalities/finalization}
9+
\subsection{Representation} \label{block data: generalities: representation} \input{generalities/representation}
10+
File renamed without changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
As per usual we declare a column \col{X} to be \textbf{conflation-constant} if it satisfies
2+
\[
3+
\If \iomf _{i} = \true ~ \Then \col{X} _{i + 1} = \col{X} _{i}
4+
\]
5+
\textbf{block-constant} if it satisfies
6+
\[
7+
\If \relBlock _{i} \neq 1 + \relBlock _{i - 1} ~
8+
\Then \col{X}_{i} = \col{X}_{i - 1}
9+
\]
10+
and \textbf{counter-constant} if it satisfies
11+
\[
12+
\If \ct _{i} \neq 0 ~
13+
\Then \col{X}_{i} = \col{X}_{i - 1}
14+
\]
15+
We impose that the following columns be \textbf{conflation-constant}
16+
\begin{enumerate}
17+
\item \blockNumberOfFirstBlockInConflation
18+
\end{enumerate}
19+
and the following columns be \textbf{block-constant}
20+
\begin{multicols}{3}
21+
\begin{enumerate}
22+
\item $\coinbase\high$
23+
\item $\coinbase\low$
24+
\item $\blockGasLimit$
25+
\item $\basefee$
26+
\item $\timestamp$
27+
\item $\numberr$
28+
\end{enumerate}
29+
\end{multicols}
30+
and that the following columns be \textbf{counter-constant}
31+
\begin{multicols}{3}
32+
\begin{enumerate}
33+
\item $\blockDataHi$
34+
\item $\blockDataLo$
35+
\item $\locWghtSum$
36+
\end{enumerate}
37+
\end{multicols}
38+
\saNote{}
39+
The \textbf{counter-constancy} of $\locWghtSum$ along with
40+
\textbf{flag exclusivity} of the \loc{is\_XX} binary flags,
41+
see note~(\ref{block data: generalities: flag sum and iomf constraints: flag exclusivities}),
42+
implicitly enforces
43+
counter-constancy of all involved \loc{is\_XX} binary flags
44+
and thus of all expressions derived from these flags by linear combination,
45+
e.g. \locMaxCtSum{} or \locInstSum{}.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
We constrain the \ct{} and \maxCt{} columns:
2+
\begin{enumerate}
3+
\item we unconditionally impose
4+
\[
5+
\maxCt _{i} = \locMaxCtSum _{i}
6+
\]
7+
\item \If $\iomf _{i} = \false$ \Then
8+
\[
9+
\left\{ \begin{array}{lclr}
10+
\ct _{i} & = & 0 \\
11+
\ct _{i + 1} & = & 0 & (\sanityCheck) \\
12+
\end{array} \right.
13+
\]
14+
\item \If $\iomf _{i} = \true$ \Then
15+
\begin{enumerate}
16+
\item
17+
\If $\ct _{i} \neq \maxCt _{i}$ \Then
18+
\[
19+
\left\{ \begin{array}{lclr}
20+
\ct _{i + 1} & = & 1 + \ct _{i} \\
21+
\locUpcomingLegalTransition _{i} & = & \false & (\sanityCheck) \\
22+
\locUpcomingPhaseIsDifferent _{i} & = & \false & (\sanityCheck) \\
23+
\locUpcomingPhaseIsTheSame _{i} & = & \true & (\sanityCheck) \\
24+
\end{array} \right.
25+
\]
26+
\item
27+
\If $\ct _{i} = \maxCt _{i}$ \Then
28+
\[
29+
\left\{ \begin{array}{lclr}
30+
\ct _{i + 1} & = & 0 \\
31+
\locUpcomingLegalTransition _{i} & = & \true \\
32+
\locUpcomingPhaseIsDifferent _{i} & = & \true & (\sanityCheck) \\
33+
\locUpcomingPhaseIsTheSame _{i} & = & \false & (\sanityCheck) \\
34+
\end{array} \right.
35+
\]
36+
\end{enumerate}
37+
\end{enumerate}

0 commit comments

Comments
 (0)