B.BlockAxis⌕ Search
Menu

Block anatomy and Merkle trees

A block contains transactions and metadata.

IntermediateContent revised · 13.09.20263 min reading · allow 5–10 more minutes for the workshopBlockAxis

Your learning plan

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

Key takeaway

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

Four-leaf Merkle treeHashes A and B form AB; C and D form CD. AB and CD form root R.R = H(AB || CD)AB = H(A || B)CD = H(C || D)A = H(tx A)B = H(tx B)C = H(tx C)D = H(tx D)

Hashes A and B form AB; C and D form CD. AB and CD form root R.

  1. A, B, C, D
  2. Four leaf hashes
  3. AB and CD
  4. Root R
Read a commitment to transactions. Conceptual map: read these four landmarks together with the explanation above.
Applied workshop · work at your own pace

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.

If C changes, which values change, and can the old proof for B still match the new root?

Choose one answer.

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.