fix the audit issues (comments and unused constants) issues: 1,2,3 #367
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ISSUE 1
PATH: pil/rom.pil
Rom SM contains an operations constant polynomial which is constructed in the Executor. The operations polynomial doesn't include assumeFree in the generated comment.
Remediation
Include assumeFree in the operations polynomial.
ISSUE 2
PATH: tools/arith/arith.ejs.pil, pil/arith.pil
The Arithmetic State Machine handles Elliptic Curve operations. Polygon zkEVM supports several curves: Secp256k1, BN254, Secp256r1. Arith SM has an equation selector to choose the curve:
The selector equation for BN254, Secp256r1 curves in the comment( selEq column) mismatches from the PIL one:
Remediation
Fix selEq values in the comment for EQ5-EQ14.
ISSUE 3
PATH: sm_rom.js