Blockchain Basics: Merkle Tree
A Merkle Tree is a data structure that lets you efficiently verify that data has not been changed.
It is widely used in blockchains, distributed systems, databases, and Git.
Imagine you have 4 pieces of data(or 4 transactions):
A B C D
First, calculate the cryptographic hash of each:
HASH(Transaction A)
HASH(Transaction B)
HASH(Transaction C)
HASH(Transaction D)
This makes tampering easy to detect.
The really clever part is that you don't need all the data to verify one item.
If there are 1,000,000 transactions, you only need roughly 20 hashes to prove that a particular
transaction belongs to the tree.
In blockchain
Suppose a Bitcoin block contains thousands of transactions:
Merkle Tree = a tree of hashes used to efficiently prove that data belongs to a dataset and hasn't been altered.
Comments
Post a Comment