0% found this document useful (0 votes)
4 views

Merkle Root

Uploaded by

murmusupriya1818
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Merkle Root

Uploaded by

murmusupriya1818
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Merkle root

A Merkle root is the hash of all the hashes of all the transactions that are
part of a block in a blockchain network.

A blockchain is comprised of various blocks that are linked with one


another (hence the name blockchain). A hash tree, or the Merkle tree,
encodes the blockchain data in an efficient and secure manner. It enables
the quick verification of blockchain data, as well as quick movement of
large amounts of data from one computer node to the other on the peer-to-
peer blockchain network.

Every transaction occurring on the blockchain network has a hash


associated with it. However, these hashes are not stored in a sequential
order on the block, rather in the form of a tree-like structure such that each
hash is linked to its parent following a parent-child tree-like relation.

Since there are numerous transactions stored on a particular block, all the
transaction hashes in the block are also hashed, which results in a Merkle
root.

For example, consider a seven-transaction block. At the lowest level


(called the leaf-level), there will be four transaction hashes. At the level
one above the leaf-level, there will be two transaction hashes, each of
which will connect to two hashes that are below them at the leaf level. At
the top (level two), there will be the last transaction hash called the root,
and it will connect to the two hashes below it (at level one).

Effectively, you get an upside-down binary tree, with each node of the tree
connecting to only two nodes below it (hence the name "binary tree"). It
has one root hash at the top, which connects to two hashes at level one,
each of which again connects to the two hashes at level three (leaf-level),
and the structure continues depending upon the number of transaction
hashes.

The hashing starts at the lowest level (leaf-level) nodes, and all four
hashes are included in the hash of nodes that are linked to it at level one.
Similarly, hashing continues at level one, which leads to hashes of hashes
reaching to higher levels, until it reaches the single top root hash.

This root hash is called the Merkle root, and due to the tree-like linkage of
hashes, it contains all the information about every single transaction hash
that exists on the block. It offers a single-point hash value that enables
validating everything present on that block.
For example, if one has to verify a transaction that claims to have come
from block #137, they only needs to check the block's Merkle tree, without
worrying about verifying anything on any other blocks on the blockchain,
like block #136 or block #138.

Enter the Merkle root, which further speeds up verification. Since it carries
all the information about the entire tree, one only needs to verify that
transaction hash, its sibling-node (if it exists), and then proceed upward
until it reaches the top.

Essentially, the Merkle tree and Merkle root mechanism significantly


reduce the levels of hashing to be performed, enabling faster verification
and transactions.

You might also like