Skip to content

Commit

Permalink
Use bellpepper.
Browse files Browse the repository at this point in the history
  • Loading branch information
porcuquine committed Jul 14, 2023
1 parent e51b866 commit 6fd8b49
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/lurk-lab/neptune"
rust-version = "1.64.0"

[dependencies]
bellperson = { workspace = true }
bellpepper = { workspace = true }
blake2s_simd = { workspace = true }
blstrs = { workspace = true, optional = true }
byteorder = { workspace = true }
Expand Down Expand Up @@ -51,7 +51,7 @@ incremental = false
codegen-units = 1

[features]
default = ["bellperson/default"]
default = ["bellpepper/default"]
cuda = ["ec-gpu-gen/cuda", "ec-gpu", "pasta_curves/gpu"]
opencl = ["ec-gpu-gen/opencl", "ec-gpu", "pasta_curves/gpu"]
# The supported arities for Poseidon running on the GPU are specified at compile-time.
Expand All @@ -76,7 +76,7 @@ members = [

# Dependencies that should be kept in sync through the whole workspace
[workspace.dependencies]
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "master" }
bellpepper = { path = "../bellpepper" }
blake2s_simd = "0.5"
blstrs = { version = "0.7.0" }
ff = "0.13.0"
Expand Down
8 changes: 4 additions & 4 deletions benches/synthesis.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::poseidon::{Arity, PoseidonConstants};
use bellperson::gadgets::num::AllocatedNum;
use bellperson::util_cs::bench_cs::BenchCS;
use bellperson::util_cs::witness_cs::WitnessCS;
use bellperson::{ConstraintSystem, SynthesisError};
use bellpepper::gadgets::num::AllocatedNum;
use bellpepper::util_cs::bench_cs::BenchCS;
use bellpepper::util_cs::witness_cs::WitnessCS;
use bellpepper::{ConstraintSystem, SynthesisError};
use blstrs::Scalar as Fr;
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use ff::Field;
Expand Down
6 changes: 3 additions & 3 deletions gbench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
license = "MIT OR Apache-2.0"

[dependencies]
bellperson = { workspace = true, default-features = false }
bellpepper = { workspace = true, default-features = false }
blake2s_simd = { workspace = true }
blstrs = { workspace = true, features = ["gpu"] }
byteorder = { workspace = true }
Expand All @@ -23,5 +23,5 @@ structopt = { version = "0.3", default-features = false }

[features]
default = ["opencl"]
cuda = ["neptune/cuda", "bellperson/cuda", "ec-gpu-gen/cuda"]
opencl = ["neptune/opencl", "bellperson/opencl", "ec-gpu-gen/opencl"]
cuda = ["neptune/cuda", "ec-gpu-gen/cuda"]
opencl = ["neptune/opencl", "ec-gpu-gen/opencl"]
12 changes: 6 additions & 6 deletions src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use crate::hash_type::HashType;
use crate::matrix::Matrix;
use crate::mds::SparseMatrix;
use crate::poseidon::{Arity, PoseidonConstants};
use bellperson::gadgets::boolean::Boolean;
use bellperson::gadgets::num;
use bellperson::gadgets::num::AllocatedNum;
use bellperson::{ConstraintSystem, LinearCombination, SynthesisError};
use bellpepper::gadgets::boolean::Boolean;
use bellpepper::gadgets::num;
use bellpepper::gadgets::num::AllocatedNum;
use bellpepper::{ConstraintSystem, LinearCombination, SynthesisError};
use ff::{Field, PrimeField};
use std::marker::PhantomData;

