From 469b78674147cf56d5b830014f8f5a20e36ed49f Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 28 Jan 2025 15:01:12 -0700 Subject: [PATCH 1/4] Update patched `redjubjub` dependency. --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b85b647..c097b17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "redjubjub" version = "0.7.0" -source = "git+https://github.com/nuttycom/redjubjub?rev=e413019904400f4caa3550df7c4040befadfbb14#e413019904400f4caa3550df7c4040befadfbb14" +source = "git+https://github.com/ZcashFoundation/redjubjub?rev=eae848c5c14d9c795d000dd9f4c4762d1aee7ee1#eae848c5c14d9c795d000dd9f4c4762d1aee7ee1" dependencies = [ "rand_core", "reddsa", diff --git a/Cargo.toml b/Cargo.toml index f191ae5..fc5c17f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,7 +91,7 @@ std = [ "core2/std", "dep:document-features", "group/wnaf-memuse", - "redjubjub/std", + "redjubjub/std" ] ## Enables creation of Sapling proofs @@ -126,4 +126,4 @@ name = "pedersen_hash" harness = false [patch.crates-io] -redjubjub = { git = "https://github.com/nuttycom/redjubjub", rev = "e413019904400f4caa3550df7c4040befadfbb14" } +redjubjub = { git = "https://github.com/ZcashFoundation/redjubjub", rev = "eae848c5c14d9c795d000dd9f4c4762d1aee7ee1" } From 53566aef8d77e709533d1b4d4d7f65f3ca0ee9cf Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 28 Jan 2025 13:56:27 -0700 Subject: [PATCH 2/4] Re-expose the `ProverProgress` type outside of the `circuit` feature. --- src/builder.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index dd6e181..a2bd756 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -980,19 +980,17 @@ impl InProgressProofs for Proven { } /// Reports on the progress made towards creating proofs for a bundle. -#[cfg(feature = "circuit")] pub trait ProverProgress { /// Updates the progress instance with the number of steps completed and the total /// number of steps. fn update(&mut self, cur: u32, end: u32); } -#[cfg(feature = "circuit")] impl ProverProgress for () { fn update(&mut self, _: u32, _: u32) {} } -#[cfg(all(feature = "circuit", feature = "std"))] +#[cfg(feature = "std")] impl> ProverProgress for std::sync::mpsc::Sender { fn update(&mut self, cur: u32, end: u32) { // If the send fails, we should ignore the error, not crash. @@ -1000,7 +998,6 @@ impl> ProverProgress for std::sync::mpsc::Sender { } } -#[cfg(feature = "circuit")] impl ProverProgress for &mut U { fn update(&mut self, cur: u32, end: u32) { (*self).update(cur, end); From befbf95646d2a9387cdd7340721a5fe66c1473a5 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 28 Jan 2025 17:45:22 -0700 Subject: [PATCH 3/4] Bump MSRV to 1.70 --- CHANGELOG.md | 2 +- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc86cd7..0379b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this library adheres to Rust's notion of avoid the need to depend upon the `bellman` crate. ### Changed -- MSRV is now 1.66 +- MSRV is now 1.70 ## [0.4.0] - 2024-12-16 diff --git a/Cargo.toml b/Cargo.toml index fc5c17f..2e5e644 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "Kris Nuttycombe ", ] edition = "2021" -rust-version = "1.66" +rust-version = "1.70" description = "Cryptographic library for Zcash Sapling" homepage = "https://github.com/zcash/sapling-crypto" repository = "https://github.com/zcash/sapling-crypto" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4a49675..5299106 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.66.0" +channel = "1.70.0" components = ["clippy", "rustfmt"] From a3cb90a2d4b5690f2afd0969153997de30458e25 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 28 Jan 2025 17:53:21 -0700 Subject: [PATCH 4/4] Remove unused type parameterization (fix Clippy lint) --- src/builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index a2bd756..b7e847e 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -697,7 +697,7 @@ impl Builder { Zip212Enforcement::Off | Zip212Enforcement::GracePeriod => { Err(Error::PcztRequiresZip212) } - Zip212Enforcement::On => build_bundle::<_, (), (), _>( + Zip212Enforcement::On => build_bundle( rng, self.bundle_type, Zip212Enforcement::On, @@ -743,7 +743,7 @@ pub fn bundle>( outputs: Vec, extsks: &[ExtendedSpendingKey], ) -> Result, SaplingMetadata)>, Error> { - build_bundle::<_, SP, OP, _>( + build_bundle( rng, bundle_type, zip212_enforcement, @@ -813,7 +813,7 @@ pub fn bundle>( ) } -fn build_bundle( +fn build_bundle( mut rng: R, bundle_type: BundleType, zip212_enforcement: Zip212Enforcement,