How a Blockchain Works: Blocks, Hashes, Transactions, Merkle Trees and Chain Linking

Blockchain Developer 50 min min read Updated: Nov 17, 2026 Beginner
How a Blockchain Works: Blocks, Hashes, Transactions, Merkle Trees and Chain Linking
Beginner Topic 2 of 3

Transaction

A transaction is a record of an action, for example 'Asha sends 2 coins to Ravi'. It is signed by the sender to prove it is real (we learn signatures later).

Block

Many transactions are collected into one block. A block has two parts:

PartContains
HeaderPrevious block hash, Merkle root, timestamp, nonce, difficulty or other network data
BodyThe list of transactions

Hash in One Line

A hash is a fingerprint of data. The same data always gives the same fingerprint. Change one letter and the fingerprint changes completely.

The Chain

text Block 0 (genesis) Block 1 Block 2 hash: A1B2... prev: A1B2... prev: 9F3C... hash: 9F3C... hash: 7D4E...

Each block stores the hash of the previous block. So block 2 depends on block 1, and block 1 depends on block 0.

Why Old Data Cannot Be Changed Easily

  1. A cheat changes a transaction in Block 1
  2. Block 1's hash changes
  3. Block 2 stores the old hash of Block 1, so the link breaks
  4. To hide it, the cheat must redo Block 2, 3, 4 and all later blocks and convince the network. This is very costly in real networks

Merkle Tree

A Merkle tree summarizes all transactions of a block into one hash (the Merkle root).

text Root = hash(H12 + H34) / \ H12 = hash(H1+H2) H34 = hash(H3+H4) / \ / \ H1 H2 H3 H4 (tx1) (tx2) (tx3) (tx4)
  • Change any transaction and the root changes
  • Light clients can prove one transaction is in a block using only a few hashes (a Merkle proof)

Life of a Transaction

  1. User signs a transaction in a wallet
  2. It is sent to a node and broadcast to the network
  3. It waits in the mempool (waiting area)
  4. A miner or validator puts it into a block
  5. The network validates the block and adds it to the chain
  6. More blocks on top give more confirmations

Practice

  1. What two parts does a block have?
  2. What does the previous hash do?
  3. What does the Merkle root summarize?

Conclusion

Blocks hold signed transactions and a header. Each block stores the previous block's hash, so changing old data breaks the chain. A Merkle root summarizes all transactions.

Quick Summary: transaction; block; hash; chain; tamper; Merkle; life cycle.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators