What is a Blockchain? (Blocks, Hashes, Consensus)

What is a Blockchain? (Blocks, Hashes, Consensus)

The plain-English primer on how blockchains store data securely without a central authority.

TL;DR:
A blockchain is a shared database (ledger) stored across many computers (nodes).
Data is grouped into blocks, each block has a hash (a tamper-evident fingerprint) and a pointer to the previous block’s hash, forming a chain.
New blocks are accepted by network rules called consensus (e.g., Proof-of-Work or Proof-of-Stake).
The result: no single party can change history without everyone noticing.

1) The distributed ledger idea

Think of a spreadsheet that records transfers (“Alice → Bob: 1 token”).
In traditional systems a bank hosts the spreadsheet on its server.
In a blockchain, the spreadsheet (ledger) is shared across thousands of computers called nodes.
Every honest node stores the same data and verifies new updates as they arrive.

  • Decentralized: no single company controls the database.
  • Transparent: anyone can verify the data and the rules.
  • Resilient: knocking one machine offline doesn’t kill the network.
Nodes (peers) on the network:

[Node A: copy of ledger]   [Node B: copy of ledger]   [Node C: copy of ledger]
        |                           |                           |
        +---------- gossip new transactions/blocks ------------+

2) Blocks, hashes & the chain

Blockchains don’t save transactions one by one; they batch them into blocks.
Each block contains:

  • Transactions (the actual data)
  • Timestamp
  • Previous block hash (pointer to the prior block)
  • Its own block hash (a digital fingerprint)
What’s a hash? A hash is the output of a cryptographic function (e.g., SHA-256).
Change even one character in the input and the output hash changes completely.
That’s why hashes are ideal as tamper-evident fingerprints.
Block #101
  - transactions: [ ... ]
  - prev_hash:   0x8f3a...21bd
  - timestamp:   1723087543
  - hash:        0x4c1e...9a77

Block #102
  - transactions: [ ... ]
  - prev_hash:   0x4c1e...9a77   ← points to #101
  - timestamp:   1723087641
  - hash:        0xb2a9...c4de

Because each block includes the previous block’s hash, the blocks form a chain.
If someone tries to edit an old block, its hash changes, which breaks the pointers for every block after it.
Honest nodes immediately reject the altered chain.

3) How the network agrees (consensus)

Without a central server, nodes need rules to decide which new block is valid.
Those rules are called a consensus mechanism.

Proof of Work (PoW)

  • Used by Bitcoin.
  • Miners compete to solve a costly puzzle. The first to find a valid solution proposes the new block.
  • Security comes from the huge amount of real-world energy required to rewrite history.

Proof of Stake (PoS)

  • Used by Ethereum today.
  • Validators lock up (“stake”) ETH. One is pseudo-randomly chosen to propose a block; others attest.
  • Dishonest validators risk losing their stake (slashing). Much more energy-efficient than PoW.

There are other models (DPoS, BFT variants), but the goal is the same:
make it economically irrational to cheat and easy for the network to agree on a single history.

4) Why this design is secure

  • Cryptography: hashes make tampering obvious.
  • Chaining: every block depends on the previous one, so rewriting history requires recomputing many blocks.
  • Decentralization: thousands of honest nodes verify and keep copies.
  • Economic costs: consensus makes attacks extremely expensive or risky.

5) What blockchains are used for

  • Cryptocurrencies & payments (BTC, ETH, stablecoins)
  • DeFi: lending, DEXs/AMMs, derivatives without centralized intermediaries
  • NFTs & digital assets: provable ownership of media, in-game items, tickets
  • On-chain identity & credentials
  • Supply-chain tracking and timestamping

Recap

  • Blockchain = distributed ledger stored by many nodes.
  • Blocks link via hashes → tamper-evident chain.
  • Consensus (PoW/PoS) decides which block is valid.
  • Security comes from cryptography, decentralization, and economics.

Quick check

  1. What happens to the chain if someone changes data in an old block?
  2. In one sentence, explain the difference between PoW and PoS.
  3. Why are hashes good fingerprints for data?
Show answers
  • The block’s hash changes, breaking all subsequent links; honest nodes reject the altered chain.
  • PoW secures the chain with energy-costly computation; PoS secures it with economic stake and slashing.
  • Because a tiny change in input produces a completely different, deterministic output; they’re one-way and collision-resistant.

Go deeper (free resources)

Ready for the next step? Learn how wallets, addresses, and keys work (your passport to Web3).


Next: Public & Private Keys Explained →