From 0562fa7e232085aa563a5c3b51cfb16e49cd373d Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 30 Mar 2021 09:22:07 +1000 Subject: [PATCH] Clarify anchor names (#1955) When we're naming the anchors without the corresponding type or struct, it's not clear if they are shared or per spend. Rename the fields as `shared_anchor` or `per_spend_anchor`. --- book/src/dev/rfcs/0010-v5-transaction.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/book/src/dev/rfcs/0010-v5-transaction.md b/book/src/dev/rfcs/0010-v5-transaction.md index e7b2df80c..0a0c9a5c2 100644 --- a/book/src/dev/rfcs/0010-v5-transaction.md +++ b/book/src/dev/rfcs/0010-v5-transaction.md @@ -119,7 +119,7 @@ We use `AnchorVariant` in `ShieldedData` to model the anchor differences between ```rust struct sapling::ShieldedData { value_balance: Amount, - anchor: AnchorV::Shared, + shared_anchor: AnchorV::Shared, first: Either, Output>, rest_spends: Vec>, rest_outputs: Vec, @@ -135,7 +135,7 @@ Sapling spend code is located at `zebra-chain/src/sapling/spend.rs`. We use `Anc ```rust struct Spend { cv: commitment::ValueCommitment, - anchor: AnchorV::PerSpend, + per_spend_anchor: AnchorV::PerSpend, nullifier: note::Nullifier, rk: redjubjub::VerificationKeyBytes, zkproof: Groth16Proof, @@ -191,7 +191,7 @@ The new V5 structure will create a new `orchard::ShieldedData` type. This new ty struct orchard::ShieldedData { flags: Flags, value_balance: Amount, - anchor: tree::Root, + shared_anchor: tree::Root, proof: Halo2Proof, /// An authorized action description. ///