Skip to content

Commit

Permalink
o1vm/pickles: Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzixnerd committed Nov 15, 2024
1 parent 1ec45d7 commit 1348b91
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
7 changes: 6 additions & 1 deletion o1vm/src/pickles/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ where
evaluations,
logups,
} = inputs;
let polys: WitnessColumns<DensePolynomial<G::ScalarField>, G, [DensePolynomial<G::ScalarField>; N_MIPS_SEL_COLS], ID> = {
let polys: WitnessColumns<
DensePolynomial<G::ScalarField>,
G,
[DensePolynomial<G::ScalarField>; N_MIPS_SEL_COLS],
ID,
> = {
let WitnessColumns {
scratch,
instruction_counter,
Expand Down
15 changes: 12 additions & 3 deletions o1vm/src/pickles/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ use super::{
};
use crate::{
interpreters::mips::{
constraints as mips_constraints, interpreter::{self, InterpreterEnv}, Instruction,
}, lookups::LookupTableIDs, pickles::{verifier::verify, MAXIMUM_DEGREE_CONSTRAINTS, TOTAL_NUMBER_OF_CONSTRAINTS}
constraints as mips_constraints,
interpreter::{self, InterpreterEnv},
Instruction,
},
lookups::LookupTableIDs,
pickles::{verifier::verify, MAXIMUM_DEGREE_CONSTRAINTS, TOTAL_NUMBER_OF_CONSTRAINTS},
};
use ark_ff::{One, Zero};
use interpreter::{ITypeInstruction, JTypeInstruction, RTypeInstruction};
Expand Down Expand Up @@ -114,7 +118,12 @@ fn test_small_circuit() {
.unwrap();

let instant_before_verification = Instant::now();
let verif = verify::<Pallas, BaseSponge, ScalarSponge, LookupTableIDs>(domain, &srs, &[expr.clone()], &proof);
let verif = verify::<Pallas, BaseSponge, ScalarSponge, LookupTableIDs>(
domain,
&srs,
&[expr.clone()],
&proof,
);
let instant_after_verification = Instant::now();
debug!(
"Verification took: {} ms",
Expand Down
4 changes: 1 addition & 3 deletions o1vm/src/pickles/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ where
let mut evaluations: Vec<_> = get_all_columns()
.into_iter()
.map(|column| {
let commitment = get_column_comm(column_eval
.commitment,
&column)
let commitment = get_column_comm(column_eval.commitment, &column)
.unwrap_or_else(|| panic!("Could not get `commitment` for `Evaluation`"))
.clone();

Expand Down

0 comments on commit 1348b91

Please sign in to comment.