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

PR to fix the non determinism of r1cs compilation #95

Merged
merged 4 commits into from
Apr 30, 2021

Conversation

ThomasPiellard
Copy link
Collaborator

This PR makes the compilation to r1cs deterministic.

Non determinism came from the reduce function in frontend/cs.go. The function has been made deterministic by sorting the variables ID in the reduced linear expression.

A specific test circuit has been added to trig non determinism when the the variables are not sorted in reduce.

@ThomasPiellard ThomasPiellard marked this pull request as draft April 30, 2021 15:20
@ThomasPiellard ThomasPiellard marked this pull request as ready for review April 30, 2021 15:32
@gbotrel gbotrel merged commit 02c3640 into develop Apr 30, 2021
@gbotrel gbotrel deleted the fix/deterministic_r1cs branch April 30, 2021 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling the same circuit multiple time doesn't always output the same R1CS
2 participants