Merkle Tree
Merkle Tree
Merkle Tree, also known as Hash Tree, is a data structure which is used for verification and
synchronization of data. A Hash is like a fingerprint, encrypted unique output from an input of data
which is converted using a specific algorithm. Hash is created to increase security for data, As the
data is distributed in the blockchain, it becomes necessary to encrypt the data to provide some sort of
privacy and security.
Merkle Root
For every Transaction, there
is a Hash but a block in
blockchain can have
Branches
thousands of transactions,
and to have a Hash function Leaves
and then sending a block
will be very time consuming
and will require a huge Transactions
It is a tree data structure where each non-leaf node is a hash of its child nodes.
Every Transaction has their own specific hash, called Leaves, i.e., H a, Hb, Hc etc.
Hash of two transactions is combined using a specific formula according to the algorithm and
converted into a single Hash, called Branches, i.e. H ab=Ha+Hb etc. (if there are odd number of
Hashes, the last one is repeated and combined with itself i.e., H yy=Hy+Hy.
The branches are combined again and again until only one Hash is remaining, called Merkle
Root.