Skip to content

DSProof

Tom Zander requested to merge (removed):dsproof into master

The specification as it is now; spec

The double spend proof code detects double spends, sends an INV to peers and handles getdata requests by introducing a new 'dsproof-beta' message.

This adds a DoubleSpendProof and a DoubleSpendProofStorage set of classes which are as you'd expect. The storage is owned by the mempool and the mempool will delete DSPs from the DSPStorage as the transaction they belong to go away (for instance if they are mined). The link between a transaction in the mempool and its proof are by the addition of the dsproof int in the CTxMemPoolEntry class.

Known issue: the code currently only manages to create DSPs when the UTXO it double spends is a p2pkh. This helps for the majority of the cases on the net, but this issue is the main reason we have the name 'beta' in the message name. The current message structure might just work for this, but lets get something deployed and tested in wallets first, ok? The second reason for calling it 'beta' is because I don't pretend to be a genius that can predict the issues we get when this is deployed and PoS systems start using this. Again, lets get this deployed first :)

Edited by Tom Zander

Merge request reports