This section states how a wallet turns payments into transactions. It defines the transaction plan and its balance equation; the pool in which each payment and each change output lies; transfers to TEX addresses and shielding transactions; input selection as a fixed point of the fee; change; the outgoing viewing key of every output; the assembly of Orchard-protocol bundles with dummy Actions in uniform order; and the authorisation of a built transaction, with the theorem that the result pays what the plan states. The input state is the spendable set of Definition 9.17; the fee is the conventional fee of §10.
A payment is a transfer of funds implemented by a single output of a transaction: a triple of a recipient address (Definition 3.20), a value in zatoshi and an optional memo , a memo being admitted only when is memo-capable. A payment request is a finite map from indices to payments; it asks for one transaction that pays every payment in its range (ZIP 321, “Terminology”). ZIP 321 encodes payment requests as URIs (§14.1); the label and message parameters of that encoding are display data and enter no transaction.
Construction has two phases. Planning maps a payment request and the wallet state, its spendable notes (Definition 9.17) and its tip, to a plan exact to the zatoshi, and uses no spending key. Execution builds, proves and authorises the transactions of the plan and records them (§13); submission is a separate act. Every choice of inputs, fee and change is fixed in the plan before a spending key is used. No ZIP defines plans: the two-phase structure is designed but unspecified (Definition 1.1).
A transaction plan is a non-empty sequence of steps. Each step describes one transaction by:
its spending account, the account of the wallet to which every input of the step belongs;
its payment outputs, each a payment of the request together with the pool assigned to it (§11.2);
its change outputs, each a value and a pool;
its fee , computed under the conventional fee rule (Definition 10.2).
A transparent output of a step may be marked ephemeral: it pays a fresh transparent address of the wallet and exists only to be spent by a later step (§11.3). Each step satisfies the balance equation
the sums taken over all pools, ephemeral outputs counted among the payments of their step. In the built transaction is the value remaining in the transparent transaction value pool: the sum of the transparent inputs, minus the transparent outputs, plus every shielded balancing value (Ironwood Guide, §“The balancing value”, Definitions “Transparent transaction value pool” and “Balancing value”).
Clause (ii) restricts this section to steps funded by one account; ZIP 316 also admits transfers whose sending account is undetermined, a case that enters only the choice of outgoing viewing key (§11.6).
A plan is well formed if and only if
every reference among the inputs of step has ;
every output of an earlier step that a step spends is ephemeral; no step spends a change output of an earlier step;
no output, of the wallet or of a step, is spent twice within the plan;
every ephemeral output of a step is spent by exactly one later step.
Let step of a plan spend output of an earlier step , and let be the transaction built for .
If the output is transparent, every field of the transaction of is computable once is built, before is mined.
If the output is a shielded note of non-zero value, the proof that covers its spend (its Sapling spend proof, or the proof of its Orchard-protocol bundle) is not computable before is mined.
If the output is an Orchard-protocol note and the transaction of has version , its signature digest, and hence every spend-authorisation and binding signature of it, is computable once is built; only proving waits for the mining of .
If the output is a Sapling note, the signature digest of the transaction of is not computable before is mined.
A plan whose steps are all completed before any of them is submitted therefore passes value between steps only through transparent outputs, which Definition 11.3 (ii) and the ephemeral outputs of Definition 11.2 realise.
(a) A transparent input names the outpoint and is signed over a digest that commits to the value and script of the spent coin (ZIP 244, “S.2: transparent_sig_digest”). The identifier is a function of the effecting data of (Ironwood Guide, §“Transaction digests and signatures”, Definition “Transaction identifier”), and value and script are fixed by ; none depends on the mining of .
(b) A proof for a spend of a note of non-zero value needs the note’s authentication path to the anchor (Ironwood Guide, §“Authentication paths”; condition A3 of the Action statement, which exempts only a consumed note of value ). The path is a function of the note’s position in its tree, which is fixed only when is mined (Definition 4.11).
(c) The version- signature digest commits to no anchor and to no proof (ZIP 229, “Anchor commitment (version 6)”; Ironwood Guide, §“Transaction digests and signatures”, Definition “Authorising-data digest; effecting and authorising data” and Definition “Signature digest”). The effecting data of an Orchard-protocol spend are computable before mining: its nullifier is , a function of note data and not of the position (Ironwood Guide, §“The nullifier”), and of the note is fixed by the Action of that creates it; the key and the commitment depend on keys, values and fresh randomness. ZIP 374, “Anchors and pre-authorization”, states this workflow, and ZIP 318, “Note preparation transactions”, uses it.
(d) A Sapling nullifier is computed from , where is the note’s position (protocol specification, §“Computing values and Nullifiers”), and it is effecting data, committed by the signature digest (ZIP 244, “Signature Digest”).
For the final claim: by (b) and (d), a step that spends a shielded note of non-zero value of an earlier step cannot be completed before that step’s transaction is mined, so a plan completed as a unit passes value only through transparent outputs, which (a) admits; a zero-valued Orchard-protocol note carries no value. □
The partially created form of (c) is that of §12.5. Fee and change are fixed jointly: the change outputs enter the padded counts of Definition 10.6 and hence the conventional fee, and the fee determines the change value; §11.5 resolves the dependence.
Execution is not deterministic. The note seeds , hence , and , the value-commitment trapdoors , the randomisers , the proofs and the permutations of §11.7 are drawn fresh (Ironwood Guide, §“Construction of a transaction”), so one plan executed twice yields transactions with different effecting data and different transaction identifiers. A plan fixes values and shape, not the transaction identifier.
The output of a payment is determined by :
a transparent address yields a transparent output to it;
a Sapling address yields a Sapling output;
an address with no receiver that the sender supports is refused, and so is a payment with a memo whose output is transparent.
Case (iv) is sound because both pools of the Orchard protocol share keys, addresses and receivers (Ironwood Guide, §“The Orchard protocol and its two pools”; ZIP 326, “Scanning for Ironwood-pool and Orchard-pool notes” and “Receiving funds into the Ironwood pool”).
Orchard-pool rules. Consensus admits no value into the Orchard pool: for every transaction, ; and every Orchard-pool Action has cross-address transfers disabled, so the note it creates lies at the expanded receiver of the note it consumes (ZIP 258, “Consensus rules from NU6.3 activation”; Ironwood Guide, §“Chain state and pool rules”, rules (i) and (ii), and §“Bundle flags”). A wallet MUST NOT send funds to any external receiver, its own included, in the Orchard pool (ZIP 326, “Wallet key-generation restrictions”), and MUST NOT use its knowledge of the internal addresses of all its accounts to send funds from one account to an internal address of another (ZIP 326, “Scanning for Ironwood-pool and Orchard-pool notes”). A wallet that generates keys MUST NOT send Orchard-pool funds to them at any point (ZIP 326, “Wallet key-generation restrictions”). This volume reads “external receiver” as every receiver that is not an internal-scope receiver (Construction 2.14) of an account of the wallet.
Change. A change output lies at an internal-scope address of the spending account (§11.5) in the Ironwood pool, in the Sapling pool, or, only as Proposition 11.6 allows, in the Orchard pool. The choice among these is wallet policy, designed but unspecified (Definition 1.1); a change output in a pool other than that of the inputs moves value between pools, and the moved amount is published in the balancing values.
In a transaction built by a wallet that follows Construction 11.5, every Orchard-pool output of non-zero value lies at the expanded receiver of the note consumed by its own Action, a real note or a fabricated zero-valued note, and that receiver is an internal-scope receiver of the spending account. Hence no payment output lies in the Orchard pool; non-zero change remains in the Orchard pool only at internal-scope receivers of the spending account, with total at most the value of the Orchard-pool notes spent; any other change lies in the Ironwood or the Sapling pool.
Condition A10 of the Action statement with (Ironwood Guide, §“Bundle flags” and §“Chain state and pool rules”, rule (i)) places each Orchard-pool output at the expanded receiver of the note consumed in its Action. By the first rule of ZIP 326 under the reading of Construction 11.5, an output of non-zero value lies at an internal-scope receiver of an account of the wallet, and by the second that account is the spending account. A payment output is routed by cases (i) to (iv) of Construction 11.5, none of which yields an Orchard-pool output. Let and be the totals of the consumed and created Orchard-pool notes; the balancing value of the Orchard pool is (rule (ii)), so the Orchard-pool change, a part of , is at most . Every other change output lies, by Construction 11.5, in the Ironwood or the Sapling pool. □
The following consequences are cited later rather than restated. Orchard-pool bundles are priced by Definition 10.6 with the requested count ; Orchard-pool fabricated outputs and spends are assembled in §11.7; and the canonical migration and note-preparation transactions of ZIP 318 are the exceptions to the padding floor stated in §10.2.
One Orchard-protocol spending key authorises spends in both Orchard-protocol pools. Ironwood-pool and Orchard-pool spends use the same full viewing key and the same spend authorising key , each pool’s bundle with its own note commitment tree, anchor and nullifier set (Ironwood Guide, §“Key capabilities and scope”, §“The Orchard protocol and its two pools” and §“Chain state and pool rules”); the two bundles of one transaction are built, proved and signed side by side.
Migration is specified. ZIP 2005 states that wallets SHOULD move all funds they control, transparent, Sprout and Sapling funds included, into recoverable Ironwood-pool notes as soon as practically possible, and that other wallets are REQUIRED to be able to receive them (ZIP 2005, “Proactive movement of funds to recoverable notes”). ZIP 318 specifies a scheduled migration from the Orchard pool to the Ironwood pool; its scheduling rules and privacy analysis are cited, not restated (ZIP 318, “Specification” and “Privacy Implications”). Its block-count constants are stated for a -second block spacing; their treatment under the -second spacing of ZIP 218, which NU7 deploys (ZIP 259, “NU7 consensus changes”), is an open problem (Definition 1.1). The privacy of the choice of source pool is stated in §11.4.
A sender paying one or more TEX addresses from shielded funds MUST create two transactions (ZIP 320, “Design considerations for Senders”), realised as two steps of one plan.
The first transaction spends shielded notes only and pays, in place of the TEX payments of values , one ephemeral transparent output of value
to a fresh ephemeral transparent address of the wallet.
The second transaction spends exactly that output and pays the TEX payments as P2PKH outputs (Crypto Guide, §“The transparent layer’s hashes”), with no memo and no change, so that its input equals its outputs plus its fee.
Here is the conventional fee of one P2PKH input priced at bytes (Proposition 10.5 (i), the ephemeral key being a compressed key of the wallet) and P2PKH outputs of bytes each:
which is zatoshi for and and zatoshi for . A single transaction that pays a TEX address and spends shielded inputs is refused: a sender to a TEX address MUST spend only transparent (P2SH or P2PKH) UTXOs in that transaction, and SHOULD pay only transparent outputs in it (ZIP 320, “Specification”). ZIP 320 does not require that those UTXOs come from a single transparent address.
The plan of Construction 11.7 is well formed (Definition 11.3): its one reference points from to the ephemeral output of , which is spent exactly once. By Proposition 11.4 (a) both transactions are completed before either is mined, and ZIP 315 exempts the ephemeral UTXO from the confirmation floor (§9.1).
Ephemeral addresses are specified. A wallet based on ZIP 32 SHOULD choose ephemeral addresses so that their private keys are recoverable from the seed, SHOULD NOT choose them so that they can be linked between transactions without the seed or the relevant transparent viewing keys, and so SHOULD avoid collisions with the addresses of earlier outputs, change outputs included; a wallet MUST recognise, and be able to spend, funds that a recipient returns to an ephemeral address (ZIP 320, “Design considerations for Senders”). An ephemeral address reserved for a construction that fails is not reused, since reuse would link the two transactions; this rule is designed but unspecified (Definition 1.1).
A shielding transaction is the transaction of a one-step plan with an empty payment request. It spends transparent UTXOs of the spending account and pays their total, less the conventional fee, to change outputs at an internal-scope shielded receiver of that account (Construction 2.14), with no other recipient and no transparent output. Its outputs lie in the Ironwood pool, since no value enters the Orchard pool (Construction 11.5) and ZIP 2005 asks for recoverable Ironwood-pool notes (ZIP 2005, “Proactive movement of funds to recoverable notes”); its balancing value in that pool is negative. Its UTXOs may be spent with zero confirmations (§9.1). The value threshold at which a wallet shields is wallet policy, designed but unspecified (Definition 1.1).
Shielding rules are specified. A wallet that receives transparent funds SHOULD auto-shield them by default; it SHOULD NOT auto-shield from several transparent addresses in one transaction, and SHOULD NOT use opportunistic shielding, the shielding of received transparent funds within a user-initiated transaction, which would show its recipients the link between the transparent addresses and the payment (ZIP 315, “Long-term storage of funds”). Users MUST be able to disable auto-shielding (ZIP 315, “Auto-shielding”). Spent transparent UTXOs SHOULD be sent only to an internal shielded receiver of the wallet, except the ephemeral outputs of a ZIP 320 transfer (ZIP 315, “Linkability of transactions or addresses”).
Transparent inputs are public, so a transaction that spends UTXOs of different transparent receivers links those receivers. ZIP 315 states that UTXOs received on different transparent receivers SHOULD NOT be shielded in one transaction, and that shielding several UTXOs of one address together leaks nothing further (ZIP 315, “Linkability of transactions or addresses”). The same holds for ephemeral addresses, so a transaction spends the ephemeral output of at most one ZIP 320 transfer.
Fix a step with payments of total , target height , anchor height and a number of change outputs (§11.5 fixes ). Let be the finite set of inputs of the spending account that Definition 11.2 (iii) admits at , each with value , and let be the family of admissible selections, those that meet the pool rules stated at the end of this subsection. For let be the public counts of Definition 10.1 of the step funded by , with its payments and change outputs, after padding (Definition 10.6), and let (Definition 10.2). A selection is covering if and only if
Adding an input never lowers a count of Definition 10.1, so is non-decreasing under inclusion, and a covering selection is a fixed point of the fee: its total must cover a fee that depends on it. A plan requires a covering selection for each step; any procedure that returns one conforms. The following construction is one such procedure.
Set and . At round :
compute the balance of the step on (§11.5 gives its exact form);
if is covering, return ;
otherwise let be the shortfall, and choose with total ; if no such exists, fail with insufficient funds.
The choice of among the admissible sets that step (3) allows is the wallet’s.
Fee escalation terminates after finitely many rounds. On success the returned selection is covering, and the fee of the step is the conventional fee of its final padded shape. On failure at round , no admissible selection has total at least . No bound on the number of rounds is claimed beyond this finiteness.
A round that does not stop has , so the totals increase strictly. Every lies in the finite set , which admits no infinite strictly increasing sequence. On success the returned is covering by step (2), and its fee is , the conventional fee of by Definition 11.9. On failure, step (3) found no admissible set of total at least . □
A failure does not show that no covering selection exists: an admissible set with and total in covers. Fee escalation is therefore sound, returning only covering selections, and complete only for choice rules that exclude this case.
Let be the number of logical actions of a step (Definition 10.1) and that after adding one input.
A P2PKH input priced at bytes gives .
A shielded spend added to a non-empty bundle with real spends and real outputs, , gives , and leaves the bundle’s padded count unchanged if and only if in an Orchard-protocol bundle with cross-address transfers enabled, in an Orchard-pool bundle, and in a Sapling bundle.
A shielded spend that opens an empty bundle gives , the padded count going from to for every kind of bundle.
The fee rises by , and not at all while .
Hence an uneconomic input of positive value adds positive net value to the step if and only if : when padding absorbs its spend, or while the step stays within the grace window.
(i) For every , ; the transparent contribution is the maximum of this term and the unchanged output term, so it rises by or .
(ii) and (iii). By Definition 10.6 the contribution of a non-empty bundle is with cross-address transfers enabled, in an Orchard-pool bundle, and for Sapling, whose outputs are padded to ; an empty bundle contributes . Each non-empty form is with and a count that rises by exactly one, so it rises by or , and by if and only if : that is in the first and third forms, and , which with is , in the second. A single spend in an empty bundle gives with cross-address transfers enabled, in the Orchard pool and for Sapling. No other contribution changes.
(iv) From Definition 10.2, since is non-decreasing and rises by at most the rise of . For the final claim: if the fee is unchanged and the input adds ; otherwise the fee rises by at least .
The instances are, with cross-address transfers enabled and for Sapling, , , and ; in an Orchard-pool bundle , , and ; and for the empty bundle of every kind. □
ZIP 315 states that automatic shielding and automatic or opportunistic migration SHOULD NOT be applied to inputs whose cost of shielding or migrating exceeds their economic value (ZIP 315, “Auto-shielding”); under the conventional fee, Lemma 11.13 decides which inputs these are.
The choice of source pool is constrained by privacy. Value that crosses pools is published in the balancing values (Ironwood Guide, §“The balancing value”, Remark “Disclosure by the balancing value”), so selecting inputs in the pool of the payment outputs keeps the amount private, and ZIP 315 states the aim of minimising pool crossing (ZIP 315, “Linkability of transactions or addresses”). Wallets MUST NOT automatically combine funds across pools to satisfy a transfer, since that could reveal the total the user holds in a pool (ZIP 315, “Information leakage for transfers between pools”). One policy serving these rules is designed but unspecified (Definition 1.1): order the shielded pools with the pool of the outputs first, then the other Orchard-protocol pool, then Sapling, or, for Sapling outputs, Sapling, then Ironwood, then Orchard; remove the pools that the user’s policy forbids; and spend from the first pool whose notes alone cover the payment.
Transparent sources and recipients are specified. A wallet MUST NOT send funds to a transparent address unless all of the source funds come from shielded pools, and this SHOULD be a single shielded pool (ZIP 315, “Linkability of transactions or addresses”); the ZIP 320 transfer of Construction 11.7 meets this rule, its first transaction spending only shielded notes. A wallet SHOULD NOT spend funds from a transparent address in a transaction with an external recipient unless the user gives explicit consent for that transaction, and MAY restrict transfers further (ZIP 315, “Allowed transfers”). The admissible family of Definition 11.9 consists of the selections that meet the rules of this and the preceding paragraph, those of §11.3, and the wallet’s policy.
Change is the excess of a step’s inputs over its payments and fee, returned to the wallet in outputs whose pool follows Construction 11.5. Let be the total of the inputs, over all pools and ephemeral inputs included, the total of the payment outputs, and the conventional fee of the padded shape with change outputs, which is non-decreasing in .
If , fail with shortfall , the requirement fed back to selection (Construction 11.10).
If , the step has no shielded input or output and no change memo is requested, set and fee .
Otherwise let be the least number of change outputs, , or a larger number chosen by the wallet to split change across notes, a choice designed but unspecified (Definition 1.1), subject to . The change is , divided among the outputs, each carrying the change memo if one is requested. If , no qualifies: the step fails with requirement , or, if , may instead set and fold the positive remainder into the fee; the plan records which.
Balance invariant. Before building, the transparent, Sapling, Orchard and Ironwood balances of the step, each the value of the step’s inputs in that pool minus the value of its outputs in that pool, sum to the planned fee. A sum above the fee means that change was omitted; a sum below it, insufficient funds.
Change goes to an internal-scope address of the spending account (ZIP 32, “Orchard internal key derivation”; Construction 2.14; ZIP 316, “Deriving Internal Keys”), its diversifier index a wallet policy; non-zero change remains in the Orchard pool only at an internal-scope receiver of the spending account, the receiver of the note consumed in its Action (Proposition 11.6). A zero-valued fabricated output at the receiver of a spent note is not change.
The balance invariant is the balance equation of Definition 11.2 with every term moved to one side, summed pool by pool.
Let a step have a shielded input or output, and let Construction 11.14 complete it with change outputs, of total when .
The public counts of the step are the same function of its inputs, payments and whether the change is or positive.
If change were instead omitted at exact balance, the counts at exact balance would differ from those with change exactly when one more output of the change pool raises that pool’s padded count or opens a bundle (Definition 10.6). An observer who knows the payment outputs, such as a party that receives every payment, and sees the counts would then infer that the inputs sum exactly to the payments plus the fee.
In the Ironwood pool, bundles with equal public leakage that differ only in whether the change is or positive are computationally indistinguishable.
The zero-valued output also carries a requested change memo. Where padding already absorbs the change output, as in the two-Action Orchard-pool bundle of ZIP 318, the omission of (ii) reveals nothing (ZIP 318, “Canonical migration transaction structure”).
(i) and (ii) follow from Construction 11.14 and Definition 10.6: the counts depend on , which is at least whatever the value of , and omission replaces by at exact balance only. (iii) is Ironwood Guide, §“Privacy”, Theorem “Privacy of an Action”, under its preconditions (P1) to (P4) and its assumptions: Actions whose private inputs have equal public leakage are indistinguishable, and a created note’s value is a private input, not public leakage. No claim is made for Sapling outputs beyond (i). □
A zero-valued note needs no witness. Condition A3 of the Action statement, , checks the authentication path only of a consumed note of non-zero value (Ironwood Guide, §“The Action statement”), so a zero-valued change note can later be spent without tracking its path.
Only a step with no shielded input or output and no change memo omits change at exact balance. The second transaction of Construction 11.7 is the instance, and a change memo is not carried there. A change note of value is an uneconomic input when it is later spent (Definition 11.12), and adds positive net value only where Lemma 11.13 gives no rise of the fee. The wallet’s policy for such change is designed but unspecified (Definition 1.1), constrained by the following proposition.
The fee of a transaction is public, the value remaining in its transparent transaction value pool, and its conventional fee is a function of public fields (Definitions 10.1 and 10.2), so every observer computes both. A transaction whose fee differs from the conventional fee of its shape is distinguished from every transaction of that shape that pays the conventional fee. Folding a remainder into the fee (Construction 11.14, case (3)) produces exactly such a fee whenever the remainder is positive. The folding threshold is the wallet’s policy, designed but unspecified (Definition 1.1).
The fee is the sum of the transparent input values and the balancing values, minus the transparent output values, each a public field (Ironwood Guide, §“The balancing value”); the transparent sizes and the shielded counts of Definition 10.1 are public fields. The predicate “the fee differs from the conventional fee of the shape” is therefore a function of the public data; it holds for a transaction with a folded remainder , whose fee exceeds , and fails for every transaction of the same shape that pays the conventional fee. ZIP 317 states that non-standard fees may reveal specific users or wallets (ZIP 317, “Security and Privacy considerations”). □
For a transfer, the sender determines:
the sending account: the account that the transfer names, if it names one; otherwise, if every fund used comes from addresses of one account, that account, a rule that ZIP 316 makes a SHOULD; otherwise the sending account is undetermined;
the preferred sending protocol, the most preferred receiver type (the Priority List of §3.3) among the funds used: Orchard if any Orchard-protocol note, of either pool, is spent, else Sapling, else transparent.
The outgoing viewing key of an output is, with the sending account determined, that account’s external or internal of the preferred protocol at the account level, external for a payment and internal for a wallet-internal output such as change or a shielding output (SHOULD); with the sending account undetermined, the external or internal of the full viewing key of one address of the preferred protocol from which funds are sent, for example the first (SHOULD) (ZIP 316, “Usage of Outgoing Viewing Keys”). The Orchard external is that of the Ironwood Guide, Construction “Diversifier key and outgoing viewing key” in §“Viewing keys”, and the internal one that of Construction 2.14; the transparent pair is that of Construction 2.18, the two halves of ; the Sapling keys are those of ZIP 32, “Sapling internal key derivation”. The choice governs the outgoing ciphertext of every payment and change output. Its construction, which also admits with a uniformly random , is cited (Ironwood Guide, §“The outgoing ciphertext”, Construction “Outgoing ciphertext”; protocol specification, §“Sending Notes (Sapling)” and §“Sending Notes (Orchard)”).
For change the rule gives the internal . The specification also permits no : with the sender draws and the outgoing plaintext uniformly, no viewing key recovers the outgoing plaintext of the change, and the wallet finds its change by trial decryption under the internal (Ironwood Guide, §“Trial decryption and note acceptance”; protocol specification, §“Sending Notes (Orchard)”). Encrypting change with no departs from the SHOULD of ZIP 316.
The holder of an account’s external therefore recovers the recipient, value and memo of the account’s Ironwood-pool payment outputs (Ironwood Guide, §“The outgoing ciphertext”, Construction “Recovery with ”), and those of its change only with the internal .
Fix an Orchard-protocol bundle with real spends and real outputs, and let be its padded Action count (Definition 10.6), or for the Ironwood-pool bundle of a canonical migration transaction, or for the Orchard-pool bundle of a note-preparation transaction (§10.2). The wallet sets , the flags that ZIP 315 notes depend under normal circumstances only on whether a transaction is a coinbase transaction (ZIP 315, “Kinds of information leakage”).
Cross-address transfers enabled, an Ironwood-pool bundle with , the normal case of ZIP 229 (ZIP 229, “enableCrossAddress polarity”), which the wallet uses for every Ironwood-pool bundle. Pad the list of real spends with dummy consumed notes and the list of real outputs with dummy created notes (Ironwood Guide, §“Actions, bundles, and dummy notes”, Definition “Dummy notes”), each at an independent fresh random address; draw independent uniform permutations and of ; place spend in Action and output in Action .
Orchard pool, cross-address transfers disabled (Construction 11.5). Form
for each real spend, one Action whose output is a fabricated zero-valued note at the spent note’s address, with its filled with random bytes (MUST), since a real encryption would let a holder of that receiver’s link the spend’s nullifier to the address (ZIP 326, “Fabricated same-address outputs and randomized note ciphertexts”);
for each real output, one Action whose spend is a fabricated zero-valued note at that output’s address, a real spend signed with the account’s for that receiver, carrying no dummy spending key (ZIP 374, “Fabricated same-address outputs (NU6.3)”);
fully dummy Actions, whose dummy spend and dummy output share one common fresh random address, the only Actions that carry a dummy spending key;
then draw a uniform permutation of and place the -th Action so formed at position .
The second Action of the canonical Orchard-pool bundle of ZIP 318 is of kind (B)(iii) when that bundle carries no change, and of kind (B)(ii) when it does (ZIP 318, “Canonical migration transaction structure”). A dummy output at an address independent of its Action’s consumed note exists only in bundles with cross-address transfers enabled; in kind (B)(iii) the dummy output shares the fresh random address of its dummy spend. A dummy spend coexists with any anchor, since condition A3 of the Action statement checks no path for a zero-valued consumed note. Per Action, , and the created note’s are drawn fresh, and of the created note is the Action’s (Ironwood Guide, §“Construction of a transaction”). A Sapling bundle samples and per spend and per output, pads its outputs as in Definition 10.6, and its binding signing key is the sum of the spends’ minus the sum of the outputs’ (protocol specification, §“Balance and Binding Signature (Sapling)”). The builder keeps the permutations, which are not part of the transaction, so that later roles (§12) attach per-output data to the right Action.
In a bundle with cross-address transfers enabled built by Construction 11.18, the position of each spend and the pairing of spends with outputs are uniform and independent of the order of the plan: the map from spend index to Action position is a uniform permutation, and the spend-to-output pairing is a uniform permutation independent of it. In an Orchard-pool bundle the order of the Actions is a uniform permutation independent of the order of the plan. Positions therefore carry no information about the plan beyond the Action count; for an Ironwood-pool bundle, the public data of the Actions reveal no more than their public leakage.
With and independent uniform permutations of applied to the padded spend and output lists, Action pairs spend with output , so spend is paired with output for . The map is a bijection of pairs of permutations, since ; it maps the uniform distribution to the uniform distribution, so is uniform and independent of . The plan’s order enters only as the indexing of the lists, which both permutations randomise. The Orchard-pool case is the single uniform permutation . The last clause is Ironwood Guide, §“Privacy”, Theorem “Privacy of an Action”, under its preconditions (P1) to (P4) and its assumptions, applied to the bundle as a whole. No indistinguishability is claimed between the kinds (B)(i), (B)(ii) and (B)(iii) of Orchard-pool Actions, whose bundles that theorem does not cover. □
The transaction carries the consensus branch identifier in force at its target height (Ironwood Guide, §“The transaction format”). Transaction versions and are valid and version is not (ZIP 2003, “Specification”; ZIP 259, “Abstract”); a transaction with an Ironwood-pool component is of version . The lock time is specified: the field is public and may distinguish a transaction if used, and SHOULD be zero (ZIP 315, “Kinds of information leakage”); the wallet sets it to , and ZIP 318 lists among the SHOULDs of its canonical migration transaction structure (ZIP 318, “Canonical migration transaction structure”). The reason is the one proved for the fee in Proposition 11.16: a public field set otherwise than by every other wallet distinguishes the transaction. The expiry height is that of §9.3.
Let a transaction be built from one step by Construction 11.18, every field of its effecting data fixed.
Compute its signature digest over the effecting data (ZIP 244, “Signature Digest”, as amended by ZIP 229, “Anchor commitment (version 6)”, which omits the anchors from the version- digest; Ironwood Guide, §“Transaction digests and signatures”). Every spend-authorisation signature and every binding signature signs .
For each Orchard-protocol Action of either pool, with the Action’s randomiser , set and (Ironwood Guide, §“Randomised validating keys”). Every Action carries one: a fully dummy Action’s spend is signed with its own random key, and a fabricated zero-valued spend beside a real Orchard-pool output with the account’s , not with a dummy key. Each Sapling spend likewise signs under its randomised key (protocol specification, §“Spend Authorization Signature (Sapling and Orchard)”).
For each bundle, set over its Actions, check it against , and sign under (Ironwood Guide, §“The binding signature”); the Sapling is that of Construction 11.18.
Sign each transparent input under the key of its address, by the scheme of the Crypto Guide, §“The transparent layer’s schemes: ECDSA and BIP-340 over secp256k1”, over the signature digest of that input (ZIP 244, “S.2: transparent_sig_digest”).
Keys. One Orchard-protocol serves both scopes and both pools (Construction 2.14; ZIP 32, “Orchard internal key derivation”). One Sapling serves both scopes, the internal scope differing in , which enters the proof and the nullifier, not the signature (ZIP 32, “Deriving a Sapling internal spending key”), so a Sapling spend is added under the scope of its note. Each transparent input needs the key of its own address.
The signature digests of version- and version- transactions commit to the effecting data and, for transparent inputs, to the values and scripts of the coins spent (ZIP 244, “S.2: transparent_sig_digest”), excluding proofs and signatures, and the version- digest also excludes the anchors. Hence steps (2) to (4) of Construction 11.20 need no proof; proofs and signatures can be computed in either order; in version , signing can precede the choice of anchor; and the transaction identifier is unchanged by proofs, by signatures and, in version , by anchors.
By the Ironwood Guide, §“Transaction digests and signatures”, Definition “Signature digest”, has the header and shielded children of and the transparent signature digest as its children, all computed over effecting data and, for the transparent signature digest, the values and scripts of the coins spent; proofs, signatures and transparent scripts are authorising data, under the authorising-data digest (Definition “Authorising-data digest; effecting and authorising data”). ZIP 229, “Anchor commitment (version 6)”, moves the anchors to the authorising data in version ; in version they are effecting data (ZIP 244, “Signature Digest”). A step of Construction 11.20 computes a signature over from keys and randomisers, and the binding key from the values, none of which is a proof, so the order of proving and signing is free. The transaction identifier is a function of the effecting data alone (Definition “Transaction identifier”). The multi-party form of the lemma is that of §12.9. □
Let a well-formed plan (Definition 11.3) be executed by Construction 11.18 and Construction 11.20, with Orchard-protocol keys generated with . In each resulting transaction:
each payment is paid by exactly one output, in the pool that Construction 11.5 assigns, to the routed receiver, of the payment’s value and with its memo, none for a transparent output;
every other output is a change output of Construction 11.14, an ephemeral output of the step, or a zero-valued dummy or fabricated output;
the fee equals the planned fee: the conventional fee of the final shape, or, where Construction 11.14 folds a remainder into it, that fee plus the remainder.
Moreover, for a version- transaction whose signing keys meet hypotheses (H) and (S) of Ironwood Guide, §“Transaction digests and signatures”, Proposition “Bundle binding”, and under the assumptions of that proposition and of its Theorem “Spend authority” (§“Authorisation of spends”), no other party produces, except with negligible probability, an accepted transaction that carries any of the transaction’s Orchard-protocol randomised validating keys with different effecting data. The theorem claims content, not inclusion: inclusion further requires that no spent nullifier be revealed first, that the anchor block remain on the best chain and that inclusion occur by the expiry height, none of which the wallet controls (§13).
(i) and (ii). By Definition 11.2 each payment is one output of its step, placed by Construction 11.5, and the only other outputs of a step are its change and ephemeral outputs. Construction 11.18 adds only notes of value : dummy created notes, fabricated outputs and the outputs of fully dummy Actions. The padding therefore creates no output of non-zero value, and each real output keeps the receiver, value and memo that the plan gives it.
(iii) In the built transaction the fee is the value remaining in the transparent transaction value pool, the transparent inputs minus the transparent outputs plus the balancing value of each shielded pool, and each balancing value is the value consumed minus the value created in its pool. Since dummy and fabricated notes have value , the remaining value is the total of the step’s inputs minus the total of its payment, ephemeral and change outputs, which is the planned fee by the balance equation of Definition 11.2 and the balance invariant of Construction 11.14; the planned fee is , or plus the folded remainder.
Binding. Every signature of the transaction signs (Construction 11.20), which covers the effecting data (Lemma 11.21). By Ironwood Guide, §“Transaction digests and signatures”, Proposition “Bundle binding”, an accepted transaction that carries some of the transaction carries the same effecting data, except with negligible probability; Theorem “Spend authority” excludes a valid signature under a key of the wallet on a digest that the wallet did not sign. For transparent and Sapling signatures the commitment to the effecting data is that of ZIP 244; no lower volume proves the unforgeability of those schemes, and none is claimed here. □
The wallet records each of its shielded outputs from the data it built the output with: the address, the value, and the memo, and, for an Orchard-protocol output, , the nullifier of the spend of its Action. For such an output,
and the note plaintext follow without any viewing key (Ironwood Guide, §“Encryption to the recipient”, and §“The outgoing ciphertext”, Construction “Recovery with ”). A fabricated zero-valued Orchard-pool output at a spent note’s receiver carries a random , which trial decryption under any rejects except with negligible probability (Ironwood Guide, §“Encryption to the recipient”, Assumption “Confidentiality and integrity of ChaCha20-Poly1305”; ZIP 326, “Fabricated same-address outputs and randomized note ciphertexts”). Non-zero Orchard-pool change lies only at internal-scope receivers (Proposition 11.6), so scanning finds it under the internal (Definition 6.4), and no external is needed for it (ZIP 326, “Wallet key-generation restrictions”).