-
Notifications
You must be signed in to change notification settings - Fork 46
feat: forced transaction #2418
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
feat: forced transaction #2418
Conversation
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
| if (precompile.isAnyOf(PRC_BLS_G1_MSM, PRC_BLS_G2_MSM)) { | ||
| mod.updateTally(2 * NB_ROWS_MOD); // coming from OOB call | ||
| } | ||
| } |
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.
LGTM, maybe add here that a comment saying that for PAIRING_CHECK we have a calll to DIV, while for MSM a call to DIV and one to MSM.
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.
while for MSM a call to DIV and one to MSM
What do you mean @lorenzogentile404 ? Do you mean DIV and MOD ?
| && cds % PRECOMPILE_CALL_DATA_UNIT_SIZE___BLS_PAIRING_CHECK == 0; | ||
| default -> throw new IllegalArgumentException("not implemented for prc: " + prc); | ||
| }; | ||
| } |
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.
Maybe the cases could be ordered by increasing addresses.
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.
Yes
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.
LGTM
| // TODO: temporary commented out | ||
| // blsdata.callBls(0, precompile, frame.getInputData(), returnData, prcSuccess); | ||
| if (validCallDataSize(precompile, callDataSize)) { | ||
| blsdata.callBls(0, precompile, frame.getInputData(), returnData, prcSuccess); |
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.
A BLS precompile call triggers a BLS_DATA call as soon as the call data is of the right size and gas is sufficient. Why use a partial condition ?
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.
because in ZkCounter, we're plugged at tracePrecompileCall which is trigger only if enough gas if I'm not mistaken whereas the hub is trigger by the call preOpcode
| if (precompile.isAnyOf(PRC_BLS_G1_MSM, PRC_BLS_G2_MSM)) { | ||
| mod.updateTally(2 * NB_ROWS_MOD); // coming from OOB call | ||
| } | ||
| } |
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.
while for MSM a call to DIV and one to MSM
What do you mean @lorenzogentile404 ? Do you mean DIV and MOD ?
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
…inea-tracer into 2414-feat-forced-transaction
Note
Enables full tracing/counting for BLAKE2f and RIPEMD precompiles, refactors MOD row accounting and BLS handling, and removes legacy precompile-exclusion modules/tests.
NB_ROWS_HUB_PRC_BLAKE, countBLAKE_MODEXP_DATArows, and update OOB tallies.ripemdBlocks.modLinesComingFromOobCall(prc); applied to SHA2/RIPEMD/IDENTITY/MODEXP/ECPAIRING/BLS.validCallDataSize) and invokeBlsData; update OOB/MOD tallies.NB_ROWS_BLAKEMODEPX_BLAKE; convert related constants toshort.POINT_EVAL/BLSmodules and associated event-detection paths fromHub/ZkCounter/ModuleName.CancunAndPraguePrecompilesExcludedTestsand drop POINT_EVAL/BLS expectations in tests.Written by Cursor Bugbot for commit 377541d. This will update automatically on new commits. Configure here.