Recursive verifier updates#351
Conversation
| MONITOR_PID=$! | ||
|
|
||
| # Run the main process | ||
| ./gnark-verifier --config "../noir-examples/noir-passport/merkle_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport/merkle_age_check/r1cs.json" |
There was a problem hiding this comment.
For CI, we used to save and reuse PK and VK. Might be worth it to bring it back.
| }, | ||
| acir::native_types::{Witness, WitnessMap}, | ||
| anyhow::{Context, Result}, | ||
| hex, |
There was a problem hiding this comment.
Seems like and unused import
|
|
||
| # 3rd party | ||
| anyhow = "1.0.93" | ||
| ciborium = "0.2.2" |
| } | ||
| verifyMerkleProofs(api, sc, rd.Leaves, rd.LeafIndexes, rd.SiblingHashes, rd.AuthPaths, prevRootHash) | ||
| } | ||
|
|
There was a problem hiding this comment.
This check should be added here? https://github.com/WizardOfMenlo/whir/blob/main/src/protocols/whir/verifier.rs#L217-L226
| LogNumConstraints int | ||
|
|
||
| SessionID [32]uints.U8 `gnark:",public"` | ||
| Transcript []uints.U8 `gnark:",public"` |
There was a problem hiding this comment.
Transcript doesn't need to be public. Only the Public Value hash needs to.
| instance := nativePublicInputsHashBytes(piValues) | ||
|
|
||
| assign = NimueInit{ | ||
| ProtocolID: [2]frontend.Variable{ |
There was a problem hiding this comment.
Shouldn't the protocol ID be a baked-in constant?
| numBitsForReversal := bits.Len(uint(foldedDomainSize)) - 1 | ||
| mainRoundData.StirChallengesPoints[r] = make([]frontend.Variable, len(stirIndexes)) | ||
| for index, idx := range stirIndexes { | ||
| mainRoundData.StirChallengesPoints[r][index] = BitReversedExponentVar(api, expDomainGenerator, idx, numBitsForReversal) |
There was a problem hiding this comment.
I believe we started using rs_in_order flag in Cargo.toml. So we no longer Reverse the exponent.
| finalNumBitsForReversal := bits.Len(uint(finalFoldedDomainSize)) - 1 | ||
| finalRandomnessPoints := make([]frontend.Variable, len(finalIndexes)) | ||
| for i, idx := range finalIndexes { | ||
| finalRandomnessPoints[i] = BitReversedExponentVar(api, expDomainGenerator, idx, finalNumBitsForReversal) |
There was a problem hiding this comment.
I believe we started using rs_in_order flag in Cargo.toml. So we no longer Reverse the exponent.
This PR aims to realign Gnarks recursive verifier.
The changes include:
Supporting PRs that were needed for this PR to work are listed here:
Expose protocol_id and session_id fields WizardOfMenlo/whir#248
Nimue refactoring updates - initialization, byte squeezing reilabs/gnark-nimue#5
instance and length check method reilabs/gnark-nimue#6
Additional details in here: #260
Proof of testing: