-
Notifications
You must be signed in to change notification settings - Fork 1
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
SOT-155: Nova #17
base: main
Are you sure you want to change the base?
SOT-155: Nova #17
Conversation
kzg/src/scheme.rs
Outdated
/// # Returns | ||
/// | ||
/// The commitment to the polynomial. | ||
pub fn commit_vector(&self, coeffs: &Vec<ScalarField>) -> KzgCommitment { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
kzg/src/scheme.rs
Outdated
/// # Returns | ||
/// | ||
/// The opening at the specified point. | ||
pub fn open_vector(&self, coeffs: &Vec<ScalarField>, z: impl Into<Fr>) -> KzgOpening { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/nifs/mod.rs
Outdated
r: ScalarField, | ||
fw1: &FWitness, | ||
fw2: &FWitness, | ||
t: &Vec<ScalarField>, |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/r1cs/mod.rs
Outdated
} | ||
#[allow(dead_code)] | ||
impl FWitness { | ||
pub fn new(w: &Vec<ScalarField>, len: usize) -> Self { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/r1cs/mod.rs
Outdated
} | ||
|
||
/// Commit a witness into its corresponding instance. | ||
pub fn commit(&self, scheme: &KzgScheme, x: &Vec<ScalarField>) -> FInstance { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/utils.rs
Outdated
/// | ||
/// A vector resulting from subtracting `b` from `a`. | ||
#[allow(dead_code)] | ||
pub fn vec_sub<F: PrimeField>(a: &Vec<F>, b: &Vec<F>) -> Vec<F> { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/utils.rs
Outdated
/// | ||
/// A vector resulting from adding `a` and `b`. | ||
#[allow(dead_code)] | ||
pub fn vec_add<F: PrimeField>(a: &Vec<F>, b: &Vec<F>) -> Vec<F> { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/utils.rs
Outdated
/// | ||
/// A vector resulting from adding `a` and `b`. | ||
#[allow(dead_code)] | ||
pub fn vec_add<F: PrimeField>(a: &Vec<F>, b: &Vec<F>) -> Vec<F> { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/utils.rs
Outdated
/// | ||
/// `true` if `a` and `b` are equal, `false` otherwise. | ||
#[allow(dead_code)] | ||
pub fn vec_equal<F: PrimeField>(a: &Vec<F>, b: &Vec<F>) -> bool { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/utils.rs
Outdated
/// | ||
/// `true` if `a` and `b` are equal, `false` otherwise. | ||
#[allow(dead_code)] | ||
pub fn vec_equal<F: PrimeField>(a: &Vec<F>, b: &Vec<F>) -> bool { |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
363e046
to
492c750
Compare
kzg/src/scheme.rs
Outdated
/// | ||
/// The commitment to the polynomial. | ||
pub fn commit_vector(&self, coeffs: &[ScalarField]) -> KzgCommitment { | ||
let new_poly = DensePolynomial::from_coefficients_vec(coeffs.clone().into()); |
Check warning
Code scanning / clippy
call to .clone() on a reference in this situation does nothing Warning
kzg/src/scheme.rs
Outdated
/// The opening at the specified point. | ||
pub fn open_vector(&self, coeffs: &[ScalarField], z: impl Into<Fr>) -> KzgOpening { | ||
let z = z.into(); | ||
let mut polynomial = DensePolynomial::from_coefficients_vec(coeffs.clone().into()); |
Check warning
Code scanning / clippy
call to .clone() on a reference in this situation does nothing Warning
nova/src/nifs/mod.rs
Outdated
r1cs: &R1CS<ScalarField>, | ||
u1: ScalarField, | ||
u2: ScalarField, | ||
z1: &Vec<ScalarField>, |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/nifs/mod.rs
Outdated
u1: ScalarField, | ||
u2: ScalarField, | ||
z1: &Vec<ScalarField>, | ||
z2: &Vec<ScalarField>, |
Check warning
Code scanning / clippy
writing &Vec instead of &[_] involves a new object where a slice will do Warning
nova/src/nifs/nifs_verifier.rs
Outdated
let a = to_f_matrix::<F>(&vec![ | ||
vec![1, 0, 0, 0, 0, 0], | ||
vec![0, 1, 0, 0, 0, 0], | ||
vec![1, 0, 1, 0, 0, 0], | ||
vec![0, 0, 0, 1, 0, 5], | ||
]); |
Check warning
Code scanning / clippy
useless use of vec! Warning
nova/src/nifs/nifs_verifier.rs
Outdated
let b = to_f_matrix::<F>(&vec![ | ||
vec![1, 0, 0, 0, 0, 0], | ||
vec![1, 0, 0, 0, 0, 0], | ||
vec![0, 0, 0, 0, 0, 1], | ||
vec![0, 0, 0, 0, 0, 1], | ||
]); |
Check warning
Code scanning / clippy
useless use of vec! Warning
nova/src/nifs/nifs_verifier.rs
Outdated
let c = to_f_matrix::<F>(&vec![ | ||
vec![0, 1, 0, 0, 0, 0], | ||
vec![0, 0, 1, 0, 0, 0], | ||
vec![0, 0, 0, 1, 0, 0], | ||
vec![0, 0, 0, 0, 1, 0], | ||
]); |
Check warning
Code scanning / clippy
useless use of vec! Warning
nova/src/r1cs/mod.rs
Outdated
FWitness { | ||
e: vec![ScalarField::zero(); len], | ||
// rE: ScalarField::rand(&mut rand::thread_rng()), | ||
w: w.clone().into(), |
Check warning
Code scanning / clippy
call to .clone() on a reference in this situation does nothing Warning
nova/src/r1cs/mod.rs
Outdated
com_e, | ||
u: ScalarField::one(), | ||
com_w, | ||
x: x.clone().into(), |
Check warning
Code scanning / clippy
call to .clone() on a reference in this situation does nothing Warning
No description provided.