Fix variable names in output circuit

This commit is contained in:
Sean Bowe 2018-03-17 09:02:29 -06:00
parent 13b03a0a1a
commit 6d01e78711
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031

View File

@ -507,7 +507,7 @@ impl<'a, E: JubjubEngine> Circuit<E> for Output<'a, E> {
note_contents.len(), note_contents.len(),
64 + // value 64 + // value
256 + // g_d 256 + // g_d
256 // p_d 256 // pk_d
); );
// Compute the hash of the note contents // Compute the hash of the note contents
@ -520,23 +520,23 @@ impl<'a, E: JubjubEngine> Circuit<E> for Output<'a, E> {
{ {
// Booleanize the randomness // Booleanize the randomness
let cmr = boolean::field_into_boolean_vec_le( let rcm = boolean::field_into_boolean_vec_le(
cs.namespace(|| "cmr"), cs.namespace(|| "rcm"),
self.commitment_randomness self.commitment_randomness
)?; )?;
// Compute the note commitment randomness in the exponent // Compute the note commitment randomness in the exponent
let cmr = ecc::fixed_base_multiplication( let rcm = ecc::fixed_base_multiplication(
cs.namespace(|| "computation of commitment randomness"), cs.namespace(|| "computation of commitment randomness"),
FixedGenerators::NoteCommitmentRandomness, FixedGenerators::NoteCommitmentRandomness,
&cmr, &rcm,
self.params self.params
)?; )?;
// Randomize our note commitment // Randomize our note commitment
cm = cm.add( cm = cm.add(
cs.namespace(|| "randomization of note commitment"), cs.namespace(|| "randomization of note commitment"),
&cmr, &rcm,
self.params self.params
)?; )?;
} }