What changed, and why it matters
This commit only reformats existing Zcash PCZT code—adjusting line breaks, indentation, and whitespace. No logic, behavior, or security checks were changed.
No security action needed; this is a cosmetic formatting commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure formatting change across three Rust files in the Zcash PCZT module. It collapses multi-line function calls and error-formatting expressions onto single lines, wraps a long type declaration, and removes a blank line. There are no functional modifications, no new dependencies, no altered control flow, and no changes to cryptographic validation or signing logic.
Changed components
rust/apps/zcash/src/pczt/check.rsrust/apps/zcash/src/pczt/parse.rsrust/apps/zcash/src/pczt/sign.rsInspect captured patch +26 / −23
diff --git a/rust/apps/zcash/src/pczt/check.rs b/rust/apps/zcash/src/pczt/check.rs
index 85dec60..b478338 100644
--- a/rust/apps/zcash/src/pczt/check.rs
+++ b/rust/apps/zcash/src/pczt/check.rs
@@ -298,14 +298,7 @@ fn check_shielded_bundle<P: consensus::Parameters>(
) -> Result<(), ZcashError> {
let pool_label = pool.label();
bundle.actions().iter().try_for_each(|action| {
- check_action(
- params,
- seed_fingerprint,
- account_index,
- ufvk,
- action,
- pool,
- )?;
+ check_action(params, seed_fingerprint, account_index, ufvk, action, pool)?;
Ok::<_, ZcashError>(())
})?;
@@ -341,9 +334,7 @@ fn check_action<P: consensus::Parameters>(
// Check `cv_net` first so we know that the `value` fields for both the spend and the
// output are present and correct.
action.verify_cv_net().map_err(|e| {
- ZcashError::InvalidPczt(format!(
- "invalid cv_net in {pool_label} action: {e:?}"
- ))
+ ZcashError::InvalidPczt(format!("invalid cv_net in {pool_label} action: {e:?}"))
})?;
let fvk = ufvk.orchard().ok_or(ZcashError::InvalidDataError(
@@ -396,9 +387,7 @@ fn check_action_spend<P: consensus::Parameters>(
if let Some(expected_fvk) = can_verify_nf_rk {
spend.verify_nullifier(expected_fvk).map_err(|e| {
- ZcashError::InvalidPczt(format!(
- "invalid {pool_label} action nullifier: {e:?}"
- ))
+ ZcashError::InvalidPczt(format!("invalid {pool_label} action nullifier: {e:?}"))
})?;
spend.verify_rk(expected_fvk).map_err(|e| {
ZcashError::InvalidPczt(format!("invalid {pool_label} action rk: {e:?}"))
@@ -429,9 +418,7 @@ fn check_action_output<P: consensus::Parameters>(
action
.output()
.verify_note_commitment(action.spend())
- .map_err(|e| {
- ZcashError::InvalidPczt(format!("invalid {pool_label} action cmx: {e:?}"))
- })?;
+ .map_err(|e| ZcashError::InvalidPczt(format!("invalid {pool_label} action cmx: {e:?}")))?;
let fvk = ufvk.orchard().ok_or(ZcashError::InvalidDataError(
"orchard fvk is not present".to_string(),
diff --git a/rust/apps/zcash/src/pczt/parse.rs b/rust/apps/zcash/src/pczt/parse.rs
index aa9b5bb..248afb6 100644
--- a/rust/apps/zcash/src/pczt/parse.rs
+++ b/rust/apps/zcash/src/pczt/parse.rs
@@ -216,8 +216,14 @@ pub fn parse_pczt_cypherpunk<P: consensus::Parameters>(
let verifier = Verifier::new(pczt.clone())
.with_orchard(|bundle| {
- parsed_orchard = parse_orchard(params, seed_fingerprint, ufvk, bundle, ShieldedPool::Orchard)
- .map_err(pczt::roles::verifier::OrchardError::Custom)?;
+ parsed_orchard = parse_orchard(
+ params,
+ seed_fingerprint,
+ ufvk,
+ bundle,
+ ShieldedPool::Orchard,
+ )
+ .map_err(pczt::roles::verifier::OrchardError::Custom)?;
Ok(())
})
.map_err(map_orchard_verifier_error)?;
@@ -225,8 +231,14 @@ pub fn parse_pczt_cypherpunk<P: consensus::Parameters>(
let verifier = if should_process_ironwood {
verifier
.with_ironwood(|bundle| {
- parsed_ironwood = parse_orchard(params, seed_fingerprint, ufvk, bundle, ShieldedPool::Ironwood)
- .map_err(pczt::roles::verifier::OrchardError::Custom)?;
+ parsed_ironwood = parse_orchard(
+ params,
+ seed_fingerprint,
+ ufvk,
+ bundle,
+ ShieldedPool::Ironwood,
+ )
+ .map_err(pczt::roles::verifier::OrchardError::Custom)?;
Ok(())
})
.map_err(map_orchard_verifier_error)?
diff --git a/rust/apps/zcash/src/pczt/sign.rs b/rust/apps/zcash/src/pczt/sign.rs
index f832752..e5a2783 100644
--- a/rust/apps/zcash/src/pczt/sign.rs
+++ b/rust/apps/zcash/src/pczt/sign.rs
@@ -118,7 +118,12 @@ struct SeedSigner<'a> {
/// key depend only on (seed, account), not on the action, so a bundle with many
/// actions for one account derives once. Interior mutability because the
/// `PcztSigner` trait signs through `&self`.
- ask_cache: RefCell<Vec<(zcash_vendor::zip32::AccountId, orchard::keys::SpendAuthorizingKey)>>,
+ ask_cache: RefCell<
+ Vec<(
+ zcash_vendor::zip32::AccountId,
+ orchard::keys::SpendAuthorizingKey,
+ )>,
+ >,
/// Number of authorizations produced, so `sign_pczt` can distinguish "nothing of
/// ours to sign" (`PcztNoMyInputs`) from a successful signing.
signed: Cell<usize>,
@@ -742,7 +747,6 @@ mod tests {
.expect("wallet-set min key must survive round trip");
assert_eq!(request_min.as_slice(), &[1u8, 2][..]);
}
-
}
#[cfg(all(test, feature = "multi_coins", not(feature = "cypherpunk")))]
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.