-
Notifications
You must be signed in to change notification settings - Fork 129
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
Make VerifyFailure::emit
public
#292
Make VerifyFailure::emit
public
#292
Conversation
0bbcb9a
to
8e14bb9
Compare
Hi! Well, the idea is that the errors of the In other words, MockProver is designed such that the failure is asserted to be equal to a particular one that you provide OR to be printed (Debug or Display-wise) directly after a panic in the verify function. But you should never need to call Can you share an example where you actually need to have this? |
Thanks for the quick response :)
I don't think so, it looks different for me! Also, looking at the code, functions like My use-case is that I have a wrapper around |
(I'm on v0.3.0, but looking at the code, looks like this would be the same problem with the current |
Hey @georgwiese does any of these examples work for what you're trying to do?
Notice that halo2/halo2_frontend/src/dev/failure.rs Line 127 in 1650a0b
|
Hmm, I don't see how. The behavior I'd like is to be able to pretty-print the error (same as when calling Basically, we have a trait for each prover which returns a |
I don't see how you can't get the error. If you call halo2/halo2_frontend/src/dev.rs Lines 773 to 778 in 1650a0b
Display impl for the vector of failures after calling .err().unwrap() .
Apologies if I'm missing how this doesn't solve your issue. Edit: You don't want the regular error but rather the one that gives you the constraint details with the parrot message etc.. Fair enough. Apologies for the insistence. |
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 looks like the easiest and simplest way to go.
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! After reading the discussion I believe the use case described by @georgwiese is totally reasonable!
This way, users can pretty-print the error while still catching the verification failure. As far as I can see, printing the error is otherwise only exposed via
MockProver::assert_satisfied
.