<blockquote>
  <p>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. </p>
</blockquote>

<p>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.</p>

<p>This is specified in <a href="https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki" rel="nofollow noreferrer">BIP 37</a> 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.</p>

<blockquote>
  <p>What reward he is getting for his services?</p>
</blockquote>

<p>None. Full nodes are not rewarded for anything unless they are a miner.</p>

CC BY-SA 4.0
2020-06-30T15:35:04.180Z
So then what is incentive to run a full node?
lhay86
CC BY-SA 4.0
2020-06-30T15:57:44.200Z
@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.
Ava Chow
CC BY-SA 4.0
2018-05-17T15:40:35.533Z
2018-05-17T15:40:35.533Z
Ava Chow
<p>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:</p>

<p>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. </p>

<p>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?</p>

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

<p>PS: Please also point me towards a publication which has all the information.</p>

<transactions><transaction-verification><merkle-tree>
Merkle Tree computations
Noman Aslam
# Merkle Tree computations

(Asked by: username_0 on 2018-05-17)

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.

**Tags:** transactions, transaction-verification, merkle-tree


---

## 1 answers

### Answer by username_1 on 2018-05-17. Score: 1 | Accepted answer

> 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](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki) 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.

> **Comments:**
> **username_2**: So then what is incentive to run a full node?  
> **username_1**: @username_2 The incentive is that your money will be better protected and more private. Full nodes have better security and privacy guarantees than SPV wallets.  

---

