<p>A lightweight client cannot even check for itself that a <em>confirmed</em> transaction is valid.  It has to trust that miners will not spend time confirming invalid transactions.</p>

<p>If you have an SPV client and I am an evil miner with a substantial amount of mining power, I can make a transaction with a nonexistent input (essentially creating coins out of thin air), and include it in a block I mine.  This block won't be accepted by any full node, because they will have a complete transaction register and will know that the input is nonexistent, but your SPV client would accept it.  If I then mine some more blocks on top of my bogus block, your SPV client will think that transaction has several confirmations.  This  will work particularly well if I can mess with your network connection so that you can't connect to any full nodes except for evil nodes controlled by me.</p>

<p>Of course this attack is fairly costly for me, since I have to spend mining power that could otherwise generate legitimate coins, but maybe it is worth it if I can buy something valuable from you and pay with fake coins.  So if you are in the business of selling high-value goods, you might very well consider it worthwhile to have a full node.</p>

CC BY-SA 3.0
2017-04-24T21:20:31.820Z
2017-04-24T21:20:31.820Z
Nate Eldredge
<p>I read that running a full node provides "more security" than running a SPV client. What does this concretely mean? I think I understand pretty well how those two kinds of nodes work but I do not see what risks one takes running a SPV node. True a lightweight client cannot check by itself that unconfirmed transaction are valid. Is this the only difference as regards security? Even for a full node, accepting an unconfirmed transaction is not totally safe. 
I am asking this question because I try to understand what would be the effect of bigger blocks on the Bitcoin network. Therefore I need to understand why people choose to run full nodes/lightweight clients. I see very well why some people would choose to run SPV nodes but I don't understand why somebody would rationnaly chose to run a full node.</p>

<p>Thank you by advance!</p>

<security><client><network>
What are the advantages of running a full node in comparison with a lightweight client?
benjiw
# What are the advantages of running a full node in comparison with a lightweight client?

(Asked by: username_0 on 2017-04-24)

I read that running a full node provides "more security" than running a SPV client. What does this concretely mean? I think I understand pretty well how those two kinds of nodes work but I do not see what risks one takes running a SPV node. True a lightweight client cannot check by itself that unconfirmed transaction are valid. Is this the only difference as regards security? Even for a full node, accepting an unconfirmed transaction is not totally safe.
I am asking this question because I try to understand what would be the effect of bigger blocks on the Bitcoin network. Therefore I need to understand why people choose to run full nodes/lightweight clients. I see very well why some people would choose to run SPV nodes but I don't understand why somebody would rationnaly chose to run a full node.

Thank you by advance!

**Tags:** security, client, network


---

## 1 answers

### Answer by username_1 on 2017-04-24. Score: 0 | Accepted answer

A lightweight client cannot even check for itself that a *confirmed* transaction is valid. It has to trust that miners will not spend time confirming invalid transactions.

If you have an SPV client and I am an evil miner with a substantial amount of mining power, I can make a transaction with a nonexistent input (essentially creating coins out of thin air), and include it in a block I mine. This block won't be accepted by any full node, because they will have a complete transaction register and will know that the input is nonexistent, but your SPV client would accept it. If I then mine some more blocks on top of my bogus block, your SPV client will think that transaction has several confirmations. This will work particularly well if I can mess with your network connection so that you can't connect to any full nodes except for evil nodes controlled by me.

Of course this attack is fairly costly for me, since I have to spend mining power that could otherwise generate legitimate coins, but maybe it is worth it if I can buy something valuable from you and pay with fake coins. So if you are in the business of selling high-value goods, you might very well consider it worthwhile to have a full node.


---

