Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion zips/zip-0226.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Note that the OrchardZSA Protocol does not allow for the burning of the Native A

In the `OrchardZSA Transaction Structure`_, there is now an $\mathsf{assetBurn}$ set.
For every Custom Asset (represented by its $\mathsf{AssetBase}$) that is burnt in the transaction, the sender adds to $\mathsf{assetBurn}$ the tuple $(\mathsf{AssetBase}, \mathsf{v})$, where $\mathsf{v}$ is the amount of the Custom Asset the sender wants to burn.
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.

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.
Expand All @@ -216,14 +217,20 @@ Additional Consensus Rules for the assetBurn set
````````````````````````````````````````````````

1. It MUST be the case that for every $(\mathsf{AssetBase}, \mathsf{v}) \in \mathsf{assetBurn}, \mathsf{AssetBase} \neq \mathcal{V}^{\mathsf{Orchard}}$. That is, the Native Asset is not allowed to be burnt by this mechanism.
2. It MUST be that for every $(\mathsf{AssetBase}, \mathsf{v}) \in \mathsf{assetBurn}, \mathsf{v} \neq 0$.
2. It MUST be that for every $(\mathsf{AssetBase}, \mathsf{v}) \in \mathsf{assetBurn}, \mathsf{v} > 0$ and $\mathsf{v} \leq \mathsf{MAX\_BURN\_VALUE}$.
3. There MUST be no duplication of Custom Assets in the $\mathsf{assetBurn}$ set. That is, every $\mathsf{AssetBase}$ has at most one entry in $\mathsf{assetBurn}$.

The other consensus rule changes for the OrchardZSA protocol are specified in ZIP 227 [#zip-0227-consensus]_.

**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 $\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.

Value Balance Verification
--------------------------

Expand Down
6 changes: 4 additions & 2 deletions zips/zip-0230.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,11 @@ An OrchardZSA Asset Burn description is encoded in a transaction as an instance
| | | |:math:`\mathsf{AssetBase^{Orchard}}\!`. |
+-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+
| 8 |``valueBurn`` |``uint64`` |The amount being burnt. The value is checked by consensus to be |
| | | |non-zero. |
| | | |non-zero, and less than :math:`\mathsf{MAX\_BURN\_VALUE}` |
| | | |[#zip-0226-burn-mechanism]_. |
+-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+

The encodings of each of these elements are defined in ZIP 226 [#zip-0226]_.
The encodings of each of these elements are defined in ZIP 226 [#zip-0226-burn-mechanism]_.

Transparent Sighash Information (``TransparentSighashInfo``)
------------------------------------------------------------
Expand Down Expand Up @@ -698,6 +699,7 @@ References
.. [#zip-0225] `ZIP 225: Version 5 Transaction Format <zip-0225.rst>`_
.. [#zip-0225-transaction-format] `ZIP 225: Version 5 Transaction Format. Specification: Transaction Format <zip-0225.rst#transaction-format>`_
.. [#zip-0226] `ZIP 226: Transfer and Burn of Zcash Shielded Assets <zip-0226.rst>`_
.. [#zip-0226-burn-mechanism] `ZIP 226: Transfer and Burn of Zcash Shielded Assets - Burn Mechanism <zip-0226.rst#burn-mechanism>`_
.. [#zip-0226-orchardzsa-transaction-structure] `ZIP 226: Transfer and Burn of Zcash Shielded Assets — OrchardZSA Transaction Structure <zip-0226.rst#orchardzsa-transaction-structure>`_
.. [#zip-0226-note-structure-and-commitment] `ZIP 226: Transfer and Burn of Zcash Shielded Assets — Note Structure and Commitment <zip-0226#note-structure-and-commitment>`_
.. [#zip-0227] `ZIP 227: Issuance of Zcash Shielded Assets <zip-0227.rst>`_
Expand Down
Loading