Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to latest revision of Zcash crates #1618

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 105 additions & 36 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,3 @@ num-traits = { version = "0.2.19", default-features = false }
blake2b_simd = { version = "1.0.2", default-features = false }
getrandom = "0.2"
# third party dependencies end

[patch.crates-io]
bip32 = { git = "https://github.com/KeystoneHQ/crates.git", rev = "9873e8fd56007d792fa60d6e844fdb75d527c858" }
f4jumble = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
nonempty = { git = "https://github.com/nuttycom/nonempty.git", rev = "38d37189faecb2a0e3d6adc05aa24e1b93c2483b" }
orchard = { git = "https://github.com/zcash/orchard.git", rev = "e0cc7ac53ad8c97661b312a8b1c064f4cd3c6629" }
pczt = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
transparent = { package = "zcash_transparent", git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
zcash_keys = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
zcash_protocol = { git = "https://github.com/zcash/librustzcash.git", rev = "9407f09208d5574a3ba7bf3e6963741114ba77c2" }
21 changes: 12 additions & 9 deletions rust/zcash_vendor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ f4jumble = { version = "0.1.1", default-features = false, features = ["alloc"] }
byteorder = { version = "1", default-features = false }
ripemd = { version = "0.1", default-features = false, features = ["oid"] }
bs58 = { version = "0.5", default-features = false, features = ["alloc"] }
bip32 = { version = "0.5", default-features = false, features = [
bip32 = { version = "=0.6.0-pre.1", default-features = false, features = [
"alloc",
"secp256k1-ffi",
] }
Expand All @@ -41,14 +41,17 @@ chacha20poly1305 = { version = "0.10.1", default-features = false, features = [
] }
postcard = { version = "1.0.3", features = ["alloc"] }
getset = { version = "0.1.3" }
orchard = { version = "0.10", default_features = false }
pczt = { version = "0.1", features = ["orchard", "transparent"] }
orchard = { version = "0.11", default_features = false }
pczt = { version = "0.2", features = ["orchard", "transparent"] }
serde = { workspace = true }
serde_with = { version = "3.11.0", features = ["alloc", "macros"], default_features = false }
transparent = { package = "zcash_transparent", version = "0.1", default_features = false, features = ["transparent-inputs"] }
zcash_address = { version = "0.6.2", default_features = false }
zcash_encoding = { version = "0.2.2", default-features = false }
zcash_keys = { version = "0.6", default-features = false, features = ["orchard", "transparent-inputs"] }
zcash_protocol = { version = "0.4.2", default-features = false }
zip32 = { version = "0.1.3", default-features = false }
transparent = { package = "zcash_transparent", version = "0.2", default_features = false, features = ["transparent-inputs"] }
zcash_address = { version = "0.7", default_features = false }
zcash_encoding = { version = "0.3", default-features = false }
zcash_keys = { version = "0.7", default-features = false, features = ["orchard", "transparent-inputs"] }
zcash_protocol = { version = "0.5", default-features = false }
zip32 = { version = "0.2", default-features = false }
#zcash end

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("zfuture"))'] }
2 changes: 1 addition & 1 deletion rust/zcash_vendor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![no_std]
#![feature(error_in_core)]

extern crate alloc;

pub mod pczt_ext;
Expand Down
4 changes: 2 additions & 2 deletions rust/zcash_vendor/src/pczt_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn has_transparent(pczt: &Pczt) -> bool {
fn is_transparent_coinbase(pczt: &Pczt) -> bool {
pczt.transparent().inputs().len() == 1
&& pczt.transparent().inputs()[0].prevout_index() == &u32::MAX
&& pczt.transparent().inputs()[0].prevout_txid().as_ref() == &[0u8; 32]
&& pczt.transparent().inputs()[0].prevout_txid() == &[0u8; 32]
}

fn has_sapling(pczt: &Pczt) -> bool {
Expand Down Expand Up @@ -391,7 +391,7 @@ where
llsigner
.sign_transparent_with::<T::Error, _>(|pczt, signable, tx_modifiable| {
let lock_time = determine_lock_time(pczt.global(), pczt.transparent().inputs())
.map_err(|()| transparent::pczt::ParseError::InvalidRequiredHeightLocktime)?;
.ok_or(transparent::pczt::ParseError::InvalidRequiredHeightLocktime)?;
signable
.inputs_mut()
.iter_mut()
Expand Down
Loading