Skip to content

Commit

Permalink
o1vm/pickles: handle t correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbeunardeau88 committed Oct 28, 2024
1 parent 940d2b2 commit f24ab52
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions o1vm/run-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ else
./run-op-program.sh
./run-cannon.sh
fi

./run-vm.sh
19 changes: 15 additions & 4 deletions o1vm/src/pickles/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ where
.commit_custom(
&quotient_poly,
DEGREE_QUOTIENT_POLYNOMIAL as usize,
&PolyComm::new(vec![G::ScalarField::one(); 7]),
&PolyComm::new(vec![
G::ScalarField::one();
DEGREE_QUOTIENT_POLYNOMIAL as usize
]),
)
.unwrap()
.commitment;
Expand Down Expand Up @@ -359,19 +362,27 @@ where
polynomials.push(polys.instruction_counter);
polynomials.push(polys.error);
polynomials.extend(polys.selector);
polynomials.push(quotient_poly);

// Preparing the polynomials for the opening proof
let polynomials: Vec<_> = polynomials
let mut polynomials: Vec<_> = polynomials
.iter()
.map(|poly| {
(
DensePolynomialOrEvaluations::DensePolynomial(poly),
// We do not have any blinder, therefore we set to 0.
PolyComm::new(vec![G::ScalarField::zero()]),
PolyComm::new(vec![G::ScalarField::one()]),
)
})
.collect();
// we handle the quotient separately bc of the nb of blinders = num chunks
polynomials.push((
DensePolynomialOrEvaluations::DensePolynomial(&quotient_poly),
// We do not have any blinder, therefore we set to 0.
PolyComm::new(vec![
G::ScalarField::one();
DEGREE_QUOTIENT_POLYNOMIAL as usize
]),
));

// poly scale
let v_chal = fr_sponge.challenge();
Expand Down
8 changes: 7 additions & 1 deletion o1vm/src/pickles/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,13 @@ where
],
})
});

evaluations.push(Evaluation {
commitment: proof.quotient_commitment.clone(),
evaluations: vec![
vec![quotient_evaluations.zeta],
vec![quotient_evaluations.zeta_omega],
],
});
evaluations
};

Expand Down

0 comments on commit f24ab52

Please sign in to comment.