Skip to content

Parallelize verifier pairing inputs under std - #1000

Merged
Neotamandua merged 2 commits into
masterfrom
neotamandua/parallel-verifier-pairing-inputs
Oct 8, 2026
Merged

Neotamandua merged 2 commits into
masterfrom
neotamandua/parallel-verifier-pairing-inputs

Conversation

@Neotamandua

@Neotamandua Neotamandua commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

This change parallelizes the construction of the two independent G1 pairing inputs during proof verification using rayon via joining two closures.

The left opening-witness computation and the right grouped MSM are independent, so they can execute concurrently under std. The existing non-parallel behavior is retained for no_std.

This does not change the verification equations, transcript, proof format, or public API.

A Criterion verification benchmark using a synthetic circuit with 32 public inputs is added as well.

Performance

The timings below were measured separately using an existing valid Phoenix V3 fixture with 32 public inputs (not the synthetic benchmark added in this PR), with verifier/proof decoding outside the timed section.

Median
Baseline 2.915 ms
Parallel 2.057 ms
Improvement 29.45%

3 paired runs were performed (25 warmups and 500 timed verifications each), using the default 32-worker Rayon pool.

This measures single-proof verification latency.

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.25%. Comparing base (b932820) to head (9ad817f).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/proof_system/proof.rs 71.42% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1000      +/-   ##
==========================================
- Coverage   92.27%   92.25%   -0.03%     
==========================================
  Files          81       81              
  Lines        8886     8887       +1     
==========================================
- Hits         8200     8199       -1     
- Misses        686      688       +2     
Files with missing lines Coverage Δ
src/proof_system/proof.rs 96.94% <71.42%> (-0.36%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b932820...9ad817f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Neotamandua
Neotamandua force-pushed the neotamandua/parallel-verifier-pairing-inputs branch from bff9e35 to c8532cc Compare October 6, 2026 11:37
@Neotamandua Neotamandua linked an issue Oct 6, 2026 that may be closed by this pull request
@Neotamandua
Neotamandua force-pushed the neotamandua/parallel-verifier-pairing-inputs branch from c8532cc to e69cb40 Compare October 7, 2026 12:21

@moCello moCello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMMENT — The verifier change is correct: both closures read only public, already computed values, the pairing equation is unchanged, and the split matches the rayon::join pattern in the prover. Approval waits on the new bench, which cannot run from this repo and makes make bench fail.

One small note below on the V1 path.

Comment thread benches/verification.rs Outdated
Comment thread src/proof_system/proof.rs
@Neotamandua
Neotamandua force-pushed the neotamandua/parallel-verifier-pairing-inputs branch from e69cb40 to 874e789 Compare October 8, 2026 09:22
@Neotamandua
Neotamandua requested a review from moCello October 8, 2026 09:22

@moCello moCello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — Both verifier paths compute the two pairing inputs with rayon::join, as the prover already does, and the pairing equation does not change. The closures read only public values that the transcript fixes, the no_std path stays serial, and the new bench runs from this repository.

  • Process note: the pull request description still says that a Phoenix V3 benchmark is added, and its timing table comes from that external fixture. The bench in this change is a synthetic circuit with 32 public inputs. Update the description so that it names the bench that lands.

@Neotamandua
Neotamandua force-pushed the neotamandua/parallel-verifier-pairing-inputs branch from 874e789 to 9ad817f Compare October 8, 2026 12:16
@Neotamandua
Neotamandua merged commit 7381206 into master Oct 8, 2026
11 checks passed
@Neotamandua
Neotamandua deleted the neotamandua/parallel-verifier-pairing-inputs branch October 8, 2026 12:24
@HDauven HDauven mentioned this pull request Oct 8, 2026
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.

Parallelize independent verifier pairing-input computations

2 participants