Skip to content

Commit

Permalink
refactor: bellpepper from dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tchataigner committed Mar 21, 2024
1 parent 27accef commit 02f8c46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ blstrs = { workspace = true, optional = true }
byteorder = { workspace = true }
ec-gpu = { workspace = true, optional = true }
ec-gpu-gen = { workspace = true, optional = true }
ff ={ workspace = true }
ff = { workspace = true }
generic-array = { workspace = true }
pasta_curves = { workspace = true, features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
Expand Down Expand Up @@ -80,13 +80,13 @@ abomonation = ["dep:abomonation", "dep:abomonation_derive"]
[workspace]
resolver = "2"
members = [
"gbench",
"gbench",
]

# Dependencies that should be kept in sync through the whole workspace
[workspace.dependencies]
bellpepper-core = { version = "0.4.0", default-features = false }
bellpepper = { version = "0.4.0", default-features = false }
bellpepper = { git = "https://github.com/lurk-lab/bellpepper.git", branch = "dev" }
blake2s_simd = "1.0.1"
blstrs = { version = "0.7.0" }
ff = "0.13.0"
Expand Down
4 changes: 3 additions & 1 deletion src/sponge/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ impl<F: PrimeField, A: Arity<F>, S: InnerSpongeAPI<F, A>> SpongeAPI<F, A> for S
#[cfg(test)]
mod test {
use bellpepper::util_cs::test_shape_cs::TestShapeCS;
use bellpepper_core::ConstraintSystem;
use bellpepper_core::num::AllocatedNum;
use bellpepper_core::test_cs::TestConstraintSystem;
use bellpepper_core::ConstraintSystem;
use blstrs::Scalar as Fr;
use ff::{Field, PrimeFieldBits};
use generic_array::typenum::U24;
Expand Down Expand Up @@ -370,6 +370,7 @@ mod test {
})
.collect::<Vec<_>>();

// Values are `None`, we should get a None back
let hash = sponge_cycle(&mut cs, &elts);
assert!(hash[0].val().is_none());

Expand All @@ -384,6 +385,7 @@ mod test {
})
.collect::<Vec<_>>();

// We have values, we expect one in return
let hash = sponge_cycle(&mut cs, &elts);
assert_eq!(
"Scalar(0x4d1f7863ee494536a938bd87d761a30828eeeeebfbc160117135dc6766f6e16c)",
Expand Down

0 comments on commit 02f8c46

Please sign in to comment.