There is no SPV on Bitcoin SV at the moment. These are just some quick notes on what I've been thinking is needed for SPV to be doable.
There is no standard for a merkle proof. Every coin spent by someone who wishes to make a P2P payment needs this proof that is in a given block. ElectrumX has a JSON-based structure it has been serving to the internet at large for up to a decade (no idea how long I don't work on ElectrumX) and which ElectrumSV uses. ElectrumSV will be switching to the standard developed by the Bitcoin Association technical standards process. when that gets developed.
Receiving a payment
Someone gives you a P2P payment. They give you:
- Their payment transaction.
- For every input in the transaction, or coin being spent to pay you, the corresponding transaction that contains the UTXO for that payment coin.
- For every transaction containing a payment UTXO, a merkle proof that shows it was mined in a given block.
- They might even through some negotiation process give you all the headers you do not have that are needed to cover the largest height of any of their proofs.
Received payment micromanagement
Now you have a new transaction. You need some way of knowing when it gets mined so that you can in turn get it's merkle proof so you can use it in any payment.
So this suggests that an application needs some API where:
- They can register transaction ids and can get notified when a transaction is mined.
- They can fetch a merkle proof for a given transaction.
I suspect the future of commodity services that are fundamental requirements for applications and wallets to function are standard APIs and interoperability. This means that applications and wallets that need to use them will need to support the API of any service that offer them, and very likely this will mean that the services that offer a standard common API for this will eventuate.
Any service that requires registration or account creation for the use of their commodity services puts a barrier to adoption. Any service that has a custom payment protocol for the use of their commodity services puts a barrier to adoption. This would suggest that there must not only be a standard common protocol, but also a standard ad-hoc micro-payment protocol for applications or wallets to use.
SPV looks like it requires services with the following things to be standardised:
- How to receive notifications for when a transaction you have been paid with, is mined.
- Fetching merkle proofs.
- Syncing block headers.
- Automated payment of services for API usage. Payment channels?