Rename CommitmentTreeWitness -> MerklePath

This commit is contained in:
Jack Grigg
2020-02-08 00:25:24 +00:00
parent 3a3008caf9
commit 76e0f658c1
6 changed files with 41 additions and 46 deletions

View File

@@ -9,7 +9,7 @@ use zcash_primitives::{
primitives::{Diversifier, PaymentAddress, ProofGenerationKey},
};
use zcash_primitives::{
merkle_tree::CommitmentTreeWitness,
merkle_tree::MerklePath,
prover::TxProver,
redjubjub::{PublicKey, Signature},
sapling::Node,
@@ -127,7 +127,7 @@ impl TxProver for LocalTxProver {
ar: Fs,
value: u64,
anchor: Fr,
witness: CommitmentTreeWitness<Node>,
merkle_path: MerklePath<Node>,
) -> Result<
(
[u8; GROTH_PROOF_SIZE],
@@ -143,7 +143,7 @@ impl TxProver for LocalTxProver {
ar,
value,
anchor,
witness,
merkle_path,
&self.spend_params,
&self.spend_vk,
&JUBJUB,

View File

@@ -10,7 +10,7 @@ use zcash_primitives::{
primitives::{Diversifier, Note, PaymentAddress, ProofGenerationKey, ValueCommitment},
};
use zcash_primitives::{
merkle_tree::CommitmentTreeWitness,
merkle_tree::MerklePath,
redjubjub::{PrivateKey, PublicKey, Signature},
sapling::Node,
transaction::components::Amount,
@@ -46,7 +46,7 @@ impl SaplingProvingContext {
ar: Fs,
value: u64,
anchor: Fr,
witness: CommitmentTreeWitness<Node>,
merkle_path: MerklePath<Node>,
proving_key: &Parameters<Bls12>,
verifying_key: &PreparedVerifyingKey<Bls12>,
params: &JubjubBls12,
@@ -104,7 +104,7 @@ impl SaplingProvingContext {
r: rcm,
};
let nullifier = note.nf(&viewing_key, witness.position, params);
let nullifier = note.nf(&viewing_key, merkle_path.position, params);
// We now have the full witness for our circuit
let instance = Spend {
@@ -114,7 +114,7 @@ impl SaplingProvingContext {
payment_address: Some(payment_address),
commitment_randomness: Some(rcm),
ar: Some(ar),
auth_path: witness
auth_path: merkle_path
.auth_path
.iter()
.map(|(node, b)| Some(((*node).into(), *b)))