diff --git a/CHANGELOG.md b/CHANGELOG.md index d1d45bc4..2aecf3a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to Rust's notion of ## [Unreleased] ### Changed +- Bumped dependencies to `bitvec 1`, `ff 0.12`, `group 0.12`, `pasta_curves 0.4`. - `orchard::bundle`: - `Action` has been moved to `orchard::Action`. - `Bundle::{try_}authorize` have been renamed to diff --git a/Cargo.toml b/Cargo.toml index 19ec4988..99cb7853 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,17 +24,17 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"] [dependencies] aes = "0.7" -bitvec = "0.22" +bitvec = "1" blake2b_simd = "1" -ff = "0.11" +ff = "0.12" fpe = "0.5" -group = "0.11" +group = "0.12" halo2_gadgets = "=0.1.0-beta.3" halo2_proofs = "=0.1.0-beta.4" hex = "0.4" lazy_static = "1" memuse = { version = "0.2", features = ["nonempty"] } -pasta_curves = "0.3" +pasta_curves = "0.4" proptest = { version = "1.0.0", optional = true } rand = "0.8" reddsa = "0.2" @@ -82,6 +82,7 @@ debug = true debug = true [patch.crates-io] -halo2_gadgets = { git = "https://github.com/zcash/halo2.git", rev = "3800de59188a73b4e04f689c8bcc855a2fc7fdcf" } -halo2_proofs = { git = "https://github.com/zcash/halo2.git", rev = "3800de59188a73b4e04f689c8bcc855a2fc7fdcf" } +halo2_gadgets = { git = "https://github.com/zcash/halo2.git", rev = "72ff677776504c288f4927a6ce8d3c273ebd588d" } +halo2_proofs = { git = "https://github.com/zcash/halo2.git", rev = "72ff677776504c288f4927a6ce8d3c273ebd588d" } incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "f23e3d89507849a24543121839eea6f40b141aff" } +reddsa = { git = "https://github.com/ZcashFoundation/reddsa.git", rev = "f711bfa4931a3b80b216e642a453426ceb727143" } diff --git a/src/circuit/commit_ivk.rs b/src/circuit/commit_ivk.rs index 69d3ae67..dfa50df1 100644 --- a/src/circuit/commit_ivk.rs +++ b/src/circuit/commit_ivk.rs @@ -811,7 +811,7 @@ mod tests { .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ) .chain( @@ -819,7 +819,7 @@ mod tests { .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ), &rivk, diff --git a/src/circuit/note_commit.rs b/src/circuit/note_commit.rs index 0b7763c3..63b1fcd1 100644 --- a/src/circuit/note_commit.rs +++ b/src/circuit/note_commit.rs @@ -2240,7 +2240,7 @@ mod tests { .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ) .chain(Some(lsb(self.gd_y_lsb.unwrap()))) @@ -2249,17 +2249,17 @@ mod tests { .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ) .chain(Some(lsb(self.pkd_y_lsb.unwrap()))) - .chain(value.to_le_bits().iter().by_val().take(L_VALUE)) + .chain(value.to_le_bits().iter().by_vals().take(L_VALUE)) .chain( self.rho .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ) .chain( @@ -2267,7 +2267,7 @@ mod tests { .unwrap() .to_le_bits() .iter() - .by_val() + .by_vals() .take(L_ORCHARD_BASE), ), &rcm, diff --git a/src/note/commitment.rs b/src/note/commitment.rs index b7f12d2d..f4133eba 100644 --- a/src/note/commitment.rs +++ b/src/note/commitment.rs @@ -49,11 +49,11 @@ impl NoteCommitment { domain .commit( iter::empty() - .chain(BitArray::::new(g_d).iter().by_val()) - .chain(BitArray::::new(pk_d).iter().by_val()) - .chain(v.to_le_bits().iter().by_val()) - .chain(rho.to_le_bits().iter().by_val().take(L_ORCHARD_BASE)) - .chain(psi.to_le_bits().iter().by_val().take(L_ORCHARD_BASE)), + .chain(BitArray::<_, Lsb0>::new(g_d).iter().by_vals()) + .chain(BitArray::<_, Lsb0>::new(pk_d).iter().by_vals()) + .chain(v.to_le_bits().iter().by_vals()) + .chain(rho.to_le_bits().iter().by_vals().take(L_ORCHARD_BASE)) + .chain(psi.to_le_bits().iter().by_vals().take(L_ORCHARD_BASE)), &rcm.0, ) .map(NoteCommitment) diff --git a/src/spec.rs b/src/spec.rs index 8670b9e3..652d9d19 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -179,8 +179,8 @@ pub(crate) fn commit_ivk( let domain = sinsemilla::CommitDomain::new(COMMIT_IVK_PERSONALIZATION); domain.short_commit( iter::empty() - .chain(ak.to_le_bits().iter().by_val().take(L_ORCHARD_BASE)) - .chain(nk.to_le_bits().iter().by_val().take(L_ORCHARD_BASE)), + .chain(ak.to_le_bits().iter().by_vals().take(L_ORCHARD_BASE)) + .chain(nk.to_le_bits().iter().by_vals().take(L_ORCHARD_BASE)), rivk, ) } diff --git a/src/tree.rs b/src/tree.rs index 63d5ac66..96cf1f54 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -213,8 +213,8 @@ impl Hashable for MerkleHashOrchard { .hash( iter::empty() .chain(i2lebsp_k(altitude.into()).iter().copied()) - .chain(left.0.to_le_bits().iter().by_val().take(L_ORCHARD_MERKLE)) - .chain(right.0.to_le_bits().iter().by_val().take(L_ORCHARD_MERKLE)), + .chain(left.0.to_le_bits().iter().by_vals().take(L_ORCHARD_MERKLE)) + .chain(right.0.to_le_bits().iter().by_vals().take(L_ORCHARD_MERKLE)), ) .unwrap_or(pallas::Base::zero()), ) diff --git a/src/value.rs b/src/value.rs index 38db80c9..a760e77b 100644 --- a/src/value.rs +++ b/src/value.rs @@ -111,8 +111,8 @@ impl NoteValue { self.0.to_le_bytes() } - pub(crate) fn to_le_bits(self) -> BitArray { - BitArray::::new(self.0.to_le_bytes()) + pub(crate) fn to_le_bits(self) -> BitArray<[u8; 8], Lsb0> { + BitArray::<_, Lsb0>::new(self.0.to_le_bytes()) } }