Emerging Technologies (8hrs) · Computer Fundamentals & Emerging Technologies

Blocks

1. Definition

A block is the container that holds a batch of transactions plus the metadata needed to link it to the rest of the chain. It is the unit in which a blockchain grows: nodes agree on one block at a time, and the chain is simply the ordered sequence of accepted blocks. Blocks are produced at a fairly regular interval — roughly 10 minutes in Bitcoin and about 12 seconds in Ethereum — decided by the protocol, not by any operator.

2. Anatomy of a Block

  ┌────────────────────────── BLOCK HEADER (80 bytes in Bitcoin) ────────────────────────┐
  │ version           4 B   software/protocol rules in force                             │
  │ previous hash    32 B   SHA-256 hash of the PREVIOUS block  ← the link in the chain  │
  │ Merkle root      32 B   single hash summarising ALL transactions in this block        │
  │ timestamp         4 B   when the block was created (Unix time)                        │
  │ difficulty bits   4 B   target the block hash must be below                           │
  │ nonce             4 B   counter that miners change to find a valid hash               │
  ├──────────────────────────────────────────────────────────────────────────────────────┤
  │ BLOCK BODY                                                                            │
  │  • coinbase transaction (the reward paid to the miner/validator)                      │
  │  • list of ordinary transactions (each individually signed and hashed)                │
  │  • in Ethereum: state root, receipts root, gas used, gas limit, beneficiary           │
  └──────────────────────────────────────────────────────────────────────────────────────┘
Field Purpose
Version Which protocol rules the block follows (allows upgrades)
Previous block hash Immutably links this block to its parent — the essence of the chain
Merkle root Hash of all transactions; lets a client verify one transaction without downloading the block
Timestamp Orders blocks in time and adjusts mining difficulty
Difficulty / target How hard it is to mine; retargeted periodically so blocks keep coming every ~10 minutes
Nonce The variable a miner searches to satisfy the target (proof of work)
Transactions + coinbase The payload; the coinbase pays the block reward and fees to the miner/validator

3. The Merkle Tree (why the root matters)

                        Merkle Root  H(ABCD)
                        /               \
                 H(AB)                      H(CD)
                /     \                    /     \
            H(A)      H(B)             H(C)      H(D)
             │         │                 │         │
            TxA       TxB               TxC       TxD

Transactions are hashed pairwise, and the results hashed again, until a single Merkle root remains. Consequences:

  • Tamper detection — changing any transaction changes its hash, and therefore every hash above it, and therefore the Merkle root in the header, and therefore the block's own hash — the whole chain objects.
  • Efficient proofs — a light (SPV) wallet can prove that one transaction is in a block by receiving only about log₂(n) hashes (a "Merkle proof") instead of the entire block.
  • Deduplication and integrity — the same root cannot be produced by a different set of transactions.

4. The Block Hash and Immutability

The block's own hash is computed over its header (Bitcoin uses double SHA-256). Because the header includes the previous block's hash, blocks form a hash chain:

Hash(Blockn)=H(headern),headern contains Hash(Blockn−1)Hash(Block_n) = H(header_n), header_n\ contains\ Hash(Block_{n-1})

So altering transaction data in an old block changes its hash, which breaks the "previous hash" pointer in the next block, and so on to the tip. An attacker would have to redo the proof of work for that block and every later block, and outpace the honest majority — the practical definition of immutability. In Bitcoin, six confirmations (six blocks built on top) are conventionally treated as final.

5. How a Block Is Created — Nonce Search Illustrated

  header fields (version, prev hash, merkle root, time, difficulty) + nonce = ?
  nonce = 0        → hash = 3f9a…   ✗ (does not meet the target)
  nonce = 1        → hash = b71c…   ✗
  nonce = 2        → hash = 91ee…   ✗
        … thousands/millions of attempts …
  nonce = 27  → hash = 0000af…      ✓ meets the target → BLOCK IS VALID

The target requires the hash to begin with a number of zero bits; on average the miner needs about 2N2^{N} attempts for NN required zero bits, which is exactly why energy is spent and why rewriting history is expensive. Changing any field of the header (or any transaction, via the Merkle root) invalidates the nonce and restarts the search.

6. Block Lifecycle and Related Terms

Genesis block — block 0, hard-coded into the software, with no previous hash · block height — the number of blocks below it (block 840,000 means the chain is that long) · candidate block — assembled by a miner/validator from the mempool, usually prioritising higher fees · orphan/stale block — a valid block that lost a race and is not part of the longest/most-worked chain; its reward is not paid (Ethereum's "uncle" blocks pay a partial reward) · confirmations — each subsequent block adds one more · block reward and fees — the incentive to mine, with the reward halving periodically in Bitcoin (50 → 25 → 12.5 → 6.25 → 3.125 BTC) · block size/weight limit — Bitcoin's original 1 MB cap (raised in effective capacity by SegWit), Ethereum's gas limit per block · fork/reorganisation — when two blocks appear at the same height, nodes follow the chain with the most work, and the shorter branch is abandoned.

7. Exam Points

  • Define a block; draw its structure and explain each field — 5-7 marks, almost certain.
  • Explain how blocks are linked by hashes and why the chain is tamper-evident — 5-7 marks, very frequent.
  • What is a Merkle tree/root and why is it used? — 5 marks, frequent.
  • Explain the nonce and how mining validates a block — 5 marks.
  • Define genesis block, block height, orphan block and confirmations — 3-5 marks.
  • What is the block reward and what is halving? — 3 marks.
  • Why does an attacker need more than 51% of the hash power to rewrite history? — 5 marks.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Computer Fundamentals & Emerging Technologies modules