2

Assume I am running a mini-blockchain that is I only have blocks' headers but no transactions. I wish to verify a transaction of a third party. For that I need the transaction's path to the Merkle root. Given that no one stores Merkle tree and it is computed on the fly. My question is that who will compute Merkle tree. That is:

Option # 1) I will receive all transactions hashes of the block and I will be computing the Merkle tree myself. Pitfall: That implies, I will be receiving lots of data and sender has to send lots of data.

Option # 2) A node running full-block chain will compute Merkle tree and will send me only the transaction path. Pitfall: the sender will be computing Merkle trees of lots of people. What reward he is getting for his services?

I feel both options are not ideal. May be there is a third option which I do not know. I will appreciate your reply.

PS: Please also point me towards a publication which has all the information.

1 Answer 1

1

Option # 2) A node running full-block chain will compute Merkle tree and will send me only the transaction path. Pitfall: the sender will be computing Merkle trees of lots of people.

This is what happens. You connect to a full node, tell it to send you transactions which match a filter, and then you will receive those transactions along with the merkle tree path.

This is specified in BIP 37 which is used by many SPV wallets. Note that not all wallets use BIP 37 such as Electrum which uses its own protocol and connects to special Electrum servers.

What reward he is getting for his services?

None. Full nodes are not rewarded for anything unless they are a miner.

2
  • 1
    So then what is incentive to run a full node?
    – lhay86
    Jun 30, 2020 at 15:35
  • 1
    @lhay86 The incentive is that your money will be better protected and more private. Full nodes have better security and privacy guarantees than SPV wallets.
    – Andrew Chow
    Jun 30, 2020 at 15:57

Your Answer

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

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