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

groth16: filter points at infinity in setup #130

Merged
merged 14 commits into from Sep 1, 2021

Conversation

gbotrel
Copy link
Collaborator

@gbotrel gbotrel commented Aug 31, 2021

fixes:

  • groth16.Prove with force=true wasn't doing much since msm with zeroes don't do much.

perf:

  • groth16.Setup produces pk.G1.A, pk.G1.B and pk.G2.B, derived from the QAP. However, if a variable doesn't appear in a QAP column, the value of the corresponding interpolation vector is 0, and the resulting point in the proving key is infinity.

Additionally, frontend.newR1C will put the variable with the longest linear expression in the A part of the QAP, maximizing the number of zeroes in the B part.

In one internal circuit, using a lot of MiMC, this speeds up groth16.Prove by ~30%.

@gbotrel gbotrel added this to the v0.6.0 milestone Aug 31, 2021
@gbotrel gbotrel merged commit 53a3896 into develop Sep 1, 2021
@gbotrel gbotrel deleted the groth16-setup-filter-inf branch September 1, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant