-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add a sindri proof create
command
#90
Conversation
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.
This is a great feature. I can foresee a lot of internal and external use cases for this one. Just one question at the bottom here.
Testing Performed
- tested all the scaffold circuits deployed and proved in one self-contained flow
- I tested
sindri create proof
against circuits that we're compiled via different access points (frontend rather than the CLI) andproof create
is stable. - I tested the
verify
flag with all frameworks for proof inputs that should and should not verify. At first I was a little worried that halo2 was passing back proofs no matter what the verification result is, but then I recalled that the circuit outputs the equal status as a public output (similar to what you encountered with circom)
An observation
There are different levels of error handling going on. For instance, when I create the Noir "not equal" circuit scaffold, and I edit the prover.toml
to be something that isn't proper TOML at all (e.g. erasing an equals sign), the CLI will pass back an error:
"error": "ProofInputInvalid",
But when I revise the Prover.toml
to just have X not equal to Y, the result of proof create result is just blank
"proofId": "d6a9922f-3d99-4d5c-922e-ccc1890f2ce1",
"proof": null,
"public": null,
"verification_key": null
}
I have to go to the frontend to retrieve the error. Can you try to recreate this and see why? I was imagining that if the proof failed for any reason, I'd get back the error
Good catch, I was thinking that a proof status of
|
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!
This adds a basic
sindri proof create
command for generating a proof for the circuit. This currently just prints out the relevant subset of the API response, we don't attempt to save the outputs to disk or integrate with local tools. There's a--verify
flag which optionally performs a remote verification of a proof, and a--tag
flag which allows proving against a specific tag.This update also required a regeneration of the internal API client and the test fixtures, so there's a fair bit of noise in the diffs. The main files to pay attention to are
src/lib/client.ts
,src/cli/index.ts
, andsrc/cli/proof.ts
.Closes #35