Skip to content

Commit c79fc92

Browse files
committed
Update orchard and librustzcash crate versions to the latest from the zsa1 branches and adjust related code for compatibility
1 parent 47fedd3 commit c79fc92

File tree

7 files changed

+65
-54
lines changed

7 files changed

+65
-54
lines changed

Cargo.lock

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ dependencies = [
15711571
[[package]]
15721572
name = "equihash"
15731573
version = "0.2.2"
1574-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
1574+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
15751575
dependencies = [
15761576
"blake2b_simd",
15771577
"cc",
@@ -1619,7 +1619,7 @@ dependencies = [
16191619
[[package]]
16201620
name = "f4jumble"
16211621
version = "0.1.1"
1622-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
1622+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
16231623
dependencies = [
16241624
"blake2b_simd",
16251625
]
@@ -3448,8 +3448,8 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
34483448

34493449
[[package]]
34503450
name = "orchard"
3451-
version = "0.11.0"
3452-
source = "git+https://github.com/QED-it/orchard?rev=7ec34c9be7d36ecdce7c3658efe9a78c2863ed97#7ec34c9be7d36ecdce7c3658efe9a78c2863ed97"
3451+
version = "0.12.0"
3452+
source = "git+https://github.com/QED-it/orchard?rev=92db1ee1c3d11481bc96c90ba64a060a5c48dd67#92db1ee1c3d11481bc96c90ba64a060a5c48dd67"
34533453
dependencies = [
34543454
"aes",
34553455
"bitvec",
@@ -4636,8 +4636,8 @@ dependencies = [
46364636

46374637
[[package]]
46384638
name = "sapling-crypto"
4639-
version = "0.5.0"
4640-
source = "git+https://github.com/QED-it/sapling-crypto?rev=9393f93fe547d1b3738c9f4618c0f8a2fffed29f#9393f93fe547d1b3738c9f4618c0f8a2fffed29f"
4639+
version = "0.6.0"
4640+
source = "git+https://github.com/QED-it/sapling-crypto?rev=59535fb5d34b5c5cf1b20ef18269f5c65228378c#59535fb5d34b5c5cf1b20ef18269f5c65228378c"
46414641
dependencies = [
46424642
"aes",
46434643
"bellman",
@@ -6733,9 +6733,9 @@ dependencies = [
67336733

67346734
[[package]]
67356735
name = "xdg"
6736-
version = "2.5.2"
6736+
version = "3.0.0"
67376737
source = "registry+https://github.com/rust-lang/crates.io-index"
6738-
checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"
6738+
checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5"
67396739

67406740
[[package]]
67416741
name = "yaml-rust2"
@@ -6773,8 +6773,8 @@ dependencies = [
67736773

67746774
[[package]]
67756775
name = "zcash_address"
6776-
version = "0.9.0"
6777-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6776+
version = "0.10.1"
6777+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
67786778
dependencies = [
67796779
"bech32",
67806780
"bs58",
@@ -6787,16 +6787,17 @@ dependencies = [
67876787
[[package]]
67886788
name = "zcash_encoding"
67896789
version = "0.3.0"
6790-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6790+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
67916791
dependencies = [
67926792
"core2",
6793+
"hex",
67936794
"nonempty",
67946795
]
67956796

67966797
[[package]]
67976798
name = "zcash_history"
67986799
version = "0.4.0"
6799-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6800+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
68006801
dependencies = [
68016802
"blake2b_simd",
68026803
"byteorder",
@@ -6805,8 +6806,8 @@ dependencies = [
68056806

68066807
[[package]]
68076808
name = "zcash_keys"
6808-
version = "0.11.0"
6809-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6809+
version = "0.12.0"
6810+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
68106811
dependencies = [
68116812
"bech32",
68126813
"blake2b_simd",
@@ -6817,7 +6818,9 @@ dependencies = [
68176818
"group",
68186819
"memuse",
68196820
"nonempty",
6821+
"orchard",
68206822
"rand_core 0.6.4",
6823+
"sapling-crypto",
68216824
"secrecy",
68226825
"subtle",
68236826
"tracing",
@@ -6842,8 +6845,8 @@ dependencies = [
68426845

68436846
[[package]]
68446847
name = "zcash_primitives"
6845-
version = "0.25.0"
6846-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6848+
version = "0.26.4"
6849+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
68476850
dependencies = [
68486851
"bip32",
68496852
"blake2b_simd",
@@ -6860,7 +6863,6 @@ dependencies = [
68606863
"hex",
68616864
"incrementalmerkletree",
68626865
"jubjub",
6863-
"lazy_static",
68646866
"memuse",
68656867
"nonempty",
68666868
"orchard",
@@ -6884,8 +6886,8 @@ dependencies = [
68846886

68856887
[[package]]
68866888
name = "zcash_proofs"
6887-
version = "0.25.0"
6888-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6889+
version = "0.26.1"
6890+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
68896891
dependencies = [
68906892
"bellman",
68916893
"blake2b_simd",
@@ -6895,7 +6897,6 @@ dependencies = [
68956897
"home",
68966898
"jubjub",
68976899
"known-folders",
6898-
"lazy_static",
68996900
"rand_core 0.6.4",
69006901
"redjubjub",
69016902
"sapling-crypto",
@@ -6907,13 +6908,14 @@ dependencies = [
69076908

69086909
[[package]]
69096910
name = "zcash_protocol"
6910-
version = "0.6.2"
6911-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6911+
version = "0.7.2"
6912+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
69126913
dependencies = [
69136914
"core2",
69146915
"document-features",
69156916
"hex",
69166917
"memuse",
6918+
"zcash_encoding",
69176919
]
69186920

69196921
[[package]]
@@ -6922,8 +6924,10 @@ version = "0.4.2"
69226924
source = "registry+https://github.com/rust-lang/crates.io-index"
69236925
checksum = "9bed6cf5b2b4361105d4ea06b2752f0c8af4641756c7fbc9858a80af186c234f"
69246926
dependencies = [
6927+
"bip32",
69256928
"bitflags 2.10.0",
69266929
"bounded-vec",
6930+
"hex",
69276931
"ripemd 0.1.3",
69286932
"secp256k1",
69296933
"sha1",
@@ -6941,8 +6945,8 @@ dependencies = [
69416945

69426946
[[package]]
69436947
name = "zcash_transparent"
6944-
version = "0.5.0"
6945-
source = "git+https://github.com/QED-it/librustzcash?rev=acd68d123997ea9788c14244bc3805c6d2e8d68c#acd68d123997ea9788c14244bc3805c6d2e8d68c"
6948+
version = "0.6.3"
6949+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"
69466950
dependencies = [
69476951
"bip32",
69486952
"blake2b_simd",
@@ -6951,6 +6955,7 @@ dependencies = [
69516955
"document-features",
69526956
"getset",
69536957
"hex",
6958+
"nonempty",
69546959
"ripemd 0.1.3",
69556960
"secp256k1",
69566961
"sha2 0.10.9",
@@ -7497,3 +7502,8 @@ name = "zmij"
74977502
version = "1.0.19"
74987503
source = "registry+https://github.com/rust-lang/crates.io-index"
74997504
checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
7505+
7506+
[[patch.unused]]
7507+
name = "zcash_client_backend"
7508+
version = "0.21.1"
7509+
source = "git+https://github.com/QED-it/librustzcash?rev=75a293e74045dcd827452003c194b50c219c74a7#75a293e74045dcd827452003c194b50c219c74a7"

Cargo.toml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ edition = "2021"
3030

3131
[workspace.dependencies]
3232
incrementalmerkletree = { version = "0.8.2", features = ["legacy-api"] }
33-
orchard = { version = "0.11", features = ["zsa-issuance", "temporary-zebra"] }
34-
sapling-crypto = "0.5"
35-
zcash_address = "0.9"
36-
zcash_encoding = "0.3"
37-
zcash_history = "0.4"
38-
zcash_keys = "0.11"
39-
zcash_primitives = { version = "0.25", features = ["zsa-issuance", "zip-233"] }
40-
zcash_proofs = "0.25"
41-
zcash_transparent = "0.5"
42-
zcash_protocol = "0.6.2"
33+
orchard = { version = "0.12", features = ["zsa-issuance", "temporary-zebra"] }
34+
sapling-crypto = "0.6"
35+
zcash_address = "0.10.1"
36+
zcash_encoding = "0.3.0"
37+
zcash_history = "0.4.0"
38+
zcash_keys = "0.12.0"
39+
zcash_primitives = { version = "0.26.4", features = ["zsa-issuance", "zip-233"] }
40+
zcash_proofs = "0.26.1"
41+
zcash_transparent = "0.6.3"
42+
zcash_protocol = "0.7.2"
4343
zip32 = "0.2"
4444
abscissa_core = "0.7"
4545
atty = "0.2.14"
@@ -317,15 +317,16 @@ halo2_proofs = { version = "0.3.0", git = "https://github.com/zcash/halo2", rev
317317
halo2_poseidon = { version = "0.1.0", git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" }
318318
sinsemilla = { git = "https://github.com/zcash/sinsemilla", rev = "aabb707e862bc3d7b803c77d14e5a771bcee3e8c" }
319319
zcash_note_encryption = { version = "0.4.1", git = "https://github.com/zcash/zcash_note_encryption", rev = "9f7e93d42cef839d02b9d75918117941d453f8cb" }
320-
sapling-crypto = { package = "sapling-crypto", version = "0.5", git = "https://github.com/QED-it/sapling-crypto", rev = "9393f93fe547d1b3738c9f4618c0f8a2fffed29f" }
321-
orchard = { version = "0.11.0", git = "https://github.com/QED-it/orchard", rev = "7ec34c9be7d36ecdce7c3658efe9a78c2863ed97" }
322-
zcash_primitives = { version = "0.25.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
323-
zcash_protocol = { version = "0.6.2", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
324-
zcash_address = { version = "0.9.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
325-
zcash_encoding = { version = "0.3.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
326-
zcash_history = { version = "0.4.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
327-
zcash_keys = { version = "0.11.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
328-
zcash_transparent = { version = "0.5.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
329-
zcash_proofs = { version = "0.25.0", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
330-
equihash = { version = "0.2.2", git = "https://github.com/QED-it/librustzcash", rev = "acd68d123997ea9788c14244bc3805c6d2e8d68c" }
320+
sapling-crypto = { package = "sapling-crypto", version = "0.6", git = "https://github.com/QED-it/sapling-crypto", rev = "59535fb5d34b5c5cf1b20ef18269f5c65228378c" }
321+
orchard = { version = "0.12.0", git = "https://github.com/QED-it/orchard", rev = "92db1ee1c3d11481bc96c90ba64a060a5c48dd67" }
322+
zcash_primitives = { version = "0.26.1", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
323+
zcash_protocol = { version = "0.7.2", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
324+
zcash_address = { version = "0.10.1", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
325+
zcash_encoding = { version = "0.3.0", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
326+
zcash_history = { version = "0.4.0", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
327+
zcash_client_backend = { version = "0.21.1", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
328+
zcash_keys = { version = "0.12.0", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
329+
zcash_transparent = { version = "0.6.3", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
330+
zcash_proofs = { version = "0.26.1", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
331+
equihash = { version = "0.2.2", git = "https://github.com/QED-it/librustzcash", rev = "75a293e74045dcd827452003c194b50c219c74a7" }
331332
zcash_spec = { git = "https://github.com/QED-it/zcash_spec", rev = "d5e84264d2ad0646b587a837f4e2424ca64d3a05" }

zebra-chain/src/block/height.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use std::ops::{Add, Sub};
44
use thiserror::Error;
5-
use zcash_primitives::consensus::BlockHeight;
5+
use zcash_protocol::consensus::BlockHeight;
66

77
use crate::{serialization::SerializationError, BoxError};
88

zebra-chain/src/parameters/network_upgrade.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ impl fmt::Display for ConsensusBranchId {
208208
}
209209
}
210210

211-
impl TryFrom<ConsensusBranchId> for zcash_primitives::consensus::BranchId {
211+
impl TryFrom<ConsensusBranchId> for zcash_protocol::consensus::BranchId {
212212
type Error = crate::Error;
213213

214214
fn try_from(id: ConsensusBranchId) -> Result<Self, Self::Error> {
215-
zcash_primitives::consensus::BranchId::try_from(u32::from(id))
215+
zcash_protocol::consensus::BranchId::try_from(u32::from(id))
216216
.map_err(|_| Self::Error::InvalidConsensusBranchId)
217217
}
218218
}

zebra-chain/src/primitives/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Usage: <https://docs.rs/zcash_address/0.2.0/zcash_address/trait.TryFromAddress.html#examples>
44
55
use zcash_address::unified::{self, Container};
6-
use zcash_primitives::consensus::NetworkType;
6+
use zcash_protocol::consensus::NetworkType;
77

88
use crate::{parameters::NetworkKind, transparent, BoxError};
99

zebra-chain/src/transparent/address.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ impl std::str::FromStr for Address {
142142
hash_bytes.copy_from_slice(&payload);
143143

144144
match hrp.as_str() {
145-
zcash_primitives::constants::mainnet::HRP_TEX_ADDRESS => Ok(Address::Tex {
145+
zcash_protocol::constants::mainnet::HRP_TEX_ADDRESS => Ok(Address::Tex {
146146
network_kind: NetworkKind::Mainnet,
147147
validating_key_hash: hash_bytes,
148148
}),
149149

150-
zcash_primitives::constants::testnet::HRP_TEX_ADDRESS => Ok(Address::Tex {
150+
zcash_protocol::constants::testnet::HRP_TEX_ADDRESS => Ok(Address::Tex {
151151
network_kind: NetworkKind::Testnet,
152152
validating_key_hash: hash_bytes,
153153
}),

zebra-rpc/src/methods.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use tower::ServiceExt;
5858
use tracing::Instrument;
5959

6060
use zcash_address::{unified::Encoding, TryFromAddress};
61-
use zcash_primitives::consensus::Parameters;
61+
use zcash_protocol::consensus::Parameters;
6262

6363
use zebra_chain::{
6464
amount::{self, Amount, NegativeAllowed, NonNegative},
@@ -1843,7 +1843,7 @@ where
18431843
let time = u32::try_from(block.header.time.timestamp())
18441844
.expect("Timestamps of valid blocks always fit into u32.");
18451845

1846-
let sapling_nu = zcash_primitives::consensus::NetworkUpgrade::Sapling;
1846+
let sapling_nu = zcash_protocol::consensus::NetworkUpgrade::Sapling;
18471847
let sapling = if network.is_nu_active(sapling_nu, height.into()) {
18481848
match read_state
18491849
.ready()
@@ -1864,7 +1864,7 @@ where
18641864
let (sapling_tree, sapling_root) =
18651865
sapling.map_or((None, None), |(tree, root)| (Some(tree), Some(root)));
18661866

1867-
let orchard_nu = zcash_primitives::consensus::NetworkUpgrade::Nu5;
1867+
let orchard_nu = zcash_protocol::consensus::NetworkUpgrade::Nu5;
18681868
let orchard = if network.is_nu_active(orchard_nu, height.into()) {
18691869
match read_state
18701870
.ready()

0 commit comments

Comments
 (0)