diff --git a/src/backends/kimchi/prover.rs b/src/backends/kimchi/prover.rs index 51eb6f5fb..3fa4772b9 100644 --- a/src/backends/kimchi/prover.rs +++ b/src/backends/kimchi/prover.rs @@ -11,7 +11,6 @@ use crate::{ }; use itertools::chain; -use kimchi::{mina_curves::pasta::{Vesta, VestaParameters}, poly_commitment::SRS as _}; use kimchi::mina_poseidon::constants::PlonkSpongeConstantsKimchi; use kimchi::mina_poseidon::sponge::{DefaultFqSponge, DefaultFrSponge}; use kimchi::poly_commitment::commitment::CommitmentCurve; @@ -21,6 +20,10 @@ use kimchi::{ circuits::constraints::ConstraintSystem, groupmap::GroupMap, mina_curves::pasta::Pallas, poly_commitment::ipa::SRS, }; +use kimchi::{ + mina_curves::pasta::{Vesta, VestaParameters}, + poly_commitment::SRS as _, +}; use miette::{Context, IntoDiagnostic}; use once_cell::sync::Lazy; @@ -107,7 +110,7 @@ impl KimchiVesta { .wrap_err("kimchi: could not create a constraint system with the given circuit and public input size")?; // create SRS (for vesta, as the circuit is in Fp) - let mut srs = SRS::::create(cs.domain.d1.size as usize); + let srs = SRS::::create(cs.domain.d1.size as usize); srs.get_lagrange_basis(cs.domain.d1); let srs = std::sync::Arc::new(srs); @@ -198,12 +201,15 @@ impl ProverIndex { } // create proof - let proof = - ProverProof::create::(&GROUP_MAP, witness, &[], &self.index, &mut rand::rngs::OsRng) - //.map_err(|e| miette!(e)) - .into_diagnostic() - .wrap_err("kimchi: could not create a proof with the given inputs")?; - + let proof = ProverProof::create::( + &GROUP_MAP, + witness, + &[], + &self.index, + &mut rand::rngs::OsRng, + ) + .into_diagnostic() + .wrap_err("kimchi: could not create a proof with the given inputs")?; // return proof + public output Ok(( diff --git a/src/inputs.rs b/src/inputs.rs index 13d5b7e11..d4dbaee5f 100644 --- a/src/inputs.rs +++ b/src/inputs.rs @@ -3,10 +3,10 @@ use std::{collections::HashMap, fs::File, io::Read, str::FromStr}; use ark_ff::{One, Zero}; +use kimchi::o1_utils::FieldHelpers; use miette::Diagnostic; use num_bigint::BigUint; use thiserror::Error; -use kimchi::o1_utils::FieldHelpers; use crate::{ backends::{kimchi::VestaField, Backend}, diff --git a/src/serialization.rs b/src/serialization.rs index 1116c3b94..5c83dcb34 100644 --- a/src/serialization.rs +++ b/src/serialization.rs @@ -38,7 +38,8 @@ pub mod ser { D: serde::Deserializer<'de>, { let bytes: Vec = Bytes::deserialize_as(deserializer)?; - T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes).map_err(serde::de::Error::custom) + T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes) + .map_err(serde::de::Error::custom) } } @@ -77,6 +78,7 @@ where D: serde::Deserializer<'de>, { let bytes: Vec = Bytes::deserialize_as(deserializer)?; - T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes).map_err(serde::de::Error::custom) + T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes) + .map_err(serde::de::Error::custom) } }