Merkle Root of Bitcoin Block

This section describes the Merkle Root of a Bitcoin Block.

The Merkle Root of A Bitcoin block is the hash of all transaction hashes.

For example, block # 500 of the Bitcoin Test Network has the following Merkle Root and transaction hashes:

  ...
  "height": 500,
  "merkleroot": 
     "dd3f288510dd3b632940bd3fb1db162d3ff99b19ddb0c586cfa3ac9a76d42517",
  "tx": [
    "a647d0c4112b4727f3c856782ff6bbaf099be929b27214a8e0dfedee4383eb68", 
    "24b8a4c788b8c805b810438ddd99e569e184ff20f4394ac49a6d832e69f57242", 
    "c5ffd70c3bc4998465cef55ed6d5d831ab3a550406423eb611117ed8ee41c278", 
    "4692772a73ea834c836915089acf97f2c790380a2b8fd32f82729da72545d8c5", 
    "82d6d88081e3e0eb36730f7f3aedb17228142b9e00a6dbaab4b53b798d0742c1", 
    "fc407d7a3b819daa5cf1ecc2c2a4b103c3782104d1425d170993bd534779a0da", 
    "95ad3ffb2a9426d6f5f5b97a134d90153ae16c9375f74eb385f481cff2771d77"
  ],
  ...

Here is the algorithm of how to calculate the Merkle Root:

You can try the above algorithm to verify the Merkle Root on block # 500.

Last update: 2017.

Table of Contents

 About This Book

 Introduction of Bitcoin

 Bitcoin Blockchain

 Bitcoin Wallet

 Bitcoin Core

 Bitcoin Transaction

 Bitcoin-Qt - Bitcoin Core GUI

 Bitcoin Mining

 Bitcoin Consensus Rules

Bitcoin Block Data Structure

 Data Components of Bitcoin Block

 Data Properties of Bitcoin Block

Merkle Root of Bitcoin Block

 Calculate Double-SHA256 Hash with Python

 Verify Merkle Root of 2 Transactions

 Verify Merkle Root of 7 Transactions

 Data Structure of Bitcoin Block

 "getblock blockhash 0" - Serialized Hex Block Data

 Block Hash Calculation Algorithm

 Block Hash Calculation in Python

 Calculate Double-SHA256 Hash with Java

 Bitcoin Transaction Data Structure

 blockexplorer.com API

 Copay - Bitcoin Wallet

 References

 PDF Printing Version