node_walletSenior Member
Posts: 139 · Reputation: 949
#1Aug 17, 2021, 10:50 PM
Hey everyone,
I’m looking for some thoughts on a concept I want to propose as a different approach to simply freezing or retiring legacy signatures in the context of Quantum-Resistant Address Migration Protocol, or similar migration strategies.
Instead of making old ECDSA spends invalid after a certain point, how about we put them into a quarantine status:
- Even after PQ activation, legacy UTXOs can still be spent,
- but only through a two-phase commit to spend process that stops any substitution of the destination, even if someone can quickly derive the legacy private key after revealing the pubkey.
So here’s a high-level breakdown:
1) **Commit phase (on-chain):** we publish a commitment that ties together the future spend outputs (ideally, the entire output set: amounts and scriptPubKeys) and this commitment only becomes valid after it reaches at least K confirmations.
2) **Spend phase (on-chain):** a legacy spend is deemed valid only if it can show (a) proof that the corresponding commitment has been mined and is mature, and (b) the outputs of the spend match what was committed originally.
An important thing to keep in mind is that this needs to be enforced by consensus without relying on historical transaction lookups (so it works with pruned nodes and no transaction index). That means the spend might need to include an SPV-style proof for the commitment (txid plus merkle branch to a block header plus the K depth rule).
A key point for user experience here is **fee sponsorship**: the receiver or exchange can create and pay for the commitment transaction, while the holder of the legacy funds gives their approval for the commitment off-chain (by signing the commitment hash). This avoids the issue of not being able to safely pay fees during Phase 1.
Just a quick design note and diagram:
- Markdown: https://github.com/bnavf/bitcoinqp/blob/main/two_phase_destination_commitment.m