How Blockchain Works
A blockchain is a shared record that thousands of computers copy and agree on, built so old entries cannot be quietly rewritten.
Each Hash is built from the block's Data plus the previous block's Hash. Change any block, or tamper Block 2, and every block after it stops matching.
Chain intact. Every block points back to the correct fingerprint, so nothing is flagged.
Look at the chain above before reading on. Each block stores a short fingerprint (its hash) of its own contents, and it also stores the hash of the block before it, which is exactly what links the blocks into a chain. Tamper with Block 2 and its fingerprint changes, so Block 3 and Block 4 no longer match the block behind them and light up as broken. Now picture one giant notebook that lists every payment ever made, and imagine thousands of computers each keeping an identical copy of it. No bank owns the master version, no single person can reach in and change a line, and everyone can check that their copy matches everyone else's. That is a blockchain. The name is literal: it is a chain of blocks, where each block is a batch of transactions and the blocks are linked in order. You do not need any coding to understand it. You just need a clear picture of a shared notebook that is very hard to forge, and the rest of this module builds that picture one step at a time.
A shared, add-only record
Start with the notebook. Instead of one bank holding it, thousands of computers (called nodes) each keep their own up-to-date copy. That is what "distributed" means, and it buys you two things.
First, there is no single copy to hack, seize or lose. If one node goes offline, the record still lives on every other machine, so there is nothing central to attack.
Second, the record is append-only. You can add new entries to the end, but you cannot quietly erase or rewrite old ones, because every other copy would instantly disagree with you. This is why people call a blockchain a shared source of truth: not because one authority guarantees it, but because thousands of independent copies have to agree.
How blocks link into a chain
New transactions get collected and bundled into a block. Before the network accepts that block, it checks the block against the rules: are the coins real, does the sender actually own them, are the signatures valid? Only then does the block get added to the end of the chain.
The clever part is how one block connects to the next. Every block runs its contents through a hash, a mathematical function that turns any data into a short, fixed-length fingerprint. Each new block then stores the fingerprint of the block right before it. So block 100 carries block 99's fingerprint, block 99 carries block 98's, and that reference runs all the way back to the very first block. The blocks are chained together by these fingerprints, and that chaining is exactly what makes the whole history tamper-evident (you will see why in a moment).
Who decides which block comes next
If no one is in charge, how do thousands of nodes agree on the next block? They follow a consensus mechanism, a shared rulebook for deciding who gets to add the next block. The two you will hear about most are proof of work and proof of stake.
In proof of work (used by Bitcoin), special nodes called miners compete to solve a hard mathematical puzzle. Solving it takes real electricity and computing power, and the first to solve it earns the right to add the next block and collect a reward.
In proof of stake (used by Ethereum since 2022), there is no puzzle race. Instead, validators lock up some of their own capital as a deposit, called a stake, and the system picks who adds the next block partly at random and partly by how large their stake is. Anyone caught cheating can have that stake taken away.
Both approaches reach the same goal, honest agreement with no central boss, by the same trick: they make cheating expensive.
Why the record is so hard to fake
Three things stack up to make a blockchain very hard to falsify.
- Hash-linking. Change even one old transaction and that block's fingerprint changes, which breaks the reference in every block after it. The tampering does not hide; it lights up.
- Distributed copies. Your forged version has to out-argue thousands of honest copies at once, and the majority wins.
- The cost of attack. To actually rewrite recent history, an attacker would need to control more than half of the network's mining power or stake, redo all the affected work, and out-pace everyone else combined. This is the famous 51% attack, and on a large network it is so costly it is generally not worth attempting.
Notice what is doing the work here. Security does not come from a trusted guard watching the ledger. It comes from making dishonesty cost more than it could ever earn.
Walk through a tampered block
Imagine a short chain of 5 blocks. Block 2 records a payment of 50 coins from Alice to Bob. The blocks are linked so that block 3 stores block 2's fingerprint, block 4 stores block 3's, and block 5 stores block 4's.
- You try to cheat by editing block 2 to say Alice paid you 5,000 coins instead.
- The instant you change block 2's contents, block 2's fingerprint changes.
- Now block 3's stored "previous fingerprint" no longer matches the real block 2, so block 3 is broken, and so are blocks 4 and 5.
- To make the forgery stick, you would have to recompute the valid work for blocks 2, 3, 4 and 5, and do it faster than the entire honest network is extending the real chain. On a large network that needs more than half of all mining power (a 51% attack), which is prohibitively expensive.
The single edit did not stay hidden. It cascaded through every later block and exposed itself. That cascade is the heart of why a blockchain is called immutable in practice.
Proof of work vs proof of stake, side by side
Both mechanisms answer the same question (who adds the next block, and why should we trust them?), but they spend different resources to do it.
| Proof of work | Proof of stake | |
|---|---|---|
| Who adds a block | Miners racing to solve a puzzle | Validators chosen partly at random, partly by stake |
| What it costs to take part | Electricity and computing power | Capital locked up as a deposit |
| What stops cheating | The energy and hardware you would waste | Losing the stake you put up |
| Used by | Bitcoin | Ethereum (since 2022) |
Ethereum switched from proof of work to proof of stake in an upgrade called the Merge on 15 September 2022. The change cut the network's energy use by roughly 99.95%, because validators no longer needed to burn power racing to solve puzzles. Both designs still reach the same end, honest agreement without a central authority, so the choice between them is mostly a trade-off between energy cost and the way security is funded.
What a hash actually is
A hash is just a function that takes any input (a sentence, a whole block, an entire book) and returns a short, fixed-length fingerprint. Two useful properties make it perfect for a blockchain.
- The same input always produces the same fingerprint, so anyone can recompute it and check.
- Changing the input even slightly produces a completely different fingerprint, with no resemblance to the old one.
That second property is why tampering cannot hide. If a dishonest actor alters one character in an old block, the recomputed fingerprint looks nothing like the one stored in the next block, and the mismatch is obvious to every honest copy. The fingerprint does not tell you what was inside the block, and you cannot run it backwards to recover the original data. It only lets everyone confirm that the data has not changed since it was recorded.
Quick knowledge check
What does "append-only" mean for a blockchain? You can add new entries to the end of the record, but you cannot quietly erase or rewrite existing ones, because every other copy of the ledger would disagree with your altered version.
How are individual blocks linked into a chain? Each block stores the hash (the fingerprint) of the block before it. That reference runs back to the first block, so changing any old block breaks the link in every block that follows it.
Why is a 51% attack so hard to pull off on a large network? To rewrite recent history, an attacker would need to control more than half of the network's mining power or stake, redo all the affected work, and still out-pace the entire honest network. On a large chain that is so expensive it is rarely worth attempting.
Sources
- NIST, "IR 8202: Blockchain Technology Overview", definition of a blockchain as a distributed, append-only ledger of hash-linked blocks copied across many nodes.
- ISO, "ISO 22739: Blockchain and distributed ledger technologies - Vocabulary", how a shared database is replicated and synchronised across many nodes with no central administrator.
- bitcoin.org, "Bitcoin: A Peer-to-Peer Electronic Cash System" (Satoshi Nakamoto), why miners expend computing power and energy to add blocks and earn the reward.
- ethereum.org, "Proof-of-stake (PoS)", how validators are chosen in proportion to the capital they stake, which can be forfeited for cheating.
- ethereum.org, "The Merge", Ethereum's 15 September 2022 switch to proof of stake and the roughly 99.95% cut in energy use.
- bitcoin.org, "Bitcoin: A Peer-to-Peer Electronic Cash System" (Satoshi Nakamoto), the 51% attack and why rewriting history on a large network is prohibitively expensive.