Skip to content
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

Gadget verify creates unsatisfied constraints when passed a default proof #7

Open
nirvantyagi opened this issue Nov 11, 2020 · 1 comment
Labels
D-medium Difficulty: medium P-medium Priority: medium T-bug Type: bug

Comments

@nirvantyagi
Copy link

This issue was run into on the zexe library and has not been attempted to be reproduced on arkworks yet.

The constraints method verify for computing a BooleanVar representing whether a proof is valid or not produces unsatisfied constraints when a Default::default proof is passed as input. The correct behavior would be to simply return a BooleanVar with value false.

The method works as expected when passing in the correct proof (returns a true BooleanVar) or passing in a proof with values not initialized to Default, e.g. random group elements or canonical generator (returns a false BooleanVar). This indicates that there might be some odd behavior with how verify interacts with a proof that has 0 values (which I believe is what Default sets the group elements to).

https://github.com/arkworks-rs/groth16/blob/master/src/constraints.rs#L243

@weikengchen
Copy link
Member

I don't have a good idea...The problem is that the default proof has not been designed to work as a placeholder. In some of our projects, we do need such a placeholder, and our workaround is as follows: generate a real proof as "default proof", either from the same circuit we are proving or from a totally different circuit that has the same input size.

@Pratyush Pratyush added D-medium Difficulty: medium P-medium Priority: medium T-bug Type: bug labels Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-medium Difficulty: medium P-medium Priority: medium T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

3 participants