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

perf: avoid commiting to table and queries in log-derivative argument #1309

Closed
wants to merge 3 commits into from

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Oct 31, 2024

Description

In the log-derivative argument check F \in T the prover provides the histogram of the occurrences M of the elements F in T. We then check \sum_i m_i/(X - t_i) == \sum_j 1/(X - f_j).

Previously we always committed to F, T, M to obtain the random challenge r which we used for checking the equality. But as the left-hand side is always known and the equality doesn't hold for invalid M except for negligible probability, then we can avoid committing to F and T.

However, when the table entries and queries are vectors, then we need to challenge the random coefficients for the random linear combination, so we still commit to the queries then.

Doesn't affect Groth16 as there we compute the commitment as a Pedersen vector commitment. But for PLONK as we need to align the committed values to the commitment column and it saves the number of constraints significantly. Depending on the circuit it may be 10-15%.

How has this been benchmarked?

See the updated stats

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ivokub ivokub added the perf label Oct 31, 2024
@ivokub ivokub self-assigned this Oct 31, 2024
@ivokub
Copy link
Collaborator Author

ivokub commented Nov 1, 2024

Not applicable

@ivokub ivokub closed this Nov 1, 2024
@ivokub ivokub deleted the perf/logderiv-commitment branch November 1, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant