Skip to content

Commit

Permalink
feat: using ShapeCS from bellpepper
Browse files Browse the repository at this point in the history
  • Loading branch information
tchataigner committed Mar 20, 2024
1 parent 934c9df commit 994c27a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 115 deletions.
10 changes: 3 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ keywords = ["zkSNARKs", "cryptography", "proofs"]
rust-version = "1.71.0"

[dependencies]
bellpepper = { path = "../bellpepper/crates/bellpepper" }
bellpepper-core = { path = "../bellpepper/crates/bellpepper-core" }
bellpepper-core = { version = "0.4.0", default-features = false }
bellpepper = { git = "https://github.com/lurk-lab/bellpepper", branch = "dev", default-features = false }
ff = { version = "0.13.0", features = ["derive"] }
digest = "0.10"
halo2curves = { version = "0.6.0", features = ["bits", "derive_serde"] }
Expand Down Expand Up @@ -125,8 +125,4 @@ inherits = "dev"
opt-level = 3
lto = "thin"
incremental = false
codegen-units = 16

[patch.crates-io]
bellpepper = { path = "../bellpepper/crates/bellpepper" }
bellpepper-core = { path = "../bellpepper/crates/bellpepper-core" }
codegen-units = 16
3 changes: 1 addition & 2 deletions src/bellpepper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
//! [Bellpepper]: https://github.com/lurk-lab/bellpepper

pub mod r1cs;
pub mod shape_cs;
pub mod solver;

#[cfg(test)]
mod tests {
use crate::{
bellpepper::{
r1cs::{NovaShape, NovaWitness},
shape_cs::ShapeCS,
solver::SatisfyingAssignment,
},
provider::{Bn256EngineKZG, PallasEngine, Secp256k1Engine},
traits::{snark::default_ck_hint, Engine},
};
use bellpepper::util_cs::shape_cs::ShapeCS;
use bellpepper_core::{num::AllocatedNum, ConstraintSystem};
use ff::PrimeField;

Expand Down
4 changes: 2 additions & 2 deletions src/bellpepper/r1cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

#![allow(non_snake_case)]

use super::{shape_cs::ShapeCS, solver::SatisfyingAssignment};
use super::solver::SatisfyingAssignment;
use crate::{
errors::NovaError,
r1cs::{commitment_key, CommitmentKeyHint, R1CSInstance, R1CSShape, R1CSWitness, SparseMatrix},
traits::Engine,
CommitmentKey,
};
use bellpepper::util_cs::test_shape_cs::TestShapeCS;
use bellpepper::util_cs::{shape_cs::ShapeCS, test_shape_cs::TestShapeCS};
use bellpepper_core::{Index, LinearCombination};
use ff::PrimeField;

Expand Down
102 changes: 0 additions & 102 deletions src/bellpepper/shape_cs.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ use crate::digest::{DigestComputer, SimpleDigestible};
use crate::{
bellpepper::{
r1cs::{NovaShape, NovaWitness},
shape_cs::ShapeCS,
solver::SatisfyingAssignment,
},
r1cs::R1CSResult,
};
use ::bellpepper::util_cs::shape_cs::ShapeCS;
use abomonation::Abomonation;
use abomonation_derive::Abomonation;
use bellpepper_core::{ConstraintSystem, SynthesisError};
Expand Down
2 changes: 1 addition & 1 deletion src/supernova/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use std::ops::Index;

use crate::{
bellpepper::shape_cs::ShapeCS,
constants::{BN_LIMB_WIDTH, BN_N_LIMBS, NUM_HASH_BITS},
digest::{DigestComputer, SimpleDigestible},
errors::NovaError,
Expand All @@ -18,6 +17,7 @@ use crate::{
},
Commitment, CommitmentKey, R1CSWithArity,
};
use bellpepper::util_cs::shape_cs::ShapeCS;

#[cfg(feature = "abomonate")]
use abomonation::Abomonation;
Expand Down

0 comments on commit 994c27a

Please sign in to comment.