Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ShapeCS #373

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ readme = "README.md"
repository = "https://github.com/lurk-lab/arecibo"
license-file = "LICENSE"
keywords = ["zkSNARKs", "cryptography", "proofs"]
rust-version="1.71.0"
rust-version = "1.71.0"

[dependencies]
bellpepper-core = { version = "0.4.0", default-features = false }
bellpepper = { git="https://github.com/lurk-lab/bellpepper", branch="dev", 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 All @@ -23,7 +23,7 @@ rand_core = { version = "0.6", default-features = false }
rand_chacha = "0.3"
subtle = "2.5"
pasta_curves = { version = "0.5.0", features = ["repr-c", "serde"] }
neptune = { git = "https://github.com/lurk-lab/neptune", branch="dev", default-features = false, features = ["abomonation"] }
neptune = { git = "https://github.com/lurk-lab/neptune", branch = "dev", default-features = false, features = ["abomonation"] }
generic-array = "1.0.0"
num-bigint = { version = "0.4", features = ["serde", "rand"] }
num-traits = "0.2"
Expand Down Expand Up @@ -125,4 +125,4 @@ inherits = "dev"
opt-level = 3
lto = "thin"
incremental = false
codegen-units = 16
codegen-units = 16
8 changes: 3 additions & 5 deletions src/bellpepper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
//! [Bellpepper]: https://github.com/lurk-lab/bellpepper

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

#[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 All @@ -43,9 +41,9 @@ mod tests {

fn test_alloc_bit_with<E: Engine>() {
// First create the shape
let mut cs: ShapeCS<E> = ShapeCS::new();
let mut cs: ShapeCS<E::Scalar> = ShapeCS::new();
synthesize_alloc_bit(&mut cs);
let (shape, ck) = cs.r1cs_shape_and_key(&*default_ck_hint());
let (shape, ck) = cs.r1cs_shape_and_key(&*default_ck_hint::<E>());

// Now get the assignment
let mut cs = SatisfyingAssignment::<E>::new();
Expand Down
5 changes: 3 additions & 2 deletions src/bellpepper/r1cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

#![allow(non_snake_case)]

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

Expand Down Expand Up @@ -57,7 +58,7 @@ impl<E: Engine> NovaWitness<E> for SatisfyingAssignment<E> {

macro_rules! impl_nova_shape {
( $name:ident) => {
impl<E: Engine> NovaShape<E> for $name<E>
impl<E: Engine> NovaShape<E> for $name<E::Scalar>
where
E::Scalar: PrimeField,
{
Expand Down
106 changes: 0 additions & 106 deletions src/bellpepper/shape_cs.rs

This file was deleted.

Loading
Loading