Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
darth-cy committed Nov 22, 2024
1 parent 06e2689 commit af32b96
Show file tree
Hide file tree
Showing 5 changed files with 1,104 additions and 593 deletions.
2 changes: 1 addition & 1 deletion spartan_parallel/src/dense_mlpoly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,8 @@ impl<S: SpartanExtensionField> PolyEvalProof<S> {
#[cfg(test)]
mod tests {
use super::*;
use rand::rngs::OsRng;
use crate::scalar::Scalar;
use rand::rngs::OsRng;

fn evaluate_with_LR(Z: &[Scalar], r: &[Scalar]) -> Scalar {
let eq = EqPolynomial::new(r.to_vec());
Expand Down
17 changes: 8 additions & 9 deletions spartan_parallel/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ impl<S: SpartanExtensionField> Instance<S> {
return Err(R1CSError::InvalidIndex);
}

// col must be smaller than num_vars
if col >= num_vars {
println!("COL: {}, NUM_VARS: {}", col, num_vars);
return Err(R1CSError::InvalidIndex);
}
// col must be smaller than num_vars
if col >= num_vars {
println!("COL: {}, NUM_VARS: {}", col, num_vars);
return Err(R1CSError::InvalidIndex);
}

let val = S::from_bytes(&val_bytes);
if val.is_some().unwrap_u8() == 1 {
Expand All @@ -101,8 +101,8 @@ impl<S: SpartanExtensionField> Instance<S> {
}
}

Ok(mat)
};
Ok(mat)
};

let mut A_scalar_list = Vec::new();
let mut B_scalar_list = Vec::new();
Expand Down Expand Up @@ -347,7 +347,6 @@ impl<S: SpartanExtensionField> Instance<S> {
let mut B: Vec<(usize, usize, [u8; 32])> = Vec::new();
let mut C: Vec<(usize, usize, [u8; 32])> = Vec::new();


// constraints for correctness
for i in 0..arg.len() {
tmp_nnz_A += arg[i].0.len();
Expand Down Expand Up @@ -1313,4 +1312,4 @@ impl<S: SpartanExtensionField> Instance<S> {
perm_root_inst,
)
}
}
}
Loading

0 comments on commit af32b96

Please sign in to comment.