From 6206115b9beb634436d1a6d78da74c2d376cce7c Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 16 Nov 2023 20:43:45 +0100 Subject: [PATCH] Expose proof module --- Cargo.lock | 3 +++ optimism/Cargo.toml | 3 +++ optimism/src/lib.rs | 1 + optimism/src/proof.rs | 14 ++++++++------ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5bf22e44bf..5edb20c018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1312,8 +1312,10 @@ name = "kimchi_optimism" version = "0.1.0" dependencies = [ "ark-bn254", + "ark-ec", "ark-ff", "ark-poly", + "ark-serialize", "base64", "clap 4.4.6", "elf", @@ -1325,6 +1327,7 @@ dependencies = [ "log", "mina-curves", "mina-poseidon", + "o1-utils", "poly-commitment", "regex", "rmp-serde", diff --git a/optimism/Cargo.toml b/optimism/Cargo.toml index 37fe645aee..93c90fe43b 100644 --- a/optimism/Cargo.toml +++ b/optimism/Cargo.toml @@ -26,6 +26,9 @@ serde = "1.0.130" serde_with = "1.10.0" ark-poly = { version = "0.3.0", features = [ "parallel" ] } ark-ff = { version = "0.3.0", features = [ "parallel" ] } +ark-ec = { version = "0.3.0", features = [ "parallel" ] } +ark-serialize = "0.3.0" +o1-utils = { path = "../utils", version = "0.1.0" } clap = "4.4.6" hex = "0.4.3" regex = "1.10.2" diff --git a/optimism/src/lib.rs b/optimism/src/lib.rs index f10400a639..0eb7e9c26e 100644 --- a/optimism/src/lib.rs +++ b/optimism/src/lib.rs @@ -1,3 +1,4 @@ pub mod cannon; pub mod prover_index; +pub mod proof; pub mod mips; diff --git a/optimism/src/proof.rs b/optimism/src/proof.rs index 22d95a9b31..45f2676d28 100644 --- a/optimism/src/proof.rs +++ b/optimism/src/proof.rs @@ -1,9 +1,11 @@ -use crate::circuits::expr::{ColumnEvaluations, ExprError}; +use kimchi::circuits::expr::{ColumnEvaluations, ExprError}; use crate::mips::columns::{ - Column, FixedColumns, InstructionParts, InstructionSelectors, LookupCounters, NUM_LOOKUP_TERMS, - SCRATCH_SIZE, + Column, FixedColumns, LookupCounters }; -use crate::proof::PointEvaluations; +use crate::mips::interpreter::{InstructionParts, InstructionSelectors}; +use crate::mips::{SCRATCH_SIZE, NUM_LOOKUP_TERMS}; + +use kimchi::proof::PointEvaluations; use ark_ec::AffineCurve; use poly_commitment::{commitment::PolyComm, evaluation_proof::OpeningProof}; use serde::{Deserialize, Serialize}; @@ -140,7 +142,7 @@ impl Proof { ft_eval1, t_comm, commitments, - evaluations: evaluations.map(&f), + evaluations: evaluations.map(f), } } } @@ -160,7 +162,7 @@ impl SerializableProof { ft_eval1, t_comm, commitments, - evaluations: evaluations.map(&f), + evaluations: evaluations.map(f), } } }