<p>The merkle root is a <em>32 byte</em> hash.</p>
<p>As the hashing operation is sha256, it is exceedingly unlikely that you will find duplicates, but it is not, strictly speaking, impossible.</p>

CC BY-SA 4.0
2020-12-01T06:51:47.723Z
The list will actually have 2 duplicates, due to the coinbase duplications before BIP30.
Pieter Wuille
CC BY-SA 4.0
2020-12-01T08:15:36.137Z
@PieterWuille Isn't that simply a duplicate coinbase *transaction*? Since block 91880 contains a non-coinbase transaction as well, the merkle root in the header will be different
Raghav Sood
CC BY-SA 4.0
2020-12-01T08:17:39.020Z
Ah, I must have misremembered then! I thought they both had no other transactions.
Pieter Wuille
CC BY-SA 4.0
2020-11-04T03:15:05.890Z
2020-11-04T03:15:05.890Z
Raghav Sood
<p>The &quot;Mastering Bitcoin&quot; book says that each block header contains a 32B long hash of the Merkle root for all the transactions it contains.</p>
<p>If I extract all these Merkle roots from all the blocks in the blockchain (longest branch only) and put them in a list, will that list have any duplicates?</p>

<merkle-tree>
Are hashes of Merkle tree roots unique throughout whole blockchain?
yujaiyu
# Are hashes of Merkle tree roots unique throughout whole blockchain?

(Asked by: username_0 on 2020-11-04)

The "Mastering Bitcoin" book says that each block header contains a 32B long hash of the Merkle root for all the transactions it contains.

If I extract all these Merkle roots from all the blocks in the blockchain (longest branch only) and put them in a list, will that list have any duplicates?

**Tags:** merkle-tree


---

## 1 answers

### Answer by username_1 on 2020-11-04. Score: 4 | Accepted answer

The merkle root is a *32 byte* hash.

As the hashing operation is sha256, it is exceedingly unlikely that you will find duplicates, but it is not, strictly speaking, impossible.

> **Comments:**
> **username_2**: The list will actually have 2 duplicates, due to the coinbase duplications before BIP30.  
> **username_1**: @PieterWuille Isn't that simply a duplicate coinbase *transaction*? Since block 91880 contains a non-coinbase transaction as well, the merkle root in the header will be different  
> **username_2**: Ah, I must have misremembered then! I thought they both had no other transactions.  

---

