The Zcash ArboretumThe Complete Arboretum PDF

8 The transaction carrier

This section states the status of every text that would carry OrchardZSA in a transaction: the transaction formats (§8.1), the digests and the message that the three kinds of signature sign (§8.2), and the fee terms (§8.3). No carrier is constructed here. The withdrawn design is described abstractly and classified as designed but unspecified; the absence of a live carrier is classified as an open problem (Definition 1.2).

8.1 Transaction formats

The carrier of a construction is the set of transaction fields that encode it together with the digests that commit to it (Definition 1.4).

Deferral of the encodings. ZIP 226, “OrchardZSA Transaction Structure”, states that the transaction format that carries OrchardZSA “is described in ZIP 230”, and defers to it the transaction structure and the note plaintexts. ZIP 227, “Issue Note”, “Issuance Action” and “Issuance Bundle”, defers to ZIP 230 the encodings of Issue Notes, of Issuance Actions and of the Issuance Bundle. ZIP 230, now titled “Withdrawn Version 6 Transaction Format”, has status Withdrawn (Definition 1.1): it “has been obsoleted by ZIP 229, and will not be deployed”, and transaction version 6 “is now defined by ZIP 229” (ZIP 230, “Abstract”). The consensus rules of ZIP 227 nonetheless name fields that exist only in ZIP 230, the Action-Group count and the per-group expiry field of rule (T1) of Construction 7.3 (“State transition of a transaction”, §7.2), and require every Issue Note description to be “a valid field encoding as defined in ZIP 230” (ZIP 227, “Specification: Consensus Rule Changes”). A Draft consensus rule thus delegates to withdrawn text. ZIP 226, “Privacy Implications” and “Implications for Wallets”, still identifies OrchardZSA with version-6 transactions.

Version 6. Version 6 is the transaction format of ZIP 229, “Version 6 Transaction Format” (Draft), which the active NU6.3 deploys (ZIP 258, Draft). It carries the Ironwood component beside the Orchard component and no bundle of OrchardZSA or of issuance (Ironwood Guide, §“The transaction format”, Construction “Version-6 transaction”). By ZIP 229, “Non-requirements”, the format “need not support ZSAs”. The withdrawn format and the format of ZIP 229 share the version number 6 and are distinct and incompatible.

Version 7. ZIP 248, “Extensible Transaction Format” (Draft), defines transaction version 7, whose version group identifier is not yet assigned and whose “Deployment” section is empty. Its bundle registry allocates no bundle to ZSA. OrchardZSA, proposed as a provisional variant of the Orchard bundle type (ZIP 226), and ZSA Issuance, with no bundle type (ZIP 227), appear only under “Potential Future Bundle Types”, kinds that “have no allocated (𝖻𝗎𝗇𝖽𝗅𝖾𝖳𝗒𝗉𝖾,𝖻𝗎𝗇𝖽𝗅𝖾𝖵𝖺𝗋𝗂𝖺𝗇𝗍) pair”. ZIP 248 specifies no encoding and no digest for either (ZIP 248, “Terminology”, “Abstract”, “Potential Future Bundle Types” and “Deployment”).

