Skip to content

Fix error when compiling some circuits #690

Closed
@xevisalle

Description

@xevisalle

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

fix:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions