PR #1407proposed changes toZIP 226ยทZIP 227ยทZIP 228

ZIP 226: Update for the Ironwood pool and ZIP 248's transaction format

Draftby daira ยท updated 2026-10-22zips/zip-0226.rst @ 972214a9ff ยท upstream 4699a8d518view on GitHub โ†—

Unofficial preview โ€” the proposed text below is rendered from the pull request head and is not part of the canonical ZIP set.

Terminology

The key word "MUST" in this document is to be interpreted as described in BCP 14 [1] when, and only when, it appears in all capitals.

The term "network upgrade" in this document is to be interpreted as described in ZIP 200. [2]

The character ยง is used when referring to sections of the Zcash Protocol Specification. [18]

The terms "Orchard" and "Action" in this document are to be interpreted as described in ZIP 224. [4]

The terms "Orchard shielded pool" and "Ironwood shielded pool" in this document are to be interpreted as described in ZIP 229. [10]

The terms "Asset" and "Custom Asset" in this document are to be interpreted as described in ZIP 227. [5]

We define the following additional terms:

  • Split Input: an Action input used to ensure that the output note of that Action is of a validly issued ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ (see [6]) when there is no corresponding real input note, in situations where the number of outputs are larger than the number of inputs. See formal definition in Split Notes.

  • Split Action: an Action that contains a Split Input.

Abstract

This ZIP (ZIP 226) proposes the Orchard Zcash Shielded Assets (OrchardZSA) protocol, in conjunction with ZIP 227 [5]. The OrchardZSA protocol is an extension of the Orchard protocol that enables the issuance, transfer and burn of custom Assets on the Zcash chain. The issuance of such Assets is defined in ZIP 227 [5], while the transfer and burn of such Assets is defined in this ZIP (ZIP 226). While the proposed OrchardZSA protocol is a modification to the Orchard protocol, it has been designed with adaptation to possible future shielded protocols in mind.

This ZIP is defined relative to the Zcash protocol specification version 2026.8.0 [19].

Motivation

None of the currently deployed Zcash transfer protocols support Custom Assets. Enabling multi-asset support on the Zcash chain will open the door for a host of applications, and enhance the ecosystem with application developers and Asset custody institutions for issuance and bridging purposes. This ZIP builds on the issuance mechanism introduced in ZIP 227 [5].

Overview

In order to be able to represent different Assets, we need to define a data field that uniquely represents the Asset in question, which we call the Asset Identifier ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ . This Asset Identifier maps to an Asset Base ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ that is stored in OrchardZSA notes. These terms are formally defined in ZIP 227 [5].

The Asset Identifier (via means of the Asset Digest and Asset Base) will be used to enforce that the balance of an Action Description [21] [36] is preserved across Assets (see the Orchard Binding Signature [26]), and by extension the balance of an Orchard transaction. That is, the sum of all the ๐— ๐–บ ๐—… ๐—Ž ๐–พ ๐—‡ ๐–พ ๐— from each Action Description, computed as ๐— ๐–บ ๐—… ๐—Ž ๐–พ ๐—ˆ ๐—… ๐–ฝ โˆ’ ๐— ๐–บ ๐—… ๐—Ž ๐–พ ๐—‡ ๐–พ ๐— , must be balanced only with respect to the same Asset Identifier. This is especially important since we will allow different Action Descriptions to transfer notes of different Asset Identifiers, where the overall balance is checked without revealing which (or how many distinct) Assets are being transferred.

As was initially proposed by Jack Grigg and Daira-Emma Hopwood [37] [38], we propose to make this happen by changing the value base point, ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ , in the Homomorphic Pedersen Commitment that derives the value commitment, ๐–ผ ๐— ๐—‡ ๐–พ ๐— , of the net value in an Orchard Action.

Because in a single transaction all value commitments are balanced, there must be as many different value base points as there are Asset Identifiers for a given shielded protocol used in a transaction. We propose to make the Asset Base an auxiliary input to the proof for each Action statement [28], represented already as a point on the Pallas curve. The circuit then should check that the same Asset Base is used in the old note commitment and the new note commitment [33], and as the base point in the value commitment [32]. This ensures (1) that the input and output notes are of the same Asset Base, and (2) that only Actions with the same Asset Base will balance out in the Orchard binding signature.

In order to ensure the security of the transfers, and as we will explain below, we are redefining input dummy notes [25] for Custom Assets, as we need to enforce that the ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ of the output note of that Split Action is the output of a valid ๐–น ๐–ฒ ๐–  ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ก ๐–บ ๐—Œ ๐–พ computation defined in ZIP 227 [5].

We include the ability to pause the ZSA functionality, via a ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–น ๐–ฒ ๐–  boolean flag. When this flag is set to false, the proof will fail for any non-native Asset, making it impossible to perform transactions involving Custom Assets. When this flag is set to true, the circuit will allow transactions involving Custom Assets subject to the values of the ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–ฒ ๐—‰ ๐–พ ๐—‡ ๐–ฝ ๐—Œ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ and ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–ฎ ๐—Ž ๐— ๐—‰ ๐—Ž ๐— ๐—Œ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ flags, similar to the vanilla Orchard setting.

Finally, in this ZIP we also describe the burn mechanism, which is a direct extension of the transfer mechanism. The burn process uses a similar mechanism to what is used in Orchard to unshield ZEC, by using the ๐— ๐–บ ๐—… ๐—Ž ๐–พ ๐–ก ๐–บ ๐—… ๐–บ ๐—‡ ๐–ผ ๐–พ of the Asset in question. Burning Assets is useful for many purposes, including bridging, and removing supply of Assets.

Privacy Implications

  • After the protocol upgrade, the Ironwood shielded pool will be shared by the Orchard protocol and the OrchardZSA protocol. The Orchard shielded pool cannot contain OrchardZSA notes.

  • Deploying the OrchardZSA protocol does not necessitate disabling the Orchard protocol. Both can co-exist and be addressed via different transaction versions.

  • OrchardZSA note commitments for the native asset (ZEC) are indistinguishable from OrchardZSA note commitments for non-native Assets.

  • When including new Assets we would like to maintain the amount and identifiers of Assets private, which is achieved with the design.

Specification

Most of the protocol is kept the same as the Orchard protocol released with NU5, except for the following.

Asset Identifiers

For every new Asset, there MUST be a new and unique Asset Identifier. Every Asset is defined by an Asset description, ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— _ ๐–ฝ ๐–พ ๐—Œ ๐–ผ , which is a global byte string (scoped across all future versions of Zcash). From this Asset description and the issuance validating key of the issuer, the specific Asset Identifier, ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ , the Asset Digest, and the Asset Base ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ) are derived as defined in ZIP 227 [5].

This Asset Base will be the base point of the value commitment for the specific Custom Asset. Note that the Asset Base of the ZEC Asset will be kept as the original value base point, ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ .

Rationale for Asset Identifiers

In future network and protocol upgrades, the same Asset description string can be carried on, potentially mapping into a different shielded pool. In that case, nodes should know how to transform the Asset Identifier, the Asset Digest, and the Asset Base from one shielded pool to another, while ensuring there are no balance violations [3].

We prevent a potential malleability attack on the Asset Identifier by ensuring the output notes receive an Asset Base that exists on the global state.

Note Structure and Commitment

An OrchardZSA note differs from an Orchard note [20] by additionally including the Asset Base, ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ . So an OrchardZSA note is a tuple ( ๐–ฝ , ๐—‰ ๐—„ ๐–ฝ , ๐— , ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , \rhoย  , \psiย  , ๐—‹ ๐–ผ ๐—† ) , where

  • ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ โˆถ โ„™ * is the unique element of the Pallas group [34] that identifies each Asset in the Orchard protocol, defined as the Asset Base in ZIP 227 [6], a valid group element that is not the identity and is not โŠฅ . The byte representation of the Asset Base is defined as $mathsf{asset_base} : mathbb{B}^{mathbb{Y}^{[ell_{mathbb{P}}/8]}} := mathsf{LEBS2OSP}_{ell_{mathbb{P}}}(mathsf{repr}_{mathbb{P}}(mathsf{AssetBase}))$.

  • The remaining terms are as defined in ยง3.2 โ€˜Notesโ€™ [20].

Note that the above assumes a canonical encoding, which is true for the Pallas group, but may not hold for future shielded protocols.

Let ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  be the type of a OrchardZSA note, i.e.

๐–ญ ๐—ˆ ๐— ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  โˆถ = ๐”น [ โ„“ ๐–ฝ ] ร— ๐–ช ๐–  ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . ๐–ฏ ๐—Ž ๐–ป ๐—… ๐—‚ ๐–ผ ร— { 0 . . 2 โ„“ ๐— ๐–บ ๐—… ๐—Ž ๐–พ โˆ’ 1 } ร— โ„™ * ร— ๐”ฝ q โ„™ ร— ๐”ฝ q โ„™ ร— ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . ๐–ณ ๐—‹ ๐–บ ๐—‰ ๐–ฝ ๐—ˆ ๐—ˆ ๐—‹ ,

where โ„™ * is the Pallas group excluding the identity element, and the other types are as defined in ยง3.2 โ€˜Notesโ€™ [20].

Non-normative note: The type and definition of the OrchardZSA note reflect that it is a tuple of all the components of an Orchard note, with the addition of the Asset Base into the tuple.

We define the note commitment scheme ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐—† ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  as follows:

  • ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  โˆถ ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . ๐–ณ ๐—‹ ๐–บ ๐—‰ ๐–ฝ ๐—ˆ ๐—ˆ ๐—‹ ร— ๐”น [ โ„“ โ„™ ] ร— ๐”น [ โ„“ โ„™ ] ร— { 0 . . 2 โ„“ ๐— ๐–บ ๐—… ๐—Ž ๐–พ โˆ’ 1 } ร— ๐”ฝ q โ„™ ร— ๐”ฝ q โ„™ ร— โ„™ * โ†’ ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . ๐–ฎ ๐—Ž ๐— ๐—‰ ๐—Ž ๐—

where โ„™ , โ„“ โ„™ , q โ„™ are as defined for the Pallas curve [34], and where ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . { ๐–ณ ๐—‹ ๐–บ ๐—‰ ๐–ฝ ๐—ˆ ๐—ˆ ๐—‹ , ๐–ฎ ๐—Ž ๐— ๐—‰ ๐—Ž ๐— } are as defined in ยง4.1.8 โ€˜Commitmentโ€™ [23]. This uses the note commitment scheme defined in ยง5.4.8.4 โ€˜Sinsemilla Commitmentsโ€™ [33] as follows:

\mathsf{NoteCommit^{OrchardZSA}_{rcm}}(\mathsf{g_d}\star, \mathsf{pk_d}\star, \mathsf{v}, \text{ฯ}, \text{ฯˆ}, \mathsf{AssetBase}) :=
  \begin{cases}
    \mathsf{NoteCommit^{Orchard}_{rcm}}(\mathsf{g_d}\star, \mathsf{pk_d}\star, \mathsf{v}, \text{ฯ}, \text{ฯˆ}), &\!\!\textsf{if } \mathsf{AssetBase} = \mathcal{V}^{\mathsf{Orchard}} \\
    \mathsf{cm_{ZSA}} &\!\!\textsf{otherwise}
  \end{cases}

where:

  • \mathsf{cm_{ZSA}} := \mathsf{SinsemillaHashToPoint}(\texttt{โ€œz.cash:ZSA-NoteCommit-Mโ€},\hspace{-6em} $hspace{6em}mathsf{g_{d}star} ,||, mathsf{pk_{d}star} ,||, mathsf{I2LEBSP_{64}(v)} ,||, mathsf{I2LEBSP}_{ell^{mathsf{Orchard}}_{mathsf{base}}}(text{ฯ})hspace{-6em}$ $hspace{6em},||, mathsf{I2LEBSP}_{ell^{mathsf{Orchard}}_{mathsf{base}}}(text{ฯˆ}) ,||, mathsf{asset_base})hspace{-4em}$ \hspace{4em}\,+\; [\mathsf{rcm}]\,\mathsf{GroupHash}^{\mathbb{P}}(\texttt{โ€œz.cash:Orchard-NoteCommit-rโ€}, \texttt{โ€œโ€})

Note that ๐—‹ ๐–พ ๐—‰ ๐—‹ โ„™ and ๐–ฆ ๐—‹ ๐—ˆ ๐—Ž ๐—‰ ๐–ง ๐–บ ๐—Œ ๐— โ„™ are as defined for the Pallas curve [34], โ„“ ๐–ป ๐–บ ๐—Œ ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ is as defined in ยง5.3 โ€˜Constantsโ€™ [30], and ๐–จ ๐Ÿค ๐–ซ ๐–ค ๐–ก ๐–ฒ ๐–ฏ is as defined in ยง5.1 โ€˜Integers, Bit Sequences, and Endiannessโ€™ [29].

The nullifier is generated in the same manner as in the Orchard protocol ยง4.16 โ€˜Computing ฯ values and Nullifiersโ€™ [27].

The OrchardZSA note plaintext also includes the Asset Base ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— _ ๐–ป ๐–บ ๐—Œ ๐–พ โˆถ ๐”น [ โ„“ โ„™ ] in addition to the components in the Orchard note plaintext [35].

Open Issue: The encoding of OrchardZSA bundles in the transaction format of ZIP 248 [13] is yet to be specified, including the explicit encoding of the OrchardZSA note plaintext. These encodings, including that of the note plaintext [12], were specified for the withdrawn ZIP 230 design [11].

When ยง 4.7.3 'Sending Notes (Orchard)' [24] or ยง 4.8.3 'Dummy Notes (Orchard)' [25] are invoked directly or indirectly in the computation of \rhoย  and \psiย  for an OrchardZSA note, ๐—… ๐–พ ๐–บ ๐–ฝ ๐–ก ๐—’ ๐— ๐–พ MUST be set to {{ZSALEADBYTE}}. This is a placeholder for the note plaintext lead byte of OrchardZSA notes, whose value is yet to be assigned.

The explicit order of addition of the note commitments to the note commitment tree is specified in ZIP 227 [8].

Rationale for Note Commitment

In the OrchardZSA protocol, the instance of the note commitment scheme, ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐—† ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  , differs from the Orchard-protocol note commitment scheme ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐—† ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ in that for Custom Assets, the Asset Base will be added as an input to the commitment computation. In the case where the Asset is the ZEC Asset, the commitment is computed identically to the Orchard-protocol note commitment, without making use of the ZEC Asset Base as an input. As we will see, the nested structure of the Sinsemilla-based commitment [33] allows us to add the Asset Base as a final recursive step.

The note commitment output is still indistinguishable from Orchard-protocol ZEC note commitments, by definition of the Sinsemilla hash function [31]. OrchardZSA-protocol note commitments will therefore be added to the same note commitment tree as the Orchard-protocol notes of the Ironwood shielded pool. In essence, we have:

๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐—† ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐—‹ ๐–พ ๐—‰ ๐—‹ โ„™ ( ๐—€ ๐–ฝ ) , ๐—‹ ๐–พ ๐—‰ ๐—‹ โ„™ ( ๐—‰ ๐—„ ๐–ฝ ) , ๐— , \rhoย  , \psiย  , ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ) โˆˆ ๐–ญ ๐—ˆ ๐— ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . ๐–ฎ ๐—Ž ๐— ๐—‰ ๐—Ž ๐—

This definition can be viewed as a generalization of the Orchard-protocol note commitment, and will allow maintaining a single commitment instance for the note commitment, which will be used both for pre-ZSA Orchard-protocol notes and OrchardZSA-protocol notes.

Value Commitment

In the case of the OrchardZSA protocol, the value of different Asset Identifiers in a given transaction will be committed using a different value base point. The value commitment becomes:

๐–ผ ๐— ๐—‡ ๐–พ ๐— โˆถ = ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ , ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—‡ ๐–พ ๐— ) = [ ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—‡ ๐–พ ๐— ] ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ + [ ๐—‹ ๐–ผ ๐— ] โ„› ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ

where ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—‡ ๐–พ ๐— = ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—ˆ ๐—… ๐–ฝ โˆ’ ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—‡ ๐–พ ๐— such that

  • ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—ˆ ๐—… ๐–ฝ and ๐— ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ ๐—‡ ๐–พ ๐— are the values of the old and new notes of Asset Identifier ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ respectively,

  • ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ is defined in ZIP 227 [5], and

  • \mathcal{R}^{\mathsf{Orchard}} := \mathsf{GroupHash^{\mathbb{P}}}(\texttt{โ€œz.cash:Orchard-cvโ€}, \texttt{โ€œrโ€}), as in the Orchard protocol.

For ZEC, we define ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–จ ๐–ฝ โˆถ = ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ so that the value commitment for ZEC notes is computed identically to the Orchard protocol deployed in NU5 [4]. As such ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ( ๐— ) as defined in [4] is used as ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ , ๐— ) here.

Rationale for Value Commitment

The Orchard Protocol uses a Homomorphic Pedersen Commitment [32] to perform the value commitment, with fixed base points ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ and โ„› ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ as the values represent the amount of ZEC being transferred.

The use of different value base points for different Assets enables the final balance of the transaction to be securely computed, such that each Asset Identifier is balanced independently, which is required as different Assets are not meant to be mutually fungible.

Burn Mechanism

The burn mechanism is a transparent extension to the transfer protocol that enables a specific amount of any Custom Asset to be "destroyed" by the holder. The burn mechanism does NOT send Assets to a non-spendable address, it simply reduces the total number of units of a given Custom Asset in circulation. It is enforced at the consensus level, by using an extension of the value balance mechanism used for ZEC Assets. Burning makes it globally provable that a given amount of a Custom Asset has been destroyed. Note that the OrchardZSA Protocol does not allow for the burning of the Native Asset (i.e. ZEC or TAZ).

In the OrchardZSA Transaction Structure, there is now an ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set. For every Custom Asset (represented by its ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ ) that is burnt in the transaction, the sender adds to ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ the tuple ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ) , where ๐— is the amount of the Custom Asset the sender wants to burn. We define a constant ๐–ฌ ๐–  ๐–ท _ ๐–ก ๐–ด ๐–ฑ ๐–ญ _ ๐–ต ๐–  ๐–ซ ๐–ด ๐–ค โˆถ = 2 63 โˆ’ 1 , which denotes the maximum amount of a given Custom Asset that can be burnt in a transaction. We denote by L the cardinality of the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set in a transaction.

Open Issue: The encoding of the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set is yet to be specified, as noted in Note Structure and Commitment.

As described in Value Balance Verification, this provides the information for the validator of the transaction to compute the value commitment with the corresponding Asset Base. This ensures that the values are all balanced out on a per-Asset basis in the transaction.

Additional Consensus Rules for the assetBurn set

  1. It MUST be the case that for every ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ) โˆˆ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ , ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ โ‰  ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ . That is, the Native Asset is not allowed to be burnt by this mechanism.

  2. It MUST be that for every ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ) โˆˆ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ , ๐— > 0 and ๐— โ‰ค ๐–ฌ ๐–  ๐–ท _ ๐–ก ๐–ด ๐–ฑ ๐–ญ _ ๐–ต ๐–  ๐–ซ ๐–ด ๐–ค .

  3. There MUST be no duplication of Custom Assets in the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set. That is, every ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ has at most one entry in ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ .

The other consensus rule changes for the OrchardZSA protocol are specified in ZIP 227 [7].

Note: The transparent protocol will not be changed with this ZIP to adapt to a multiple Asset structure. This means that unless future consensus rules changes do allow it, unshielding will not be possible for Custom Assets.

Rationale for MAX_BURN_VALUE

The maximum amount of any Custom Asset allowed to be burnt in a transaction is set to ๐–ฌ ๐–  ๐–ท _ ๐–ก ๐–ด ๐–ฑ ๐–ญ _ ๐–ต ๐–  ๐–ซ ๐–ด ๐–ค in order to prevent it from being incompatible with other valueBalance fields, which are signed 64-bit integers. It will also allow for compatibility with future Custom-asset-specific value balances in subsequent pools that support transferring ZSAs from the Ironwood shielded pool via a turnstile.

Value Balance Verification

In order to verify the balance of the different Assets, the verifier MUST perform a similar process as for the Orchard protocol [26], with the addition of the burn information.

For a total of n Actions in a transfer, the prover MUST still sign the SIGHASH transaction hash using the binding signature key ๐–ป ๐—Œ ๐—„ = โˆ‘ i = 1 n ๐—‹ ๐–ผ ๐— i .

The verifier MUST compute the value balance verification equation:

๐–ป ๐— ๐—„ = ( โˆ‘ i = 1 n ๐–ผ ๐— i ๐—‡ ๐–พ ๐— ) โˆ’ ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐Ÿข ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ , ๐— ๐–ป ๐–บ ๐—… ๐–บ ๐—‡ ๐–ผ ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ) โˆ’ โˆ‘ ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ) โˆˆ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐Ÿข ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— )

After computing ๐–ป ๐— ๐—„ , the verifier MUST use it to verify the binding signature on the SIGHASH transaction hash.

Open Issue: The transaction format of ZIP 248 [13] records value balances as value pool deltas. How the value balance ๐— ๐–ป ๐–บ ๐—… ๐–บ ๐—‡ ๐–ผ ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ and the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set used in this equation are represented in that format is yet to be specified, as noted in Note Structure and Commitment.

Rationale for Value Balance Verification

We assume n Actions in a transfer. Out of these n Actions, we further distinguish (for the sake of clarity) between Actions related to ZEC and Actions related to Custom Assets. We denote by S ๐–น ๐–ค ๐–ข โІ { 1 . . n } the set of indices of Actions that are related to ZEC, and by S ๐–ข ๐–  = { 1 . . n } โงต S ๐–น ๐–ค ๐–ข the set of indices of Actions that are related to Custom Assets.

The right hand side of the value balance verification equation can be expanded to:

( ( โˆ‘ i โˆˆ S ๐–น ๐–ค ๐–ข ๐–ผ ๐— i ๐—‡ ๐–พ ๐— ) + ( โˆ‘ j โˆˆ S ๐–ข ๐–  ๐–ผ ๐— j ๐—‡ ๐–พ ๐— ) ) โˆ’ ( [ ๐— ๐–ป ๐–บ ๐—… ๐–บ ๐—‡ ๐–ผ ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ] ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ + [ 0 ] โ„› ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ) โˆ’ ( โˆ‘ ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ) โˆˆ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ [ ๐— ] ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ + [ 0 ] โ„› ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ )

This equation contains the balance check of the Orchard protocol [26]. With ZSA, transfer Actions for Custom Assets must also be balanced across Asset Bases. All Custom Assets are contained within the shielded pool, and cannot be unshielded via a regular transfer. Custom Assets can be burnt, the mechanism for which reveals the amount and identifier of the Asset being burnt, within the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set. As such, for a correctly constructed transaction, we will get $sum_{j in S_{mathsf{CA}}} mathsf{cv}^{mathsf{net}}_j - sum_{(mathsf{AssetBase}, mathsf{v}) in mathsf{assetBurn}} [mathsf{v}],mathsf{AssetBase} = sum_{j in S_{mathsf{CA}}} [mathsf{rcv}^{mathsf{net}}_j],mathcal{R}^{mathsf{Orchard}}$.

When the Asset is not being burnt, the net balance of the input and output values is zero, and there will be no addition to the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ vector. Therefore, the relationship between ๐–ป ๐— ๐—„ and ๐–ป ๐—Œ ๐—„ will hold if and only if, per Custom Asset, the sum of the net values of the relevant Actions equals the corresponding ๐— k value (or equals 0 if that Asset is not in the ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐—Ž ๐—‹ ๐—‡ set), and for ZEC, the sum of the net values of the relevant Actions equals the ๐— ๐–ป ๐–บ ๐—… ๐–บ ๐—‡ ๐–ผ ๐–พ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ value.

As in the Orchard protocol, the binding signature verification key, ๐–ป ๐— ๐—„ , will only be valid (and hence verify the signature correctly), as long as the committed values sum to zero. In contrast, in this protocol, the committed values must sum to zero per Asset Base, as the Pedersen commitments add up homomorphically only with respect to the same value base point.

Split Notes

A Split Input is a copy of a previously issued input note (that is, a note that has previously been included in the Merkle tree), with the following changes:

  • A ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ boolean is set to 1.

  • The value of the note is replaced with the value 0 during the computation of the value commitment.

Input notes are sometimes split in two (or more) output notes, as in most cases, not all the value in a single note is sent to a single output.

When the number of input notes of a particular Asset Base is smaller than the required number of output notes for the same Asset Base, the sender creates Split Inputs of the same Asset Base as padding for the input-less Actions. Note that we do not care about whether the previously issued note copied to create a Split Input is owned by the sender, or whether it was nullified before.

Wallets and other clients have to choose from the following to ensure the Asset Base is preserved for the output note of a Split Action:

  1. The Split Input note could be another note containing the same Asset Base that is being spent by this transaction (but not by this Split Input).

  2. The Split Input note could be a different unspent note containing the same Asset Base (note that the note will not actually be spent).

  3. The Split Input note could be an already spent note containing the same Asset Base (note that by zeroing the value in the circuit, we prevent double spending).

For Split Notes, the nullifier is generated as follows:

๐—‡ ๐–ฟ ๐—ˆ ๐—… ๐–ฝ = ๐–ค ๐—‘ ๐— ๐—‹ ๐–บ ๐–ผ ๐— โ„™ ( [ ( ๐–ฏ ๐–ฑ ๐–ฅ ๐—‡ ๐—„ ๐—‡ ๐–ฟ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ( \rhoย  ๐—ˆ ๐—… ๐–ฝ ) + \psiย  ๐—‡ ๐–ฟ ) mod q โ„™ ] ๐’ฆ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ + ๐–ผ ๐—† ๐—ˆ ๐—… ๐–ฝ + โ„’ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ )

where \psiย  ๐—‡ ๐–ฟ is computed as $mathsf{ToBase^{Orchard}}big(mathsf{PRF^{expand}_{rseed_nf}}([mathtt{0x0A}] ,||, underline{text{ฯ}^{mathsf{old}}})kern-0.1embig)$ for $mathsf{rseed_nf}$ sampled uniformly at random on $mathbb{B}^{{kern-0.1emtinymathbb{Y}}[32]}$, $mathcal{K}^{mathsf{Orchard}}$ is the Orchard Nullifier Base as defined in ยง4.16 โ€˜Computing ฯ values and Nullifiersโ€™ [27], and \mathcal{L}^{\mathsf{Orchard}} := \mathsf{GroupHash^{\mathbb{P}}}(\texttt{โ€œz.cash:Orchardโ€}, \texttt{โ€œLโ€}). The first-byte domain separator ๐Ÿถ ๐šก ๐Ÿถ ๐™ฐ for ๐–ฏ ๐–ฑ ๐–ฅ ๐–พ ๐—‘ ๐—‰ ๐–บ ๐—‡ ๐–ฝ is reserved for this use by ZIP 2005 [17], as recorded in ยง4.1.2 โ€˜Pseudo Random Functionsโ€™ [22].

Rationale for Split Notes

In the Orchard protocol, since each Action represents an input and an output, the transaction that wants to send one input to multiple outputs must have multiple inputs. The Orchard protocol gives dummy spend notes [25] to the Actions that have not been assigned input notes.

The Orchard technique requires modification for the OrchardZSA protocol with multiple Asset Identifiers, as the output note of the split Actions cannot contain just any Asset Base. We must enforce it to be an actual output of a GroupHash computation (in fact, we want it to be of the same Asset Base as the original input note, but the binding signature takes care that the proper balancing is performed). Without this enforcement the prover could input a multiple (or linear combination) of an existing Asset Base, and thereby attack the network by overflowing the ZEC value balance and hence counterfeiting ZEC funds.

Therefore, for Custom Assets we enforce that every input note to an OrchardZSA Action must be proven to exist in the set of note commitments in the note commitment tree. We then enforce this real note to be โ€œunspendableโ€ in the sense that its value will be zeroed in split Actions and the nullifier will be randomized, making the note not spendable in the specific Action. Then, the proof itself ensures that the output note is of the same Asset Base as the input note. In the circuit, the split note functionality will be activated by a boolean private input to the proof (aka the ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ boolean). This ensures that the value base points of all output notes of a transfer are actual outputs of a GroupHash, as they originate in the Issuance protocol which is publicly verified.

Note that the Orchard dummy note functionality remains in use for ZEC notes, and the Split Input technique is used in order to support Custom Assets.

Circuit Statement

Every OrchardZSA Action statement is closely similar to the Orchard Action statement [28], except for a few additions that ensure the security of the Asset Identifier system. We detail these changes below.

All modifications in the Circuit are detailed in [39].

Asset Base Equality

The following constraints must be added to ensure that the input and output note are of the same ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ :

  • The Asset Base, ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , for the note is witnessed once, as an auxiliary input.

  • In the Old note commitment integrity constraint in the Orchard Action statement [28], $mathsf{NoteCommit^{Orchard}_{rcm^{old}}}(mathsf{repr}_{mathbb{P}}(mathsf{g_d^{old}}), mathsf{repr}_{mathbb{P}}(mathsf{pk_d^{old}}), mathsf{v^{old}}, text{ฯ}^{mathsf{old}}, text{ฯˆ}^{mathsf{old}})$ is replaced with $mathsf{NoteCommit^{OrchardZSA}_{rcm^{old}}}(mathsf{repr}_{mathbb{P}}(mathsf{g_d^{old}}), mathsf{repr}_{mathbb{P}}(mathsf{pk_d^{old}}), mathsf{v^{old}}, text{ฯ}^{mathsf{old}}, text{ฯˆ}^{mathsf{old}}, mathsf{AssetBase})$.

  • In the New note commitment integrity constraint in the Orchard Action statement [28], $mathsf{NoteCommit^{Orchard}_{rcm^{new}}}(mathsf{repr}_{mathbb{P}}(mathsf{g_d^{new}}), mathsf{repr}_{mathbb{P}}(mathsf{pk_d^{new}}), mathsf{v^{new}}, text{ฯ}^{mathsf{new}}, text{ฯˆ}^{mathsf{new}})$ is replaced with $mathsf{NoteCommit^{OrchardZSA}_{rcm^{new}}}(mathsf{repr}_{mathbb{P}}(mathsf{g_d^{new}}), mathsf{repr}_{mathbb{P}}(mathsf{pk_d^{new}}), mathsf{v^{new}}, text{ฯ}^{mathsf{new}}, text{ฯˆ}^{mathsf{new}}, mathsf{AssetBase})$.

To make the evaluation of the note commitment easier, we add a boolean ๐—‚ ๐—Œ _ ๐—‡ ๐–บ ๐— ๐—‚ ๐— ๐–พ _ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— as an auxiliary witness. We also add some constraints to verify that this variable is activated (i.e. ๐—‚ ๐—Œ _ ๐—‡ ๐–บ ๐— ๐—‚ ๐— ๐–พ _ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— = 1 ) if the Asset Base is equal to ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ and this variable is not activated (i.e. ๐—‚ ๐—Œ _ ๐—‡ ๐–บ ๐— ๐—‚ ๐— ๐–พ _ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— = 0 ) if the Asset Base is not equal to ๐’ฑ ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ .

The ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–น ๐–ฒ ๐–  Flag

The following constraints must be added to disable transactions involving Custom Assets when the ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–น ๐–ฒ ๐–  flag is set to false:

  • if ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–น ๐–ฒ ๐–  is not activated (i.e. ๐–พ ๐—‡ ๐–บ ๐–ป ๐—… ๐–พ ๐–น ๐–ฒ ๐–  = 0 ), then constrain ๐—‚ ๐—Œ _ ๐—‡ ๐–บ ๐— ๐—‚ ๐— ๐–พ _ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— = 1 , since the ๐–  ๐—Œ ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ must be equal to the native asset.

Value Commitment Correctness

The following constraints must be added to ensure that the value commitment is computed using the witnessed Asset Base:

  • The fixed-base multiplication constraint between the value and the value base point of the value commitment, ๐–ผ ๐— , is replaced with a variable-base multiplication between the two.

  • The witness to the value base point (as defined in the asset base equation) is the auxiliary input ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ .

Asset Identifier Consistency for Split Actions