Content and withdrawn design. The abstract content that the rules of this volume need is fixed earlier and does not depend on a carrier: the OrchardZSA bundle of Definition 5.2, with at most one Action Group, one burn set, the balancing value and the binding signature, and the Issuance Bundle of Definition 6.5. The withdrawn design of ZIP 230 encodes this content as follows; no part of it is a live layout.

  1. (a)

    The burn set is encoded inside the Action Group as a list of 40-byte entries, each the 32-byte encoding 𝖺𝗌𝗌𝖾𝗍⁢_⁢𝖻𝖺𝗌𝖾 of Definition 2.14 followed by the amount as an unsigned 64-bit little-endian integer. ZIP 230 thus places one burn set in each Action Group, which under the limit of ZIP 227 of one Action Group per transaction is one burn set per transaction. Its field description of the amount, “non-zero, and less than 𝖬𝖠𝖷⁢_⁢𝖡𝖴𝖱𝖭⁢_⁢𝖵𝖠𝖫𝖴𝖤”, is superseded by rule (B2) of Definition 5.1, 0<v≤𝖬𝖠𝖷⁢_⁢𝖡𝖴𝖱𝖭⁢_⁢𝖵𝖠𝖫𝖴𝖤, which is ZIP 226’s (ZIP 230, “OrchardZSA Action Group Description” and “OrchardZSA Asset Burn Description”; ZIP 226, “Additional Consensus Rules for the assetBurn set”).

  2. (b)

    The flags byte of the Action Group assigns bit 2 to 𝖾𝗇𝖺𝖻𝗅𝖾𝖹𝖲𝖠, an assignment without live counterpart (“Action Groups”, §4.5).

  3. (c)

    Each Action carries the public fields of an Orchard Action description; the Action Group carries, in Action order, one spend-authorisation signature per Action, and the aggregate proof. The byte lengths of an Action depend on a plaintext encoding that no current ZIP defines (“Action Groups”, §4.5).

The pool into which a carrier would place OrchardZSA notes is the subject of Remark 1.7.

Remark 8.1 (Status of the carrier).

Under Definition 1.2:

  1. (i)

    the transfer, burn and issuance constructions are specified, in ZIPs 226 and 227, both Draft;

  2. (ii)

    the field sets and digests of withdrawn ZIPs 230 and 246, read as a composition of those constructions into one transaction and abstracted from the version number, the version group and the positions of the flag bits, are designed but unspecified: a complete design exists in withdrawn text, and no live text fixes it. The exception is the authorising-data digest, which ZIP 246 itself marks as not updated for 𝗌𝗂𝗀𝗁𝖺𝗌𝗁𝖨𝗇𝖿𝗈 (ZIP 246, “v0 Digests”), and whose issuance child states its empty case for a transaction with no Orchard Actions (ZIP 246, “A.4: issuance_auth_digest”); no result of this volume uses that digest;

  3. (iii)

    which live transaction format carries OrchardZSA bundles and Issuance Bundles is an open problem. The only design assigns the version number 6 and bit 2 of the Orchard flags, both of which live text assigns otherwise: version 6 is the format of ZIP 229, in which that bit is reserved. ZIP 229 need not support ZSAs, and ZIP 248 allocates no bundle to them.

The texts that leave (iii) open and the obligation that closes it are enumerated in “Open problems” (§10.2) (ZIP 229, “Non-requirements”; ZIP 230 and ZIP 246, “Abstract”; ZIP 248, “Potential Future Bundle Types”).

8.2 Transaction digests and the signature message

The signed message. Every signature that OrchardZSA uses signs one message, 𝖲𝗂𝗀𝖧𝖺𝗌𝗁: the issuance authorisation signature, by rule (I3) of Definition 6.12, the spend-authorisation signature of each Action, and the binding signature of the bundle (Definition 5.4; ZIP 226, “Value Balance Verification”; Ironwood Guide, Definition “Signature digest”). ZIP 227 defines 𝖲𝗂𝗀𝖧𝖺𝗌𝗁 as the digest of the protocol specification, §“SIGHASH Transaction Hashing”, under 𝖲𝖨𝖦𝖧𝖠𝖲𝖧⁢_⁢𝖠𝖫𝖫, “with the modifications described in ZIP 226”, and cites for them a ZIP 226 section “TxId Digest” that does not exist. ZIP 226, “Sighash modifications relative to ZIP 244”, and ZIP 227, “Modifications relative to ZIP 244”, defer those modifications to ZIP 246, “Digests for the Withdrawn Version 6 Transaction Format”, whose status is Withdrawn and whose digests “are now specified by ZIP 229” (ZIP 227, “Specification: Consensus Rule Changes”; ZIP 246, “Abstract”).

Withdrawn design of the transaction identifier. ZIP 246 extends the digest tree of ZIP 244 (Ironwood Guide, Definition “Transaction identifier”). Each node is the function 𝗁=𝖡𝖫𝖠𝖪𝖤𝟤𝖻⁢-⁢𝟤𝟧𝟨 under a personalisation of its own, applied to the concatenation of fixed-length digests and field encodings; a node that ZIP 246 does not redefine keeps its definition in ZIP 244. The root has six children:

𝗍𝗑𝗂𝖽:=𝗁(ZcashTxHash_∥β,d𝗁𝖽𝗋∥d𝗍𝗋∥d𝖲𝖺𝗉∥d𝖮𝗋𝖼∥d𝖨𝗌𝗌∥d𝗆𝖾𝗆𝗈),

with β the encoding of the consensus branch identifier as in the Ironwood Guide. The header digest d𝗁𝖽𝗋, redefined with fields of ZIPs outside this volume, the transparent digest d𝗍𝗋 and the Sapling digest d𝖲𝖺𝗉 carry no ZSA content. The other three children do.

  1. (a)

    The Orchard branch d𝖮𝗋𝖼 hashes one digest over the Action Groups and the balancing value. For each Action Group, the digest over the Action Groups commits to every Action’s nullifier 𝗇𝖿, note commitment 𝖼𝗆𝗑, ephemeral key 𝖾𝗉𝗄 and ciphertexts C𝖾𝗇𝖼 and C𝗈𝗎𝗍, value commitment 𝖼𝗏𝗇𝖾𝗍 and randomised validating key 𝗋𝗄, in Action order, and to the flags byte, the anchor, the per-group expiry field and a burn digest. The burn digest hashes every burn pair (𝖺𝗌𝗌𝖾𝗍⁢_⁢𝖻𝖺𝗌𝖾,v) in encoding order, and is the hash of the empty string when the burn set is empty. Without an Action Group the Orchard branch is the hash of the empty string; since the burn set is encoded inside the Action Group, a transaction then has no burn set. With at most one Action Group per transaction (ZIP 227), the digest over the Action Groups is one hash over the elements of that group.

  2. (b)

    The issuance branch d𝖨𝗌𝗌 hashes the length-prefixed 𝗂𝗌𝗌𝗎𝖾𝗋 and an actions digest, which commits, per Issuance Action and in order, to 𝖺𝗌𝗌𝖾𝗍𝖣𝖾𝗌𝖼𝖧𝖺𝗌𝗁, to a notes digest over every Issue Note’s recipient, value, ρ and 𝗋𝗌𝖾𝖾𝖽, and to 𝖿𝗅𝖺𝗀𝗌𝖨𝗌𝗌𝗎𝖺𝗇𝖼𝖾. ZIP 246 states empty cases for the issuance digest, “no issuance components”, and for the notes digest, and none for the actions digest.

  3. (c)

    The memo branch d𝗆𝖾𝗆𝗈 hashes a nonce and a digest over memo chunks, and presupposes the memo bundles of ZIP 231.

The personalisation strings of the nodes below the root are not listed, since no proof or rule of this volume uses them (ZIP 246, “TxId Digest”, nodes T.4, T.4a, T.4a.vi, T.5, T.5a, T.5a.i and T.6; ZIP 244, “TxId Digest”).

Withdrawn design of the signature digest and the authorising-data digest. The signature digest has the same six children as the transaction identifier. Its Orchard, issuance and memo children are those of 𝗍𝗑𝗂𝖽, and its transparent child is specific to the input, as in ZIP 244 (Ironwood Guide, Definition “Signature digest”). ZIP 246 produces a signature digest for each transparent input, each Sapling input, each Action and each Issuance Action; all of these except those of transparent inputs equal the 𝖲𝖨𝖦𝖧𝖠𝖲𝖧⁢_⁢𝖠𝖫𝖫 digest 𝖲𝗂𝗀𝖧𝖺𝗌𝗁, since no other child depends on the signer. The authorising-data digest (Ironwood Guide, Definition “Authorising-data digest; effecting and authorising data”) has transparent, Sapling, Orchard and issuance children. The Orchard child hashes, per Action Group, the proof and the spend-authorisation signatures, and then the binding signature; the issuance child hashes the encoding of 𝗂𝗌𝗌𝗎𝖾𝖠𝗎𝗍𝗁𝖲𝗂𝗀. Proofs and signatures enter this digest only. ZIP 246 marks this digest as not yet updated for the 𝗌𝗂𝗀𝗁𝖺𝗌𝗁𝖨𝗇𝖿𝗈 fields of its format (ZIP 246, “v0 Digests”). ZIP 246 states that the pair of the transaction identifier and the authorising-data digest commits to all data of the transaction (ZIP 246, “Signature Digest” and “Authorizing Data Commitment”, nodes A.3, A.3a and A.4; ZIP 244, “Signature Digest” and “Authorizing Data Commitment”).

