1

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?

1 Answer 1

4

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.

3
  • The list will actually have 2 duplicates, due to the coinbase duplications before BIP30. Dec 1, 2020 at 6:51
  • @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 Dec 1, 2020 at 8:15
  • 1
    Ah, I must have misremembered then! I thought they both had no other transactions. Dec 1, 2020 at 8:17

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .