Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions pkg/rlp_tx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
\newcommand{\phaseValueValue} {\rlpTxnPhase{value}}
\newcommand{\phaseDataValue} {\rlpTxnPhase{data}}
\newcommand{\phaseAccessListValue} {\rlpTxnPhase{access\_list}}
\newcommand{\phaseAuthorizationListValue} {\rlpTxnPhase{authorization\_list}}
\newcommand{\phaseBetaValue} {\rlpTxnPhase{beta}}
\newcommand{\phaseYValue} {\rlpTxnPhase{y}}
\newcommand{\phaseRValue} {\rlpTxnPhase{r}}
Expand All @@ -60,6 +61,7 @@
\newcommand{\phaseValue} {\col{IS\_VALUE}}
\newcommand{\phaseData} {\col{IS\_DATA}}
\newcommand{\phaseAccessList} {\col{IS\_ACCESS\_LIST}}
\newcommand{\phaseAuthorizationList} {\col{IS\_AUTHORIZATION\_LIST}}
\newcommand{\phaseBeta} {\col{IS\_BETA}}
\newcommand{\phaseY} {\col{IS\_Y}}
\newcommand{\phaseR} {\col{IS\_R}}
Expand Down
4 changes: 3 additions & 1 deletion pkg/rlp_txn_v2.sty
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
\newcommand{\rlpTxnTransactionColumnNbWarmedStorageKey} {\rlpTxnTransactionColumn{\nbWarmedStorageKey}}
\newcommand{\rlpTxnTransactionColumnRequiresEvmExecution} {\rlpTxnTransactionColumn{REQUIRES\_EVM\_EXECUTION}}


\newcommand{\rlpTxnCommonColumnReplayProtection} {\col{REPLAY\_PROTECTION}}
\newcommand{\rlpTxnCommonColumnYparity} {\col{Y\_PARITY}}
\newcommand{\rlpTxnCommonColumnNumberOfAuthorizations} {\col{NUMBER\_OF\_AUTHORIZATIONS}}


