Skip to content

docs(dip27): version 2 Asset Unlock transactions with stable txids - #189

Draft
PastaPastaPasta wants to merge 4 commits into
dashpay:masterfrom
PastaPastaPasta:dip27-asset-unlock-v2
Draft

docs(dip27): version 2 Asset Unlock transactions with stable txids#189
PastaPastaPasta wants to merge 4 commits into
dashpay:masterfrom
PastaPastaPasta:dip27-asset-unlock-v2

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Aug 24, 2026

Copy link
Copy Markdown
Member

Amends DIP-0027 (plus the DIP-2 registry and DIP-4) to introduce version 2 Asset Unlock transactions, activating with the v24 hard fork. Goal: make spends of unmined Platform withdrawals valid across Platform's re-signs and eligible for InstantSend, so Platform→Core transfers become rapidly respendable.

Design ("segwit-for-unlocks"): a version 2 Asset Unlock is serialized identically to version 1, but its transaction hash is computed with the signHeight, quorumHash, and quorumSig fields zeroed — exactly the fields Platform changes when it re-signs an expired withdrawal. Every re-signed instance of one withdrawal is therefore the same transaction with one txid: outputs are tracked and spent under it like any other transaction (no parallel identifier, no special spending rules for wallets), and children plus their InstantSend locks survive expiry and re-signing. Signature validity rules are unchanged from version 1, and the signed message hash still commits to signHeight and quorumHash.

Supporting changes:

  • DIP-4 / CbTx version 4: merkleRootAssetUnlocks commits to the instance hashes (full-serialization hashes) of the block's version 2 Asset Unlocks, restoring the commitment the block merkle root no longer provides; mismatches are treated as block mutation.
  • Relay: instances are announced by instance hash via a new MSG_ASSET_UNLOCK inventory type, since a txid-based announcement can never propagate a re-sign; nodes keep the instance with the higher signHeight and retain expired instances awaiting a replacement.
  • Worked txid examples plus a reference script (dip-0027/dip-0027-txid-calc.py); vectors are pinned byte-for-byte against the Dash Core implementation's unit tests.
  • Registry updates: Asset Unlock payload version 2, CbTx payload version 4.
  • Two wording fixes on amended lines where the spec said "asset lock" but meant "Asset Unlock".

Implementation: dashpay/dash#7639.

🤖 Generated with Claude Code

…drawal identifier

Version 2 Asset Unlock transactions are serialized identically to version 1 but introduce a withdrawal transaction identifier: the transaction hashed with signHeight, quorumHash, and quorumSig set to zeros. Outputs are referenced by this identifier, so transactions spending an unmined withdrawal remain valid when Platform re-signs it, and such spends become eligible for InstantSend. Also fixes existing errata (asset lock/unlock wording, duplicated word, TOC omission, table styles) and bumps the DIP-2 registry payload version.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Restore original emphasis style and table formatting on untouched lines; keep only wording changes required by the v2 amendment.
Instead of a separate withdrawal transaction identifier with outputs tracked under it, the txid of a version 2 Asset Unlock transaction is itself computed with the signHeight, quorumHash and quorumSig fields zeroed, so every re-signed instance of one withdrawal is the same transaction and spends reference it like any other. The hash of the full serialization becomes the instance hash, used for relay (new MSG_ASSET_UNLOCK inventory type) and for a new coinbase commitment: CbTx version 4 (DIP-4) commits to the instance hashes the block merkle root no longer covers, with mismatches treated as block mutation.
@PastaPastaPasta PastaPastaPasta changed the title docs(dip27): version 2 Asset Unlock transactions with stable withdrawal identifier docs(dip27): version 2 Asset Unlock transactions with stable txids Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant