diff --git a/rendered/zip-0226.html b/rendered/zip-0226.html index 5a48dc80b..3ab4b7163 100644 --- a/rendered/zip-0226.html +++ b/rendered/zip-0226.html @@ -459,79 +459,73 @@
The transaction format for v6 transactions is described in ZIP 230 14.
+The transaction format for v6 transactions is described in ZIP 230 13.
The transaction digest algorithm defined in ZIP 244 15 is modified by the OrchardZSA protocol to add a new branch for issuance information, along with modifications within the orchard_digest to account for the inclusion of the Asset Base. The details of these changes are described in this section, and highlighted using the [UPDATED FOR ZSA] or [ADDED FOR ZSA] text label. We omit the details of the sections that do not change for the OrchardZSA protocol.
The transaction digest algorithm defined in ZIP 244 14 is modified by the OrchardZSA protocol to add a new branch for issuance information, along with replacement of the orchard_digest with a new orchard_zsa_digest to account for the inclusion of the Asset Base and the updated transaction format. The details of these changes are described in this section, and highlighted using the [ADDED FOR ZSA] text label. We omit the details of the sections that do not change for the OrchardZSA protocol.
A BLAKE2b-256 hash of the following values:
T.1: header_digest (32-byte hash output) T.2: transparent_digest (32-byte hash output) T.3: sapling_digest (32-byte hash output) -T.4: orchard_digest (32-byte hash output) [UPDATED FOR ZSA] +T.4: orchard_zsa_digest (32-byte hash output) [ADDED FOR ZSA] T.5: issuance_digest (32-byte hash output) [ADDED FOR ZSA]-
The personalization field remains the same as in ZIP 244 15.
-The personalization field remains the same as in ZIP 244 14.
+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) [ADDED FOR ZSA] -T.4b: orchard_zsa_burn_digest (32-byte hash output) [ADDED FOR ZSA] -T.4c: valueBalanceOrchard (64-bit signed little-endian)-
The personalization field of this hash is the same as in ZIP 244 15
+T.4a: orchard_zsa_action_groups_digest (32-byte hash output) +T.4b: valueBalanceOrchard (64-bit signed little-endian)+
The personalization field of this hash is the same as for orchard_digest in ZIP 244 14
"ZTxIdOrchardHash"-
In the case that the transaction has no OrchardZSA Action Groups, orchard_digest is
In the case that the transaction has no OrchardZSA Action Groups, orchard_zsa_digest is
BLAKE2b-256("ZTxIdOrchardHash", [])
- A BLAKE2b-256 hash of the subset of OrchardZSA Action Groups information for all OrchardZSA Action Groups belonging to the transaction. For each Action Group, the following elements are included in the hash:
-T.4a.i : orchard_actions_compact_digest (32-byte hash output) -T.4a.ii : orchard_actions_memos_digest (32-byte hash output) -T.4a.iii: orchard_actions_noncompact_digest (32-byte hash output) -T.4a.iv : flagsOrchard (1 byte) -T.4a.v : anchorOrchard (32 bytes) -T.4a.vi : nAGExpiryHeight (4 bytes)+
T.4a.i : orchard_zsa_actions_compact_digest (32-byte hash output) +T.4a.ii : orchard_zsa_actions_memos_digest (32-byte hash output) +T.4a.iii : orchard_zsa_actions_noncompact_digest (32-byte hash output) +T.4a.iv : orchard_zsa_burn_digest (32-byte hash output) +T.4a.v : flagsOrchard (1 byte) +T.4a.vi : anchorOrchard (32 bytes) +T.4a.vii : nAGExpiryHeight (4 bytes)
The personalization field of this hash is set to:
"ZTxIdOrcActGHash"-
A BLAKE2b-256 hash of the subset of OrchardZSA Action information intended to be included in an updated version of the ZIP-307 17 CompactBlock format for all OrchardZSA Actions belonging to the Action Group. For each Action, the following elements are included in the hash:
T.4a.i.1 : nullifier (field encoding bytes) T.4a.i.2 : cmx (field encoding bytes) T.4a.i.3 : ephemeralKey (field encoding bytes) -T.4a.i.4 : encCiphertext[..84] (First 84 bytes of field encoding) [UPDATED FOR ZSA]-
The personalization field of this hash is the same as in ZIP 244:
+T.4a.i.4 : encCiphertext[..84] (First 84 bytes of field encoding) +The personalization field of this hash is the same as for orchard_actions_compact_digest in ZIP 244:
"ZTxIdOrcActCHash"
A BLAKE2b-256 hash of the subset of Orchard shielded memo field data for all OrchardZSA Actions belonging to the Action Group. For each Action, the following elements are included in the hash:
-T.4a.ii.1: encCiphertext[84..596] (contents of the encrypted memo field) [UPDATED FOR ZSA]-
The personalization field of this hash remains identical to ZIP 244:
+T.4a.ii.1: encCiphertext[84..596] (contents of the encrypted memo field)+
The personalization field of this hash is identical to that for orchard_actions_memos_digest in ZIP 244:
"ZTxIdOrcActMHash"
A BLAKE2b-256 hash of the remaining subset of OrchardZSA Action information not intended for inclusion in an updated version of the the ZIP 307 17 CompactBlock format, for all OrchardZSA Actions belonging to the Action Group. For each Action, the following elements are included in the hash:
T.4a.iii.1 : cv (field encoding bytes) T.4a.iii.2 : rk (field encoding bytes) -T.4a.iii.3 : encCiphertext[596..] (post-memo suffix of field encoding) [UPDATED FOR ZSA] +T.4a.iii.3 : encCiphertext[596..] (post-memo suffix of field encoding) T.4a.iii.4 : outCiphertext (field encoding bytes)-
The personalization field of this hash is defined identically to ZIP 244:
+The personalization field of this hash is defined just as for orchard_actions_noncompact_digest in ZIP 244:
"ZTxIdOrcActNHash"
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:
-T.4b.i : assetBase (field encoding bytes) -T.4b.ii: valueBurn (field encoding bytes)-
The personalization field of this hash is set to:
-"ZTxIdOrcBurnHash"-
In case the transaction does not perform the burning of any Assets (i.e. the - \(\mathsf{assetBurn}\) - set is empty), the ''orchard_zsa_burn_digest'' is:
-BLAKE2b-256("ZTxIdOrcBurnHash", [])
- The Asset Base being burnt encoded as the 32-byte representation of a point on the Pallas curve.
-Value of the Asset Base being burnt encoded as little-endian 8-byte representation of 64-bit unsigned integer (e.g. u64 in Rust) raw value.
+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:
+T.4a.iv.1 : assetBase (field encoding bytes) +T.4a.iv.2 : valueBurn (field encoding bytes)+
The personalization field of this hash is set to:
+"ZTxIdOrcBurnHash"+
In case the transaction does not perform the burning of any Assets (i.e. the
+ \(\mathsf{assetBurn}\)
+ set is empty), the orchard_zsa_burn_digest is:
BLAKE2b-256("ZTxIdOrcBurnHash", [])
The details of the changes to this algorithm are in ZIP 227 11.
+The per-input transaction digest algorithm to generate the signature digest in ZIP 244 15 is modified so that a signature digest is produced for each transparent input, each Sapling input, each OrchardZSA Action, and additionally for each Issuance Action. The modifications replace the orchard_digest in ZIP 244 with a new orchard_zsa_digest, and add a new branch, issuance_digest, for the Issuance Action information.
The overall structure of the hash is as follows. We highlight the changes for the OrchardZSA protocol via the [ADDED FOR ZSA] text label, and we omit the descriptions of the sections that do not change for the OrchardZSA protocol:
signature_digest +├── header_digest +├── transparent_sig_digest +├── sapling_digest +├── orchard_zsa_digest [ADDED FOR ZSA] +└── issuance_digest [ADDED FOR ZSA]+
A BLAKE2b-256 hash of the following values
+S.1: header_digest (32-byte hash output) +S.2: transparent_sig_digest (32-byte hash output) +S.3: sapling_digest (32-byte hash output) +S.4: orchard_zsa_digest (32-byte hash output) [ADDED FOR ZSA] +S.5: issuance_digest (32-byte hash output) [ADDED FOR ZSA]+
The personalization field remains the same as in ZIP 244 14, namely:
+"ZcashTxHash_" || CONSENSUS_BRANCH_ID+
ZcashTxHash_ has 1 underscore character.
Identical to that specified for the transaction identifier.
+Identical to the issuance_digest specified for the transaction identifier in ZIP 227 zip-0227-txiddigest.