-
Notifications
You must be signed in to change notification settings - Fork 20
OOB: add constraint to disallow the BLS precompiles from EIP-2537: Precompile for BLS12-381 curve operations use in Cancun #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} \\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly here, no need for an array as it's a single term. |
||
\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 & | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same array comment |
||
\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} \\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be \macroName _{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 \\ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can remove the array (as we aren't summing anything, it's just one term.)