Skip to content

Suggestion for "[ZIP 248]: Define a forward-compatible, extensible transaction format. #1156" - #1253

Draft
arya2 wants to merge 6 commits into
draft/extensible_tx_formatfrom
suggestion-extensible_tx_format
Draft

Suggestion for "[ZIP 248]: Define a forward-compatible, extensible transaction format. #1156"#1253
arya2 wants to merge 6 commits into
draft/extensible_tx_formatfrom
suggestion-extensible_tx_format

Conversation

@arya2

@arya2 arya2 commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator

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_digest to be supplied externally (e.g. by a
light 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

  • Add Parsing Rules section consolidating parser-level invariants
  • Restructure Consensus Rules into bundle-local and cross-bundle subsections
  • Clarify anchorSapling handling at T.3.2c when nSpendsSapling = 0
  • Pad ZTxIdEffBndHash / ZTxAuthBndHash personalizations to 16 characters
  • Fix heading underline in Per-Signature Structures
  • Fix typos, RST syntax, and normative language (MUST)
  • Remove redundant normative constraints; cross-reference Parsing Rules
  • Specify key comparison for mValuePoolDeltas ordering
  • Define transparent bundle value pool delta computation
  • Clarify structured digest approach for bundle type registration

Ref impl: zcash/librustzcash@main...zip248

@daira
daira changed the base branch from main to draft/extensible_tx_format April 7, 2026 20:09
Comment thread zips/zip-0248.rst Outdated
Comment thread zips/zip-0248.rst Outdated
Comment thread zips/zip-0248.rst
\forall \mathsf{a}. \sum_{\mathsf{d} \in \mathsf{mValuePoolDeltas} | \mathsf{AssetUuid}(\mathsf{d}) = \mathsf{a}} \mathsf{d.value} = 0

Sighash Versioning
-------------------

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-------------------
------------------

Comment thread zips/zip-0248.rst
+--------------------+-------------------------------------------------------+
| |:math:`\hspace{4.5em}` ``associatedData`` |
+--------------------+-------------+-------------+-------------+-------------+
| ``sighashVersion`` | Transparent | Sapling | Orchard | Issuance |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issuance doesn't belong here. Also, this table seems like it might be malformed given the extensible nature of this transaction format.

Comment thread zips/zip-0248.rst
Sighash version information is present alongside each signature in the
authorizing data of the transaction, via the per-signature structures defined
below.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The process for introducing a new sighash version (including how that affects each bundle type) should be specified here. Add a TODO.

@daira
daira force-pushed the suggestion-extensible_tx_format branch from 3b9fefb to b1a46d8 Compare April 9, 2026 04:24
@daira
daira changed the base branch from draft/extensible_tx_format to main April 9, 2026 04:25
@daira
daira marked this pull request as draft April 9, 2026 04:31
@daira
daira force-pushed the suggestion-extensible_tx_format branch from b1a46d8 to b31e49d Compare April 9, 2026 04:36
Comment thread zips/zip-0248.rst
Comment on lines +835 to +836
* For coinbase transactions, the ``enableSpendsOrchard`` bit of the Orchard
bundle's ``flagsOrchard`` field MUST be 0.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread zips/zip-0248.rst Outdated
Comment on lines +265 to +271
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.

@arya2 arya2 Apr 14, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@daira
daira force-pushed the suggestion-extensible_tx_format branch from cf2a3f6 to ab81ac2 Compare April 15, 2026 00:26
@nuttycom
nuttycom force-pushed the suggestion-extensible_tx_format branch from ab81ac2 to de8b429 Compare April 21, 2026 20:28
@nuttycom
nuttycom changed the base branch from main to draft/extensible_tx_format April 21, 2026 20:28
@daira daira added the F-transaction-v6 Feature: v6 transactions label Apr 24, 2026
@nuttycom
nuttycom force-pushed the draft/extensible_tx_format branch from 1e02d2f to 5c49035 Compare May 13, 2026 18:44
@nuttycom
nuttycom force-pushed the draft/extensible_tx_format branch 2 times, most recently from b64bf8f to 0f0ffe1 Compare September 1, 2026 18:22
nuttycom and others added 6 commits September 1, 2026 14:53
- 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>
@arya2
arya2 force-pushed the suggestion-extensible_tx_format branch from de8b429 to 4186266 Compare September 1, 2026 19:17
@nuttycom
nuttycom force-pushed the draft/extensible_tx_format branch 2 times, most recently from 4ad4038 to 873532a Compare September 1, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-transaction-v6 Feature: v6 transactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants