What is a Merkle tree for, inside a block?
Experienced · Updated
A Merkle tree commits to a set of transactions. Each leaf is the hash of a transaction, each level above is the hash of its children, and the root goes into the block header. Change one transaction, the order, or the set, and the root changes. The small header is thereby bound to the whole block body. Someone who has the header has a commitment to exactly those transactions, not a vague summary.
The tree does not by itself prove that each transaction is valid. It proves what the block claims to contain. The node still checks signatures, amounts and scripts. For you, a header you accept pins the miner to a precise body: they cannot later swap a transaction and keep the same header. For a node operator, the root is one of the block rules. If the body does not reproduce the root, the block is invalid, however much work it carries.
Informational text from Criptos.ai. It is not a buy or sell recommendation, and it is not tax advice. This is general information, not financial, tax or legal advice. We do not promise gains.
In the glossary
Articles
In the Academy: Advanced · In the Academy · In the glossary