Step by step to make a SPV bitcoin node


As I know, there is a light node version called SPV. for now I have started a full node and it has downloaded 82222 blocks, but I don't want to have a full node with full blockchain, my purpose is to have a node that provide me:

  • check balance or unspent amount for an address
  • sign and broadcast a transaction

is this possible?

Hamid Naghipour

Posted 2020-05-03T06:35:00.927

Reputation: 188


bcoin is a nodejs Bitcoin library with both full and SPV node applications:

– pinhead – 2020-05-03T13:40:03.350

@pinhead thank you, only can I ask a question? I have downloaded bitcoin source from here and after all steps I can run bitcoin-cli. now it downloaded blocks 8222, but I don't want to download 300GB of blocks and only I want to download headers. this has any line config in bitcoin.conf or Is something completely separate from bitcoin core?

– Hamid Naghipour – 2020-05-03T13:46:35.667

1Bitcoin Core does not have an SPV mode. It can serve SPV clients but by design it is only a full node. If disk space is your only issue you can run it with pruning on. A pruned node deletes old blocks from disk but still maintains a complete UTXO set which is sufficient for full validation. – pinhead – 2020-05-03T13:48:53.173

@pinhead The bcoin re write bitcoin in node application with SPV mode? or inside of Node app connect to P2p network with SPV mode? or like me install bitcoin core and only different config? Thank you about "pruning", disk space and bandwidth. – Hamid Naghipour – 2020-05-03T13:51:59.953

1Bcoin is an alternative implementation of the bitcoin protocol. It was written from scratch in nodejs and shares very little code in common with Bitcoin Core which is written in C++. Some open source libraries like the crypto library libsecp256k1 are included with license. But otherwise it is a complete rewrite including networking, wallet, and block validation. – pinhead – 2020-05-03T13:54:53.533

@pinhead Great, Thank you very much. So there is no need to install bitcoin core when we want to have a SPV node, I was looking a way to change a config that change type of message from block to Header. you said there is not this config and bitcoin core doesn't support SPV node.Am I right? Do you know like this in php please? – Hamid Naghipour – 2020-05-03T14:02:34.857

1Yeah sounds like you get the concept. Please learn more about the trade offs involved with SPV before using it. I'm not aware of any useful PHP bitcoin library. – pinhead – 2020-05-03T14:03:53.330

@pinhead I asked another question, answer it please if you like and get points:

– Hamid Naghipour – 2020-05-03T14:39:18.927



By design, Bitcoin Core is a fully validating Bitcoin node and does not have an SPV client mode.

If disk space is your primary concern, you can run Bitcoin Core with pruning active. This will delete old blocks from disk but maintain a full UTXO set which is sufficient for full blockchain validation.

Bitcoin Core can serve SPV clients, although there has been discussion to deprecate this service or at least switch the service off by default. Before using an SPV wallet yourself, you should understand the tradeoffs for both security and privacy.

There are other software libraries capable of running a bitcoin wallet with Simple Payment Verification. One such library is bcoin which is written in nodejs:


Posted 2020-05-03T06:35:00.927

Reputation: 4 072