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

Benchmarks for ZK proofs #173

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Jan 17, 2025

Adds a set of benchmarks for our ZK proofs, starting with FacProof and AffG.

Also contains a synthetic benchmark that measures the performance of exponentiations with large exponents vs reducing such exponents by the totient.

Given the proof code is not part of the public API (and shouldn't be), this PR introduces a "private_benches" feature that allows a thin(-ish) criterion benchmark wrapper ("benches/zk_proofs.rs") to call code in src/private_benches/mod.rs. Here we have access to everything that is pub(crate).

Run the benchmarks with cargo bench --bench zk_proofs --features private_benches.

The PR also initialize tracing during the benchmarks, which can be useful when doing optimization work.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 0.14815% with 674 lines in your changes missing coverage. Please review.

Project coverage is 84.33%. Comparing base (423f1b5) to head (7cf86ec).

Files with missing lines Patch % Lines
synedrion/src/private_benches.rs 0.00% 673 Missing ⚠️
synedrion/src/cggmp21/sigma/fac.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
- Coverage   93.06%   84.33%   -8.74%     
==========================================
  Files          36       36              
  Lines        7012     7684     +672     
==========================================
- Hits         6526     6480      -46     
- Misses        486     1204     +718     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant