Suggestion for "[ZIP 248]: Define a forward-compatible, extensible transaction format. #1156" - #1253
Suggestion for "[ZIP 248]: Define a forward-compatible, extensible transaction format. #1156"#1253arya2 wants to merge 6 commits into
Conversation
| \forall \mathsf{a}. \sum_{\mathsf{d} \in \mathsf{mValuePoolDeltas} | \mathsf{AssetUuid}(\mathsf{d}) = \mathsf{a}} \mathsf{d.value} = 0 | ||
|
|
||
| Sighash Versioning | ||
| ------------------- |
There was a problem hiding this comment.
| ------------------- | |
| ------------------ |
| +--------------------+-------------------------------------------------------+ | ||
| | |:math:`\hspace{4.5em}` ``associatedData`` | | ||
| +--------------------+-------------+-------------+-------------+-------------+ | ||
| | ``sighashVersion`` | Transparent | Sapling | Orchard | Issuance | |
There was a problem hiding this comment.
Issuance doesn't belong here. Also, this table seems like it might be malformed given the extensible nature of this transaction format.
| Sighash version information is present alongside each signature in the | ||
| authorizing data of the transaction, via the per-signature structures defined | ||
| below. | ||
|
|
There was a problem hiding this comment.
The process for introducing a new sighash version (including how that affects each bundle type) should be specified here. Add a TODO.
3b9fefb to
b1a46d8
Compare
b1a46d8 to
b31e49d
Compare
| * For coinbase transactions, the ``enableSpendsOrchard`` bit of the Orchard | ||
| bundle's ``flagsOrchard`` field MUST be 0. |
There was a problem hiding this comment.
Do we want to make this a global rule in the protocol instead of applying it to V5 txs there and writing it again here?
| identifier, if effecting data is present. For bundle types not defined in | ||
| this ZIP, the ``bundle_effects_digest`` MUST be equal to | ||
| ``BLAKE2b-256(personalization, vBundleData)`` where | ||
| ``personalization`` is the `Opaque Effects Personalization`_ for the | ||
| bundle's ``(bundleType, bundleVariant)`` pair. This ensures that wallets | ||
| which do not understand the bundle type can still compute the correct | ||
| transaction identifier by hashing the raw effecting data. |
There was a problem hiding this comment.
@nuttycom did you have an argument against using flat hashes everywhere for computing transaction ids from effects/auth bundles? I've mixed legacy structured hashes and flat hashes here, but would like to update it to use flat hashes everywhere if there are no objections.
cf2a3f6 to
ab81ac2
Compare
ab81ac2 to
de8b429
Compare
1e02d2f to
5c49035
Compare
b64bf8f to
0f0ffe1
Compare
- Register ZSA Issuance bundle type in the V6 bundle registry - Update digest section to reference effects_bundles_digest and auth_bundles_digest - Add reference to extensible transaction format ZIP - Remove unused ZIP 244 and ZIP 246 references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Register OrchardZSA bundle type in the V6 bundle registry - Update digest section to reference effects_bundles_digest and auth_bundles_digest - Add reference to extensible transaction format ZIP - Remove unused ZIP 244 and ZIP 246 references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…uples. This makes the mutual exclusivity of bundle variants (e.g. Orchard vs OrchardZSA) implicit in the map structure, and allows clients that do not recognize a specific bundleVersion to still identify which pool is affected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a section to ZIP 248 describing wallet requirements for handling unknown bundle types and versions. Update ZIP 226 to reference ZIP 248 instead of ZIP 230 for transaction format and wallet implications. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation. Make explicit that each new bundle type's defining ZIP specifies its own digest algorithm (point 7 of Bundle Type Registration), SHOULD use a structured sub-tree separating compact from non-compact data for trustless partial verification, and that wallets unable to compute the digest themselves may obtain it from any source that implements the algorithm (e.g. a light wallet server or full node). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
de8b429 to
4186266
Compare
4ad4038 to
873532a
Compare
Structured digest approach
This PR uses structured per-bundle digest trees for the transaction
identifier and authorizing data commitment. Each bundle type's defining
ZIP specifies its own digest algorithm, which SHOULD separate compact
data (for the light wallet protocol) from non-compact data to enable
trustless partial verification.
For bundle types a wallet does not understand, the wallet needs the
32-byte
bundle_effects_digestto be supplied externally (e.g. by alight wallet server or full node that implements the bundle type's
digest algorithm).
An alternative approach using flat hashes with a compact/noncompact
wire format split is proposed in #1260. That approach allows any
wallet to compute the txid without understanding all bundle types, at
the cost of requiring existing bundle types to switch from structured
to flat effect digests.
Changes in this update
Ref impl: zcash/librustzcash@main...zip248