From e19a2b63786cbebd8152cc22bd258a723e9a7648 Mon Sep 17 00:00:00 2001 From: Constance Beguier Date: Thu, 22 Jan 2026 11:05:08 +0100 Subject: [PATCH 1/3] Update Cargo.toml --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c795974dd7..6a4029e0a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2855,7 +2855,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchard" version = "0.11.0" -source = "git+https://github.com/QED-it/orchard?rev=d8caa76a5c49300db35f7a4d80077dfaeb7295ca#d8caa76a5c49300db35f7a4d80077dfaeb7295ca" +source = "git+https://github.com/QED-it/orchard?rev=043cf442d7b76a7b9edde2bc1461a9b2f2389e0b#043cf442d7b76a7b9edde2bc1461a9b2f2389e0b" dependencies = [ "aes", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index 034f484d1c..f1f083c1a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -227,7 +227,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [ [patch.crates-io] sapling = { package = "sapling-crypto", git = "https://github.com/QED-it/sapling-crypto", rev = "9393f93fe547d1b3738c9f4618c0f8a2fffed29f" } -orchard = { git = "https://github.com/QED-it/orchard", rev = "d8caa76a5c49300db35f7a4d80077dfaeb7295ca" } +orchard = { git = "https://github.com/QED-it/orchard", rev = "043cf442d7b76a7b9edde2bc1461a9b2f2389e0b" } sinsemilla = { git = "https://github.com/zcash/sinsemilla", rev = "aabb707e862bc3d7b803c77d14e5a771bcee3e8c" } zcash_note_encryption = { git = "https://github.com/zcash/zcash_note_encryption", rev = "9f7e93d42cef839d02b9d75918117941d453f8cb" } halo2_proofs = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" } From 8cd894b0d64552087562daffdb5846fcf2630ac2 Mon Sep 17 00:00:00 2001 From: Constance Beguier Date: Thu, 22 Jan 2026 11:05:50 +0100 Subject: [PATCH 2/3] Update orchard/issue_sighash_kind_to_info return type --- zcash_primitives/src/sighash_versioning.rs | 14 ++++++++------ .../src/transaction/components/issuance.rs | 2 +- .../src/transaction/components/orchard.rs | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/zcash_primitives/src/sighash_versioning.rs b/zcash_primitives/src/sighash_versioning.rs index 665f1e6bec..15a0dcc7e5 100644 --- a/zcash_primitives/src/sighash_versioning.rs +++ b/zcash_primitives/src/sighash_versioning.rs @@ -2,6 +2,8 @@ //! //! [ZIP-246]: https://zips.z.cash/zip-0246 +use alloc::vec::Vec; + use orchard::sighash_kind::OrchardSighashKind; #[cfg(zcash_unstable = "nu7")] @@ -13,9 +15,9 @@ const ORCHARD_SIGHASH_INFO_V0: [u8; 1] = [0]; /// Returns the Orchard sighash info encoding corresponding to the given /// [`OrchardSighashKind`]. -pub(crate) fn orchard_sighash_kind_to_info(kind: &OrchardSighashKind) -> &'static [u8] { +pub(crate) fn orchard_sighash_kind_to_info(kind: &OrchardSighashKind) -> Vec { match kind { - OrchardSighashKind::AllEffecting => &ORCHARD_SIGHASH_INFO_V0, + OrchardSighashKind::AllEffecting => ORCHARD_SIGHASH_INFO_V0.to_vec(), } } @@ -38,9 +40,9 @@ const ISSUE_SIGHASH_INFO_V0: [u8; 1] = [0]; /// Returns the Issuance sighash info encoding corresponding to the given /// [`IssueSighashKind`]. #[cfg(zcash_unstable = "nu7")] -pub(crate) fn issue_sighash_kind_to_info(kind: &IssueSighashKind) -> &'static [u8] { +pub(crate) fn issue_sighash_kind_to_info(kind: &IssueSighashKind) -> Vec { match kind { - IssueSighashKind::AllEffecting => &ISSUE_SIGHASH_INFO_V0, + IssueSighashKind::AllEffecting => ISSUE_SIGHASH_INFO_V0.to_vec(), } } @@ -66,7 +68,7 @@ mod tests { for kind in kinds { // kind -> info -> kind let info = orchard_sighash_kind_to_info(&kind); - let parsed = orchard_sighash_kind_from_info(info) + let parsed = orchard_sighash_kind_from_info(&info) .expect("SighashInfo produced by orchard_sighash_kind_to_info must be parsable."); assert_eq!(parsed, kind); } @@ -85,7 +87,7 @@ mod tests { for kind in kinds { // kind -> info -> kind let info = issue_sighash_kind_to_info(&kind); - let parsed = issue_sighash_kind_from_info(info) + let parsed = issue_sighash_kind_from_info(&info) .expect("SighashInfo produced by issue_sighash_kind_to_info must be parsable."); assert_eq!(parsed, kind); } diff --git a/zcash_primitives/src/transaction/components/issuance.rs b/zcash_primitives/src/transaction/components/issuance.rs index 30340b9d64..519038a911 100644 --- a/zcash_primitives/src/transaction/components/issuance.rs +++ b/zcash_primitives/src/transaction/components/issuance.rs @@ -165,7 +165,7 @@ pub fn write_bundle( Vector::write_nonempty(&mut writer, bundle.actions(), write_action)?; let sighash_info_bytes = issue_sighash_kind_to_info(bundle.authorization().signature().sighash_kind()); - Vector::write(&mut writer, sighash_info_bytes, |w, b| w.write_u8(*b))?; + Vector::write(&mut writer, &sighash_info_bytes, |w, b| w.write_u8(*b))?; Vector::write( &mut writer, diff --git a/zcash_primitives/src/transaction/components/orchard.rs b/zcash_primitives/src/transaction/components/orchard.rs index 313c688811..ab3627e366 100644 --- a/zcash_primitives/src/transaction/components/orchard.rs +++ b/zcash_primitives/src/transaction/components/orchard.rs @@ -297,7 +297,7 @@ pub fn write_versioned_signature( versioned_sig: &OrchardSig, ) -> io::Result<()> { let sighash_info_bytes = orchard_sighash_kind_to_info(versioned_sig.sighash_kind()); - Vector::write(&mut writer, sighash_info_bytes, |w, b| w.write_u8(*b))?; + Vector::write(&mut writer, &sighash_info_bytes, |w, b| w.write_u8(*b))?; writer.write_all(&<[u8; 64]>::from(versioned_sig.sig())) } From 7cf658e1197062a5e0aa6dbc8ab530e59df1876f Mon Sep 17 00:00:00 2001 From: Constance Beguier Date: Thu, 22 Jan 2026 13:03:29 +0100 Subject: [PATCH 3/3] Update Cargo.toml --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a4029e0a7..98cf45e738 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2855,7 +2855,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchard" version = "0.11.0" -source = "git+https://github.com/QED-it/orchard?rev=043cf442d7b76a7b9edde2bc1461a9b2f2389e0b#043cf442d7b76a7b9edde2bc1461a9b2f2389e0b" +source = "git+https://github.com/QED-it/orchard?rev=a80b5faf590add72ddf2feb40e045937f9cb1d40#a80b5faf590add72ddf2feb40e045937f9cb1d40" dependencies = [ "aes", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index f1f083c1a7..8ed2b41e96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -227,7 +227,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [ [patch.crates-io] sapling = { package = "sapling-crypto", git = "https://github.com/QED-it/sapling-crypto", rev = "9393f93fe547d1b3738c9f4618c0f8a2fffed29f" } -orchard = { git = "https://github.com/QED-it/orchard", rev = "043cf442d7b76a7b9edde2bc1461a9b2f2389e0b" } +orchard = { git = "https://github.com/QED-it/orchard", rev = "a80b5faf590add72ddf2feb40e045937f9cb1d40" } sinsemilla = { git = "https://github.com/zcash/sinsemilla", rev = "aabb707e862bc3d7b803c77d14e5a771bcee3e8c" } zcash_note_encryption = { git = "https://github.com/zcash/zcash_note_encryption", rev = "9f7e93d42cef839d02b9d75918117941d453f8cb" } halo2_proofs = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" }