Skip to content

Commit

Permalink
Expose verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Nov 17, 2023
1 parent bd0f43f commit 75d902d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions optimism/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ strum = "0.24.0"
strum_macros = "0.24.0"
log = "0.4.20"
env_logger = "0.10.0"
rand = "0.8.0"
1 change: 1 addition & 0 deletions optimism/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pub mod lookup;
pub mod prover_index;
pub mod proof;
pub mod mips;
pub mod verifier;
pub mod verifier_index;
15 changes: 10 additions & 5 deletions optimism/src/verifier.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::mips::{proof::Proof, verifier_index::VerifierIndex};
use crate::{
use crate::{proof::Proof, verifier_index::VerifierIndex};
use ark_poly::EvaluationDomain;
use kimchi::{
circuits::expr::{Constants, PolishToken},
curve::KimchiCurve,
plonk_sponge::FrSponge,
proof::PointEvaluations,
};
use ark_ff::{Field, One, PrimeField, Zero};
use ark_poly::EvaluationDomain;
use mina_poseidon::{sponge::ScalarChallenge, FqSponge};
use poly_commitment::commitment::{
absorb_commitment, combined_inner_product, BatchEvaluationProof, Evaluation,
Expand All @@ -30,7 +30,7 @@ where
let (_, endo_r) = G::endos();

// Create sponge
let mut fq_sponge = EFqSponge::new(G::OtherCurve::sponge_params());
let mut fq_sponge = EFqSponge::new(G::other_curve_sponge_params());

// Absorb commitments

Expand Down Expand Up @@ -177,10 +177,15 @@ where
joint_combiner: Some(vector_lookup_value_combiner),
endo_coefficient: *endo_r,
mds: &G::sponge_params().mds,
// TODO/FIXME(dw): 3 might not be correct. Didn't check more. I just
// want to have this file compiled
zk_rows: 3,
};

let ft_eval0 = -PolishToken::evaluate(
&index.constraints,
// TODO(dw): constraints
&[],
// &index.constraints,
index.domain.d1,
evaluation_point,
&self.evaluations,
Expand Down

0 comments on commit 75d902d

Please sign in to comment.