Summary
An unconfirmed (mempool) transaction that spends a wallet outpoint reserves that outpoint indefinitely. The reservation survives restart, and a rescan does not clear it. Only a conflicting InstantSend-locked or confirmed spend releases it.
Why this matters
dash-spv forwards peer mempool transactions to the wallet. The wallet recognises a spend by matching tracked outpoints and does not verify the spending signature. A connected peer can therefore relay an unsigned or never-mineable transaction that references a victim UTXO, and the UTXO becomes unspendable in that wallet:
Regression evidence: should_not_release_inputs_reserved_by_unconfirmed_spend passes with an empty scriptSig.
Expected
Legitimate pending sends keep their reservation until they confirm, are replaced, or expire. Unauthenticated peer observations cannot lock funds permanently. The fix must clear both the persisted reservation and the in-memory one, and must never release confirmed or InstantSend-locked spends.
Possible directions
- Provenance: distinguish locally authored sends from peer observations when persisting.
- Expiry: drop unconfirmed spend reservations that are not locally authored after a bound (time or block count), including on load.
- Revalidation: verify input scripts before a peer mempool transaction may reserve an outpoint.
References
🤖 Generated with Claude Code
Summary
An unconfirmed (mempool) transaction that spends a wallet outpoint reserves that outpoint indefinitely. The reservation survives restart, and a rescan does not clear it. Only a conflicting InstantSend-locked or confirmed spend releases it.
Why this matters
dash-spv forwards peer mempool transactions to the wallet. The wallet recognises a spend by matching tracked outpoints and does not verify the spending signature. A connected peer can therefore relay an unsigned or never-mineable transaction that references a victim UTXO, and the UTXO becomes unspendable in that wallet:
Regression evidence:
should_not_release_inputs_reserved_by_unconfirmed_spendpasses with an emptyscriptSig.Expected
Legitimate pending sends keep their reservation until they confirm, are replaced, or expire. Unauthenticated peer observations cannot lock funds permanently. The fix must clear both the persisted reservation and the in-memory one, and must never release confirmed or InstantSend-locked spends.
Possible directions
References
TODO(expire-unconfirmed-spend-reservations):rs-platform-wallet-storage/src/sqlite/rehydrate.rs, moved in fix(platform-wallet)!: replay recorded transaction history on load for every persister #5220 tors-platform-wallet/src/manager/history_replay.rs.🤖 Generated with Claude Code