This section states the protocol by which the construction, proving and authorisation of one transaction are divided among several parties (ZIP 374). It defines the partially created transaction, its versions and the kinds of its fields; the roles that act on it and the modification state they maintain; its fields, its canonical empty bundles and its encoding; the version- rules for deferred anchors and the Ironwood bundle; construction and IO finalisation; signing, with the theorem that a Signer’s signatures authorise exactly what it checked; proving; combining and redaction, with the order independence of proving and signing and the data a PCZT discloses; and spend finalisation and extraction.
A partially created transaction (PCZT) of one transaction is a value of the typed record of §12.3 for one PCZT version, exchanged among the parties to the creation of that transaction. It carries the data each role needs for its step (adding inputs and outputs, proving, signing, extracting) and accumulates proofs and signatures until the transaction is complete; since it carries all data a signer needs, a signer can be offline. A PCZT consists of a Global record and one bundle per protocol: transparent, Sapling, Orchard and, from version , Ironwood. Every bundle is present in every PCZT, empty bundles included, because metadata of a protocol may have to be held before it is known whether that protocol has inputs or outputs (ZIP 374, “Abstract”, “Specification” and “Structure”).
The PCZT protocol is specified (Definition 1.1) in ZIP 374, Revision , whose status is that of Table 1; no consensus rule depends on it. It covers transactions of versions and only: it supports neither Sprout nor version or earlier, since version predates the ZIP 244 digest and several of the role separations of this section, the independence of proving from signing in particular, fail for it (ZIP 374, “Specification”). The protocol serves signing devices that hold spending keys but can neither compute proofs nor hold a whole transaction; proof delegation, the prover needing note data and the full viewing key but no spending key; transactions with several signers (threshold signing, the transparent multisignature wallets of ZIP 48) or several contributors of inputs, whose parallel contributions are merged; and, for version , pre-authorisation, in which the signatures precede the choice of anchors, the witnesses and the proofs (ZIP 374, “Motivation”).
ZIP 374, “Requirements”, states six requirements, recorded here as the ZIP’s and not proved as such:
every intermediate state of the creation of a version- or version- transaction is representable, and adding inputs and outputs, finalising the input and output set, attaching lookup data, proving, signing, merging parallel contributions and extracting are each performable by distinct entities, in an order constrained only by data dependencies;
no spending key material is required, the keys of dummy spends excepted, which authorise nothing of value and are removable before any Signer sees the PCZT;
a Signer determines from the PCZT alone what it authorises (amounts, recipients, and the correspondence between the fields it signs and the values shown to its user), and data a Signer does not need is removable;
merging two PCZTs of the same transaction is deterministic and fails on any conflict;
for version , signatures can be produced while anchors, witnesses and proofs are absent, and supplying them later leaves the signatures valid;
the encoding is compact and strictly versioned, so that no data is read under another version’s rules.
Requirement (R3) is made a theorem in §12.7, (R5) a proposition in §12.5 and (R4) a construction in §12.9.
Version represents transactions of version (ZIP 225); version represents transactions of versions and (ZIP 229). The PCZT version does not fix the transaction version: a version- PCZT carries a transaction of version or , subject to the per-field rules, and a version- PCZT only one of version . Relative to version , version adds the Ironwood bundle; a note version in per Orchard-protocol bundle; anchors that may be absent; and an encoding that writes a bundle equal to its slot’s canonical empty bundle as absent (ZIP 374, “Versioning”). The fields are made exact in §12.3 and the encoding in §12.4.
No field can be added within a version: the encoding is positional, and a parser cannot skip a field it does not know. A PCZT has no non-proprietary key–value maps, so every field of a version is known in advance and a Signer’s view of a PCZT is complete; the proprietary maps are the only extension point within a version, and MUST be used for internal processes only. The format evolves by new versions, which the four-byte version of the header distinguishes. Implementations SHOULD parse every specified version and SHOULD emit the oldest version able to represent a PCZT’s state when interoperating with entities that may lack the newest; conversion between versions is lossless exactly when the target version represents the state (ZIP 374, “Extensibility” and “Proprietary Use fields”). The states that version cannot represent are listed in §12.4.
Every field of a PCZT is of one of three kinds (ZIP 374, “Structure”):
effecting data, required fields that are part of the final transaction and are always present, committed to by the signature digest (Ironwood Guide, §“Transaction digests and signatures”);
authorising data, initially absent and filled as roles act: proofs, signatures, binding signing keys and, in a transaction of version , the anchors;
context data, which enables roles to act and never enters the final transaction: note openings, keys, witnesses, derivation records and address strings.
In a transaction of version the anchors are effecting data (ZIP 374, “Anchors and pre-authorization”).
The signature digest commits to every non-transparent effecting field as soon as any input is signed, so no shielded analogue of the transparent hash types that leave inputs or outputs open exists. The transparent and the shielded modifiable flags of §12.2 are therefore kept apart, so that a purely transparent PCZT behaves as a partially signed Bitcoin transaction of BIP 174 and BIP 370 does (ZIP 374, “Separate Shielded Modifiable Flag from Transparent Modifiable Flags”).
A role is a partial map from PCZTs to PCZTs, undefined where the role fails; a role that draws randomness is a family of such maps indexed by its random coins, and the Combiner maps a finite set of PCZTs to one. The roles, with the parties that may execute them (ZIP 374, “Specification” and “Roles”), are:
Creator (a single entity): chooses the transaction version and consensus branch identifier, and sets the Global fields and the empty bundles;
Constructor: adds transparent inputs and outputs, Sapling spends and outputs, and Orchard-protocol Actions;
IO Finalizer (anyone): declares the input and output set final, computes the binding signing keys and signs dummy spends;
Updater (anyone): adds data later roles need, such as derivation records, full viewing keys, witnesses and, for version , anchors;
Redactor (anyone): removes data later roles do not need;
Prover (a holder of the note data): adds proofs;
Signer (a holder of a spending key): adds signatures;
Combiner (anyone): merges PCZTs;
Spend Finalizer (anyone): assembles transparent unlocking scripts;
Transaction Extractor (anyone): checks completeness and produces the transaction.
The lifecycle runs the Creator, the Constructors, the IO Finalizer and the Updaters, then the Provers and the Signers, the Combiners and the Redactors, and last the Spend Finalizer and the Transaction Extractor. A Verifier is not a role: it is an inspection of a PCZT’s internal consistency, for example the relations of §12.7, performed on behalf of an entity, such as a hardware signer, that trusts it and cannot perform the checks itself (ZIP 374, “Verifier”).
The Global field , bits numbered from the least significant, has the following bits (ZIP 374, “Global” and “Combiner”):
bit , transparent inputs modifiable, and bit , transparent outputs modifiable: each set by the Creator, checked, and possibly cleared, by a Constructor before it adds an input or output of its kind, cleared by the IO Finalizer when shielded spends or outputs exist, and merged by AND;
bit , a signature with hash type is present: cleared by the Creator, set by a Signer that adds such a signature, read by a Constructor, which then preserves the pairing of each such input with its output, and merged by OR;
bits to : zero, which ZIP 374 requires in version and the Combiner requires of every PCZT it merges;
bit , shielded modifiable: set by the Creator, checked, and possibly cleared, by a Constructor before it adds a shielded spend or output, cleared by the IO Finalizer when shielded spends or outputs exist and by every Signer, and merged by AND.
The Creator’s value is therefore in binary.
Signing freezes the effects. After adding a shielded signature a Signer clears bits , and : every shielded signature, spend-authorisation and binding alike, is on the one signature digest, which commits to all effecting data (Ironwood Guide, §“Transaction digests and signatures”, Proposition “Bundle binding”), and no shielded hash type leaves an input or output open. After adding a transparent signature it clears bit unless the hash type has , clears bit unless its base type is , sets bit if its base type is , with or without , and clears bit (ZIP 374, “Global” and “Signer”).
A wallet executing a plan (Definition 11.2) acts as Creator, Constructor, IO Finalizer and Updater. It builds the bundles by Construction 11.18 and then, as Updater, attaches to each non-dummy Orchard-pool, Ironwood-pool and Sapling spend the derivation record of §12.3, with the seed fingerprint of Construction 2.2 and the path of Definition 2.7; to each transparent input the BIP 44 path , the last two components non-hardened; and to each output that pays a payment of the plan (Definition 11.1) that payment’s address string as , which a Signer checks (§12.7) (ZIP 374, “Updater” and “Zip32Derivation”; ZIP 32; BIP 44).
Types. The types , and are the unsigned integers of that width, the signed integers of bits and ; is the set of byte strings of length , the sequences of elements of , and the pairs; is together with an absent value ; is the finite sequences over , the finite maps from to , and the UTF-8 strings; is a set of tags, with index . A derivation record is a value of , a seed fingerprint (Construction 2.2) and a derivation path, an index with bit set being hardened. Let , the type of a proprietary map. Each record below lists its fields in order, the order of the encoding (§12.4); a field marked (v1) or (v2) is present only in that version (ZIP 374, “Structure” and the sections of each record).
, which is in version and or in version ; , consistent with it (ZIP 225, ZIP 229); , which for names an upgrade at which version is supported, NU6.3 or later, that of NU7 being 0x77190AD9 (ZIP 259, “NU7 network constants”); , absence meaning ; (ZIP 203); , the SLIP 44 coin type, which is not part of the transaction and against which roles check network-specific data; (Definition 12.5); .
and . An input : ; ; , absence meaning ; , at least ; , in ; ; ; ; ; ; ; ; four preimage maps, for RIPEMD160, SHA256, HASH160 and HASH256, of types , , and in that order; . An output : ; ; ; ; ; .
; ; , the net value of the spends minus the outputs; (v1) or (v2); . A spend : effecting ; ; ; ; ; and , at most one set, by whether the note predates ZIP 212; ; the proof generation key ; ; ; a derivation record in ; ; . An output : effecting and the ciphertexts , whose lengths depend on the transaction version; ; ; ; ; a derivation record in ; ; . The Sapling constructions are those of the protocol specification and are cited, not restated.
; , with bit , bit , bit (v2; zero in version and in the Orchard bundle of every transaction mined under NU6.3 or later, the rule of Construction 11.5), and bits to zero; ; (v1) or (v2); (v2), where is the note plaintext of ZIP 212, lead byte 0x02, and that of ZIP 2005, lead byte 0x03, which MUST be in the Orchard bundle and is implicitly in version ; , one proof for the bundle; . An Action : ; a spend ; an output ; , one per Action, since an Action has one net value commitment (Ironwood Guide, §“Value commitments”). A spend : effecting ; ; , a raw Orchard address; ; ; , the encoding of ; , a position and a -level authentication path; ; a derivation record in ; ; . In a transaction of version the witness may be absent until proving (§12.5). An output : effecting and ; ; ; ; a derivation record in ; ; .
(v2). The fields of the Orchard bundle, with and its anchor a root of the Ironwood note commitment tree (§12.5).
Which role sets, requires or clears each field is as ZIP 374 states per field; this section restates it where it defines a role.
Every transparent input’s and are required, not optional, because the signature digest commits to the value and script of every coin a transaction spends (ZIP 244, as amended by ZIP 229; Ironwood Guide, §“Transaction digests and signatures”), and the binding signatures are on that digest (ZIP 374, “TransparentInput”).
The pair denotes the net value of the bundle’s spends minus its outputs, but ZIP 374 does not state the meaning of : a gap in the specification. The reference implementation of ZIP 374 reads as the net value and as , and the canonical empty bundle has . This volume adopts that reading, and writes for the integer that a bundle’s denotes; for Sapling it is the value itself.
A Signer MUST parse the of each output that carries one and confirm that it contains the output’s recipient, directly or as a receiver of a unified address (ZIP 374, “TransparentOutput”, “SaplingOutput” and “OrchardOutput”; Definition 3.7 and Construction 3.10). The anchors, witnesses and commitments that these fields carry are those of the Ironwood Guide, §“The note commitment tree”, with its subsections “Anchors” and “Authentication paths”; they are cited, not rebuilt.
The canonical empty bundle of each slot is (ZIP 374, “v2 Encoding”):
transparent: empty input and output lists;
Sapling: empty spend and output lists, , , ;
Orchard: no Actions, in binary (spends and outputs enabled), , , , ;
Ironwood: no Actions, in binary (spends, outputs and cross-address transfers enabled), , , , .
A bundle that differs from it in any field, its flags, note version or anchor included, is not canonical empty.
The encoding of a PCZT of version is
the first four bytes being the ASCII string PCZT. A string that does not begin with this -byte header is not a PCZT encoding, and a parser that meets an unknown version MUST NOT parse the remainder (ZIP 374, “Encoding”). The body is built from the following encodings of the types of Definition 12.6 (ZIP 374, “Data type encodings”):
: one raw byte;
and : , the digits of in base , least significant first, one per byte, with bit set on every byte but the last. Encoders MUST emit the shortest form. A -bit integer takes at most bytes, for and for , and in an encoding of that length the last byte contributes only the high bits, so the fifth byte of a is at most 0x0f; decoders MUST reject encodings that exceed either bound and MAY accept non-minimal encodings within them;
: , with for and for ;
: the byte 0x00 for or 0x01 for , other bytes rejected;
, and pairs: the concatenation of the elements, with no length prefix, so that a witness path is raw bytes;
: the byte 0x00 for , and 0x01 followed by the value otherwise, other tag bytes rejected;
and : the varint of the number of elements, of bytes for a string, followed by the elements; invalid UTF-8 is rejected;
: the varint of the number of entries, followed by each key and its value. Encoders MUST emit the entries in strictly ascending lexicographic byte order of the unencoded keys, without duplicates; decoders MAY accept other orders and duplicates;
: the varint of the tag’s index;
a record: the concatenation of its fields in the order of Definition 12.6, without tags or padding, a field absent from version being omitted entirely.
Encoders MUST NOT emit data after the last field; decoders MAY ignore or reject it. Layout (ZIP 374, “v1 Encoding” and “v2 Encoding”): is the Global record followed by the transparent, Sapling and Orchard bundles, each Action encoded as , spend, output, . The body is the Global record followed by the four bundles, transparent, Sapling, Orchard and Ironwood, each as a value of ; a bundle equal to its slot’s canonical empty bundle (Definition 12.8) MUST be encoded as absent and any other as present, and a parser MUST restore the canonical empty bundle from absence. Encoding in version MUST fail when , when the Ironwood bundle is not canonical empty, when the Orchard note version is not , or when an anchor required before signing a transaction of version is absent: these are the states version cannot represent.
For every version and every PCZT representable in version , exactly one byte string is an output for permitted to an encoder that obeys the MUST rules of Construction 12.9, and distinct PCZTs have distinct encodings. Canonicity is a property of encoder output: since decoders may accept non-minimal varints, unordered or repeated map entries and trailing data, several strings may decode to one PCZT.
By induction on the type structure. Uniqueness. The permitted encoding of each primitive is a function of its value: the shortest base- representation is unique, its last byte non-zero unless the value is ; the map is a bijection from the integers onto the naturals; the tags of options, booleans and enumerations are fixed; the counts of lists and strings are determined by the value. A finite map admits exactly one strictly ascending order of its entries without duplicates, since lexicographic order on byte strings is total. A record concatenates uniquely encoded fields in a fixed order. In version the presence of each bundle is determined by equality with Definition 12.8, and no trailing data is permitted. Injectivity. Each encoding is self-delimiting given its type, being of fixed length or a count followed by self-delimiting elements, so a decoder that reads the fields in order recovers every value; an absent version- bundle is restored as the canonical empty bundle, the only bundle encoded as absent. The header fixes , so encodings of distinct versions differ as well. □
The canonical-empty rule is exact equality so that two copies of one PCZT encode identically whatever software produced them, and re-encoding cannot move a bundle between its present and absent forms (ZIP 374, “Omitting empty bundles in PCZT v2”).
The Creator’s PCZT (§12.6) for a transaction of version , with version group identifier 0xD884B698 (ZIP 229), consensus branch identifier 0x77190AD9 (NU7, ZIP 259), expiry height , coin type (Mainnet), no fallback lock time, no proprietary entries and every bundle canonical empty, encodes in version as the bytes of Table 6. With coin type the coin type takes the one byte 01, the total is bytes, and every later field moves one byte earlier: the position of a field depends on the values before it, which is why no field can be added within a version.
| Offset | Bytes | Field |
|---|---|---|
| 50 43 5a 54 | header, PCZT | |
| 02 00 00 00 | version | |
| 06 | ||
| 98 ed 92 c4 0d | ||
| d9 95 e4 b8 07 | ||
| 00 | ||
| 80 ad e2 04 | ||
| 85 01 | ||
| 83 | , bits , , | |
| 00 | empty proprietary map | |
| to | 00 00 00 00 | four absent bundles |
In version the Ironwood bundle carries the Ironwood-pool component of a transaction of version , with the structure, field meaning and role interactions of the Orchard bundle, the Ironwood pool being a second value pool of the Orchard protocol (ZIP 229; Ironwood Guide, §“The Orchard protocol and its two pools”). It differs in three respects: its bit is meaningful and normally ; its anchor is a root of the Ironwood note commitment tree, distinct from the Orchard tree; and its note version MUST be . Every role MUST reject a PCZT with whose Ironwood bundle is not canonical empty (Definition 12.8) (ZIP 374, “IronwoodBundle (PCZT v2)”).
The following rules hold (ZIP 374, “Anchors and pre-authorization”).
For , every shielded bundle’s anchor is set when the bundle’s first spend is added and never changes, since the version- digest commits to it.
For , which requires version , an anchor MAY be absent until proving; an Updater MAY set an absent anchor, or replace a set one, at any time before the Prover runs for that bundle; setting or replacing an anchor MUST clear every proof already in that bundle, the Sapling spends’ proofs or the Orchard-protocol bundle’s proof, since a proof takes the anchor as a primary input; and the witness of a Sapling or Orchard-protocol spend MAY be absent until proving, and is set by an Updater once known.
Whenever a bundle has both an anchor and witnesses, the Updater that sets either MUST check that every witness of a spend of non-zero value roots to the anchor, and the Prover MUST check the same before proving.
Deferral is governed by the transaction version, not by the PCZT version: a transaction of version in a version- PCZT fixes its anchors as in version . Absence is an absent option, not an all-zero string, because zero is an element of and so a syntactically valid anchor (ZIP 374, “Optional anchors in PCZT v2”).
Let be a PCZT of a transaction of version .
If every spend of is signed, replacing the anchor of a bundle and its proof by any anchor and a proof valid for it leaves every signature valid and the transaction identifier unchanged: re-anchoring needs only re-proving.
A spend of an Orchard-protocol note whose creating transaction is not yet mined can be fully signed before that note is in the tree, and its signatures remain valid once an anchor, a witness and a proof are supplied: every field that the signature digest commits to is computable from the note data, and the anchor is not among them.
Neither holds for a transaction of version , and (ii) fails for a Sapling spend in version .
(i) The version- digest and transaction identifier omit the anchors, which are authorising data (ZIP 229, “Anchor commitment (version 6)”), and by Ironwood Guide, §“Transaction digests and signatures”, Proposition “Bundle binding”, replacing by changes neither the transaction identifier nor any signed message, so every signature remains valid.
(ii) The effecting fields of an Orchard-protocol spend are , and its Action’s . The nullifier is (Ironwood Guide, §“The nullifier”), a function of the key and of note data, with fixed by the creating Action and and derived from , , the address and the value; it does not depend on the note’s position. The key and the commitment depend on keys, values and fresh randomness only.
For version the digest commits to the anchors (ZIP 244, “Signature Digest”), so replacing an anchor invalidates every signature, which refutes (i); and an anchor fixed before the note is in the tree is the root of a tree state that does not contain the note, for which no authentication path of the note exists except with negligible probability (Ironwood Guide, §“Anchors”, Proposition “Membership soundness”), so a spend of non-zero value signed then admits no valid proof, so no signature made before the note is in the tree survives completion, which refutes (ii). A Sapling nullifier depends on the note’s position in the tree (protocol specification, §“Computing values and Nullifiers”), which is unknown until the note is mined, and is effecting data; for Sapling only (i) holds. □
The transaction of a PCZT is of version , with version group identifier 0x26A7270A (protocol specification, §“Transaction Consensus Rules”), or of version , with 0xD884B698 (ZIP 229), whose consensus branch identifier names NU6.3 or a later upgrade; version is not representable, and is invalid from NU7 on (ZIP 2003, deployed by ZIP 259). An Ironwood component requires version , the mixed case being rejected by the rule of §12.5. The consensus branch identifier fixes the rules in force, and a role that does not recognise it cannot check the PCZT against them (ZIP 374, “Global”).
Creator. The Creator chooses , and , sets the other Global fields with in binary, and sets every bundle to its canonical empty bundle (Definition 12.8); for it sets the Sapling and Orchard anchors, and for it MAY leave them to an Updater (Definition 12.12) (ZIP 374, “Creator”).
Constructor. Before adding anything the Constructor MUST check the bit of for the kind added (Definition 12.5), and it updates the bundle’s . Per Orchard-protocol Action, in the notation of the Ironwood Guide, it sets for a fresh (§“Value commitments”); the nullifier of the consumed note (§“The nullifier”); a uniform and (§“Randomised validating keys”); and the created note with , its (§“Note commitments”), and (§“Encryption to the recipient”) and (§“The outgoing ciphertext”); together with the context fields of the spend and the output. Dummy and fabricated Actions and their order are those of Construction 11.18, only fully dummy Actions carrying . Spends and outputs MUST agree with the bundle flags. When the bundle’s anchor is set, each spend added carries a witness rooting to it, or, for a note of value zero, whose path the Action statement does not check, any placeholder; for a spend MAY be added without a witness, even of a note not yet in the tree; for every non-dummy spend is of a note in the tree, with a witness to the anchor. A transparent input with a lock-time requirement is added only if its lock type is compatible with those of the other inputs and, when inputs are already signed, it leaves the lock time unchanged (§12.10) (ZIP 374, “Constructor” and “OrchardBundle”).
Once the input and output set is final, the IO Finalizer performs the following steps, failing where stated (ZIP 374, “IO Finalizer”).
If shielded spends or outputs exist, it clears bits , and of .
For each Orchard-protocol bundle with Actions , it requires every , sets , computes
with the integer that the bundle’s denotes (§12.3), and fails unless (Ironwood Guide, §“The binding signature”). The Orchard and the Ironwood bundles are finalised separately, each by this computation on its own Actions.
For the Sapling bundle, it sets to the sum of the spends’ minus the sum of the outputs’ , checked in the same way against the Sapling binding validating key (protocol specification, §“Balance and Binding Signature (Sapling)”).
It computes the signature digest over the effecting data (Ironwood Guide, §“Transaction digests and signatures”), signs each dummy spend under the spend authorising key derived from its or given by its , randomised by the spend’s , and clears that key.
For each bundle with , it MUST verify that each Action’s output recipient equals its spend recipient, and fail otherwise.
The condition of step (5) is condition A10 of the Action statement (Ironwood Guide, §“The Action statement”), so no valid proof exists for an Action that violates it; the step reports the violation at the role responsible for it.
Let an Orchard-protocol bundle have Actions with , and let be the integer that its denotes. Step (2) of Construction 12.14 passes if and only if , and is then a binding signing key whose validating key is . The check reads no value , which may therefore have been redacted.
With ,
which is if and only if the coefficient vanishes modulo , since is a non-identity point of the group of prime order . This is Ironwood Guide, §“The binding signature”, Proposition “Balance and key knowledge”, part (i). No independence of and is used. The check computes from the commitments and alone. □
The binding signing key cannot wait for the Transaction Extractor, since every would then travel to it and open every value commitment to every intermediate party; nor can Constructors maintain it incrementally, since serial Constructors would have to update it and parallel ones, whose results a Combiner merges, must not. One role run once the set is final removes both problems, and the same role signs dummy spends so that no Signer parses spending-key material (ZIP 374, “Adding an IO Finalizer role”).
Digests. The Signer derives the effecting data from the PCZT and computes the shielded signature digest itself (ZIP 244 for version , as amended by ZIP 229 for version ; Ironwood Guide, §“Transaction digests and signatures”), neither proofs nor signatures entering it; for each transparent input it signs, it computes that input’s digest under the input’s (ZIP 244, “S.2: transparent_sig_digest”) and signs it by the scheme of the Crypto Guide, §“The transparent layer’s schemes: ECDSA and BIP-340 over secp256k1”. A Signer that cannot sign under an input’s hash type MUST NOT sign that input (ZIP 374, “TransparentInput”).
Orchard-protocol spends. For an Action it signs, with present, the Signer sets , fails unless , and sets to the RedPallas signature on under (Ironwood Guide, §“Randomised validating keys”); Ironwood-pool Actions are signed in the same way in their own bundle. A signature produced elsewhere, for example by a hardware device, is attached if and only if it is valid under the Action’s on . The Signer then updates (Definition 12.5) (ZIP 374, “Signer” and “OrchardSpend”).
For an Orchard-protocol Action whose explicit data are present, with and the values of its spend and its output, the Signer relations are, in the notation of the Ironwood Guide:
(§“Value commitments”);
the consumed note rebuilt from (, , , ) has nullifier under the of (§“The nullifier”), and owns the recipient: for the that determines (§“Diversified addresses”);
for the of (§“Randomised validating keys”);
is the commitment of the created note rebuilt from (, , ) with (§“Note commitments”);
for an output that is not fabricated, derived from and gives and a that decrypts to a plaintext with the explicit recipient, value and (§“Encryption to the recipient”), and, when is present, decrypts under it to (§“The outgoing ciphertext”).
A fabricated zero-valued output at a spent note’s receiver carries a random (Construction 11.18) and is exempt from (e): a Signer MUST NOT reject it on that ground alone, and SHOULD classify it as a tolerable dummy, checking (d) if it wishes (ZIP 374, “Signer”, “Verifier” and “Fabricated same-address outputs (NU6.3)”).
Obligations before signing (ZIP 374, “Signer”). A Signer MUST reject a PCZT that carries any or : the IO Finalizer signs dummy spends and clears these keys, so their presence asks the Signer to parse spending-key material. It MUST, for each output with a , parse it and confirm that it contains the output’s recipient (§12.3). It SHOULD verify that the explicit values and note data it shows its user are consistent with the effecting data it signs, through the relations of Definition 12.16; a field absent because it was redacted is not an inconsistency, and only a present field that contradicts the effecting data is. The relations need the value and note commitments, BLAKE2b and the functions built on it, nullifier derivation, key agreement, the key derivation and the AEAD of note encryption, the signature digest and RedPallas signing (RedJubjub for Sapling), and no proof system.
Let a Signer hold the of an Orchard-protocol key generated with , and suppose that for every PCZT it signs it computes from the effecting data of , performs the obligations above, verifies relations (a) to (e) of Definition 12.16, with all their fields present, for every Action whose spend it signs, displays the values, recipients and address strings so checked, and signs under keys no message other than such digests . Under the assumptions of Ironwood Guide, §“Authorisation of spends”, Theorem “Spend authority”, and Assumption “Collision resistance of BLAKE2b” (§“Transaction digests and signatures”), except with negligible probability:
every accepted Action that consumes a note of the key carries a signature on some ;
every accepted transaction that carries an Action with a randomised validating key under which the Signer signed has the effecting data of some PCZT that the Signer signed with an Action of key ; in it the Actions whose spends the Signer signed consume and create the notes, with the values and recipients, that the Signer displayed for , and every other effecting field, balancing values and transparent data included, equals that of .
The theorem concerns content, not inclusion.
(i) The Signer is the signing oracle of the Ironwood Guide, §“Authorisation of spends”, Definition “Spend-authority experiment”, queried with for taken from the PCZT and so possibly chosen by an adversary, which that experiment admits; the full viewing key that the PCZT discloses is given to the adversary there. Theorem “Spend authority” bounds by a negligible function the probability of an accepted Action that consumes a note of the key without a queried digest.
(ii) Let be accepted and carry an Action with key and a signature valid under on . The reduction of the proof of Theorem “Spend authority”, which simulates the key holder from and answers queries with adversarial randomisers, turns a triple that is not a triple of an answer of the Signer into a forgery in Ironwood Guide, §“RedPallas unforgeability”, Proposition “Unforgeability under re-randomisation”; hence, except with negligible probability, for a PCZT that the Signer signed under . The collision case of the proof of Proposition “Bundle binding” uses only that each node of the digest tree hashes a string from which its children and fields are recovered uniquely, which holds equally for the version- tree (ZIP 244, “TxId Digest” and “Signature Digest”), where the anchors are among the hashed fields and are effecting data (Definition 12.3); it therefore applies to both transaction versions and gives as effecting data, except with negligible probability under Assumption “Collision resistance of BLAKE2b”. The digest covers the value and script of each transparent input (§12.3), so a false value in yields a digest that validation does not compute and a signature that is not accepted. For each Action whose spend the Signer signed, relations (a) and (d) make the displayed data an opening of and of , and by Lemma “Hiding and binding of net value commitments” and Proposition “Hiding and binding of note commitments” of the Ironwood Guide no other opening is feasible; relation (b) identifies the consumed note, whose commitment fixes its value; relation (e) makes the created note decryptable by its recipient (Proposition “Decryption correctness”); and the check of ties each recipient to the displayed string. □
Pre-authorisation (ZIP 374, “Signer” and “Anchors and pre-authorization”). For a transaction of version a Signer MAY sign while the shielded anchors, witnesses or proofs are absent, since signatures commit to none of them (Proposition 12.13). A Signer asked to do so SHOULD be aware, and where applicable make its user aware, that a spend without a witness may be of a note that never exists on chain: the signature authorises the spend whether or not the note is created. For a transaction of version the anchors are in the digest and MUST be present before signing.
If IO finalisation (Construction 12.14) succeeded for an Orchard-protocol bundle, and its commitments and its are unchanged afterwards, then a binding signature under on the signature digest is valid under the that validation derives from the transaction’s and balancing value .
Validation computes from the same commitments and balancing value (Ironwood Guide, §“The binding signature”, Definition “Binding validating key”), and IO finalisation checked that it equals (Lemma 12.15). Correctness of RedPallas in the binding-signature instance (Ironwood Guide, §“The binding signature”, Construction “Binding signature”) gives validity. □
Per Orchard-protocol Action the Prover requires the spend’s recipient, value, , , , witness and , the output’s recipient, value and , and the Action’s ; the bundle’s anchor MUST be set, and before proving the Prover MUST verify that the path of the witness of every spend of non-zero value roots to it, and fail otherwise. For Sapling it requires per spend the recipient, the value, or , , the proof generation key and the witness, and per output the recipient, the value, and . The Prover needs no spending key; a delegated Prover learns the note data of the bundle but gains no spending authority (§12.9) (ZIP 374, “Prover”).
For an Orchard-protocol bundle with no Actions the Prover does nothing. Otherwise, for each Action , it rebuilds the consumed note from its explicit data and the created note from its explicit data with ; forms the primary input
with the bundle’s anchor, and the auxiliary input from the witness, the two notes, , the components of and (Ironwood Guide, §“The Action statement”); and fails if the pair does not satisfy the Action statement, in particular if does not own the consumed note or differs from the commitment of the rebuilt created note. It then creates one Halo 2 proof for all Actions of the bundle (Ironwood Guide, §“The Action circuit and the Halo 2 proof”; Halo 2 Guide, §“The Halo 2 proof system”) and sets . The Ironwood bundle is proved in the same way with its own anchor. The primary input consists of effecting data and the anchor only.
An Action whose is the identity point is invalid (protocol specification, §“Action Descriptions”; ZIP 256, “Orchard identity rk”), and the Transaction Extractor MUST refuse it (ZIP 374, “Transaction Extractor”). A Prover that refuses it as well spares a proof of a transaction that cannot be valid; ZIP 374 does not state that check for the Prover, and it is designed but unspecified (Definition 1.1).
The merge of two PCZTs is defined, or fails, as follows (ZIP 374, “Combiner”).
Global. The fields , , , , and MUST be equal. The field merges bitwise, bits , and by AND and bit by OR, bits to being required zero on both sides.
Lists of inputs, outputs, spends and Actions. If either side’s bundle is IO-finalised, its being present, both sides have equally many entries and equal . Otherwise the entries at the positions common to both lists merge pairwise, and the extra entries of the longer list are appended provided the shorter side’s permits additions of that kind, the merge failing otherwise. The merged shielded bundle’s is that of the side each of whose lists of the bundle is at least as long as the other side’s, the merge failing if neither side is; with lists of equal lengths the two MUST be equal. ZIP 374 leaves this unstated, so it is designed but unspecified (Definition 1.1).
Required fields of merged entries, and the bundle , and, in version , , MUST be equal.
Optional fields merge as , and if , failing otherwise; in version this rule covers the anchors.
Maps merge by union of their keys, the values of a common key being required equal.
The Combiner of PCZTs merges them into one that contains every field of each, or fails. It MUST NOT combine PCZTs that do not represent the same transaction, that is, PCZTs not derived by roles from a common ancestor, which rules (1) to (3) check structurally. Once the input and output set is final, the effecting data determine the transaction identifier, which then identifies the PCZT; for version , re-anchored copies keep that identifier.
BIP 174 lets a combiner keep one of two conflicting values and discard the other. The PCZT merge requires equality instead, which is always possible because every field is typed and known in advance, so every conflict fails at the Combiner and none diverges later (ZIP 374, “Combiner rejecting non-identical duplicates”).
For PCZTs and , the merge is defined if and only if is, and then the two are equal.
By cases on the rules of Construction 12.20. The equality tests of rules (1) and (3) are symmetric; AND and OR are commutative; the rule for optional fields and the union of maps with equal values on common keys are symmetric; the condition on IO-finalised bundles is symmetric; in rule (2) the longer list and the side whose permission is consulted are determined by the lengths, not by the order of the arguments, and so is the merged , which is required equal at equal lengths; and the pairwise merges of common entries commute by induction on the structure of the entries. □
ZIP 374 requires further that combining SHOULD be functionally order-independent, for participants that apply and to . That is a requirement on roles, not a property proved here for all of them; Proposition 12.22 proves it for the Prover and the Signer.
Let be an IO-finalised PCZT on which the Prover (Construction 12.19) and a Signer (§12.7) are both defined, the anchors being set for proving and, for a transaction of version , fixed before signing (Definition 12.12). Fix the random coins of both roles. Then and are defined and both equal : the two roles run in either order, or in parallel on copies whose outputs are merged by Construction 12.20. For a transaction of version signing may moreover precede the setting of the anchors (Proposition 12.13). If a copy is redacted before either role, and retains the fields that role reads, the equality holds up to the redacted fields, which the merge restores from the other side.
Signing. The signed digest is computed from effecting data only, excluding proofs and signatures (Lemma 11.21), and the relations of Definition 12.16 read effecting and context data; writes neither, so reads the same values on and on and, with its coins fixed, writes the same signatures and bits. Proving. The primary input of the Action statement consists of effecting data and the anchor, and the auxiliary input of context data (Construction 12.19; Ironwood Guide, §“The Action statement”); writes none of them, and the Prover reads no spending key, so writes the same proofs on and on . Merge. The role sets only proof fields, absent in , and only signatures, absent in , and bits of , which it only clears, or sets in the case of bit ; the bundle of is finalised on both sides with equal counts and value sums. Neither role writes a required field, so rule (3) holds, and a transparent signature is a new key of , merged by rule (5). Rules (1) to (5) of Construction 12.20 therefore give . ZIP 374, “Prover”, states the same independence. □
Redactor (ZIP 374, “Redactor” and the field descriptions). Anyone may clear fields that later roles do not need: per Orchard-protocol Action the spend’s , recipient, value, , , , witness, , derivation record, dummy key and proprietary entries, the output’s recipient, value, , , derivation record, and proprietary entries, and ; the corresponding Sapling fields; and the transparent and Global lookup data. A PCZT with inputs of several independent Signers is sent to each with only what that Signer needs, for example without the other Signers’ values of .
A PCZT carries strictly more than its transaction: for each shielded spend or output it may carry the counterparty address, the value, the note randomness, , which opens , the full viewing key of the spending account, derivation records, , which opens , and address strings. Every recipient of a PCZT at a stage learns all data present at that stage; a delegated Prover learns the note data of the spends and outputs but gains no spending authority; the extracted transaction contains none of these data. Participants SHOULD send a PCZT only to entities needed for the remaining roles and SHOULD redact what those do not need, and wallets SHOULD protect stored PCZTs as they protect their note records (ZIP 374, “Privacy Implications”).
The listed fields are context data (Definition 12.3), which extraction omits (§12.10); a recipient reads every field present. The Prover’s data (Construction 12.19) contain but no , and an accepted spend of a note of the key without a signature under on a digest that the key holder signed is excluded, except with negligible probability, by Ironwood Guide, §“Authorisation of spends”, Theorem “Spend authority”, under its assumptions, whose adversary holds the full viewing key. □
Spend Finalizer (ZIP 374, “Spend Finalizer” and “TransparentInput”; BIP 11; BIP 16). For each transparent input with enough data, the Spend Finalizer builds : for P2PKH, the push of the one signature, with its hash-type byte, under the key that hashes to the address, followed by the push of that key; for P2SH multisignature, the opcode , the pushes of signatures in the key order of the redeem script and the push of the redeem script, failing with fewer than signatures. It MUST fail on a signature whose hash type is not the input’s . It SHOULD then clear the input’s redeem script, partial signatures, derivation records and preimages. It keeps and , required fields that the digest needs, and and the lock-time requirements, which the digest and Definition 12.24 read at extraction; ZIP 374’s “all other optional data” would include these last fields, a gap in the specification.
If no transparent input has a required time or height lock, the lock time is , or if it is absent. Otherwise the lock type is one supported by every input that states a requirement, an input that states both types supporting both; an input that states neither supports both. If both types remain possible, the height type is chosen; if none remains, the requirements are unsatisfiable. The lock time is the maximum required value of the chosen type (ZIP 374, “Determining Lock Time”).
The Transaction Extractor checks, failing on any violation (ZIP 374, “Transaction Extractor”), that
, and name a supported format, and the lock-time requirements are satisfiable (Definition 12.24);
for the Ironwood bundle is canonical empty;
every is set;
every Sapling spend has its proof and signature, and every Sapling output its proof;
every Orchard-protocol bundle with Actions has a of the canonical length of bytes (Ironwood Guide, §“The transaction format”), and every Action a ;
every non-empty shielded bundle has its anchor and ;
no is .
It then sets each bundle’s balancing value to , failing if it lies outside the signed -bit range of the transaction field; sets the lock time by Definition 12.24; computes ; for each bundle derives from its value commitments and balancing value, fails unless it matches , and signs under , by RedPallas for the Orchard and Ironwood bundles and by RedJubjub for Sapling (Lemma 12.18); and outputs the transaction, without any context data (ZIP 229). It SHOULD then verify every proof and signature of that transaction, each under its on included, so that an invalid transaction is found before submission.
A party that holds an Orchard-protocol output’s recipient, value and , with the of its Action’s spend, recovers the full note plaintext, memo included, without or any viewing key, by the derivation of stated with Theorem 11.22 (§11.8; Ironwood Guide, §“Encryption to the recipient”, Proposition “Decryption correctness”; ZIP 212). The random of a fabricated output decrypts to nothing, as the construction intends.