Skip to content

Commit

Permalink
fixed, merging
Browse files Browse the repository at this point in the history
  • Loading branch information
laudiacay committed Jun 26, 2023
1 parent f3d759f commit cd02fd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions barustenberg/src/ecc/curves/bn254_scalar_multiplication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::marker::PhantomData;

use ark_bn254::{G1Affine, G1Projective};
use ark_ec::AffineRepr;
use ark_ff::{FftField, Field, One, Zero};
use ark_ff::{FftField, Field, Zero};

pub(crate) type G1AffineGroup = <ark_ec::short_weierstrass::Affine<
<ark_bn254::Config as ark_ec::bn::BnConfig>::G1Config,
Expand All @@ -27,7 +27,7 @@ fn cube_root_of_unity<F: ark_ff::Field>() -> F {
//}
}
pub(crate) fn is_point_at_infinity(point: &G1Projective) -> bool {
point.x.is_zero() && point.y.is_one() && point.z.is_zero()
!(point.x.is_zero() && point.y.is_zero()) && point.z.is_zero()
}

#[derive(Clone, Default, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion barustenberg/src/plonk/proof_system/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use super::{
types::{prover_settings::Settings, Proof},
};

use std::{cell::RefCell, sync::Arc};
use std::{cell::RefCell};
use std::{collections::HashMap, rc::Rc};

use super::verification_key::VerificationKey;
Expand Down
3 changes: 2 additions & 1 deletion barustenberg/src/polynomials/polynomial_arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,10 @@ impl<'a, Fr: Field + FftField> EvaluationDomain<'a, Fr> {
pub(crate) fn get_lagrange_evaluations(
&self,
z: &Fr,
num_roots_cut_out_of_vanishing_poly: usize,
num_roots_cut_out_of_vanishing_poly: Option<usize>,
) -> LagrangeEvaluations<Fr> {
// NOTE: If in future, there arises a need to cut off more zeros, this method will not require any changes.
let num_roots_cut_out_of_vanishing_poly = num_roots_cut_out_of_vanishing_poly.unwrap_or(0);

let z_pow_n = z.pow([self.size as u64]);

Expand Down

0 comments on commit cd02fd1

Please sign in to comment.