Senders must not be able to change the Asset Base for the output note in a Split Action. We do this via the following constraints:

  • The Value Commitment Integrity should be changed:

    • Replace the input note value by a generic value, ๐— ' , as ๐–ผ ๐— ๐—‡ ๐–พ ๐— = ๐–ต ๐–บ ๐—… ๐—Ž ๐–พ ๐–ข ๐—ˆ ๐—† ๐—† ๐—‚ ๐— ๐—‹ ๐–ผ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ ๐–น ๐–ฒ ๐–  ( ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ , ๐— ' โˆ’ ๐— ๐—‡ ๐–พ ๐— )

  • Add a boolean ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ variable as an auxiliary witness. This variable is to be activated ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ = 1 if the Action in question has a Split Input and ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ = 0 if the Action is actually spending an input note:

    • If ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ = 1 then constrain ๐— ' = 0 otherwise constrain ๐— ' = ๐— ๐—ˆ ๐—… ๐–ฝ from the auxiliary input.

    • If ๐—Œ ๐—‰ ๐—… ๐—‚ ๐— _ ๐–ฟ ๐—… ๐–บ ๐—€ = 1 then constrain ๐—‚ ๐—Œ _ ๐—‡ ๐–บ ๐— ๐—‚ ๐— ๐–พ _ ๐–บ ๐—Œ ๐—Œ ๐–พ ๐— = 0 because split notes are only available for Custom Assets.

  • The Merkle Path Validity should check the existence of the note commitment as usual (and not like with dummy notes):

    • Check for all notes except dummy notes that ( ๐—‰ ๐–บ ๐— ๐— , ๐—‰ ๐—ˆ ๐—Œ ) is a valid Merkle path of depth ๐–ฌ ๐–พ ๐—‹ ๐—„ ๐—… ๐–พ ๐–ฃ ๐–พ ๐—‰ ๐— ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ , from ๐–ผ ๐—† ๐—ˆ ๐—… ๐–ฝ to the anchor ๐—‹ ๐— ๐–ฎ ๐—‹ ๐–ผ ๐— ๐–บ ๐—‹ ๐–ฝ .

    • The new constraint is $underbrace{(mathsf{v^{old}} = 0 land mathsf{is_native_asset} = 1)}_text{It is a dummy note} lor underbrace{(mathsf{Valid,Merkle,Path})}_text{The Merkle Path is valid}$.

  • The Nullifier Integrity will be changed to prevent the identification of notes as defined in the Split Notes section.

Backwards Compatibility with ZEC Notes

The input note in the old note commitment integrity check must either include an Asset Base (OrchardZSA note) or not (pre-ZSA Orchard note). If the note is a pre-ZSA Orchard note, the note commitment is computed in the original Orchard fashion [23]. If the note is an OrchardZSA note, the note commitment is computed as defined in the Note Structure and Commitment section.

OrchardZSA Transaction Structure

ZIP 248 [13] specifies a new transaction version, and provisionally registers a bundle variant for OrchardZSA in its format.

Open Issue: The encoding of OrchardZSA bundles is yet to be specified, as noted in Note Structure and Commitment.

Implications for Wallets

Once the transaction version specified by ZIP 248 is allowed on the network, that ZIP requires wallets to be able to parse transactions of that version, and to send only such transactions [16]. For ZSAs, the corresponding requirements on wallets are:

  • Once ZSAs have activated, all wallets should switch to sending only the transaction version that supports ZSAs. They should also use the OrchardZSA bundle variant for all of their Ironwood-pool actions, including those that transfer ZEC. The main consequence of not doing so is that users would not otherwise obtain the privacy benefit of indistinguishability between native and non-native assets in the Ironwood shielded pool, because actions in v6 and earlier transactions, and in bundles of other variants, can only transfer the native ZEC asset.

  • All wallets should be ready to receive funds in outputs of the transaction version that supports ZSAs as soon as they activate. The consequence of not doing so would be that funds sent to Orchard-protocol addresses of a wallet without this support could be temporarily inaccessible, until the wallet is upgraded to fully support the relevant transaction version and note plaintext lead byte, and to rescan Ironwood-pool outputs since ZSA activation.

Sighash

ZIP 248 specifies the digest algorithms for the transaction version that it defines [14], and a mechanism for versioning sighash algorithms [15]. Each bundle type defines its contributions to those digests, and the sighash versions available to its signers together with the associated data that each version requires.

Open Issue: The digests of OrchardZSA bundles, and the sighash versions available to their signers, are yet to be specified.

Transaction Fees

The fee mechanism for the upgrades proposed in this ZIP will follow the mechanism described in ZIP 317 for the OrchardZSA protocol upgrade, and are described in ZIP 227 [9].

Backward Compatibility

In order to have backward compatibility with the ZEC notes, we have designed the circuit to support both ZEC and OrchardZSA notes. As we specify above, there are three main reasons we can do this:

  • Note commitments for ZEC notes will remain the same, while note commitments for Custom Assets will be computed taking into account the ๐–  ๐—Œ ๐—Œ ๐–พ ๐— ๐–ก ๐–บ ๐—Œ ๐–พ value as well.

  • The Ironwood shielded pool, which already holds Orchard-protocol notes, will also hold the new OrchardZSA-protocol notes after the upgrade.

  • The value commitment is abstracted to allow for the value base-point as a variable private input to the proof.

  • The ZEC-based Actions will still include dummy input notes, whereas the OrchardZSA Actions will include split input notes and will not include dummy input notes.

Deployment

The Zcash Shielded Assets protocol is scheduled to be deployed in Network Upgrade 7 (NU7). This ZIP currently assumes that this will be the case.

Test Vectors

Reference Implementation

References

Changes

