docs(dip27): version 2 Asset Unlock transactions with stable txids - #189
Draft
PastaPastaPasta wants to merge 4 commits into
Draft
docs(dip27): version 2 Asset Unlock transactions with stable txids#189PastaPastaPasta wants to merge 4 commits into
PastaPastaPasta wants to merge 4 commits into
Conversation
…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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5 tasks
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.
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.
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, andquorumSigfields 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 tosignHeightandquorumHash.Supporting changes:
merkleRootAssetUnlockscommits 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.MSG_ASSET_UNLOCKinventory type, since a txid-based announcement can never propagate a re-sign; nodes keep the instance with the highersignHeightand retain expired instances awaiting a replacement.dip-0027/dip-0027-txid-calc.py); vectors are pinned byte-for-byte against the Dash Core implementation's unit tests.Implementation: dashpay/dash#7639.
🤖 Generated with Claude Code