Skip to content

Commit dacba7f

Browse files
committed
Removed the BuildParams::proof_generation_key function because its superceded by the ExtendedKey trait. Removed BuildParams::auth_sig because signatures can be modified after the build using the MapAuth trait.
1 parent 87c2419 commit dacba7f

File tree

1 file changed

+0
-16
lines changed
  • masp_primitives/src/transaction/components/sapling

1 file changed

+0
-16
lines changed

masp_primitives/src/transaction/components/sapling/builder.rs

-16
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ pub struct SpendBuildParams {
9191
pub rcv: jubjub::Fr,
9292
/// The spend authorization randomizer
9393
pub alpha: jubjub::Fr,
94-
/// The authorization signature
95-
pub auth_sig: Option<Signature>,
96-
/// The proof generation key
97-
pub proof_generation_key: Option<ProofGenerationKey>,
9894
}
9995

10096
impl BorshSerialize for SpendBuildParams {
@@ -103,10 +99,6 @@ impl BorshSerialize for SpendBuildParams {
10399
writer.write_all(&self.rcv.to_repr())?;
104100
// Write spend authorization randomizer
105101
writer.write_all(&self.alpha.to_repr())?;
106-
// Write the authorization signature
107-
self.auth_sig.serialize(writer)?;
108-
// Write the proof generation key
109-
self.proof_generation_key.serialize(writer)?;
110102
Ok(())
111103
}
112104
}
@@ -123,16 +115,10 @@ impl BorshDeserialize for SpendBuildParams {
123115
let alpha = Option::from(jubjub::Fr::from_bytes(&alpha_bytes)).ok_or_else(|| {
124116
std::io::Error::new(std::io::ErrorKind::InvalidData, "alpha not in field")
125117
})?;
126-
// Read the authorization signature
127-
let auth_sig = Option::<Signature>::deserialize_reader(reader)?;
128-
// Read the proof generation key
129-
let proof_generation_key = Option::<ProofGenerationKey>::deserialize_reader(reader)?;
130118
// Finally, aggregate the spend parameters
131119
Ok(SpendBuildParams {
132120
rcv,
133121
alpha,
134-
auth_sig,
135-
proof_generation_key,
136122
})
137123
}
138124
}
@@ -347,8 +333,6 @@ impl<R: CryptoRng + RngCore> RngBuildParams<R> {
347333
self.spends.entry(i).or_insert_with(|| SpendBuildParams {
348334
rcv: jubjub::Fr::random(&mut self.rng),
349335
alpha: jubjub::Fr::random(&mut self.rng),
350-
auth_sig: None,
351-
proof_generation_key: None,
352336
})
353337
}
354338

0 commit comments

Comments
 (0)