diff --git a/oob/_local.tex b/oob/_local.tex index e0cefa77..9aa3b44c 100644 --- a/oob/_local.tex +++ b/oob/_local.tex @@ -210,6 +210,8 @@ \def\locPrcFlagSumBlake {\locPrcFlagSum\loc{\_blake}} \def\locPrcFlagSumModexp {\locPrcFlagSum\loc{\_modexp}} \def\locPrcFlagSumBls {\locPrcFlagSum\loc{\_bls}} +\def\locFlagSumEipBlobTransactions {\loc{flag\_sum\_eip\_blob\_transactions}} +\def\locFlagSumEipBlsTwelvePrecompiles {\loc{flag\_sum\_eip\_bls12\_precompiles}} % common precompile shorthands % \def\locCalleeGas {\loc{callee\_gas}} diff --git a/oob/shorthands.tex b/oob/shorthands.tex index 4822884c..6506ffab 100644 --- a/oob/shorthands.tex +++ b/oob/shorthands.tex @@ -23,7 +23,6 @@ + & \oobInstIsEcadd _{i} \\ + & \oobInstIsEcmul _{i} \\ + & \oobInstIsEcpairing _{i} \\ - + & \oobInstIsPointEvaluation_{i}\\ + & \locPrcFlagSumBls _{i} \\ \end{array} \right] \vspace{2mm} \\ \locPrcFlagSumBlake_{i} & \define & @@ -39,7 +38,11 @@ + & \oobInstIsModexpPricing _{i} \\ + & \oobInstIsModexpExtract _{i} \\ \end{array} \right] \vspace{2mm} \\ - \locPrcFlagSumBls_{i} & \define & + \locFlagSumEipBlobTransactions_{i} & \define & + \left[ \begin{array}{cl} + + & \oobInstIsPointEvaluation_{i} \\ + \end{array} \right] \vspace{2mm} \\ + \locFlagSumEipBlsTwelvePrecompiles_{i} & \define & \left[ \begin{array}{cl} + & \oobInstIsBlsGOneAdd _{i} \\ + & \oobInstIsBlsGOneMsm _{i} \\ @@ -48,9 +51,18 @@ + & \oobInstIsBlsPairingCheck _{i} \\ + & \oobInstIsBlsMapFpToGOne _{i} \\ + & \oobInstIsBlsMapFpTwoToGTwo_{i} \\ - \end{array} \right] + \end{array} \right] \vspace{2mm} \\ + \locPrcFlagSumBls_ {i} & \define & + \left[ \begin{array}{cl} + + & \locFlagSumEipBlobTransactions_ {i} \\ + + & \locFlagSumEipBlsTwelvePrecompiles_ {i} \\ + \end{array} \right] \vspace{2mm} \\ \end{array} \right. \] +\saNote{} +If the Ethereum network configuration is at the Cancun hard fork, one may further impose $\locFlagSumEipBlsTwelvePrecompiles_{i} = 0$, +thereby not allowing \blsMod{} precompiles to be executed. + we also set \[ \left\{ \begin{array}{lcl} @@ -69,6 +81,7 @@ \] and \[ + \hspace*{-1cm} \left\{ \begin{array}{lcl} \weightedFlagSumInst_{i} & \define & \left[ \begin{array}{clcl} @@ -92,7 +105,6 @@ + & \oobInstEcadd & \cdot & \oobInstIsEcadd _{i} \\ + & \oobInstEcmul & \cdot & \oobInstIsEcmul _{i} \\ + & \oobInstEcpairing & \cdot & \oobInstIsEcpairing _{i} \\ - + & \oobInstPointEvaluation & \cdot & \oobInstIsPointEvaluation _{i} \\ + & \weightedPrcFlagSumBls_{i} \\ \end{array} \right] \vspace{2mm} \\ \weightedPrcFlagSumBlake_{i} & \define & @@ -108,7 +120,11 @@ + & \oobInstModexpPricing & \cdot & \oobInstIsModexpPricing _{i} \\ + & \oobInstModexpExtract & \cdot & \oobInstIsModexpExtract _{i} \\ \end{array} \right] \vspace{2mm} \\ - \weightedPrcFlagSumBls_{i} & \define & + \weightedPrcEipBlobTransactions_{i} & \define & + \left[ \begin{array}{crcl} + + & \oobInstPointEvaluation & \cdot & \oobInstIsPointEvaluation _{i} \\ + \end{array} \right] \vspace{2mm} \\ + \weightedPrcEipBlsTwelvePrecompiles_{i} & \define & \left[ \begin{array}{crcl} + & \oobInstBlsGOneAdd & \cdot & \oobInstIsBlsGOneAdd _{i} \\ + & \oobInstBlsGOneMsm & \cdot & \oobInstIsBlsGOneMsm _{i} \\ @@ -117,6 +133,11 @@ + & \oobInstBlsPairingCheck & \cdot & \oobInstIsBlsPairingCheck _{i} \\ + & \oobInstBlsMapFpToGOne & \cdot & \oobInstIsBlsMapFpToGOne _{i} \\ + & \oobInstBlsMapFpTwoToGTwo & \cdot & \oobInstIsBlsMapFpTwoToGTwo _{i} \\ + \end{array} \right] \vspace{2mm} \\ + \weightedPrcFlagSumBls_{i} & \define & + \left[ \begin{array}{cl} + + & \weightedPrcEipBlobTransactions_ {i} \\ + + & \weightedPrcEipBlsTwelvePrecompiles_ {i} \\ \end{array} \right] \end{array} \right. \] @@ -159,7 +180,6 @@ \oobInstEcadd & \define & \oxEcadd \\ \oobInstEcmul & \define & \oxEcmul \\ \oobInstEcpairing & \define & \oxEcpairing \\ - \oobInstPointEvaluation & \define & \oxPointEvaluation \\ \oobInstBlakeCds & \define & \oxBlakeCds \\ \oobInstBlakeParams & \define & \oxBlakeParams \\ \end{array} \right. @@ -177,6 +197,7 @@ and \[ \left\{ \begin{array}{lclcr} + \oobInstPointEvaluation & \define & \oxPointEvaluation \\ \oobInstBlsGOneAdd & \define & \oxBlsGOneAdd \\ \oobInstBlsGOneMsm & \define & \oxBlsGOneMsm \\ \oobInstBlsGTwoAdd & \define & \oxBlsGTwoAdd \\ @@ -192,6 +213,7 @@ We further set \[ + \hspace*{-1cm} \left\{ \begin{array}{lcl} \maxCtFlagSumInst_{i} & \define & \left[ \begin{array}{clcl} @@ -215,7 +237,6 @@ + & \oobCtMaxEcadd & \cdot & \oobInstIsEcadd _{i} \\ + & \oobCtMaxEcmul & \cdot & \oobInstIsEcmul _{i} \\ + & \oobCtMaxEcpairing & \cdot & \oobInstIsEcpairing _{i} \\ - + & \oobCtMaxPointEvaluation & \cdot & \oobInstIsPointEvaluation _{i} \\ + & \maxCtFlagSumPrcBls_{i} \\ \end{array} \right] \vspace{2mm} \\ \maxCtFlagSumPrcBlake_{i} & \define & @@ -231,7 +252,11 @@ + & \oobCtMaxModexpPricing & \cdot & \oobInstIsModexpPricing _{i} \\ + & \oobCtMaxModexpExtract & \cdot & \oobInstIsModexpExtract _{i} \\ \end{array} \right] \vspace{2mm} \\ - \maxCtFlagSumPrcBls_{i} & \define & + \maxCtFlagSumPrcEipBlobTransactions_{i} & \define & + \left[ \begin{array}{crcl} + + & \oobCtMaxPointEvaluation & \cdot & \oobInstIsPointEvaluation _{i} \\ + \end{array} \right] \vspace{2mm} \\ + \maxCtFlagSumPrcEipBlsTwelvePrecompiles_{i} & \define & \left[ \begin{array}{crcl} + & \oobCtMaxBlsGOneAdd & \cdot & \oobInstIsBlsGOneAdd _{i} \\ + & \oobCtMaxBlsGOneMsm & \cdot & \oobInstIsBlsGOneMsm _{i} \\ @@ -240,6 +265,11 @@ + & \oobCtMaxBlsPairingCheck & \cdot & \oobInstIsBlsPairingCheck _{i} \\ + & \oobCtMaxBlsMapFpToGOne & \cdot & \oobInstIsBlsMapFpToGOne _{i} \\ + & \oobCtMaxBlsMapFpTwoToGTwo & \cdot & \oobInstIsBlsMapFpTwoToGTwo _{i} \\ + \end{array} \right] \vspace{2mm} \\ + \maxCtFlagSumPrcBls_{i} & \define & + \left[ \begin{array}{cl} + + & \maxCtFlagSumPrcEipBlobTransactions_ {i} \\ + + & \maxCtFlagSumPrcEipBlsTwelvePrecompiles_ {i} \\ \end{array} \right] \end{array} \right. \] @@ -283,7 +313,6 @@ \oobCtMaxEcadd & \define & 2 \\ \oobCtMaxEcmul & \define & 2 \\ \oobCtMaxEcpairing & \define & 4 \\ - \oobCtMaxPointEvaluation & \define & 3 \\ \end{array} \right. \\ \left\{ \begin{array}{lcl} \oobCtMaxBlakeCds & \define & 1 \\ @@ -298,6 +327,7 @@ \oobCtMaxModexpExtract & \define & 3 \\ \end{array} \right. \\ \left\{ \begin{array}{lcl} + \oobCtMaxPointEvaluation & \define & 3 \\ \oobCtMaxBlsGOneAdd & \define & 3 \\ \oobCtMaxBlsGOneMsm & \define & 6 \\ \oobCtMaxBlsGTwoAdd & \define & 3 \\ diff --git a/oob/specialized.tex b/oob/specialized.tex index 7ab463a1..fedc3674 100644 --- a/oob/specialized.tex +++ b/oob/specialized.tex @@ -1,6 +1,7 @@ We define a series of simple parametrized constraint systems for instructions that are sent to the \addMod{} module, the \modMod{} module and the \wcpMod{} module. Let $\relof$ be a small nonnegative integer. \[ + \hspace*{-0.5cm} \left\{ \begin{array}{lcl} \oobCallToAdd {i}{\relof} diff --git a/pkg/precompiles.sty b/pkg/precompiles.sty index 832f42c6..e83317cb 100644 --- a/pkg/precompiles.sty +++ b/pkg/precompiles.sty @@ -299,27 +299,34 @@ \newcommand{\modArgTwoLo} {\col{MOD\_ARG2\_LO}} \newcommand{\modRes} {\col{MOD\_RES}} -\newcommand{\GQuadDivisor} {G_{\text{quaddivisor}}} -\newcommand{\GQuadDivisorValue} {3} -\newcommand{\cycleModexp} {\redm{15}} -\newcommand{\cycleNotModexp} {\redm{3}} -\newcommand{\weightedPhaseFlagSum} {\loc{phase\_sum}} -\newcommand{\indexMaxFlagSum} {\loc{index\_max\_sum}} -\newcommand{\flagSum} {\loc{flag\_sum}} -\newcommand{\weightedFlagSum} {\loc{wght\_sum}} -\newcommand{\weightedFlagSumInst} {\weightedFlagSum\loc{\_inst}} -\newcommand{\weightedPrcFlagSum} {\weightedFlagSum\loc{\_prc}} -\newcommand{\weightedPrcFlagSumCommon} {\weightedPrcFlagSum\loc{\_common}} -\newcommand{\weightedPrcFlagSumBlake} {\weightedPrcFlagSum\loc{\_blake}} -\newcommand{\weightedPrcFlagSumModexp} {\weightedPrcFlagSum\loc{\_modexp}} -\newcommand{\weightedPrcFlagSumBls} {\weightedPrcFlagSum\loc{\_bls}} -\newcommand{\maxCtFlagSum} {\loc{ct\_max\_sum}} -\newcommand{\maxCtFlagSumInst} {\maxCtFlagSum\loc{\_inst}} -\newcommand{\maxCtFlagSumPrc} {\maxCtFlagSum\loc{\_prc}} -\newcommand{\maxCtFlagSumPrcCommon} {\maxCtFlagSumPrc\loc{\_common}} -\newcommand{\maxCtFlagSumPrcBlake} {\maxCtFlagSumPrc\loc{\_blake}} -\newcommand{\maxCtFlagSumPrcModexp} {\maxCtFlagSumPrc\loc{\_modexp}} -\newcommand{\maxCtFlagSumPrcBls} {\maxCtFlagSumPrc\loc{\_bls}} +\newcommand{\GQuadDivisor} {G_{\text{quaddivisor}}} +\newcommand{\GQuadDivisorValue} {3} +\newcommand{\cycleModexp} {\redm{15}} +\newcommand{\cycleNotModexp} {\redm{3}} +\newcommand{\weightedPhaseFlagSum} {\loc{phase\_sum}} +\newcommand{\indexMaxFlagSum} {\loc{index\_max\_sum}} +\newcommand{\flagSum} {\loc{flag\_sum}} +\newcommand{\weightedFlagSum} {\loc{wght\_sum}} +\newcommand{\weightedFlagSumInst} {\weightedFlagSum\loc{\_inst}} +\newcommand{\weightedPrcFlagSum} {\weightedFlagSum\loc{\_prc}} +\newcommand{\weightedPrcFlagSumCommon} {\weightedPrcFlagSum\loc{\_common}} +\newcommand{\weightedPrcFlagSumBlake} {\weightedPrcFlagSum\loc{\_blake}} +\newcommand{\weightedPrcFlagSumModexp} {\weightedPrcFlagSum\loc{\_modexp}} +\newcommand{\weightedPrcFlagSumBls} {\weightedPrcFlagSum\loc{\_bls}} + +\newcommand{\weightedPrcEipBlobTransactions} {\weightedPrcFlagSum\loc{\_eip\_blob\_transactions}} +\newcommand{\weightedPrcEipBlsTwelvePrecompiles} {\weightedPrcFlagSum\loc{\_eip\_bls12\_precompiles}} + +\newcommand{\maxCtFlagSum} {\loc{ct\_max\_sum}} +\newcommand{\maxCtFlagSumInst} {\maxCtFlagSum\loc{\_inst}} +\newcommand{\maxCtFlagSumPrc} {\maxCtFlagSum\loc{\_prc}} +\newcommand{\maxCtFlagSumPrcCommon} {\maxCtFlagSumPrc\loc{\_common}} +\newcommand{\maxCtFlagSumPrcBlake} {\maxCtFlagSumPrc\loc{\_blake}} +\newcommand{\maxCtFlagSumPrcModexp} {\maxCtFlagSumPrc\loc{\_modexp}} +\newcommand{\maxCtFlagSumPrcBls} {\maxCtFlagSumPrc\loc{\_bls}} + +\newcommand{\maxCtFlagSumPrcEipBlobTransactions} {\maxCtFlagSumPrc\loc{\_eip\_blob\_transactions}} +\newcommand{\maxCtFlagSumPrcEipBlsTwelvePrecompiles} {\maxCtFlagSumPrc\loc{\_eip\_bls12\_precompiles}} \newcommand{\hubMmuMmioEcDataPrediction} {\colorbox{solarized-orange}{\textbf{~~$\hubMod \rightarrow \mmuMod \rightarrow \mmioMod \rightarrow \ecDataMod$ prediction~~}}} \newcommand{\hubMmuMmioBlsPrediction} {\colorbox{solarized-orange}{\textbf{~~$\hubMod \rightarrow \mmuMod \rightarrow \mmioMod \rightarrow \blsMod$ prediction~~}}}