Expand Down Expand Up @@ -613,8 +613,8 @@ mod tests {
use super::*;
use crate::poseidon::HashMode;
use crate::{Poseidon, Strength};
use bellperson::util_cs::test_cs::TestConstraintSystem;
use bellperson::ConstraintSystem;
use bellpepper::util_cs::test_cs::TestConstraintSystem;
use bellpepper::ConstraintSystem;
use blstrs::Scalar as Fr;
use generic_array::typenum;
use rand::SeedableRng;
Expand Down
12 changes: 6 additions & 6 deletions src/circuit2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use crate::hash_type::HashType;
use crate::matrix::Matrix;
use crate::mds::SparseMatrix;
use crate::poseidon::{Arity, PoseidonConstants};
use bellperson::gadgets::boolean::Boolean;
use bellperson::gadgets::num::{self, AllocatedNum};
use bellperson::gadgets::test::TestConstraintSystem;
use bellperson::{ConstraintSystem, LinearCombination, SynthesisError};
use bellpepper::gadgets::boolean::Boolean;
use bellpepper::gadgets::num::{self, AllocatedNum};
use bellpepper::gadgets::test::TestConstraintSystem;
use bellpepper::{ConstraintSystem, LinearCombination, SynthesisError};
use ff::{Field, PrimeField};
use std::marker::PhantomData;

Expand Down Expand Up @@ -699,8 +699,8 @@ mod tests {
use super::*;
use crate::poseidon::HashMode;
use crate::{Poseidon, Strength};
use bellperson::util_cs::test_cs::TestConstraintSystem;
use bellperson::ConstraintSystem;
use bellpepper::util_cs::test_cs::TestConstraintSystem;
use bellpepper::ConstraintSystem;
use blstrs::Scalar as Fr;
use generic_array::typenum;
use rand::SeedableRng;
Expand Down
14 changes: 7 additions & 7 deletions src/circuit2_witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use crate::hash_type::HashType;
use crate::matrix::Matrix;
use crate::mds::SparseMatrix;
use crate::poseidon::{Arity, Poseidon, PoseidonConstants};
use bellperson::util_cs::witness_cs::SizedWitness;
use bellpepper::util_cs::witness_cs::SizedWitness;

use bellperson::gadgets::boolean::Boolean;
use bellperson::gadgets::num::{self, AllocatedNum};
use bellperson::gadgets::test::TestConstraintSystem;
use bellperson::{ConstraintSystem, LinearCombination, SynthesisError};
use bellpepper::gadgets::boolean::Boolean;
use bellpepper::gadgets::num::{self, AllocatedNum};
use bellpepper::gadgets::test::TestConstraintSystem;
use bellpepper::{ConstraintSystem, LinearCombination, SynthesisError};
use ff::{Field, PrimeField};
use generic_array::sequence::GenericSequence;
use generic_array::typenum::Unsigned;
Expand Down Expand Up @@ -324,8 +324,8 @@ mod test {
use crate::circuit2;
use crate::poseidon::HashMode;
use crate::{Poseidon, Strength};
use bellperson::util_cs::{test_cs::TestConstraintSystem, witness_cs::WitnessCS, Comparable};
use bellperson::ConstraintSystem;
use bellpepper::util_cs::{test_cs::TestConstraintSystem, witness_cs::WitnessCS, Comparable};
use bellpepper::ConstraintSystem;
use blstrs::Scalar as Fr;
use generic_array::typenum;
use rand::SeedableRng;
Expand Down
10 changes: 5 additions & 5 deletions src/sponge/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use crate::sponge::{
vanilla::{Direction, Mode, SpongeTrait},
};
use crate::Strength;
use bellperson::gadgets::boolean::Boolean;
use bellperson::gadgets::num::{self, AllocatedNum};
use bellperson::util_cs::witness_cs::{SizedWitness, WitnessCS};
use bellperson::{ConstraintSystem, LinearCombination, Namespace, SynthesisError};
use bellpepper::gadgets::boolean::Boolean;
use bellpepper::gadgets::num::{self, AllocatedNum};
use bellpepper::util_cs::witness_cs::{SizedWitness, WitnessCS};
use bellpepper::{ConstraintSystem, LinearCombination, Namespace, SynthesisError};
use ff::{Field, PrimeField};
use std::collections::VecDeque;
use std::marker::PhantomData;
Expand Down Expand Up @@ -254,7 +254,7 @@ mod tests {
use super::*;
use crate::sponge::vanilla::Sponge;

use bellperson::{
use bellpepper::{
util_cs::{test_cs::TestConstraintSystem, witness_cs::WitnessCS},
Circuit,
};
Expand Down

0 comments on commit 6fd8b49

Please sign in to comment.