AGENTS.md +6 โˆ’0
@@ -131,6 +131,12 @@ footnotes) and add a corresponding entry in the References section. See `zips/zip-guide-markdown.md` for more information about conventions and syntax. +Fix errors in references as you discover them. Examples are a citation +with no entry in the References section, an entry that nothing cites +(often left behind when the citing text moved to another ZIP), and an +entry whose link target or title is out of date. Whether the fix goes in +the current PR or in a new one is decided case by case. + For reStructuredText ZIPs, see `zips/zip-guide.rst` for conventions and syntax.
zips/zip-0226.rst +82 โˆ’72
@@ -29,6 +29,8 @@ The character ยง is used when referring to sections of the Zcash Protocol Specif The terms "Orchard" and "Action" in this document are to be interpreted as described in ZIP 224. [#zip-0224]_ +The terms "Orchard shielded pool" and "Ironwood shielded pool" in this document are to be interpreted as described in ZIP 229. [#zip-0229]_ + The terms "Asset" and "Custom Asset" in this document are to be interpreted as described in ZIP 227. [#zip-0227]_ We define the following additional terms: @@ -42,7 +44,7 @@ Abstract This ZIP (ZIP 226) proposes the Orchard Zcash Shielded Assets (OrchardZSA) protocol, in conjunction with ZIP 227 [#zip-0227]_. The OrchardZSA protocol is an extension of the Orchard protocol that enables the issuance, transfer and burn of custom Assets on the Zcash chain. The issuance of such Assets is defined in ZIP 227 [#zip-0227]_, while the transfer and burn of such Assets is defined in this ZIP (ZIP 226). While the proposed OrchardZSA protocol is a modification to the Orchard protocol, it has been designed with adaptation to possible future shielded protocols in mind. -This ZIP is defined relative to the Zcash protocol with the changes specified in ZIP 2005 [#zip-2005]_ applied. ZIP 2005 (Orchard Quantum Recoverability) is expected to deploy before any ZSA activation; the references in this document to $\mathsf{H^{rcm,Orchard}}$, $\mathsf{H^{\text{ฯˆ},Orchard}}$, recoverable note plaintexts, and related constructs are to be interpreted as defined by ZIP 2005's modifications to the protocol specification. +This ZIP is defined relative to the Zcash protocol specification version 2026.8.0 [#protocol-base]_. Motivation ========== @@ -73,13 +75,12 @@ Finally, in this ZIP we also describe the *burn* mechanism, which is a direct ex Privacy Implications ==================== -- After the protocol upgrade, the Orchard shielded pool will be shared by the - Orchard protocol and the OrchardZSA protocol. +- After the protocol upgrade, the Ironwood shielded pool will be shared by the + Orchard protocol and the OrchardZSA protocol. The Orchard shielded pool cannot + contain OrchardZSA notes. - Deploying the OrchardZSA protocol does not necessitate disabling the Orchard protocol. Both can co-exist and be addressed via different transaction - versions (V5 for Orchard and V6 for OrchardZSA). Due to this, Orchard note - commitments can be distinguished from OrchardZSA note commitments. This holds - whether or not the two protocols are active simultaneously. + versions. - OrchardZSA note commitments for the native asset (ZEC) are indistinguishable from OrchardZSA note commitments for non-native Assets. - When including new Assets we would like to maintain the amount and identifiers @@ -157,24 +158,25 @@ Note that $\mathsf{repr}_{\mathbb{P}}$ and $\mathsf{GroupHash}^{\mathbb{P}}$ are The nullifier is generated in the same manner as in the Orchard protocol ยง4.16 โ€˜Computing ฯ values and Nullifiersโ€™ [#protocol-rhoandnullifiers]_. The OrchardZSA note plaintext also includes the Asset Base $\mathsf{asset\_base} : \mathbb{B}^{[\ell_{\mathbb{P}}]}$ in addition to the components in the Orchard note plaintext [#protocol-notept]_. -The explicit encoding of the note plaintext is provided in ZIP 230 [#zip-0230-orchard-note-plaintext]_. -When ยง 4.7.3 'Sending Notes (Orchard)' [#protocol-orchardsend]_ or ยง 4.8.3 'Dummy Notes (Orchard)' [#protocol-orcharddummynotes]_ are invoked directly or indirectly in the computation of $\text{ฯ}$ and $\text{ฯˆ}$ for an OrchardZSA note, $\mathsf{leadByte}$ MUST be set to {{ZSALEADBYTE}}. +**Open Issue:** The encoding of OrchardZSA bundles in the transaction format of ZIP 248 [#zip-0248]_ is yet to be specified, including the explicit encoding of the OrchardZSA note plaintext. These encodings, including that of the note plaintext [#zip-0230-orchard-note-plaintext]_, were specified for the withdrawn ZIP 230 design [#zip-0230]_. + +When ยง 4.7.3 'Sending Notes (Orchard)' [#protocol-orchardsend]_ or ยง 4.8.3 'Dummy Notes (Orchard)' [#protocol-orcharddummynotes]_ are invoked directly or indirectly in the computation of $\text{ฯ}$ and $\text{ฯˆ}$ for an OrchardZSA note, $\mathsf{leadByte}$ MUST be set to {{ZSALEADBYTE}}. This is a placeholder for the note plaintext lead byte of OrchardZSA notes, whose value is yet to be assigned. The explicit order of addition of the note commitments to the note commitment tree is specified in ZIP 227 [#zip-0227-note-commitment-order]_. Rationale for Note Commitment ````````````````````````````` -In the OrchardZSA protocol, the instance of the note commitment scheme, $\mathsf{NoteCommit^{OrchardZSA}_{rcm}}$, differs from the Orchard note commitment $\mathsf{NoteCommit^{Orchard}_{rcm}}$ in that for Custom Assets, the Asset Base will be added as an input to the commitment computation. -In the case where the Asset is the ZEC Asset, the commitment is computed identically to the Orchard note commitment, without making use of the ZEC Asset Base as an input. +In the OrchardZSA protocol, the instance of the note commitment scheme, $\mathsf{NoteCommit^{OrchardZSA}_{rcm}}$, differs from the Orchard-protocol note commitment scheme $\mathsf{NoteCommit^{Orchard}_{rcm}}$ in that for Custom Assets, the Asset Base will be added as an input to the commitment computation. +In the case where the Asset is the ZEC Asset, the commitment is computed identically to the Orchard-protocol note commitment, without making use of the ZEC Asset Base as an input. As we will see, the nested structure of the Sinsemilla-based commitment [#protocol-concretesinsemillacommit]_ allows us to add the Asset Base as a final recursive step. -The note commitment output is still indistinguishable from the original Orchard ZEC note commitments, by definition of the Sinsemilla hash function [#protocol-concretesinsemillahash]_. OrchardZSA note commitments will therefore be added to the same Orchard Note Commitment Tree. In essence, we have: +The note commitment output is still indistinguishable from Orchard-protocol ZEC note commitments, by definition of the Sinsemilla hash function [#protocol-concretesinsemillahash]_. OrchardZSA-protocol note commitments will therefore be added to the same note commitment tree as the Orchard-protocol notes of the Ironwood shielded pool. In essence, we have: .. math:: \mathsf{NoteCommit^{OrchardZSA}_{rcm}}(\mathsf{repr}_{\mathbb{P}}(\mathsf{g_d}), \mathsf{repr}_{\mathbb{P}}(\mathsf{pk_d}), \mathsf{v}, \text{ฯ}, \text{ฯˆ}, \mathsf{AssetBase}) \in \mathsf{NoteCommit^{Orchard}.Output} -This definition can be viewed as a generalization of the Orchard note commitment, and will allow maintaining a single commitment instance for the note commitment, which will be used both for pre-ZSA Orchard and OrchardZSA notes. +This definition can be viewed as a generalization of the Orchard-protocol note commitment, and will allow maintaining a single commitment instance for the note commitment, which will be used both for pre-ZSA Orchard-protocol notes and OrchardZSA-protocol notes. Value Commitment ---------------- @@ -214,6 +216,8 @@ For every Custom Asset (represented by its $\mathsf{AssetBase}$) that is burnt i We define a constant $\mathsf{MAX\_BURN\_VALUE} := 2^{63} - 1$, which denotes the maximum amount of a given Custom Asset that can be burnt in a transaction. We denote by $L$ the cardinality of the $\mathsf{assetBurn}$ set in a transaction. +**Open Issue:** The encoding of the $\mathsf{assetBurn}$ set is yet to be specified, as noted in `Note Structure and Commitment`_. + As described in `Value Balance Verification`_, this provides the information for the validator of the transaction to compute the value commitment with the corresponding Asset Base. This ensures that the values are all balanced out on a per-Asset basis in the transaction. @@ -233,7 +237,7 @@ Rationale for MAX_BURN_VALUE ```````````````````````````` The maximum amount of any Custom Asset allowed to be burnt in a transaction is set to $\mathsf{MAX\_BURN\_VALUE}$ in order to prevent it from being incompatible with other valueBalance fields, which are signed 64-bit integers. -It will also allow for compatibility with future Custom-asset-specific value balances in subsequent pools that support transferring ZSAs from the Orchard pool via a turnstile. +It will also allow for compatibility with future Custom-asset-specific value balances in subsequent pools that support transferring ZSAs from the Ironwood shielded pool via a turnstile. Value Balance Verification -------------------------- @@ -249,6 +253,8 @@ The verifier MUST compute the value balance verification equation: After computing $\mathsf{bvk}$, the verifier MUST use it to verify the binding signature on the SIGHASH transaction hash. +**Open Issue:** The transaction format of ZIP 248 [#zip-0248]_ records value balances as value pool deltas. How the value balance $\mathsf{v^{balanceOrchard}}$ and the $\mathsf{assetBurn}$ set used in this equation are represented in that format is yet to be specified, as noted in `Note Structure and Commitment`_. + Rationale for Value Balance Verification ```````````````````````````````````````` @@ -294,7 +300,7 @@ For Split Notes, the nullifier is generated as follows: .. math:: \mathsf{nf_{old}} = \mathsf{Extract}_{\mathbb{P}} ([(\mathsf{PRF^{nfOrchard}_{nk}} (\text{ฯ}^{\mathsf{old}}) + \text{ฯˆ}^{\mathsf{nf}}) \bmod q_{\mathbb{P}}]\,\mathcal{K}^\mathsf{Orchard} + \mathsf{cm^{old}} + \mathcal{L}^\mathsf{Orchard}) -where $\text{ฯˆ}^{\mathsf{nf}}$ is computed as $\mathsf{ToBase^{Orchard}}\big(\mathsf{PRF^{expand}_{rseed\_nf}}([\mathtt{0x0A}] \,||\, \underline{\text{ฯ}^{\mathsf{old}}})\kern-0.1em\big)$ for $\mathsf{rseed\_nf}$ sampled uniformly at random on $\mathbb{B}^{{\kern-0.1em\tiny\mathbb{Y}}[32]}$, $\mathcal{K}^{\mathsf{Orchard}}$ is the Orchard Nullifier Base as defined in ยง4.16 โ€˜Computing ฯ values and Nullifiersโ€™ [#protocol-rhoandnullifiers]_, and $\mathcal{L}^{\mathsf{Orchard}} := \mathsf{GroupHash^{\mathbb{P}}}(\texttt{โ€œz.cash:Orchardโ€}, \texttt{โ€œLโ€})$. The first-byte domain separator $\mathtt{0x0A}$ for $\mathsf{PRF^{expand}}$ is reserved by ZIP 2005 [#zip-2005]_ for this use. +where $\text{ฯˆ}^{\mathsf{nf}}$ is computed as $\mathsf{ToBase^{Orchard}}\big(\mathsf{PRF^{expand}_{rseed\_nf}}([\mathtt{0x0A}] \,||\, \underline{\text{ฯ}^{\mathsf{old}}})\kern-0.1em\big)$ for $\mathsf{rseed\_nf}$ sampled uniformly at random on $\mathbb{B}^{{\kern-0.1em\tiny\mathbb{Y}}[32]}$, $\mathcal{K}^{\mathsf{Orchard}}$ is the Orchard Nullifier Base as defined in ยง4.16 โ€˜Computing ฯ values and Nullifiersโ€™ [#protocol-rhoandnullifiers]_, and $\mathcal{L}^{\mathsf{Orchard}} := \mathsf{GroupHash^{\mathbb{P}}}(\texttt{โ€œz.cash:Orchardโ€}, \texttt{โ€œLโ€})$. The first-byte domain separator $\mathtt{0x0A}$ for $\mathsf{PRF^{expand}}$ is reserved for this use by ZIP 2005 [#zip-2005]_, as recorded in ยง4.1.2 โ€˜Pseudo Random Functionsโ€™ [#protocol-abstractprfs]_. Rationale for Split Notes ````````````````````````` @@ -370,39 +376,45 @@ The input note in the old note commitment integrity check must either include an OrchardZSA Transaction Structure -------------------------------- -The transaction format for v6 transactions is described in ZIP 230 [#zip-0230]_. -The ZSA-related changes in v6 include: +ZIP 248 [#zip-0248]_ specifies a new transaction version, and provisionally +registers a bundle variant for OrchardZSA in its format. -* updates to the transaction structure [#zip-0230-transaction-format]_ and the - sighash digest computation [#zip-0246]_; -* new note plaintext formats for both Sapling and Orchard outputs [#zip-0230-note-plaintexts]_, - with corresponding changes to the note decryption algorithms for incoming and - outgoing viewing keys [#zip-2005]_. +**Open Issue:** The encoding of OrchardZSA bundles is yet to be specified, as +noted in `Note Structure and Commitment`_. Implications for Wallets ```````````````````````` -The following requirements on wallets are specified and motivated in ZIP 230 -[#zip-0230-implications-for-wallets]_: - -* *All* wallets should switch to sending only v6 transactions once NU7 has activated. - The main consequence of not doing so relevant to ZSAs, is that users would not obtain - the privacy benefit of indistinguishability between native and non-native assets in - the Orchard shielded pool, because v5 transactions can only transact in the native - ZEC asset. For other consequences see ZIP 230. - -* *All* wallets should be ready to receive funds in outputs of v6 transactions as soon - as ZSAs activate. The consequence of not doing so would be that funds sent to Orchard - addresses of a wallet without this support could be temporarily inaccessible, until - the wallet is upgraded to fully support v6 and to rescan outputs since v6 activation. - -Sighash modifications relative to ZIP 244 [#zip-0244]_ ------------------------------------------------------- - -Relative to the sighash algorithm defined in ZIP 244 [#zip-0244]_, the sighash algorithm -that applies to v6 transactions differs by altering the Orchard bundle within -the tree hash to match the corresponding OrchardZSA changes. See ZIP 246 [#zip-0246]_ -for details. +Once the transaction version specified by ZIP 248 is allowed on the network, +that ZIP requires wallets to be able to parse transactions of that version, and +to send only such transactions [#zip-0248-implications-for-wallets]_. For ZSAs, +the corresponding requirements on wallets are: + +* Once ZSAs have activated, *all* wallets should switch to sending only the transaction + version that supports ZSAs. They should also use the OrchardZSA bundle variant for all of + their Ironwood-pool actions, including those that transfer ZEC. The main consequence of + not doing so is that users would not otherwise obtain the privacy benefit of + indistinguishability between native and non-native assets in the Ironwood shielded pool, + because actions in v6 and earlier transactions, and in bundles of other variants, can only + transfer the native ZEC asset. + +* *All* wallets should be ready to receive funds in outputs of the transaction version that + supports ZSAs as soon as they activate. The consequence of not doing so would be that funds + sent to Orchard-protocol addresses of a wallet without this support could be temporarily + inaccessible, until the wallet is upgraded to fully support the relevant transaction version + and note plaintext lead byte, and to rescan Ironwood-pool outputs since ZSA activation. + +Sighash +------- + +ZIP 248 specifies the digest algorithms for the transaction version that it +defines [#zip-0248-digest-algorithms]_, and a mechanism for versioning sighash +algorithms [#zip-0248-sighash-versioning]_. Each bundle type defines its +contributions to those digests, and the sighash versions available to its +signers together with the associated data that each version requires. + +**Open Issue:** The digests of OrchardZSA bundles, and the sighash versions +available to their signers, are yet to be specified. Transaction Fees ---------------- @@ -415,7 +427,7 @@ Backward Compatibility In order to have backward compatibility with the ZEC notes, we have designed the circuit to support both ZEC and OrchardZSA notes. As we specify above, there are three main reasons we can do this: - Note commitments for ZEC notes will remain the same, while note commitments for Custom Assets will be computed taking into account the $\mathsf{AssetBase}$ value as well. -- The existing Orchard shielded pool will continue to be used for the new OrchardZSA notes post the upgrade. +- The Ironwood shielded pool, which already holds Orchard-protocol notes, will also hold the new OrchardZSA-protocol notes after the upgrade. - The value commitment is abstracted to allow for the value base-point as a variable private input to the proof. - The ZEC-based Actions will still include dummy input notes, whereas the OrchardZSA Actions will include split input notes and will not include dummy input notes. @@ -446,39 +458,37 @@ References .. [#zip-0209] `ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances <zip-0209.rst>`_ .. [#zip-0224] `ZIP 224: Orchard <zip-0224.rst>`_ .. [#zip-0227] `ZIP 227: Issuance of Zcash Shielded Assets <zip-0227.rst>`_ -.. [#zip-0227-specification-global-issuance-state] `ZIP 227: Issuance of Zcash Shielded Assets โ€” Specification: Global Issuance State <zip-0227.rst#specification-global-issuance-state>`_ .. [#zip-0227-assetidentifier] `ZIP 227: Issuance of Zcash Shielded Assets โ€” Specification: Asset Identifier <zip-0227.rst#specification-asset-identifier-asset-digest-and-asset-base>`_ .. [#zip-0227-consensus] `ZIP 227: Issuance of Zcash Shielded Assets โ€” Specification: Consensus Rule Changes <zip-0227.rst#specification-consensus-rule-changes>`_ .. [#zip-0227-note-commitment-order] `ZIP 227: Issuance of Zcash Shielded Assets โ€” Addition to the Note Commitment Tree <zip-0227.rst#addition-to-the-note-commitment-tree>`_ -.. [#zip-0227-txiddigest] `ZIP 227: Issuance of Zcash Shielded Assets โ€” TxId Digest - Issuance <zip-0227.rst#txid-digest-issuance>`_ -.. [#zip-0227-authcommitment] `ZIP 227: Issuance of Zcash Shielded Assets โ€” Authorizing Data Commitment <zip-0227.rst#authorizing-data-commitment-issuance>`_ .. [#zip-0227-orchardzsa-fee-calculation] `ZIP 227: Issuance of Zcash Shielded Assets โ€” OrchardZSA Fee Calculation <zip-0227.rst#orchardzsa-fee-calculation>`_ -.. [#zip-0230] `ZIP 230: Version 6 Transaction Format <zip-0230.rst>`_ -.. [#zip-0230-transaction-format] `ZIP 230: Version 6 Transaction Format โ€” Transaction Format <zip-0230.rst#transaction-format>`_ -.. [#zip-0230-note-plaintexts] `ZIP 230: Version 6 Transaction Format โ€” Note Plaintexts <zip-0230.rst#note-plaintexts>`_ -.. [#zip-0230-orchard-note-plaintext] `ZIP 230: Version 6 Transaction Format โ€” Orchard Note Plaintext <zip-0230.rst#orchard-note-plaintext>`_ -.. [#zip-0230-implications-for-wallets] `ZIP 230: Version 6 Transaction Format โ€” Implications for Wallets <zip-0230.rst#implications-for-wallets>`_ -.. [#zip-0244] `ZIP 244: Transaction Identifier Non-Malleability <zip-0244.rst>`_ -.. [#zip-0246] `ZIP 246: Digests for the Version 6 Transaction Format <zip-0246.rst>`_ -.. [#zip-0307] `ZIP 307: Light Client Protocol for Payment Detection <zip-0307.rst>`_ -.. [#zip-2005] `ZIP 2005: Orchard Quantum Recoverability <zip-2005.md>`_ -.. [#protocol] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1] or later. <protocol/protocol.pdf>`_ -.. [#protocol-notes] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 3.2: Notes <protocol/protocol.pdf#notes>`_ -.. [#protocol-actions] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 3.7: Action Transfers and their Descriptions <protocol/protocol.pdf#actions>`_ -.. [#protocol-abstractcommit] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.1.8: Commitment <protocol/protocol.pdf#abstractcommit>`_ -.. [#protocol-orchardsend] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.7.3: Sending Notes (Orchard) <protocol/protocol.pdf#orchardsend>`_ -.. [#protocol-orcharddummynotes] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.8.3: Dummy Notes (Orchard) <protocol/protocol.pdf#orcharddummynotes>`_ -.. [#protocol-orchardbalance] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.14: Balance and Binding Signature (Orchard) <protocol/protocol.pdf#orchardbalance>`_ -.. [#protocol-rhoandnullifiers] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.16: Computing ฯ values and Nullifiers <protocol/protocol.pdf#rhoandnullifiers>`_ -.. [#protocol-actionstatement] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.18.4: Action Statement (Orchard) <protocol/protocol.pdf#actionstatement>`_ -.. [#protocol-endian] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.1: Integers, Bit Sequences, and Endianness <protocol/protocol.pdf#endian>`_ -.. [#protocol-constants] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.3: Constants <protocol/protocol.pdf#constants>`_ -.. [#protocol-concretesinsemillahash] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.1.9: Sinsemilla hash function <protocol/protocol.pdf#concretesinsemillahash>`_ -.. [#protocol-concretehomomorphiccommit] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.8.3: Homomorphic Pedersen commitments (Sapling and Orchard) <protocol/protocol.pdf#concretehomomorphiccommit>`_ -.. [#protocol-concretesinsemillacommit] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.8.4: Sinsemilla commitments <protocol/protocol.pdf#concretesinsemillacommit>`_ -.. [#protocol-pallasandvesta] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.9.6: Pallas and Vesta <protocol/protocol.pdf#pallasandvesta>`_ -.. [#protocol-notept] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.5: Encodings of Note Plaintexts and Memo Fields <protocol/protocol.pdf#notept>`_ -.. [#protocol-actionencodingandconsensus] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 7.5: Action Description Encoding and Consensus <protocol/protocol.pdf#actionencodingandconsensus>`_ +.. [#zip-0229] `ZIP 229: Version 6 Transaction Format <zip-0229.md>`_ +.. [#zip-0230] `ZIP 230: Withdrawn Version 6 Transaction Format <zip-0230.rst>`_ +.. [#zip-0230-orchard-note-plaintext] `ZIP 230: Withdrawn Version 6 Transaction Format โ€” Orchard Note Plaintext <zip-0230.rst#orchard-note-plaintext>`_ +.. [#zip-0248] `ZIP 248: Extensible Transaction Format <zip-0248.rst>`_ +.. [#zip-0248-digest-algorithms] `ZIP 248: Extensible Transaction Format โ€” Digest Algorithms <zip-0248.rst#digest-algorithms>`_ +.. [#zip-0248-sighash-versioning] `ZIP 248: Extensible Transaction Format โ€” Sighash Versioning <zip-0248.rst#sighash-versioning>`_ +.. [#zip-0248-implications-for-wallets] `ZIP 248: Extensible Transaction Format โ€” Implications for Wallets <zip-0248.rst#implications-for-wallets>`_ +.. [#zip-2005] `ZIP 2005: Ironwood Quantum Recoverability <zip-2005.md>`_ +.. [#protocol] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3] or later. <protocol/protocol.pdf>`_ +.. [#protocol-base] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3] <protocol/protocol.pdf#2026.8.0>`_ +.. [#protocol-notes] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 3.2: Shielded Pools and Notes <protocol/protocol.pdf#notes>`_ +.. [#protocol-actions] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 3.7: Action Transfers and their Descriptions <protocol/protocol.pdf#actions>`_ +.. [#protocol-abstractprfs] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.1.2: Pseudo Random Functions <protocol/protocol.pdf#abstractprfs>`_ +.. [#protocol-abstractcommit] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.1.8: Commitment <protocol/protocol.pdf#abstractcommit>`_ +.. [#protocol-orchardsend] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.7.3: Sending Notes (Orchard) <protocol/protocol.pdf#orchardsend>`_ +.. [#protocol-orcharddummynotes] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.8.3: Dummy Notes (Orchard) <protocol/protocol.pdf#orcharddummynotes>`_ +.. [#protocol-orchardbalance] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.14: Balance and Binding Signature (Orchard) <protocol/protocol.pdf#orchardbalance>`_ +.. [#protocol-rhoandnullifiers] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.16: Computing ฯ values and Nullifiers <protocol/protocol.pdf#rhoandnullifiers>`_ +.. [#protocol-actionstatement] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.18.4: Action Statement (Orchard) <protocol/protocol.pdf#actionstatement>`_ +.. [#protocol-endian] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.1: Integers, Bit Sequences, and Endianness <protocol/protocol.pdf#endian>`_ +.. [#protocol-constants] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.3: Constants <protocol/protocol.pdf#constants>`_ +.. [#protocol-concretesinsemillahash] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.1.9: Sinsemilla Hash Function <protocol/protocol.pdf#concretesinsemillahash>`_ +.. [#protocol-concretehomomorphiccommit] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.8.3: Homomorphic Pedersen commitments (Sapling and Orchard) <protocol/protocol.pdf#concretehomomorphiccommit>`_ +.. [#protocol-concretesinsemillacommit] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.8.4: Sinsemilla commitments <protocol/protocol.pdf#concretesinsemillacommit>`_ +.. [#protocol-pallasandvesta] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.9.6: Pallas and Vesta <protocol/protocol.pdf#pallasandvesta>`_ +.. [#protocol-notept] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.5: Encodings of Note Plaintexts and Memo Fields <protocol/protocol.pdf#notept>`_ +.. [#protocol-actionencodingandconsensus] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 7.5: Action Description Encoding and Consensus <protocol/protocol.pdf#actionencodingandconsensus>`_ .. [#initial-zsa-issue] `User-Defined Assets and Wrapped Assets <https://github.com/str4d/zips/blob/zip-udas/drafts/zip-user-defined-assets.rst>`_ .. [#generalized-value-commitments] `Comment on Generalized Value Commitments <https://github.com/zcash/zcash/issues/2277#issuecomment-321106819>`_ .. [#circuit-modifications] `Modifications to the Orchard circuit for the OrchardZSA Protocol <https://docs.google.com/document/d/1DzXBqZl_l3aIs_gcelw3OuZz2OVMnYk6Xe_1lBsTji8/edit?usp=sharing>`_
zips/zip-0227.rst +44 โˆ’30
@@ -325,9 +325,11 @@ An Issue Note is a tuple $(\mathsf{d}, \mathsf{pk_d}, \mathsf{v}, \mathsf{AssetB - $\text{ฯ}: \mathbb{F}_{q_{\mathbb{P}}}$ is used to derive the nullifier of the note, and is computed as in `Computation of ฯ`_. - $\mathsf{rseed}: \mathbb{B}^{[\mathbb{Y}^{32}]}$ MUST be sampled uniformly at random by the issuer. -ZIP 230 [#zip-0230-issue-note]_ defines, in ``IssueNoteDescription``, field encodings which together with -$\mathsf{issuer}$ from the parent `Issuance Bundle`_ and $\mathsf{AssetDescHash}$ from the parent -`Issuance Action`_, specify an Issue Note. +**Open Issue:** The encodings of Issue Notes, issuance actions, and the issuance bundle in the +transaction format of ZIP 248 [#zip-0248]_ are yet to be specified. In the withdrawn ZIP 230 design, +an Issue Note is specified by the field encodings in ``IssueNoteDescription`` +[#zip-0230-issue-note]_, together with $\mathsf{issuer}$ from the parent `Issuance Bundle`_ and +$\mathsf{AssetDescHash}$ from the parent `Issuance Action`_. Let $\mathsf{Note^{Issue}}$ be the type of an Issue Note, i.e. @@ -352,7 +354,7 @@ An issuance action, ``IssueAction``, is the instance of issuing a specific Custo The $\mathsf{finalize}$ boolean is set by the Issuer to signal that there will be no further issuance of the specific Custom Asset. As we will see in `Specification: Consensus Rule Changes`_, transactions that attempt to issue further amounts of a Custom Asset that has previously been finalized will be rejected. -The complete encoding of these fields into an ``IssueAction`` is defined in ZIP 230 [#zip-0230-issuance-action-description]_. +**Open Issue:** The complete encoding of these fields into an ``IssueAction`` is yet to be specified, as noted in `Issue Note`_. Issuance Bundle @@ -366,8 +368,9 @@ It contains the following fields: - ``vIssueActions``: an array of issuance actions, of type ``IssueAction``. - ``issueAuthSig``: the encoding of a signature of the transaction SIGHASH, signed by the issuance authorizing key, $\mathsf{isk}$, that validates the issuance. -The issuance bundle is added within the transaction format as a new bundle. -The detailed encoding of the issuance bundle as a part of the V6 transaction format is defined in ZIP 230 [#zip-0230-transaction-format]_. +The issuance bundle is added within the transaction format as a new bundle. + +**Open Issue:** ZIP 248 [#zip-0248]_ lists ZSA issuance among its potential future bundle kinds. The encoding of the issuance bundle is yet to be specified, as noted in `Issue Note`_. Computation of ฯ ---------------- @@ -391,6 +394,8 @@ where $\mathsf{nf}_{0,0}$ is the nullifier for the input note in the first Actio **NOTE:** This implicitly requires that there always is an Action Group in the OrchardZSA bundle of the transaction. This is enforced by a consensus rule in the `Specification: Consensus Rule Changes`_ section. +**Open Issue:** Action Groups were part of the withdrawn ZIP 230 design. Supporting them would require a modification to the transaction format of ZIP 248 [#zip-0248]_, which is possible independently of whether ZSAs activate at the same time. + Issuance Protocol ----------------- The issuer program performs the following operations: @@ -471,7 +476,7 @@ We use $\mathsf{issued\_assets}_{\mathsf{IN}}$ and $\mathsf{issued\_assets}_{\ma Specification: Consensus Rule Changes ===================================== -Let $\mathsf{SigHash}$ be the SIGHASH transaction hash of this transaction, as defined in ยง4.10 โ€˜SIGHASH Transaction Hashingโ€™ [#protocol-sighash]_ with the modifications described in ZIP 226 [#zip-0226-txiddigest]_, using $\mathsf{SIGHASH\_ALL}$. +Let $\mathsf{SigHash}$ be the SIGHASH transaction hash of this transaction, as defined in ยง4.10 โ€˜SIGHASH Transaction Hashingโ€™ [#protocol-sighash]_ with the modifications described in `Sighash`_, using $\mathsf{SIGHASH\_ALL}$. For every transaction: @@ -503,6 +508,8 @@ If the transaction contains an issuance bundle: - The node MUST compute the note commitment, $\mathsf{cm}_{\mathsf{i,j}}$, as defined in the Note Structure and Commitment section of ZIP 226 [#zip-0226-note-structure-and-commitment]_. - If $\mathsf{finalize} = 1$ within the ``flagsIssuance`` field of ``IssueAction``, the node MUST set $\mathsf{issued\_assets}_{\mathsf{OUT}}(\mathsf{AssetBase}).\mathsf{final} = 1$. +**Open Issue:** These rules refer to the ``nActionGroupsOrchard`` and ``nAGExpiryHeight`` fields and to OrchardZSA Action Groups, which the transaction format of ZIP 248 does not support, as noted in `Computation of ฯ`_. They also refer to the encoding of ``IssueNoteDescription``, which is yet to be specified, as noted in `Issue Note`_. + Addition to the Note Commitment Tree ------------------------------------ @@ -517,6 +524,8 @@ The order of addition to the tree is as specified below: - For every Issue Note in the Issue Action, append the note commitment of the Issue Note to the note commitment tree. +**Open Issue:** This order is defined in terms of OrchardZSA Action Groups, which the transaction format of ZIP 248 does not support, as noted in `Computation of ฯ`_. + Rationale ========= The following is a list of rationale for different decisions made in the proposal: @@ -525,6 +534,8 @@ The following is a list of rationale for different decisions made in the proposa - The Custom Asset is described via a combination of the issuer identifier and an asset description string, to preclude the possibility of two different issuers creating colliding Custom Assets. - The requirement of at least one OrchardZSA Action Group in the presence of an issue bundle is both to allow for the computation of the $\text{ฯ}$ field of the issue notes, as well as to prevent replay attacks. If a transaction includes only an issue bundle, the SIGHASH transaction hash would be computed solely based on the issue bundle. A duplicate bundle would have the same SIGHASH transaction hash, potentially allowing for a replay attack. + **Open Issue:** The transaction format of ZIP 248 does not support Action Groups, as noted in `Computation of ฯ`_. + Hash of the asset description ----------------------------- @@ -593,12 +604,19 @@ Concrete Applications -Modifications relative to ZIP 244 [#zip-0244]_ -============================================== +Sighash +======= + +ZIP 248 specifies the digest algorithms for the transaction version that it +defines [#zip-0248-digest-algorithms]_, and a mechanism for versioning sighash +algorithms [#zip-0248-sighash-versioning]_. Each bundle type defines its +contributions to those digests, and the sighash versions available to its +signers together with the associated data that each version requires. -Relative to the sighash algorithm defined in ZIP 244, the sighash algorithm -that applies to v6 transactions differs by including the issuance bundle -components within the tree hash. See ZIP 246 [#zip-0246]_ for details. +**Open Issue:** The digests of the issuance bundle are yet to be specified. So is +the sighash version that the issuance authorization signature uses, in place of +the $\mathsf{SIGHASH\_ALL}$ hash type referred to in +`Specification: Consensus Rule Changes`_. Changes to ZIP 317 [#zip-0317]_ @@ -690,26 +708,22 @@ References .. [#zip-0226] `ZIP 226: Transfer and Burn of Zcash Shielded Assets <zip-0226.rst>`_ .. [#zip-0226-note-structure-and-commitment] `ZIP 226: Transfer and Burn of Zcash Shielded Assets โ€” Note Structure and Commitment <zip-0226.rst#note-structure-and-commitment>`_ .. [#zip-0226-assetburn] `ZIP 226: Transfer and Burn of Zcash Shielded Assets โ€” Additional Consensus Rules for the assetBurn set <zip-0226.rst#additional-consensus-rules-for-the-assetburn-set>`_ -.. [#zip-0226-txiddigest] `ZIP 226: Transfer and Burn of Zcash Shielded Assets โ€” TxId Digest <zip-0226.rst#txid-digest>`_ -.. [#zip-0226-authcommitment] `ZIP 226: Transfer and Burn of Zcash Shielded Assets โ€” Authorizing Data Commitment <zip-0226.rst#authorizing-data-commitment>`_ -.. [#zip-0230-issuance-action-description] `ZIP 230: Version 6 Transaction Format โ€” Issuance Action Description (IssueAction) <zip-0230.rst#issuance-action-description-issueaction>`_ -.. [#zip-0230-issue-note] `ZIP 230: Version 6 Transaction Format โ€” Issue Note Description (IssueNoteDescription) <zip-0230.rst#issue-note-description-issuenotedescription>`_ -.. [#zip-0230-transaction-format] `ZIP 230: Version 6 Transaction Format โ€” Transaction Format <zip-0230.rst#transaction-format>`_ -.. [#zip-0244] `ZIP 244: Transaction Identifier Non-Malleability <zip-0244.rst>`_ -.. [#zip-0246] `ZIP 246: Digests for the Version 6 Transaction Format <zip-0246.rst>`_ +.. [#zip-0230-issue-note] `ZIP 230: Withdrawn Version 6 Transaction Format โ€” Issue Note Description (IssueNoteDescription) <zip-0230.rst#issue-note-description-issuenotedescription>`_ +.. [#zip-0230-transaction-format] `ZIP 230: Withdrawn Version 6 Transaction Format โ€” Transaction Format <zip-0230.rst#transaction-format>`_ +.. [#zip-0248] `ZIP 248: Extensible Transaction Format <zip-0248.rst>`_ +.. [#zip-0248-digest-algorithms] `ZIP 248: Extensible Transaction Format โ€” Digest Algorithms <zip-0248.rst#digest-algorithms>`_ +.. [#zip-0248-sighash-versioning] `ZIP 248: Extensible Transaction Format โ€” Sighash Versioning <zip-0248.rst#sighash-versioning>`_ .. [#zip-0317] `ZIP 317: Proportional Transfer Fee Mechanism <zip-0317.rst>`_ .. [#zip-0317-fee-calculation] `ZIP 317: Proportional Transfer Fee Mechanism โ€” Fee calculation <zip-0317.rst#fee-calculation>`_ .. [#bip-0043] `BIP 43: Purpose Field for Deterministic Wallets <https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki>`_ .. [#bip-0340] `BIP 340: Schnorr Signatures for secp256k1 <https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki>`_ -.. [#protocol] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1] or later. <protocol/protocol.pdf>`_ -.. [#protocol-notation] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 2: Notation <protocol/protocol.pdf#notation>`_ -.. [#protocol-notes] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 3.2: Notes <protocol/protocol.pdf#notes>`_ -.. [#protocol-abstractsig] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.1.7: Signature <protocol/protocol.pdf#abstractsig>`_ -.. [#protocol-orchardkeycomponents] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.2.3: Orchard Key Components <protocol/protocol.pdf#orchardkeycomponents>`_ -.. [#protocol-sighash] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 4.10: SIGHASH Transaction Hashing <protocol/protocol.pdf#sighash>`_ -.. [#protocol-constants] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.3: Constants <protocol/protocol.pdf#constants>`_ -.. [#protocol-concreteprfs] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.2: Pseudo Random Functions <protocol/protocol.pdf#concreteprfs>`_ -.. [#protocol-concretegrouphashpallasandvesta] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.4.9.8: Group Hash into Pallas and Vesta <protocol/protocol.pdf#concretegrouphashpallasandvesta>`_ -.. [#protocol-orchardpaymentaddrencoding] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 5.6.4.2: Orchard Raw Payment Addresses <protocol/protocol.pdf#orchardpaymentaddrencoding>`_ -.. [#protocol-txnencoding] `Zcash Protocol Specification, Version 2025.6.2 [NU6.1]. Section 7.1: Transaction Encoding and Consensus <protocol/protocol.pdf#txnencoding>`_ +.. [#protocol] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3] or later. <protocol/protocol.pdf>`_ +.. [#protocol-notation] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 2: Notation <protocol/protocol.pdf#notation>`_ +.. [#protocol-notes] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 3.2: Shielded Pools and Notes <protocol/protocol.pdf#notes>`_ +.. [#protocol-abstractsig] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.1.7: Signature <protocol/protocol.pdf#abstractsig>`_ +.. [#protocol-orchardkeycomponents] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.2.3: Orchard Key Components <protocol/protocol.pdf#orchardkeycomponents>`_ +.. [#protocol-sighash] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.10: SIGHASH Transaction Hashing <protocol/protocol.pdf#sighash>`_ +.. [#protocol-constants] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.3: Constants <protocol/protocol.pdf#constants>`_ +.. [#protocol-concreteprfs] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.2: Pseudo Random Functions <protocol/protocol.pdf#concreteprfs>`_ +.. [#protocol-concretegrouphashpallasandvesta] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 5.4.9.8: Group Hash into Pallas and Vesta <protocol/protocol.pdf#concretegrouphashpallasandvesta>`_ .. [#petnames] `An Introduction to Petname Systems. Marc Stiegler, updated June 2010. <HTTP://www.skyhunter.com/marcs/petnames/IntroPetNames.html>`_
zips/zip-0228.rst +25 โˆ’14
@@ -40,9 +40,11 @@ We define the following additional terms: Abstract ======== -This ZIP introduces Asset Swaps for Zcash Shielded Assets (ZSA). It builds on top of ZIP 227 [#zip-0227]_ and ZIP 226 [#zip-0226]_, and uses the transaction format encoding described in ZIP 230 [#zip-0230]_. +This ZIP introduces Asset Swaps for Zcash Shielded Assets (ZSA). It builds on top of ZIP 227 [#zip-0227]_ and ZIP 226 [#zip-0226]_. ZSA Swaps simplify the process of trading assets within the Zcash ecosystem, and lower the reliance on centralized exchanges for trading. +**Open Issue:** This ZIP uses the transaction format encoding of the withdrawn ZIP 230 design [#zip-0230]_, including the encoding of Action Groups. Supporting Action Groups would require a modification to the transaction format of ZIP 248 [#zip-0248]_, which is possible independently of whether ZSAs activate at the same time. + Motivation ========== @@ -83,9 +85,11 @@ The specification of the structure of Swap Orders (that are sent off-chain) is p v1 Signature Digest ------------------- -ZIP 246 [#zip-0246]_ introduces versioning for SIGHASH algorithms. +ZIP 248 [#zip-0248-sighash-versioning]_ specifies versioning for SIGHASH algorithms, in which each bundle type defines the sighash versions available to its signers. We define the **v1 Signature Digest** for an Action Group as the output of the ``orchard_action_groups_digest`` for that Action Group. +**Open Issue:** ``orchard_action_groups_digest`` was a digest of the withdrawn ZIP 230 design. The v1 Signature Digest is yet to be specified as a sighash version of the OrchardZSA bundle, together with the associated data that it requires [#zip-0248-sighash-versioning]_. + Spend Authorization Signature Changes ------------------------------------- @@ -94,7 +98,9 @@ The spend authorization signature is computed in the manner specified in Section Binding Signature Changes ------------------------- -The binding signature is generated using the Orchard Binding Signature scheme, by signing the v0 Signature Digest as defined in ZIP 246 [#zip-0246]_, using the signing key $\mathsf{bsk}$ computed as described below. +The binding signature is generated using the Orchard Binding Signature scheme, by signing the v0 Signature Digest as defined in ZIP 248 [#zip-0248-v0-signature-digest]_, using the signing key $\mathsf{bsk}$ computed as described below. + +**Open Issue:** The v0 Signature Digest of ZIP 248 does not cover Action Groups, which its transaction format does not support, as noted in `Abstract`_. The party performing the matching has some Swap Orders $\mathsf{SO}_i$, each of which contains a $\mathsf{bsk}_i$. The party generates the $\mathsf{bsk}$ for the binding signature by summing up the $\mathsf{bsk}_i$ values of the Swap Orders that are matched into the Swap Bundle. @@ -105,12 +111,14 @@ The binding signature is verified against the value commitments of all Actions i Swap Bundle ----------- -The V6 transaction format [#zip-0230-transaction-format]_ groups Actions [#protocol-actions]_ into **Action Groups** characterized by anchors, ``flagsOrchard`` and ``nAGExpiryHeight``. +The transaction format of the withdrawn ZIP 230 design [#zip-0230-transaction-format]_ groups Actions [#protocol-actions]_ into **Action Groups** characterized by anchors, ``flagsOrchard`` and ``nAGExpiryHeight``. We continue to use the same transaction format. The consensus rules are updated to remove the requirement that there be only one Action Group per transaction. The Spend Authorization Signatures for Action Group in the Swap Bundle signs a `v1 Signature Digest`_, as specified above. A Swap Bundle then consists of two or more Action Groups, as illustrated in the figure below. +**Open Issue:** The transaction format of ZIP 248 does not support Action Groups, as noted in `Abstract`_. + .. figure:: ../rendered/assets/images/zip-0228-swap-bundle.png :width: 1000px @@ -136,6 +144,8 @@ Specifically, the consensus rule becomes (if any checks fail, the transaction MU - check the result of ZKAction.Verify on the proof $\mathsf{AG}.\mathtt{proofsOrchard}[i]$ - check $\mathsf{SpendAuthSig.Validate}(\mathsf{AG}.\mathtt{vActionsOrchard}[i].\mathsf{rk}, \mathtt{v1\_sig\_digest}, \mathsf{AG}.\mathtt{vSpendAuthSigsOrchard}[i])$ +**Open Issue:** These rules use the ``vActionGroupsOrchard`` and ``nAGExpiryHeight`` fields of Action Groups, which the transaction format of ZIP 248 does not support, as noted in `Abstract`_. The v1 Signature Digest that they use is yet to be specified, as noted in `v1 Signature Digest`_. + Fees ---- @@ -200,7 +210,7 @@ Rationale for v1 Signature Digests and Spend Authorization Signature Changes In the OrchardZSA protocol, each Action includes a Spend Authorization Signature [#protocol-spendauthsig]_ that binds a specific spend instruction to a specific transaction and prevents replay attacks. However, in the context of Asset Swaps, there are two problems that prevent this mechanism from being carried over unchanged. -- The SIGHASH represents a hash over a full consensus-compliant transaction object. Since a Swap Order is a trade intent to be used by the party performing the matching to form a valid bundle/transaction, the sender of the Swap Order cannot compute a v0 SIGHASH as per ZIP 246. This trader doesn't know all the transaction fields in advance, as they are set when the full bundle transaction is formed and sent to the chain. +- The SIGHASH represents a hash over a full consensus-compliant transaction object. Since a Swap Order is a trade intent to be used by the party performing the matching to form a valid bundle/transaction, the sender of the Swap Order cannot compute a v0 SIGHASH as per ZIP 248. This trader doesn't know all the transaction fields in advance, as they are set when the full bundle transaction is formed and sent to the chain. To make sure the time limit isn't malleable, the sender signs the information in the Action Group of the Order. The ``orchard_action_groups_digest`` contains all the information that is in a Swap Order, which is why we use this for the v1 Signature Digest. @@ -248,6 +258,8 @@ We specify here the structure of a Swap Order. Note that this is not a change to | | | |Action and the Fee Action. | +-----------------------------+--------------------------+-------------------------------------------+---------------------------------------------------------------------+ +**Open Issue:** ``ActionGroupDescription`` is the Action Group encoding of the withdrawn ZIP 230 design, which the transaction format of ZIP 248 does not support, as noted in `Abstract`_. + The ``SwapIO`` data type is used to represent the input and output of a Swap Order. +-----------------------------+--------------------------+-------------------------------------------+---------------------------------------------------------------------+ @@ -432,15 +444,14 @@ References .. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.html>`_ .. [#zip-0224] `ZIP 224: Orchard <zip-0224.html>`_ .. [#zip-0226] `ZIP 226: Transfer and Burn of Zcash Shielded Assets <zip-0226.html>`_ -.. [#zip-0226-circuit-statement] `ZIP 226: Transfer and Burn of Zcash Shielded Assets - Circuit Statement <zip-0226.html#circuit-statement>`_ .. [#zip-0227] `ZIP 227: Issuance of Zcash Shielded Assets <zip-0227.html>`_ .. [#zip-0227-assetbase] `ZIP 227: Issuance of Zcash Shielded Assets - Specification: Asset Identifier <zip-0227.html#specification-asset-identifier>`_ -.. [#zip-0230] `ZIP 230: Version 6 Transaction Format <zip-0230.html>`_ -.. [#zip-0230-transaction-format] `ZIP 230: Version 6 Transaction Format - Transaction Format <zip-0230.html#transaction-format>`_ -.. [#zip-0244-orchard-digest] `ZIP 244: Transaction Identifier Non-Malleability: T4. orchard_digest <zip-0244.html#t-4-orchard-digest>`_ -.. [#zip-0246] `ZIP 246: Digests for the Version 6 Transaction Format <zip-0246.html>`_ -.. [#protocol-notes] `Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.2: Notes <protocol/protocol.pdf#notes>`_ -.. [#protocol-actions] `Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.7: Action Transfers and their Descriptions <protocol/protocol.pdf#actions>`_ -.. [#protocol-spendauthsig] `Zcash Protocol Specification, Version 2024.5.1. Section 4.15: Spend Authorization Signature (Sapling and Orchard) <protocol/protocol.pdf#spendauthsig>`_ -.. [#protocol-txnencoding] `Zcash Protocol Specification, Version 2024.5.1. Section 7.1: Transaction Encoding and Consensus <protocol/protocol.pdf#txnencoding>`_ +.. [#zip-0230] `ZIP 230: Withdrawn Version 6 Transaction Format <zip-0230.html>`_ +.. [#zip-0230-transaction-format] `ZIP 230: Withdrawn Version 6 Transaction Format - Transaction Format <zip-0230.html#transaction-format>`_ +.. [#zip-0248] `ZIP 248: Extensible Transaction Format <zip-0248.html>`_ +.. [#zip-0248-sighash-versioning] `ZIP 248: Extensible Transaction Format - Sighash Versioning <zip-0248.html#sighash-versioning>`_ +.. [#zip-0248-v0-signature-digest] `ZIP 248: Extensible Transaction Format - v0 Signature Digest <zip-0248.html#v0-signature-digest>`_ +.. [#protocol-notes] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 3.2: Shielded Pools and Notes <protocol/protocol.pdf#notes>`_ +.. [#protocol-actions] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 3.7: Action Transfers and their Descriptions <protocol/protocol.pdf#actions>`_ +.. [#protocol-spendauthsig] `Zcash Protocol Specification, Version 2026.8.0 [NU6.3]. Section 4.15: Spend Authorization Signature (Sapling and Orchard) <protocol/protocol.pdf#spendauthsig>`_ .. [#clob] `Central Limit Order Book Definition - Risk.net <https://www.risk.net/definition/central-limit-order-book-clob>`_