\newcommand{\rlpTxnComputationColumn} [1] {\col{cmp}\separator\col{{#1}}}
Expand Down Expand Up @@ -75,7 +77,7 @@

\newcommand{\numberOfRlpUtilsDataColumns} {\yellowm{8}}
\newcommand{\numberOfCounterConstantAuxiliaryDataColumns} {\yellowm{5}}
\newcommand{\numberOfAuxiliaryDataColumns} {\yellowm{2}}
\newcommand{\numberOfAuxiliaryDataColumns} {\yellowm{7}}



Expand Down
26 changes: 26 additions & 0 deletions rlp_txn/_local.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
\def\locValidPhaseTransitionTypeZero {\locValidPhaseTransition\loc{\_type\_0}}
\def\locValidPhaseTransitionTypeOne {\locValidPhaseTransition\loc{\_type\_1}}
\def\locValidPhaseTransitionTypeTwo {\locValidPhaseTransition\loc{\_type\_2}}
\def\locValidPhaseTransitionTypeFour {\locValidPhaseTransition\loc{\_type\_4}}

\def\locWillRemainInSamePhase {\loc{will\_remain\_in\_same\_phase}}
\def\locWillRemainInSamePhaseTypeZero {\locWillRemainInSamePhase\loc{\_type\_0}}
\def\locWillRemainInSamePhaseTypeOne {\locWillRemainInSamePhase\loc{\_type\_1}}
\def\locWillRemainInSamePhaseTypeTwo {\locWillRemainInSamePhase\loc{\_type\_2}}
\def\locWillRemainInSamePhaseTypeFour {\locWillRemainInSamePhase\loc{\_type\_4}}

\def\locPhaseWillNotChangeAndPhaseIsntRlpPrefix {\loc{phase\_wont\_change\_and\_isnt\_global\_RLP\_prefix}}
\def\locLimbUnconditionallyPartakesInLt {\loc{limb\_unconditionally\_partakes\_in\_LT}}
Expand All @@ -30,6 +32,7 @@
\def\locRlpComponentsTypeZero {\locRlpComponents\loc{\_type\_0}}
\def\locRlpComponentsTypeOne {\locRlpComponents\loc{\_type\_1}}
\def\locRlpComponentsTypeTwo {\locRlpComponents\loc{\_type\_2}}
\def\locRlpComponentsTypeFour {\locRlpComponents\loc{\_type\_4}}

\def\locAccessListLengthCountdown {\loc{AL\_RLP\_length\_countdown}}
\def\locAccessListItemCountdown {\loc{access\_list\_item\_countdown}}
Expand Down Expand Up @@ -139,3 +142,26 @@
\def\locStorageKeyLo {\loc{storage\_key\_lo}}

\def\rlpIntoHubSelector {\loc{sel\_rlp\_txn\_into\_hub}}

%% Authorization list
\def\locAuthorizationNumberOfRows {\numConst{19}}

\def\locAuthorizationPrefix {\loc{first\_CMP\_row\_of\_auth\_phase}}
\def\locAuthorizationAgainAuthPhase {\loc{again\_CMP\_row\_of\_auth\_phase}}
\def\locAuthorizationFirstRow {\loc{first\_row\_of\_tuple\_processing}}
\def\locAuthorizationIndex {\loc{tuple\_index}}
\def\locAuthorizationData {\loc{row\_contains\_tuple\_data}}
\def\locAuthorizationNotFirstRow {\loc{not\_first\_row\_of\_tuple}}
\def\locAuthorizationLengthCountdown {\loc{auth\_list\_RLP\_length\_countdown}}
\def\locAuthorizationItemCountdown {\loc{auth\_item\_countdown}}
\def\locAuthorizationChainId {\loc{auth\_chain\_id}}
\def\locAuthorizationAddressHi {\loc{auth\_address\_hi}}
\def\locAuthorizationAddressLo {\loc{auth\_address\_lo}}
\def\locAuthorizationNonce {\loc{auth\_nonce}}
\def\locAuthorizationY {\loc{auth\_y}}
\def\locAuthorizationRHi {\loc{auth\_r\_hi}}
\def\locAuthorizationRLo {\loc{auth\_r\_lo}}
\def\locAuthorizationSHi {\loc{auth\_s\_hi}}
\def\locAuthorizationSLo {\loc{auth\_s\_lo}}
\def\locAuthorizationEndOfPhase {\loc{auth\_end\_of\_phase}}

10 changes: 9 additions & 1 deletion rlp_txn/columns/shared.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
\item \typeOneTx{}
\item \typeTwoTx{}
% \item \typeThreeTx{}
% \item \typeFourTx{}
\item \typeFourTx{}
\end{enumerate}
\end{multicols}
We further introduce ``phase flag columns'':
Expand All @@ -60,6 +60,7 @@
\item \phaseBeta{}
\item \phaseMaxPriorityFeePerGas{}
\item \phaseMaxFeePerGas{}
\item \phaseAuthorizationList
\item \phaseY{}
\item \phaseR{}
\item \phaseS{}
Expand Down Expand Up @@ -111,3 +112,10 @@
\item \rlpTxnSharedColumnIsAccessListStorageKey
\end{enumerate}
\end{multicols}
for a \textbf{7702-transaction} (as witnessed by $\typeFourTx \equiv \true$).
\begin{enumerate}[resume]
\item
\markAsJustifiedHere{}
\rlpTxnCommonColumnNumberOfAuthorizations{}:
the number of authorization in the authorization list;
\end{enumerate}
7 changes: 7 additions & 0 deletions rlp_txn/columns/transaction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
\rlpTxnTransactionColumnNumberOfNonZero{}:
the number of nonzero bytes in the transaction's payload \textbf{p};
\end{enumerate}
for a \textbf{7702-transaction} (as witnessed by $\typeFourTx \equiv \true$).
\begin{enumerate}[resume]
\item
\markAsJustifiedHere{}
\rlpTxnTransactionColumnNumberOfZero{}:
the number of zero bytes in the transaction's payload \textbf{p};
\end{enumerate}
We recall the definition of the payload \textbf{p} of a transaction $T$
in section~(\ref{rlp txn: phase constraints: payload: payload size analysis: definition of payload in terms of transaction fields}).
\begin{enumerate}[resume]
Expand Down
2 changes: 2 additions & 0 deletions rlp_txn/generalities/binarities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
\item \typeZeroTx{}
\item \typeOneTx{}
\item \typeTwoTx{}
\item \typeFourTx{}
\item \phaseRlpPrefix{}
\item \phaseChainId{}
\item \phaseNonce{}
Expand All @@ -15,6 +16,7 @@
\item \phaseValue{}
\item \phaseData{}
\item \phaseAccessList{}
\item \phaseAuthorizationList{}
\item \phaseBeta{}
\item \phaseY{}
\item \phaseR{}
Expand Down
1 change: 1 addition & 0 deletions rlp_txn/generalities/constancies.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
\item \CFI
\item \rlpTxnCommonColumnReplayProtection
\item \rlpTxnCommonColumnYparity
\item \rlpTxnCommonColumnNumberOfAuthorizations
\end{enumerate}
\end{multicols}
\noindent be \textbf{transaction-constant}.
1 change: 1 addition & 0 deletions rlp_txn/generalities/lt_lx_lc_bits.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
+ & \phaseValue _{i} \\
+ & \phaseData _{i} \\
+ & \phaseAccessList _{i} \\
+ & \phaseAuthorizationList _{i} \\
% + & \phaseBeta _{i} \\
% + & \phaseY _{i} \\
% + & \phaseR _{i} \\
Expand Down
1 change: 1 addition & 0 deletions rlp_txn/generalities/miscellaneous_transaction_columns.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
\item \If $\isTxn _{i} = 1$ \et $\rlpTxnTransactionColumnChainId _{i} \neq 0$ \Then $\rlpTxnCommonColumnReplayProtection _{i} = 1$
\item \If $\isTxn _{i} = 1$ \et $\rlpTxnTransactionColumnChainId _{i} = 0$ \Then $\rlpTxnCommonColumnReplayProtection _{i} = 0$
\item \If $\isTxn _{i} = 1$ \et $\typeZeroTx _{i} = 0$ \Then $\rlpTxnCommonColumnReplayProtection _{i} = 1$
\item \If $\typeFourTx_{i} = 0$ \Then $\rlpTxnCommonColumnNumberOfAuthorizations_{i} = 0$
\end{enumerate}
\saNote{} \label{rlp txn: generalities: transaction decoding: non legacy transaction can't be chainless}
The above imposes that only legacy transactions can be chainless.
3 changes: 2 additions & 1 deletion rlp_txn/generalities/perspectives.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We define the following shorthands:
We define the following shorthands:
\[
\begin{array}{l}
\locPerspFlagSum _{i} \define
Expand All @@ -20,6 +20,7 @@
+ & (1 - \phaseValue _{i}) & \!\!\!\cdot\!\!\! & \phaseValue _{i + 1} \\
+ & (1 - \phaseData _{i}) & \!\!\!\cdot\!\!\! & \phaseData _{i + 1} \\
+ & (1 - \phaseAccessList _{i}) & \!\!\!\cdot\!\!\! & \phaseAccessList _{i + 1} \\
+ & (1 - \phaseAuthorizationList _{i}) & \!\!\!\cdot\!\!\! & \phaseAuthorizationList _{i + 1} \\
+ & (1 - \phaseBeta _{i}) & \!\!\!\cdot\!\!\! & \phaseBeta _{i + 1} \\
+ & (1 - \phaseY _{i}) & \!\!\!\cdot\!\!\! & \phaseY _{i + 1} \\
+ & (1 - \phaseR _{i}) & \!\!\!\cdot\!\!\! & \phaseR _{i + 1} \\
Expand Down
5 changes: 3 additions & 2 deletions rlp_txn/generalities/phase_end.tex
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor comment is right (Spurious text appended to section description)

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We define the following shorthand
We define the following shorthand: \phaseAuthorizationList
\[
\begin{array}{l}
\locAboutToExitPhase _{i} \vspace{2mm} \\
Expand All @@ -14,7 +14,8 @@
+ & \phaseTo _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseTo _{i + 1}) \\
+ & \phaseValue _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseValue _{i + 1}) \\
+ & \phaseData _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseData _{i + 1}) \\
+ & \phaseAccessList _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseAccessList _{i + 1}) \\
+ & \phaseAccessList _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseAccessList _{i + 1}) \\
+ & \phaseAuthorizationList _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseAuthorizationList _{i + 1}) \\
+ & \phaseBeta _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseBeta _{i + 1}) \\
+ & \phaseY _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseY _{i + 1}) \\
+ & \phaseR _{i} & \!\!\!\cdot\!\!\! & (1 - \phaseR _{i + 1}) \\
Expand Down
1 change: 1 addition & 0 deletions rlp_txn/generalities/phase_flag_sum.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
+ & \phaseValue _{i} \\
+ & \phaseData _{i} \\
+ & \phaseAccessList _{i} \\
+ & \phaseAuthorizationList _{i} \\
+ & \phaseBeta _{i} \\
+ & \phaseY _{i} \\
+ & \phaseR _{i} \\
Expand Down
10 changes: 2 additions & 8 deletions rlp_txn/generalities/transaction_decoding.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
+ & \typeOneTx _{i} \\
+ & \typeTwoTx _{i} \\
% + & \typeThreeTx _{i} \\
% + & \typeFourTx _{i} \\
+ & \typeFourTx _{i} \\
\end{array} \right]
\vspace{2mm} \\
\locWeightedTransactionTypeSum _{i} & \define &
Expand All @@ -16,7 +16,7 @@
+ & 1 & \!\!\!\cdot\!\!\! & \typeOneTx _{i} \\
+ & 2 & \!\!\!\cdot\!\!\! & \typeTwoTx _{i} \\
% + & 3 & \!\!\!\cdot\!\!\! & \typeThreeTx _{i} \\
% + & 4 & \!\!\!\cdot\!\!\! & \typeFourTx _{i} \\
+ & 4 & \!\!\!\cdot\!\!\! & \typeFourTx _{i} \\
\end{array} \right]
\end{array} \right.
\]
Expand All @@ -31,12 +31,6 @@
we impose that $\locTransactionTypeSum _{i} = \locPhaseFlagSum _{i}$
\item
\If $\isTxn _{i} = 1$ \Then $\rlpTxnTransactionColumnTxType _{i} = \locWeightedTransactionTypeSum _{i}$
% \begin{enumerate}
% \item $\ct _{i} = 0$ (\sanityCheck)
% \item $\maxCt _{i} = 0$ (\sanityCheck)
% \item $\phaseEnd _{i} = 0$ (\sanityCheck)
% \item $\lc _{i} = 0$ (\sanityCheck)
% \end{enumerate}
\end{enumerate}
\saNote{} \label{rlp txn: generalities: transaction decoding: flag exclusivity}
The above implicitly imposes flag exclusivity on the ``transaction type flags.''
Expand Down
49 changes: 49 additions & 0 deletions rlp_txn/generalities/transaction_type_phase_transitions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,48 @@
\\
\end{array} \right.
\]
and
\[
\hspace*{-2cm}
\left\{ \begin{array}{lcl}
\locValidPhaseTransitionTypeFour_{i} & \define &
\left[ \begin{array}{clcl}
+ & \phaseRlpPrefix _{i} & \cdot & \phaseChainId _{i + 1} \\
+ & \phaseChainId _{i} & \cdot & \phaseNonce _{i + 1} \\
+ & \phaseNonce _{i} & \cdot & \phaseMaxPriorityFeePerGas _{i + 1} \\
+ & \phaseMaxPriorityFeePerGas _{i} & \cdot & \phaseMaxFeePerGas _{i + 1} \\
+ & \phaseMaxFeePerGas _{i} & \cdot & \phaseGasLimit _{i + 1} \\
+ & \phaseGasLimit _{i} & \cdot & \phaseTo _{i + 1} \\
+ & \phaseTo _{i} & \cdot & \phaseValue _{i + 1} \\
+ & \phaseValue _{i} & \cdot & \phaseData _{i + 1} \\
+ & \phaseData _{i} & \cdot & \phaseAccessList _{i + 1} \\
+ & \phaseAccessList _{i} & \cdot & \phaseAuthorizationList _{i + 1} \\
+ & \phaseAuthorizationList _{i} & \cdot & \phaseY _{i + 1} \\
+ & \phaseY _{i} & \cdot & \phaseR _{i + 1} \\
+ & \phaseR _{i} & \cdot & \phaseS _{i + 1} \\
+ & \phaseS _{i} & \cdot & \phaseRlpPrefix _{i + 1} \\
\end{array} \right]
\vspace{2mm} \\
\locWillRemainInSamePhaseTypeFour_{i} & \define &
\left[ \begin{array}{clcl}
+ & \phaseRlpPrefix _{i} & \cdot & \phaseRlpPrefix _{i + 1} \\
+ & \phaseChainId _{i} & \cdot & \phaseChainId _{i + 1} \\
+ & \phaseNonce _{i} & \cdot & \phaseNonce _{i + 1} \\
+ & \phaseMaxPriorityFeePerGas _{i} & \cdot & \phaseMaxPriorityFeePerGas _{i + 1} \\
+ & \phaseMaxFeePerGas _{i} & \cdot & \phaseMaxFeePerGas _{i + 1} \\
+ & \phaseGasLimit _{i} & \cdot & \phaseGasLimit _{i + 1} \\
+ & \phaseTo _{i} & \cdot & \phaseTo _{i + 1} \\
+ & \phaseValue _{i} & \cdot & \phaseValue _{i + 1} \\
+ & \phaseData _{i} & \cdot & \phaseData _{i + 1} \\
+ & \phaseAccessList _{i} & \cdot & \phaseAccessList _{i + 1} \\
+ & \phaseAuthorizationList _{i} & \cdot & \phaseAuthorizationList _{i + 1} \\
+ & \phaseY _{i} & \cdot & \phaseY _{i + 1} \\
+ & \phaseR _{i} & \cdot & \phaseR _{i + 1} \\
+ & \phaseS _{i} & \cdot & \phaseS _{i + 1} \\
\end{array} \right]
\\
\end{array} \right.
\]
and we impose that
\begin{enumerate}
\item
Expand All @@ -131,4 +173,11 @@
+ & \locWillRemainInSamePhaseTypeTwo _{i} \\
\end{array} \right]
= 1 $
\item
\If $\typeFourTx _{i} = 1$ \Then
$ \left[ \begin{array}{clcl}
+ & \locValidPhaseTransitionTypeFour _{i} \\
+ & \locWillRemainInSamePhaseTypeFour_{i} \\
\end{array} \right]
= 1 $
\end{enumerate}
21 changes: 20 additions & 1 deletion rlp_txn/generalities/transaction_type_rlp_components.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,33 @@
+ & \phaseR _{i} \\
+ & \phaseS _{i} \\
\end{array} \right]
\vspace{2mm} \\
\locRlpComponentsTypeFour_{i} & \define &
\left[ \begin{array}{clcl}
+ & \phaseRlpPrefix _{i} \\
+ & \phaseChainId _{i} \\
+ & \phaseNonce _{i} \\
+ & \phaseMaxPriorityFeePerGas _{i} \\
+ & \phaseMaxFeePerGas _{i} \\
+ & \phaseGasLimit _{i} \\
+ & \phaseTo _{i} \\
+ & \phaseValue _{i} \\
+ & \phaseData _{i} \\
+ & \phaseAccessList _{i} \\
+ & \phaseAuthorizationList _{i} \\
+ & \phaseY _{i} \\
+ & \phaseR _{i} \\
+ & \phaseS _{i} \\
\end{array} \right]
\\
\end{array} \right.
\end{array} \right.
\]
and we impose
\begin{enumerate}
\item \If $\typeZeroTx _{i} = 1$ \Then $\locRlpComponentsTypeZero _{i} = 1$ \quad (\sanityCheck)
\item \If $\typeOneTx _{i} = 1$ \Then $\locRlpComponentsTypeOne _{i} = 1$ \quad (\sanityCheck)
\item \If $\typeTwoTx _{i} = 1$ \Then $\locRlpComponentsTypeTwo _{i} = 1$ \quad (\sanityCheck)
\item \If $\typeFourTx _{i} = 1$ \Then $\locRlpComponentsTypeFour _{i} = 1$ \quad (\sanityCheck)
\end{enumerate}
\saNote{} \label{rlp txn: generalities: transaction type rlp components: refinement of flag sum}
The above refines
Expand Down
1 change: 1 addition & 0 deletions rlp_txn/phase_constraints/_inputs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ \subsection{\localSectionTitle{} (\phaseChainId{}, \dots, \phaseY{}, \phaseR{} a
\subsection{\rlp{}-ization of \texttt{to} (\phaseTo)} \label{rlp txn: phase constraints: to address} \input{phase_constraints/to_address}
\subsection{\rlp{}-ization of \texttt{data} (\phaseData)} \label{rlp txn: phase constraints: payload} \input{phase_constraints/data/_inputs}
\subsection{\rlp{}-ization of \texttt{access list} (\phaseAccessList)} \label{rlp txn: phase constraints: access list} \input{phase_constraints/access_list/_inputs}
\subsection{\rlp{}-ization of \texttt{authorization list} (\phaseAuthorizationList)} \label{rlp txn: phase constraints: authorization list} \input{phase_constraints/authorization_list/_inputs}
\subsection{\rlp{}-ization of \texttt{beta} (\phaseBeta)} \label{rlp txn: phase constraints: beta} \input{phase_constraints/beta}
Binary file not shown.
1 change: 0 additions & 1 deletion rlp_txn/phase_constraints/access_list/_inputs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ \subsubsection{Access list bits } \label{rlp txn: phase constraints: acc
\subsubsection{Legal bit transitions } \label{rlp txn: phase constraints: access list: legal transitions} \input{phase_constraints/access_list/legal_transitions}
\subsubsection{Countdown constraints } \label{rlp txn: phase constraints: access list: countdowns} \input{phase_constraints/access_list/countdowns/_inputs}
\subsubsection{Subphases of processing } \label{rlp txn: phase constraints: access list: access list prefix} \input{phase_constraints/access_list/subphases/_inputs}
% \subsubsection{Constraints } \label{rlp txn: phase constraints: access list: constraints} \input{phase_constraints/access_list/constraints}
Loading