Skip to content

Commit e4afa72

Browse files
committed
rust: Migrate to zcash_primitives 0.23
1 parent 1fdd426 commit e4afa72

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

Cargo.lock

Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ redjubjub = "0.8"
5959
tracing = "0.1"
6060
tracing-core = "0.1"
6161
tracing-appender = "0.2"
62-
transparent = { package = "zcash_transparent", version = "0.2" }
63-
zcash_address = "0.7"
62+
transparent = { package = "zcash_transparent", version = "0.3" }
63+
zcash_address = "0.8"
6464
zcash_encoding = "0.3"
6565
zcash_history = "0.4"
6666
zcash_note_encryption = "0.4"
67-
zcash_primitives = { version = "0.22", features = ["temporary-zcashd", "transparent-inputs"] }
68-
zcash_proofs = { version = "0.22", features = ["directories"] }
67+
zcash_primitives = { version = "0.23", features = ["temporary-zcashd", "transparent-inputs"] }
68+
zcash_proofs = { version = "0.23", features = ["directories"] }
6969
zcash_protocol = { version = "0.5", features = ["local-consensus"] }
7070
ed25519-zebra = "4"
7171
zeroize = "1.4.2"
@@ -105,7 +105,7 @@ macro_find_and_replace = "1"
105105
[dev-dependencies]
106106
incrementalmerkletree = { version = "0.8", features = ["test-dependencies"] }
107107
proptest = "1.0.0"
108-
zcash_primitives = { version = "0.22", features = ["temporary-zcashd", "transparent-inputs", "test-dependencies"] }
108+
zcash_primitives = { version = "0.23", features = ["temporary-zcashd", "transparent-inputs", "test-dependencies"] }
109109

110110
[dependencies.tracing-subscriber]
111111
version = "0.3"

qa/supply-chain/audits.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3401,7 +3401,7 @@ end = "2024-09-21"
34013401
criteria = "safe-to-deploy"
34023402
user-id = 169181 # Kris Nuttycombe (nuttycom)
34033403
start = "2024-01-27"
3404-
end = "2025-04-16"
3404+
end = "2026-06-05"
34053405

34063406
[[trusted.zcash_spec]]
34073407
criteria = "safe-to-deploy"

qa/supply-chain/imports.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ user-login = "kennykerr"
169169
user-name = "Kenny Kerr"
170170

171171
[[publisher.zcash_address]]
172-
version = "0.7.1"
173-
when = "2025-05-07"
172+
version = "0.8.0"
173+
when = "2025-06-02"
174174
user-id = 169181
175175
user-login = "nuttycom"
176176
user-name = "Kris Nuttycombe"
@@ -190,22 +190,22 @@ user-login = "str4d"
190190
user-name = "Jack Grigg"
191191

192192
[[publisher.zcash_primitives]]
193-
version = "0.22.0"
194-
when = "2025-02-21"
193+
version = "0.23.0"
194+
when = "2025-06-02"
195195
user-id = 169181
196196
user-login = "nuttycom"
197197
user-name = "Kris Nuttycombe"
198198

199199
[[publisher.zcash_proofs]]
200-
version = "0.22.0"
201-
when = "2025-02-21"
200+
version = "0.23.0"
201+
when = "2025-06-02"
202202
user-id = 169181
203203
user-login = "nuttycom"
204204
user-name = "Kris Nuttycombe"
205205

206206
[[publisher.zcash_protocol]]
207-
version = "0.5.1"
208-
when = "2025-03-21"
207+
version = "0.5.2"
208+
when = "2025-06-02"
209209
user-id = 169181
210210
user-login = "nuttycom"
211211
user-name = "Kris Nuttycombe"
@@ -218,8 +218,8 @@ user-login = "daira"
218218
user-name = "Daira-Emma Hopwood"
219219

220220
[[publisher.zcash_transparent]]
221-
version = "0.2.3"
222-
when = "2025-04-04"
221+
version = "0.3.0"
222+
when = "2025-06-02"
223223
user-id = 169181
224224
user-login = "nuttycom"
225225
user-name = "Kris Nuttycombe"

src/rust/src/transaction_ffi.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ pub extern "C" fn zcash_transaction_digests(
4848
match tx.version() {
4949
// Pre-NU5 transaction formats don't have authorizing data commitments; when
5050
// included in the authDataCommitment tree, they use the [0xff; 32] value.
51-
TxVersion::Sprout(_) | TxVersion::Overwinter | TxVersion::Sapling => {
52-
*auth_digest_ret = [0xff; 32]
53-
}
51+
TxVersion::Sprout(_) | TxVersion::V3 | TxVersion::V4 => *auth_digest_ret = [0xff; 32],
5452
_ => auth_digest_ret.copy_from_slice(tx.auth_commitment().as_bytes()),
5553
}
5654
}
@@ -193,7 +191,7 @@ pub extern "C" fn zcash_transaction_precomputed_init(
193191
};
194192

195193
match tx.version() {
196-
TxVersion::Sprout(_) | TxVersion::Overwinter | TxVersion::Sapling => {
194+
TxVersion::Sprout(_) | TxVersion::V3 | TxVersion::V4 => {
197195
// We don't support these legacy transaction formats in this API.
198196
ptr::null_mut()
199197
}
@@ -252,7 +250,7 @@ pub extern "C" fn zcash_transaction_zip244_signature_digest(
252250
};
253251
if matches!(
254252
precomputed_tx.tx.version(),
255-
TxVersion::Sprout(_) | TxVersion::Overwinter | TxVersion::Sapling,
253+
TxVersion::Sprout(_) | TxVersion::V3 | TxVersion::V4,
256254
) {
257255
error!("Cannot calculate ZIP 244 digest for pre-v5 transaction");
258256
return false;

0 commit comments

Comments
 (0)