In the Bitcoin, SPV node can query that its transaction is included specific block to full node that provides merkle path which has super fast calculation.

In terms of full nodes, they have full-ledger and merkle tree that is consist of transaction tree. so they can find some transaction queried by SPV node(light node) but my question is that how they can efficiently find it?

They may dislike compute to find transaction if they have to sequence search because they are busy to find hash value of block to earn block reward.

Sorry for my English.


2 Answers 2


They may dislike compute to find transaction if they have to sequence search because they are busy to find hash value of block to earn block reward

You are confusing mining with node operation.

It is a full node on the network that will return info about the relevant merkle path to the SPV wallet.

Mining is done separately, by specialized hardware that is built to only be extremely efficient at hashing to find a new block. The mining hardware will be connected to a full node, so that it can obtain the relevant info to build new block templates. But the two computations are done on separate hardware, in parallel.

So even if a miner’s node was the one to serve the merkle path info, it would not take away from their mining time.

  • Thansk for reply. yes, I think your answer is right, but you didn't include answer of my core question, "how full-node provide efficiently merkle path?", can you show what you think about my question? I would like to hear about this!
    – Hyunsoo
    Sep 1, 2019 at 13:56

Firstly I don't know about the implementation details, so maybe I have some misunderstanding. However I still think I can help. Correct me if I'm wrong :-D.

BIP37 protocol allows the full node to find out relevant transactions from the blockchain ledger with bloom filters, so that the lightweight client would not have to download the full blocks. However it's still very inefficient. It's much less efficient than a fully indexed server like ElectrumX, Electrs etc. The full node still needs to scan the blockchain, which requires reading the hard drive intensively.

Note that Electrum protocol (essentially) requires the lightweight client to send its addresses directly, so that its privacy is not good.

BIP157/158 (aka Neutrino) protocol let the full node build a block filter index in advance, so that a lightweight client only needs to download the block filter index only firstly. With such block fitler index, the lightweight client can scan through the filters to find out which blocks may be relevant, and then it can download those possibly relevant blocks to scan out the relevant transactions from them.

Neutrino protocol is still not as efficient as a fully indexed server, like an Electrum server (or an online block explorer), however it's efficient enough to allow an ordinary laptop to scan though the whole blockchain in only 1-2 minutes, which is almostly two orders of magitudes more efficient than directly scanning the blockchain itself. The block filter index also takes much lower disk space than a fully indexed server. The bandwith consumption is obviously higher because the block filter index currently takes ~5GB, however once it's completely downloaded, it can be then reused freely.

However, Andreas Schildbach, maintainer of bitcoinj and the bitcoin-wallet for Android, thinks that Neutrino still has some limitations/problems, so that it's not really an alternative of BIP37.

By the way, what a Merkle proof can do is very much limited than what a lot of people supposed.

Merkle path proves nothing but the existence of the transaction data itself, which is essentially just a timestamp. This fact essentially makes the "reclaiming disk space" mentioned in Satoshi' s whitepaper unrealistic.

SPV light clients are facing similar problem, that even Satoshi himself also mentioned that SPV "can be fooled by an attacker's fabricated transactions", while unfortunately the countermeasure (aka "fraud proofs" nowadays) which Satoshi assumed seems impossible (or always incomplete) in reality.

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.