Merkle Trees Explained

📖 4 min read

✍️ 撰寫及審閱者 Karel Havlíček已更新 2026🛡️ 編輯獨立

Quick Answer

梅克爾樹是一個聰明的技巧,它可以讓輕量級手機錢包確認付款是否在區塊中,而無需下載整個區塊鏈。它將數千筆交易壓縮成一個微小的指紋。

💡 Think of it as…

指紋淘汰賽。將交易配對,將每一對哈希成一個代碼,然後將這些代碼配對並再次哈希 - 一輪又一輪 - 直到單個冠軍哈希(“默克爾根”)代表整個區塊。

建造樹

區塊中的每筆交易都經過哈希處理。這些雜湊值被配對並哈希在一起,並且該過程不斷重複,直到只剩下一個雜湊值:儲存在區塊頭中的 Merkle 根。

The magic: proofs

To prove a single transaction is in a block, you only need a short path of hashes up the tree — not the whole block. This is called a Merkle proof, and it is what makes lightweight (SPV) wallets possible.

Why it matters

Merkle trees give Bitcoin efficiency and integrity at once: change any transaction and the root changes, instantly invalidating the block, yet verifying inclusion stays tiny and fast even for millions of transactions.

🔑 Key takeaway

Merkle 樹將整個交易區塊壓縮到一個根哈希中,因此任何人都可以使用微小的證明而不是整個區塊鏈來驗證單筆支付。

Why this matters for you

This is why the mobile wallets popular across Asia can be both lightweight and trustworthy — Merkle proofs let your phone verify payments without storing hundreds of gigabytes.

常見問題

我需要了解 Merkle 樹才能使用比特幣嗎?

Not at all — it works silently in the background. But it explains how your phone wallet can be secure without being heavy.

What is the Merkle root?

The single hash at the top of the tree, stored in the block header. It acts as a tamper-proof summary of every transaction in the block.

Is this related to SHA-256?

Yes — the tree is built entirely from SHA-256 hashes. Merkle trees are an application of cryptographic hashing.

Keep learning