RCP-240313A: SPV proofs for anchor transactions #3
Labels
C-fastforward
Consensus backwards-compatible change
C-stdlib
Proposes changes to standard library
epic
Epic task covering multiple steps of implementation
S-implemented
Milestone
Currently all anchors inside a consignments are identified by just by their transaction ID. Verification of a consignment therefore requires an access to a fully indexed bitcoin node and checking many random transactions by their transaction ID - this might be impractical and slow for many user (with those users resorting to 3rd party nodes and blindly trusting those).
A solution is to include the SPV proof (merkle proof + raw bitcoin transaction) for all the anchor transactions. This way a client can quickly (in ~15 double SHA256 hash invocations) check that an anchor transaction is valid while only having access to bitcoin blockheaders (such as when running a heavily pruned bitcoin node, or even just a bitcoin light client node).
The SPV proof should be included in the anchor transaction definition as an optional parameter. It is important to note that an SPV proof for the latest state transition is not immediately available (since SPV proof can only be obtained once the anchor transaction is included in a block). There also might be some anchor transactions for which there is no SPV proof provided in the consignment, this is not a problem since anyone can look up those transaction and add SPV proofs for them later - this also means adding SPV proofs will be backwards compatible with old consignments.
As discussed in the RGB WG by @fedsten the requirement for having SPV proofs in the consignments should be indicated by the recipient in the RGB invoice, because the recipient might not have an access to a fully indexed bitcoin node (and is therefore unable to verify consignments without SPV proofs).
The text was updated successfully, but these errors were encountered: