Collect some verifier metrics

This commit is contained in:
Jack Grigg 2020-11-11 15:16:52 +00:00
parent d4424db8d4
commit 236b3a6692
2 changed files with 2 additions and 0 deletions

View file

@ -106,6 +106,7 @@ impl<'a, C: CurveAffine> MSM<'a, C> {
assert_eq!(scalars.len(), len);
metrics::increment!("multiexp", "size" => format!("{}", len), "fn" => "MSM::eval");
bool::from(best_multiexp(&scalars, &bases).is_zero())
}
}

View file

@ -55,6 +55,7 @@ impl<'a, C: CurveAffine> Guard<'a, C> {
pub fn compute_g(&self) -> C {
let s = compute_s(&self.challenges_sq, self.allinv);
metrics::increment!("multiexp", "size" => format!("{}", s.len()), "fn" => "compute_g");
let mut tmp = best_multiexp(&s, &self.msm.params.g);
tmp += self.msm.params.h;
tmp.to_affine()