What are Merkle trees used for, and why do blocks use them?
To prove that a transaction is in a particular block, you only need a small number of hashes along the path from that transaction to the Merkle root. This number grows logarithmically with the number of transactions. Simplified Payment Verification (SPV), described in Section 8 of the Bitcoin white paper, relies on Merkle paths to let lightweight clients confirm transactions without downloading entire blocks.
The clever thing about Merkle trees is that a single short root hash can “lock in” a large number of transactions, and any change to even one transaction will be exposed.
The header of every $BTC block records a Merkle root corresponding to all the transactions in that block. Current 71363.03.
To prove that a transaction is in a particular block, you only need a small number of hashes along the path from that transaction to the Merkle root. This number grows logarithmically with the number of transactions. Simplified Payment Verification (SPV), described in Section 8 of the Bitcoin white paper, relies on Merkle paths to let lightweight clients confirm transactions without downloading entire blocks.
The clever thing about Merkle trees is that a single short root hash can “lock in” a large number of transactions, and any change to even one transaction will be exposed.
The header of every $BTC block records a Merkle root corresponding to all the transactions in that block. Current 71363.03.