You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prove, we call prover.generateOuterProof which was a temporary name @kevaundray came up with for “generate a proof for some circuit not meant to be verified in another circuit”.
Problem is, it's not so descriptive and we could try to abstract that away or at least make it easier to understand.
Some suggestions:
Flag on the constructor
Noir.js could get the "type of proof" from the constructor, and expose just one function prover.generateProof, example:
constnoir=newNoir(circuit,{recursive: true})constproof=noir.generateProof()// noir.js already knows if it's dealing with a recursive circuit
Define new API
We could define a new API just for recursive proofs, possibly inheriting some base class:
import{Noir,NoirRecursive}from"@noir-lang/noir_js";constnoir=newNoir()// non-recursive instance of Noirconstrecursive=newNoirRecursive()// recursive instance of Noir
Rename methods
This is probably the easiest: just renaming the methods. @Savio-Sou came up with some cool alternative names to generateOuterProof:
constnoir=newNoir();constproof=noir.generateIntermediateProof()// only people who care about recursive proofs know what does this meanconstproof=noir.generateFinalProof()// descriptive enough for those who have intermediate proofs, but doesn't prompt any confusion to the common app developer
The text was updated successfully, but these errors were encountered:
signorecello
changed the title
Rename methods, or define new API for recursive proofs generation
More descriptive and easier abstraction for recursive proofs generation
Sep 26, 2023
Part of the first
noir_js
devex review.To prove, we call
prover.generateOuterProof
which was a temporary name @kevaundray came up with for “generate a proof for some circuit not meant to be verified in another circuit”.Problem is, it's not so descriptive and we could try to abstract that away or at least make it easier to understand.
Some suggestions:
Flag on the constructor
Noir.js could get the "type of proof" from the constructor, and expose just one function
prover.generateProof
, example:Define new API
We could define a new API just for recursive proofs, possibly inheriting some base class:
Rename methods
This is probably the easiest: just renaming the methods. @Savio-Sou came up with some cool alternative names to
generateOuterProof
:The text was updated successfully, but these errors were encountered: