-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
In SplitMintReason, the source token should be serialized without Unicity inclusion proofs. This would make the minting transaction hash invariant to the inclusion proofs of all transactions of the source token.
Current Behavior
SplitMintReason.toCBOR() includes the full burned token via this.token.toCBOR(), which serializes all transactions with their inclusion proofs:
// Token.toCBOR() includes:
this._transactions.map((tx) => tx.toCBOR())
// TransferTransaction.toCBOR() includes:
this.inclusionProof.toCBOR() // ← This should be excludedProblem
The mint transaction hash depends on the burn transaction's inclusion proof. This prevents:
- Creating mint commitments before receiving the burn proof
- True "Nostr-first" token delivery (instant transfers)
- Using placeholder proofs that can be replaced later
Proposed Solution
When serializing the token in SplitMintReason, exclude Unicity inclusion proofs from all transactions:
// SplitMintReason should serialize token WITHOUT inclusion proofs
toCBOR() {
return CborSerializer.encodeArray(
this.token.toCBORWithoutProofs(), // New method - excludes inclusion proofs
CborSerializer.encodeArray(...this._proofs.map((proof) => proof.toCBOR()))
);
}Rationale
- The
requestIdof each transaction is already a stable, unique identifier - Inclusion proofs are verification data, not identity data
- The aggregator can verify burn existence by
requestIdlookup - This aligns with the append-only nature of the aggregator tree
Benefit
Enables instant token splits where all commitments can be created before any aggregator submission, with proofs filled in later without affecting transaction hashes.
Reactions are currently unavailable