Remark 8.2 (Commitments required of a digest).

Under the withdrawn design, the digest 𝖲𝗂𝗀𝖧𝖺𝗌𝗁 commits

  1. (i)

    to the effecting data of the Issuance Bundle: 𝗂𝗌𝗌𝗎𝖾𝗋 and, per Issuance Action and in order, 𝖺𝗌𝗌𝖾𝗍𝖣𝖾𝗌𝖼𝖧𝖺𝗌𝗁, 𝖿𝗂𝗇𝖺𝗅𝗂𝗓𝖾 and every field of every Issue Note, namely the recipient (d,𝗉𝗄𝖽), v, ρ and 𝗋𝗌𝖾𝖾𝖽; the Asset Base is derived from 𝗂𝗌𝗌𝗎𝖾𝗋 and 𝖺𝗌𝗌𝖾𝗍𝖣𝖾𝗌𝖼𝖧𝖺𝗌𝗁 (Remark 6.14);

  2. (ii)

    to the burn set;

  3. (iii)

    to the published data of the Actions of the Action Group, hence to 𝗇𝖿0,0;

and to no signature. The argument runs node by node. The signature digest’s Orchard child is the Orchard branch (a), and its issuance child is the issuance branch (b); their inputs include the data listed in (i) to (iii), the flag 𝖿𝗂𝗇𝖺𝗅𝗂𝗓𝖾 as a bit of 𝖿𝗅𝖺𝗀𝗌𝖨𝗌𝗌𝗎𝖺𝗇𝖼𝖾. Signatures and proofs enter the authorising-data digest only. In the withdrawn design every node input is a concatenation of fixed-length digests and of fixed-length or length-prefixed field encodings, so that it parses uniquely, and the number of records of each list is determined by the length of the input. Let two transactions with equal 𝖲𝗂𝗀𝖧𝖺𝗌𝗁 differ in a listed datum. If their consensus branches differ, the root personalisations differ and equal outputs are already a collision in the sense of the Ironwood Guide’s Assumption “Collision resistance of BLAKE2b”; otherwise the differing datum yields two distinct inputs with equal outputs at some node, a collision of 𝗁. The withdrawn design thus meets Assumption 6.13 under the Ironwood Guide’s Assumption “Collision resistance of BLAKE2b”. The three commitments (i) to (iii), together with the exclusion of every signature, are the obligation on any future signature digest that carries OrchardZSA: Proposition 6.16 and Theorem 9.8 assume exactly them and nothing more (ZIP 246, “TxId Digest” and “Signature Digest”).

Current text. The version-6 digests of ZIP 229 have header, transparent, Sapling, Orchard and Ironwood children and no issuance, burn or memo-bundle data (no counterpart of the branch d𝗆𝖾𝗆𝗈 of ZIP 246); their Orchard child carries Orchard-pool Actions, which have no Asset Bases (Ironwood Guide, §“Transaction digests and signatures”; ZIP 229, “Transaction Identifiers, Auth Digests, and Signature Digests” and “Summary of the resulting digest structure”). ZIP 248 lets each bundle type define its own versions of the signature digest, carried with each signature as 𝗌𝗂𝗀𝗁𝖺𝗌𝗁𝖨𝗇𝖿𝗈, and defines none for a ZSA bundle (ZIP 248, “Sighash Versioning” and “Potential Future Bundle Types”). No current text specifies a digest that commits to OrchardZSA or issuance data.

Remark 8.3 (Status of the signature message).

The rules by which the three kinds of signature sign 𝖲𝗂𝗀𝖧𝖺𝗌𝗁 are specified, in ZIPs 226 and 227, both Draft. The message 𝖲𝗂𝗀𝖧𝖺𝗌𝗁 itself is designed but unspecified: its only definition is withdrawn ZIP 246, a complete design. Its live definition, as part of a live carrier, is an open problem (Remark 8.1). Every result of this volume that uses the message is conditional on Assumption 6.13 (Definition 1.3) (ZIP 226, “Sighash modifications relative to ZIP 244”; ZIP 227, “Modifications relative to ZIP 244”; ZIP 246).

8.3 Fees

The conventional fee. The transaction fee is the value remaining in the transparent transaction value pool, and ZIP 317, “Fee calculation”, specifies the conventional fee

𝑚𝑎𝑟𝑔𝑖𝑛𝑎𝑙⁢_⁢𝑓𝑒𝑒⋅max⁡(𝑔𝑟𝑎𝑐𝑒⁢_⁢𝑎𝑐𝑡𝑖𝑜𝑛𝑠,𝑙𝑜𝑔𝑖𝑐𝑎𝑙⁢_⁢𝑎𝑐𝑡𝑖𝑜𝑛𝑠)⁢ zatoshi,
𝑚𝑎𝑟𝑔𝑖𝑛𝑎𝑙⁢_⁢𝑓𝑒𝑒=5000,𝑔𝑟𝑎𝑐𝑒⁢_⁢𝑎𝑐𝑡𝑖𝑜𝑛𝑠=2,

where 𝑙𝑜𝑔𝑖𝑐𝑎𝑙⁢_⁢𝑎𝑐𝑡𝑖𝑜𝑛𝑠 is a sum of contributions per component, fixed by the applicable revision of ZIP 317. The fee and the formula are those of the Ironwood Guide, §“The balancing value”, and are cited, not re-derived. Paying the conventional fee is not a consensus requirement: “It is not a consensus requirement that fees follow this formula; however, wallets SHOULD create transactions that pay this fee” (ZIP 317, “Fee calculation”).

Fees in ZEC. Fees are paid in ZEC only. The balancing value is an amount of ZEC and enters the binding validating key at the base V𝖮𝗋𝖼𝗁𝖺𝗋𝖽 only (Definition 5.4), and a Custom Asset has no transparent value pool (Remark 5.3), so no Custom Asset reaches the pool whose remainder is the fee. ZIP 227 records the alternative, a fee denominated in the Custom Asset, as not adopted, since for shielded transactions any design that lifts value from the transaction leaks information about it (ZIP 226, “Value Balance Verification”; ZIP 227, “Rationale for paying fees in ZEC”).

Missing ZSA terms. ZIP 227, “Changes to ZIP 317”, states that the conventional fee in ZEC is altered for the Issuance Actions of a transaction and for Custom Assets newly created in the global issuance state, and refers to ZIP 317, “Fee calculation”. No revision of ZIP 317 has such a term; Revision 0 is Active and Revisions 1 and 2 are Draft. The Change History of ZIP 317 records “Removed the ZSA issuance and asset-creation fee contributions (ZIP 227)”. ZIP 226, “Transaction Fees”, links a ZIP 227 section “OrchardZSA Fee Calculation” that does not exist. Both references dangle. The removed design had one contribution per Issue Note and one per newly created Custom Asset; their values are not quoted (ZIP 317, “Revisions”, “Fee calculation” and “Change History”).

Remark 8.4 (Status of the fee terms).

The ZSA fee terms have one class, designed but unspecified (Definition 1.2): a complete design existed as text of ZIP 317 and was removed, and it conflicts with no live text. Live ZIP 227, “Changes to ZIP 317”, states that the conventional fee is altered, and live ZIP 317, “Fee calculation”, has no such term. The conventional fee is not a consensus rule, so the protocol of this volume does not need the fee terms in the sense of Definition 1.2(iii), and they are not an open problem. That fees are paid in ZEC is specified (ZIP 317, “Change History”; ZIP 227, “Changes to ZIP 317”).