Merkle Tree
Data structure yang hash transactions berurutan jadi single root hash untuk efficient verification.
Penjelasan
Sobat Kripto, Merkle Tree (atau Hash Tree) adalah data structure invented Ralph Merkle 1979. Pakai di Bitcoin untuk efficiently store dan verify transactions di block. Pair transactions, hash them, pair the hashes, hash them, repeat until single root hash. Merkle root di block header represent all transactions. Enable light client verification.
Cara Kerja
Take all transactions di block. Hash each transaction (leaf hash). Pair leaves, hash each pair (intermediate hash). Pair intermediates, hash each pair. Repeat until single 'merkle root' hash. Root stored di block header (32 bytes regardless of number of transactions). Tree structure: efficient untuk verify specific transaction included di block.
Merkle Proof
Untuk verify transaction included di block, need only log(N) hashes (vs all N hashes). Example: 1.000 transactions, butuh only 10 hashes (log2(1000) ≈ 10) untuk proof. Sangat efficient. Enable Simplified Payment Verification (SPV) for light client: verify transaction tanpa download all blocks.
Untuk Sobat Kripto
Pemula tidak perlu paham detail merkle tree. Important: enable light client (mobile Bitcoin wallet) verify transaction tanpa run full node. Make crypto practical untuk mass adoption. Concept extend ke other blockchain: Ethereum pakai Merkle Patricia Trie (variant). Foundational data structure di blockchain era.