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

Fix error when compiling some circuits #690

Closed
xevisalle opened this issue May 27, 2022 · 0 comments · Fixed by #691
Closed

Fix error when compiling some circuits #690

xevisalle opened this issue May 27, 2022 · 0 comments · Fixed by #691
Assignees
Labels
fix:bug Something isn't working

Comments

@xevisalle
Copy link
Member

xevisalle commented May 27, 2022

Describe the bug
When compiling some circuits, we get the error TruncatedDegreeTooLarge. The error is catched from the function truncate() in src/commitment_scheme/kzg10/key.rs, but this bug comes from srs.rs, where the max_degree in setup() should be + 6. Also, the truncated degree used in trim() should be + 6.

The explanation is that adding the blinding factors requires some extra elements for the SRS: +1 per each wire (we have 4 wires), plus +2 for the permutation polynomial.

To Reproduce
Among others, the gadget schnorr crashes when executing the double key verification. It can be reproduced by cloning the repo, selecting the last version of plonk, and using cargo bench or cargo test.

Expected behaviour
Pass all the tests and circuits with no errors.

@xevisalle xevisalle added the fix:bug Something isn't working label May 27, 2022
@xevisalle xevisalle self-assigned this Jun 2, 2022
@xevisalle xevisalle linked a pull request Jun 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant