spec: define the IssuanceTerms transport in CoinProof bundles - #89
Merged
Conversation
Contributor
Author
|
Holding this as draft: the branch base predates #97 (the accumulator-model change to on-chain half-aggregated nullifiers). The content is largely model-independent, but the section anchors and surrounding text shifted substantially in #97. Parking this until the new model settles on |
joshuakrueger-dfx
force-pushed
the
spec/issuance-terms-transport
branch
from
July 15, 2026 14:44
c322965 to
889ca5c
Compare
Collaborator
|
Finalization pass complete — reviewed (correctness + conformance) to zero findings. This branch predated #97 and previously conflicted against develop. Rebased onto develop (the V3 on-chain half-aggregated nullifier model) and reconciled the
Build and CodeQL green on the latest commit. Ready for review. |
joshuakrueger-dfx
marked this pull request as ready for review
July 15, 2026 15:00
Adds the optional asset_terms field to CoinProof (the only defined carrier of an asset's plaintext issuance terms), fail-closed recompute in receive step 6, the §7.1 wire layout, the §6.5 transport subsection, and glossary sync.
TaprootFreak
force-pushed
the
spec/issuance-terms-transport
branch
from
July 17, 2026 21:18
889ca5c to
c36f919
Compare
TaprootFreak
added a commit
that referenced
this pull request
Jul 20, 2026
Collapses the IssuanceTerms_v2 auditable-supply-cap work (genesis-anchored single mint; cap_total + terms_salt bound into asset_id via the AssetIdV2 tag; fail-closed issuance-version dispatch in clause 3) onto the current develop after #89, #102 and #107 merged. Conflict resolution: the asset_terms transport paragraph takes the version-dependent form, the mint first-occurrence comment its expanded wording; develop's serialize(Coin) paragraph and the 6-confirmation finality directive are preserved unchanged. Original v2 design by joshuakrueger-dfx; fail-closed dispatch fix follows.
TaprootFreak
added a commit
that referenced
this pull request
Jul 20, 2026
…#100) * spec: rebase the IssuanceTerms_v2 supply cap onto develop Collapses the IssuanceTerms_v2 auditable-supply-cap work (genesis-anchored single mint; cap_total + terms_salt bound into asset_id via the AssetIdV2 tag; fail-closed issuance-version dispatch in clause 3) onto the current develop after #89, #102 and #107 merged. Conflict resolution: the asset_terms transport paragraph takes the version-dependent form, the mint first-occurrence comment its expanded wording; develop's serialize(Coin) paragraph and the 6-confirmation finality directive are preserved unchanged. Original v2 design by joshuakrueger-dfx; fail-closed dispatch fix follows. * spec: fix v2 review nits (v1 clause-a branch scope, v1-and-v2 version dispatch) * spec: apply pr-ready review consistency fixes (v1 clause-a branch scope, clause-8 v2 self-mint carve-out, risks mitigation tense, first-occurrence naming) * spec: complete the v2 self-mint deferral across balances (clause 7) and the §501 invariant, and name clause 7 in clause (g)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The spec asserts in three places that an asset's human-readable
nameanddecimalstravel only inside bundles (§2.3.1, §6.5, §4.5) — but no bundle field carries them.asset_idis a Poseidon digest; without the preimage{creator_pubkey, name, decimals, issuance_version}a holder can neither display the asset nor evaluate §2.3.3 step 6 ("asset_id is well-formed"), and theIssuanceTermsmessage reserved in the §1.1 domain-separation catalogue had no wire home. The binding itself is fine (the terms are self-authenticating by recomputingasset_id); only the transport was undefined.Changes (
docs/specification.mdonly)asset_terms? = {creator_pubkey, name, decimals, issuance_version}in theCoinProofplaintext (nameis a raw byte string, max 255 bytes; UTF-8 validity is display-only). It rides exclusively inside the ZBE-encrypted blob underK_tx: no new public object. Self-authenticating —nameenters theasset_idpreimage asname_hash = H(name), so the receiver verifies by recomputingasset_id.asset_terms; a sender that holds verified terms MUST attach them on the terms' own first hop to a recipient. A holder without verified terms MAY forward, and the recipient then tracks the asset opaquely.kbMUST encrypt at most one plaintext (a bundle is never re-encrypted under the sameK_tx, which would repeat(kb, nonce)against a different plaintext and two-time-pad-leakasset_terms); the resulting blob-size side channel is documented as an accepted residual leak.asset_termsis present, the recipient MUST recomputeasset_idand reject the bundle on mismatch. Absent (or non-UTF-8) terms, the coin stays valid but the wallet MUST track the asset as an opaqueasset_id.asset_id, never byname.asset_terms?field: a presence byte (0x00absent /0x01present) plus the sub-layoutcreator_pubkey (32) ‖ decimals (1) ‖ issuance_version (1) ‖ u32-be len(name) ‖ name, soserialize(CoinProof)stays unambiguous and theblob_iddeterminism of §4.2.1 holds.nameis external and never recoverable from the chain — only from a recovered bundle'sasset_termsor the issuer); newasset_termsentry andIssuanceTerms/Bundle (CoinProof)entries synced.No circuit clauses, proof-system parameters, on-chain formats, or test vectors are touched.
Rebased onto the post-#97
develop: the terms ride the currentCoinProof(withcreating_nullifier/nav_opening); there is noanchor_hintfield in this model.