Skip to content

Commit 04b87a7

Browse files
committed
fmt and remove stray comment
1 parent a963a1e commit 04b87a7

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

src/backends/kimchi/prover.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::{
1111
};
1212

1313
use itertools::chain;
14-
use kimchi::{mina_curves::pasta::{Vesta, VestaParameters}, poly_commitment::SRS as _};
1514
use kimchi::mina_poseidon::constants::PlonkSpongeConstantsKimchi;
1615
use kimchi::mina_poseidon::sponge::{DefaultFqSponge, DefaultFrSponge};
1716
use kimchi::poly_commitment::commitment::CommitmentCurve;
@@ -21,6 +20,10 @@ use kimchi::{
2120
circuits::constraints::ConstraintSystem, groupmap::GroupMap, mina_curves::pasta::Pallas,
2221
poly_commitment::ipa::SRS,
2322
};
23+
use kimchi::{
24+
mina_curves::pasta::{Vesta, VestaParameters},
25+
poly_commitment::SRS as _,
26+
};
2427

2528
use miette::{Context, IntoDiagnostic};
2629
use once_cell::sync::Lazy;
@@ -107,7 +110,7 @@ impl KimchiVesta {
107110
.wrap_err("kimchi: could not create a constraint system with the given circuit and public input size")?;
108111

109112
// create SRS (for vesta, as the circuit is in Fp)
110-
let mut srs = SRS::<Curve>::create(cs.domain.d1.size as usize);
113+
let srs = SRS::<Curve>::create(cs.domain.d1.size as usize);
111114
srs.get_lagrange_basis(cs.domain.d1);
112115
let srs = std::sync::Arc::new(srs);
113116

@@ -198,12 +201,15 @@ impl ProverIndex {
198201
}
199202

200203
// create proof
201-
let proof =
202-
ProverProof::create::<BaseSponge, ScalarSponge, _>(&GROUP_MAP, witness, &[], &self.index, &mut rand::rngs::OsRng)
203-
//.map_err(|e| miette!(e))
204-
.into_diagnostic()
205-
.wrap_err("kimchi: could not create a proof with the given inputs")?;
206-
204+
let proof = ProverProof::create::<BaseSponge, ScalarSponge, _>(
205+
&GROUP_MAP,
206+
witness,
207+
&[],
208+
&self.index,
209+
&mut rand::rngs::OsRng,
210+
)
211+
.into_diagnostic()
212+
.wrap_err("kimchi: could not create a proof with the given inputs")?;
207213

208214
// return proof + public output
209215
Ok((

src/inputs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
use std::{collections::HashMap, fs::File, io::Read, str::FromStr};
44

55
use ark_ff::{One, Zero};
6+
use kimchi::o1_utils::FieldHelpers;
67
use miette::Diagnostic;
78
use num_bigint::BigUint;
89
use thiserror::Error;
9-
use kimchi::o1_utils::FieldHelpers;
1010

1111
use crate::{
1212
backends::{kimchi::VestaField, Backend},

src/serialization.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub mod ser {
3838
D: serde::Deserializer<'de>,
3939
{
4040
let bytes: Vec<u8> = Bytes::deserialize_as(deserializer)?;
41-
T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes).map_err(serde::de::Error::custom)
41+
T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes)
42+
.map_err(serde::de::Error::custom)
4243
}
4344
}
4445

@@ -77,6 +78,7 @@ where
7778
D: serde::Deserializer<'de>,
7879
{
7980
let bytes: Vec<u8> = Bytes::deserialize_as(deserializer)?;
80-
T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes).map_err(serde::de::Error::custom)
81+
T::deserialize_with_mode(&mut &bytes[..], Compress::Yes, Validate::Yes)
82+
.map_err(serde::de::Error::custom)
8183
}
8284
}

0 commit comments

Comments
 (0)