Add support for Double Spend Proofs (`MSG_DOUBLESPENDPROOF`, type: `0x94a0`)
bitjson opened this issue · 1 comments
Chaingraph should support saving all received Double Spend Proofs (DSPs). This requires both extending the data model and adding support for the new P2P message. This is waiting on #11.
It would be wise to make full DSP support optional, since it could significantly increase storage requirements: attackers can maliciously broadcast many large DSPs, typically paying only the network fee for a smaller initial payment. If Chaingraph's nodes hear different DSPs for the same transaction, they will ignore later DSPs, but the Chaingraph database should store everything heard from each node, possibly saving multiple large DSP preimages for a single double-spent outpoint.
Maybe when in "low-storage mode", Chaingraph could simply save a boolean to indicate the presence of a DSP, rather than storing the full preimage contents.
Please comment here if you're interested in this feature or if you have feedback on how the API should work.
By the way, Chaingraph currently issues a warning when new DSPs are received: received unexpected inventory item of type 38048 with hash: [inv_hash]
. That warning would be resolved by this feature.