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

msm timers #108

Merged
merged 3 commits into from
Dec 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions subroutines/src/pcs/multilinear_kzg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,16 @@ impl<E: PairingEngine> PolynomialCommitmentScheme<E> for MultilinearKzgPCS<E> {
.into_iter()
.map(|x| x.into_repr())
.collect();
let msm_timer = start_timer!(|| format!(
"msm of size {}",
prover_param.powers_of_g[ignored].evals.len()
));
let commitment = VariableBaseMSM::multi_scalar_mul(
&prover_param.powers_of_g[ignored].evals,
scalars.as_slice(),
)
.into_affine();
end_timer!(msm_timer);
chancharles92 marked this conversation as resolved.
Show resolved Hide resolved

end_timer!(commit_timer);
Ok(Commitment(commitment))
Expand Down Expand Up @@ -269,7 +274,11 @@ fn open_internal<E: PairingEngine>(
r[k - 1] = cur_r;

// this is a MSM over G1 and is likely to be the bottleneck
let msm_timer = start_timer!(|| format!("msm of size {} at round {}", gi.evals.len(), i));

proofs.push(VariableBaseMSM::multi_scalar_mul(&gi.evals, &scalars).into_affine());
end_timer!(msm_timer);

end_timer!(ith_round);
}
let eval = evaluate_opt(polynomial, point);
Expand Down