diff --git a/zips/zip-0230.rst b/zips/zip-0230.rst index 49ca001a0..16b3845d4 100644 --- a/zips/zip-0230.rst +++ b/zips/zip-0230.rst @@ -149,11 +149,6 @@ Transaction Format +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ | 8 |``valueBalanceOrchard`` |``int64`` |The net value of Orchard spends minus outputs. | +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ -| varies | ``nAssetBurn`` | ``compactSize`` |The number of Assets burnt. | -+-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ -| 40 × ``nAssetBurn`` | ``vAssetBurn`` | ``AssetBurn[nAssetBurn]`` |A sequence of Asset Burn descriptions, encoded per | -| | | | encoded per `OrchardZSA Asset Burn Description`_. | -+-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ | 64 |``bindingSigOrchard`` |``byte[64]`` |An OrchardZSA binding signature on the SIGHASH transaction hash. | +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ | **OrchardZSA Issuance Fields** | @@ -298,6 +293,11 @@ The OrchardZSA Action Group Description is encoded in a transaction as an instan | | | |transaction including this Action Group cannot be mined, or 0 if | | | | |this Action Group places no constraint on transaction expiry. | +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ +| varies | ``nAssetBurn`` | ``compactSize`` |The number of Assets burnt. | ++-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ +| 40 × ``nAssetBurn`` | ``vAssetBurn`` | ``AssetBurn[nAssetBurn]`` |A sequence of Asset Burn descriptions, encoded per | +| | | | encoded per `OrchardZSA Asset Burn Description`_. | ++-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ | varies |``sizeProofsOrchard`` |``compactSize`` |As defined in Section 7.1 of the Protocol Specification | | | | |[#protocol-txnencoding]_. | +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ @@ -307,7 +307,7 @@ The OrchardZSA Action Group Description is encoded in a transaction as an instan | | | |transaction. | +-----------------------------+------------------------------+------------------------------------------------+---------------------------------------------------------------------+ -The encoding of ``OrchardZSAAction`` is described below. +The encodings of ``OrchardZSAAction`` and ``AssetBurn`` are described below. * The proofs aggregated in ``proofsOrchardZSA``, and the elements of ``vSpendAuthSigsOrchard``, each have a 1:1 correspondence to the elements of @@ -321,6 +321,15 @@ We introduce the ``nAGExpiryHeight`` field in this transaction format in order t For the OrchardZSA protocol, which does not make use of an additional expiry height for transactions, we set the value of ``nAGExpiryHeight`` to be ``0`` by consensus. This serves as a default value to represent the situation where there is no expiry, analogous to the convention adopted for ``nExpiryHeight`` in ZIP 203 [#zip-0203]. +Rationale for including Burn fields inside OrchardZSA Action Groups +``````````````````````````````````````````````````````````````````` + +Note that the V6 transaction format includes the burn fields of the transaction inside the OrchardZSA Action Group rather than at the transaction level. +This is a design choice that considers the future scenario where Action Groups may be generated by different parties before being bundled together into a transaction. +In such a scenario, the individual parties can burn Assets of their choice in their corresponding Action Groups. +Maintaining the burn fields at the transaction level would provide the ability to burn Assets only to the party performing the bundling of the Action Groups. + + OrchardZSA Action Description (``OrchardZSAAction``) ---------------------------------------------------- diff --git a/zips/zip-0246.rst b/zips/zip-0246.rst index 30c5d24bb..8441ad639 100644 --- a/zips/zip-0246.rst +++ b/zips/zip-0246.rst @@ -115,8 +115,8 @@ referenced or described in detail below:: │   │   ├── orchard_actions_noncompact_digest * │   │   ├── flagsOrchard │   │   ├── anchorOrchard - │   │   └── nAGExpiryHeight * - │   ├── orchard_burn_digest * + │   │   ├── nAGExpiryHeight * + │   │   └── orchard_burn_digest * │   └── valueBalanceOrchard ├── issuance_digest * │   ├── issue_actions_digest * @@ -228,8 +228,7 @@ T.4: orchard_digest When OrchardZSA Actions Groups are present in the transaction, this digest is a BLAKE2b-256 hash of the following values:: T.4a: orchard_action_groups_digest (32-byte hash output) - T.4b: orchard_burn_digest (32-byte hash output) - T.4c: valueBalanceOrchard (64-bit signed little-endian) + T.4b: valueBalanceOrchard (64-bit signed little-endian) The personalization field of this hash is set to:: @@ -250,6 +249,7 @@ For each Action Group, the following elements are included in the hash:: T.4a.iii : flagsOrchard (1 byte) T.4a.iv : anchorOrchard (32 bytes) T.4a.v : nAGExpiryHeight (4 bytes) + T.4a.vi : orchard_burn_digest (32-byte hash output) The personalization field of this hash is set to:: @@ -293,8 +293,8 @@ The personalization field of this hash is set to:: The field encodings are specified in ZIP 230 [#zip-0230-orchard-action-field-encodings]_. -T.4b: orchard_burn_digest -''''''''''''''''''''''''' +T.4a.vi: orchard_burn_digest +'''''''''''''''''''''''''''' A BLAKE2b-256 hash of the data from the burn fields of the transaction. For each tuple in the $\mathsf{assetBurn}$ set, the following elements are included in the hash::