Read a commitment to transactions
By the end, explain the diagram in your own words, solve the case and justify the correction.
Prerequisites : Hashes, keys and signatures
Level 2 · Intermediate →Reading path · 1 / 35 · Intermediate
A block contains transactions and metadata.
The essentials
A block contains transactions and metadata. Its header links to the previous block and commits to its contents. A Merkle tree repeatedly hashes pairs of transaction fingerprints until a single root remains. Changing a transaction changes the commitment.
How it works
An inclusion proof supplies the hashes along one branch, allowing a verifier to reconstruct the root without downloading every transaction. For four leaves A, B, C and D, proving A requires its sibling B and the combined hash of C and D. This reduces the amount of data needed for the inclusion check.
What to watch
Inclusion is not full validation. A full node checks protocol rules, while an explorer provides a service’s view of the chain. Cryptographic links alone do not stop someone recalculating a different history: the consensus mechanism determines which history is accepted and what rewriting it would cost.
Understand the details
A block groups transactions with metadata. Its header commits to information such as the previous block and a summary of included transactions. In a binary Merkle tree, leaf hashes are combined in pairs until one root remains. Changing a leaf changes the hashes on its path to the root. A proof supplies the sibling hashes needed to rebuild that path.
Boundaries and common mistakes
An inclusion proof only has meaning relative to a root you trust or verify. It does not by itself establish that the block is canonical, that every transaction is valid, or that the data remains available. Different chains use different tree structures and encodings. The four-leaf example below illustrates the principle rather than specifying every Bitcoin or Ethereum detail.
The mechanism at a glance
Hashes A and B form AB; C and D form CD. AB and CD form root R.
- A, B, C, D
- Four leaf hashes
- AB and CD
- Root R
Apply the lesson to a case
Label four transactions A, B, C and D. Compute AB = H(H(A)||H(B)) and CD = H(H(C)||H(D)), then R = H(AB||CD). To prove B, supply H(A) and CD, together with their left/right positions. You do not need to supply C and D separately.
H(C), CD and R change. AB stays the same, but the old proof contains the old CD and reconstructs the old root. The proof must be updated even though B itself did not change. Draw the two affected branches to distinguish unchanged content from an outdated proof.
Terms in this lesson
- Hash
- A fixed-length fingerprint computed from data by a hash function. It checks consistency, not truth.
Prepare a correction note
Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.