I've heard that if you don't want do download gigabytes of data just to use bitcoin you gotta use a thin client. But what is a thin client? What are the main advantages of a thin bitcoin client and what defines it as such?

up vote 23 down vote accepted

A thin client is a program which connects to the Bitcoin peer-to-peer (P2P) network but which doesn't fully validate transactions or blocks. That is, it's a client to the full nodes on the network.

Most thin clients use the Simplified Payment Validation (SPV) method to verify that confirmed transactions are part of a block. To do this, they connect to a full node on the P2P network and send it a filter (called a Bloom filter) that will match any transactions affecting the client's wallet. When a new block is created, the client requests a special lightweight version of that block called a Merkle block.

The merkle block includes a block header, a relatively small number of hashes, a list of one-bit flags, and a transaction count. Using this information---often less than 1 KB of data---the client can build a partial Merkle tree to the block header as illustrated below. If the hash of the root node of the partial Merkle tree equals the hash of merkle root in the block header, the SPV client has cryptographic proof that the transaction was included in that block. If that block then gets 6 confirmations at the current network difficulty, then the client has extremely strong proof that the transaction was valid and is accepted by the entire network.

Parsing a merkle block

(Image taken from MIT-licensed Bitcoin.org developer documentation. I'm also the author of that image.)

The only major downside of the SPV method is that full nodes can simply not tell the thin clients about transactions, making it look like the client hasn't received bitcoins or that a transaction the client broadcast earlier hasn't confirmed.

  • Good informative answer, although not all that concise. Accepted. – saloalv Nov 15 '14 at 19:14
  • 4
    I doubt any answer could be equally informative yet more concise. – Steve V. Nov 16 '14 at 0:31
  • 1
    Good answer David, this is also worth mentioning: en.bitcoin.it/wiki/Thin_Client_Security#Header-Only_Clients – George Kimionis Nov 16 '14 at 1:10
  • 1
    @GeorgeKimionis great idea! Linkified "thin clients" in the first sentence with that link. Thanks! – David A. Harding Nov 16 '14 at 2:57
  • @DavidA.Harding, What's the difference betwen "thin client" vs "SPV client"? – Pacerier Oct 26 '17 at 2:32

Thin client is one that won't download whole blockchain locally on your device. They are useful for those that have small capacity hard-drive or using mobile devices.

  • 1
    So what parts of the blockchain does it download? – saloalv Nov 15 '14 at 19:11
  • @saloalv just the part it needs to: 1. determine your current balance, and 2. create new transactions from your address(es). Typically just a few blocks. And it can even throw old blocks away after certain outputs have been spent. – Madzi Konjo Nov 16 '14 at 7:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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