SPV Wallets vs API Wallets - Pragmatic


From what I know, the only advantage of an SPV node compared to a API Node, is the increase in privacy.

SPV nodes take up more bandwidth, in order to stay synced with the current chain and in some cases, store a lot of data.

With an API wallet, one could connect to multiple endpoints to see if any one is lying. There is also less data and less bandwidth.

Do most people care if their wallets are SPV? Are there any other advantages of SPV that I have missed?

Kyle Graham

Posted 2018-04-23T16:31:29.187

Reputation: 542



SPV wallets allow a user to verify that the information they have received is legit, thus the node they are connected to is unable to send them fraudulent transactions. This is possible because the block header that an SPV wallet will download contains the block hash (allowing the wallet to verify that the block header is indeed part of the bitcoin blockchain, tracing back to the genesis block), and the transaction merkle root (allowing the wallet to verify that a certain transaction is included in a certain block). Through these cryptographic mechanisms, a user can interact with the network without placing a large amount of trust in the node that is communicating with their wallet.

Using multiple endpoints for an API wallet does not provide a more secure solution than the cryptographic proofs utilized by an SPV wallet. By using an API wallet, you are trusting that the API provider will not provide you false information. Using multiple endpoints is probably better than just one, but the risk still remains because now you just trust that a bunch of nodes aren't lying, instead of just trusting that one node isn't lying.

Luckily, SPV wallets are not super resource intensive as is, block headers are only 80 bytes, so a year's worth of blocks only add up to about 4.2 MB.


Posted 2018-04-23T16:31:29.187

Reputation: 13 841

The last part about 4.2MB was eye opening. May I ask how SPVs keep their UTXO list up to date? Are there rpc commands to get the UTXO list of a specific account for example? – Kyle Graham – 2018-04-23T20:21:42.407

Can I also ask, if it is only 4.2MB per year, then why are SPV wallets like Bread and Loaf, so slow? – Kyle Graham – 2018-04-23T20:23:18.807

You have to craft a boom filter with your private key and run every transaction through it. Even though it's 4.2mb per year, those wallets sync from the ground up on startup. They have to sync 10 years worth of data ~ around 50mb right now from a decentralized network. It isn't that fast. – arshbot – 2018-05-24T22:35:12.020