74

I've seen SPV client mentioned in several places. What exactly is a SPV client? How is it different from a standard client?

0

2 Answers 2

46

Simplified Payment Verification:

A Bitcoin implementation that does not verify everything, but instead relies on either connecting to a trusted node, or puts its faith in high difficulty as a proxy for proof of validity. BitCoinJ is an implementation of this mode.

Also read:

MultiBit, Bitcoin Wallet for Android, and Electrum are examples of SPV clients.

2
  • 4
    So "SPV" is contrasted with "full" node? Or is there a third class?
    – Pacerier
    Commented Oct 26, 2017 at 2:31
  • @Pacerier Yes. The comparison is with full node. Commented Jan 5, 2019 at 13:51
3

SPV is Simplified Payment Verification and it is typically contrasted with "running a full node". SPV is around since bitcoin's original incarnation, it has been there since the beginning. It is a perfectly fine way to operate a wallet.

The bitcoin network relies on certain "consensus rules" to operate. One of these rules is that you can not spend something you own twice. When you send a transaction into the bitcoin network it will eventually be written into the blockchain. Full nodes download the complete blockchain and check every transaction in it to conform to the rules. This is important for you receiving funds also, as it makes sure that what was spent by someone by sending it to you was legitimately spent and is therefor yours.

An SPV wallet only downloads a certain part of the block chain, the "block headers". Every block in the block chain points to the previous block. The identifier used to identify a block is a "hash" of its header. Finding that hash is often referred to as the "cryptographic puzzle" or "proof of work challenge" that a miner has to solve in order to append a block to the chain. The hash has to conform to a certain difficulty which is dynamically adjusted in the network. In order to make sure that you are not being fooled you have to scan the most recent history of the blockchain to understand what the current difficulty is and whether new blocks that you see are actually valid according to that difficulty. This is way less data then the full blockchain.

Another thing a full node does is relaying transactions. Bitcoin is a P2P network which means everybody talks to everybody else. In practice not all 10000 notes talk to all other nodes (that would require 100000000 connections!) but to a subset of nodes. So for your transaction to reach a miner who puts it into a block eventually it might have to be relayed by a node.

An SPV wallet is not any less secure for an end user. It will correctly tell you what amount of bitcoin you can spend and whether an amount of bitcoin that was sent to you can actually be spent reliably (i.e. whether you own it). My wording might seem a little weird, that is because technically you never own anything, except for some cryptographic keys that allow you to spend certain funds that were sent to you.

You might have read that it's better to run a full node. This statement is true with regards to the network as a whole: The more nodes enforcing the rules of the system the better. The more nodes operating and relaying transactions the better. Think of the four-eyes-principle on steroids. But it is not feasible or even possible for every user to run a full node. For example if you have a wallet on your mobile device which might not have enough resources to validate each and every transaction in the network, or not enough bandwidth to participate.

To summarize: If there were no full nodes there would not be a bitcoin network. But for using bitcoin to send/receive funds it is not required to run a full node. Your own security is not affected. IMHO it is better to participate and thereby grow bitcoins value as a utility than not participating at all. It is also better to use your own wallet than for instance a web wallet at any given exchange.

Further readings:

2
  • "I would not recommend keeping funds in a SPV wallet," - Jonas Schnelli en.bitnovosti.com/2018/07/06/… Commented Jan 6, 2019 at 20:56
  • 1
    @StephenGornick FYI, it's offline and the internet archive doesn't have a copy. (This is why link-only answers (and by extension, comments) are discouraged...)
    – Luc
    Commented Dec 2, 2019 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.