As they say, “If I had more time, I would have written a shorter letter.” Craig Wright’s magnum opus ended up having only nine pages. That’s all. It is a letter distilled to its bare essence. As they say, “All killer, no filler.” But because it is so refined, it also does not provide the reader with much context. As they say, “Content is King, But Context is God.” The whitepaper doesn’t explain the implications it might have on us in the real world, and it doesn’t provide a grand vision. It’s like having seen the trailer, but the film itself has not been released yet.
Over the last week, we have seen much debate all over social media about Chapter 8. The one that concerns Simplified Payment Verification (SPV) and how it should be adequately implemented.
Social media is not a good place to discuss any topic. It is a simplified communication system. But unfortunately, there isn’t much room for context, and especially Twitter has become a source of annoyance for many people working within the BitCoin SV ecosystem.
The advantage Twitter does have is, it allows for anyone to approach anyone in the industry directly with questions. And most of the time you’ll get a response very quickly, which would not be possible or very difficult to get any other way. This is what I use it for, and why I likely will keep on using it.
Confusion about how SPV works
So what is all the fuss about? Of course, I cannot look into the minds of others, and can therefore only indicate for myself what the confusion is and how it originated. Consequently, I made a couple of visualizations of how I interpreted the different viewpoints presented. I put it out there on Twitter to test my assumptions, and got some clarifications from others. I asked the same question in the Metanet.ICU Slack group.
In Slack, Craig Wright was soon able to point out a mistake I made.
Apparently, given the result of a quick poll on Twitter, I was not the only one confused about it.
According to Craig Wright, my confusion was rooted in that I used two (or more) related definitions interchangeably. How did this happen? Let’s reconstruct.
I guess it started with a couple of statements by Craig Wright in 2018 about SPV. At the time, still on Twitter.
“So, I hinted a LONG time on how SPV was supposed to work. Without it, there’s no real solution to Bitcoin (any blockchain). It is being patented. I am more than happy to do this now”– Craig Wright
“In January 2019, we will start showing people how Bitcoin (any blockchain) scales. It requires SPV & SPV does not use servers (so, Electrum is not SPV). I gave 10 years, hints… much more… And, nobody bothered to learn, so it will be patented and licensed to SV exclusively”.– Craig Wright
It made me believe there was something specific required for SPV that was not yet implemented and not explicit enough in the whitepaper. So what was it that all of us were missing?
I have seen him talk about peer-to-peer a lot in the context of SPV. And also in Craig Wright’s latest blog post about SPV he says:
“The truth of the matter is, nobody realised how simple SPV could be. It is critical because you cannot scale the blockchain without SPV, and more importantly, SPV is the peer aspect of Bitcoin.”– Craig Wright
I guess this is why I have started assuming that the peer-to-peer (P2P) aspect somehow was an integral part of the true design of SPV.
So let’s untangle the mental web I made. First, we need to differentiate between SPV and P2P. See below for a visualization of the difference between the two. The model left visualizes how most wallets work today.
Alice sends a transaction to the Network, and Bob checks the Network to see if a valid transaction is received.
“The miners or nodes in the network act as a distributed intermediary. No one intermediary needs to be directly trusted, which differs greatly from any of the current systems.”– Craig Wright
The model on the right is a P2P transaction where Alice sends a transaction directly to Bob, and Bob transmits the transaction to the Network and validates if the transaction is correct.
“By definition, ‘peer-to-peer’ refers to the direct exchange between individuals or other parties. As such, a consumer, Alice, who wishes to purchase goods from a merchant, Bob, would send a transaction directly to Bob. Bob can validate it and send it to the blockchain for clearing and settlement. The process is peer-to-peer.”– Craig Wright
The peer-to-peer part of the transaction is the transmission from A to B, and it is something different than the verification.
“SPV itself is just verification. That means that how the data is transmitted, how it is recieved in a program that can be achieved in many different ways. One of these ways is Peer to Peer.”– Bitcoin Sofia
Verification vs ‘simplified verification’
Who needs to verify? The sending party (Alice) doesn’t need to concern herself with it, as long as the receiving party accepts the transaction, she is okay anyway.
“As Alice knows that she is the only party able to spend her coins, she can even act to make a transaction that is valid while she is still not connected to the blockchain in any way. Alice does not need to worry about the validity of any change transaction or output, because Bob cannot alter them.”– Craig Wright
It is essential to understand that the receiving party is the one that is incentivised to verify the transaction. The receiving party (Bob) wants to get paid after all.
“The result is that Bob either submits the payment he has received from Alice to the blockchain for settlement, with the change to be paid to Alice, or he does not receive payment, in which case Alice does not need to worry about her change at all.“– Craig Wright
So Bob needs to verify the transactions he receives. Does it matter how he receives the transaction?
“An SPV client just needs the block headers. It doesn’t really matter how it gets it:@hagbarddd
* Connect to Bitcoin network
* Fetch via HTTP
Connecting directly to the Bitcoin network via a phone is a horrible UX.” –
So how does Bob verify transactions?
“Full verification overall just means downloading the whole blockchain, tracing every single transaction, from Genesis to the most recent UTXO and just checking everything. That obviously takes a lot of resources. It is not simple.“– Bitcoin Sofia
So one way for Bob to verify transactions is by having a full network node. What is the other way?
“It is possible to verify payments without running a full network node.”– Bitcoin Whitepaper
So Bob can also verify transactions without running a full network node. And how does he do that?
“He can’t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.”– Bitcoin Whitepaper
But if he doesn’t have a full network node, how can he check if the Network has accepted it?
“You query 3 bitcoin nodes to see if a tx is in the mempool. Bitcoin nodes mine, being in the mempool means a commitment of these miners’ hash that this transaction is valid and will be included in the next block.”– Ari (CashPay Wallet)
What does Bob query to verify a transaction?
“First of all you want to do things like retrieve the block headers from the miners so that you can confirm whether your transaction is in a block In order to confirm whether it is in a block you’ll also need the Merkle path of your transactions.”– Ryan X Charles (Money Button)
“A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he’s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it’s timestamped in.”– Bitcoin Whitepaper
Is this how wallets work today, block headers and Merkle branches?
“ And something that nChain has been talking about recently is that idea that if you have proper SPV wallets you really need to be communicating these Merkle paths around. It is impossible for someone to modify a Merkle path. The wallets are not currently doing this.”– Ryan X Charles (Money Button)
So let me get this clear. A proper SPV wallet needs to send the Merkle path, and none of the wallets out there are currently doing this. What do we need to do to get there?
“ If wallets mutually adopt paymail, BIP 270 (with some extensions, including BIP 271, BIP 272 and BIP 273), and Miner ID, no wallets will need to run a node, and every wallet will be substantially less expensive to operate at scale.
Every wallet will be able to scale to arbitrarily large block sizes at a cost that depends only on the number of transactions for that wallet, not the number of transactions for the entire network. ”– MoneyButton (blog)
If a business uses a server for verification, is it still SPV?
“SPV can also work by connecting to a server. There is a server that can give you SPV verifications that some payment is real, that some coins are included in the blockchain. Stuff like that. Sure, that works. That is still SPV, because the verification process is done with in a simplified way with SPV. It doesn’t really matter how the data was received.”– Bitcoin Sofia
“We are NOT getting rid of SPV, but we just couldn’t find a way to use it at the client-side level that could offer a good user experience. SPV is great for our servers so the wallets can be just light clients.”– Alex Agut (HandCash)
So if it is not needed, why would a business want to use a server?
“The problems with having SPV at client (user wallet) side: – We cannot ensure the environment is optimal (OS settings, network connectivity…) so the UX is sub optimal. – We are blind to whatever is happening to our customers wallets (utxos, etc.) so it sucks for support.”– Alex Agut (HandCash)
“The user’s phone has to do all the heavy work and if you never reuse addresses, the more you use the wallet the more resources it will need (data, battery + processor) and there’s no way to solve that – We can’t fix Bitcoin issues without people updating the app, & they don’t.”– Alex Agut (HandCash)
“Sure. But we as a business do not want to have downtimes. If your router at home goes offline or your phone carrier censors the network, your SPV wallet stops working too. There is no such thing as NO INTERMEDIARIES, it’s a fallacy.”– Alex Agut (HandCash)
Do all businesses need to implement SPV?
“Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.”– Bitcoin Whitepaper
Well, I must say, despite all the noise on social media, I have managed to get a better understanding of what SPV is. Would you still like to know more about SPV? Do watch the upcomming MetaNet.TV conversation between @ari_cryptonized and Craig Wright and hosted by @kurtwuckertjr as they will dive into Simple Payment Verification.
This video will soon be made available on the Metanet.tv channels on Streamanity and YouTube. Also, there will be a conversation on video with Alex Agut on the BitcoinSVtrain Channel next week. Or read/watch some of the source material I used:
Ryan X Charles
Kurt Wuckert Jr