How Blockchains Work
What problem does a blockchain solve?
A blockchain lets participants verify a shared transaction history under a common set of rules.
Nodes check proposed transactions and blocks. A consensus mechanism determines which valid history the network follows when participants see competing blocks.
For a payment, the record identifies the transfer and the resulting balances. Verification depends on the chain's software, consensus rules, and security assumptions rather than only one account provider's database.
Blocks: bundles of transactions
A blockchain is, quite literally, a chain of blocks.
Each block is a container. It holds a list of recent transactions - "Alice sent 2 ETH to Bob," "Charlie sent 0.5 ETH to Diana," and so on. A typical Ethereum block holds a few hundred transactions.
Notice the blue text: each block's "Previous hash" matches the hash of the block before it. This is what creates the chain. If you change even one character in Block #1, its hash changes completely, and Block #2's "Previous hash" would no longer match. The chain breaks.
Hashes: digital fingerprints
A hash is a fingerprint for data. You feed any amount of data into a hash function, and it spits out a fixed-length string of characters. The same input always gives the same output. But change even one letter, and the output is completely different.
Hash links make changes detectable. Replacing an accepted history also requires overcoming the network's consensus rules; recalculating hashes alone is not enough. The cost and conditions differ between proof-of-work and proof-of-stake systems.
Nodes: thousands of copies
A blockchain does not live on one computer. It lives on thousands of computers called nodes. Each node keeps a complete copy of the entire blockchain.
Nodes receiving a transaction check its signature and relevant execution rules. A block producer chooses transactions for a proposed block, and other nodes validate the block. Inclusion is not decided by a simple majority vote of all nodes.
Validating nodes reject transactions that break protocol rules. Consensus attacks can affect ordering, censorship, and finality, but do not automatically let an attacker forge another user's signature.
Consensus: how nodes agree
With thousands of independent computers, how do they agree on which transactions are valid and in what order? This is called consensus, and it is the hardest problem in blockchain design.
There are two main approaches:
Proof of Work is like a lottery where buying a ticket requires solving a hard math problem. The more computing power you have, the more tickets you buy. Bitcoin uses this method.
Proof of Stake is like a security deposit. Validators put up their own money (ETH) as collateral. If they act honestly, they earn a small reward. If they try to cheat, their deposit gets taken away. Ethereum switched to Proof of Stake in September 2022 and now uses 99.95% less energy than before.
How a transaction actually works
When you send ETH to someone, here is what happens step by step:
Ethereum assigns a block-proposal slot every 12 seconds, though a slot can be missed. A transaction's first inclusion is not the same as finality: a recent block can be replaced in a reorganization. Wallets and applications use confirmation or finality requirements appropriate to the transfer.
Why this matters
Blockchains are slow (12 seconds per block) and expensive (you pay gas fees for every transaction) compared to a regular database. So why use one?
Use a blockchain when independently verifiable state and shared transaction rules are needed. A conventional database is usually simpler when one operator is responsible for the records. Applications can combine both.
| Feature | Regular database | Blockchain |
|---|---|---|
| Speed | Milliseconds | 12+ seconds |
| Cost | Hosting, operations, and maintenance | Network fees plus application costs |
| Who controls it | The company that owns it | No single entity |
| Can be edited | According to administrator permissions | According to execution and consensus rules |
| Needs trust | Operator and access controls | Protocol, consensus, and application dependencies |
| Best for | Speed-sensitive apps | Money, ownership, voting |
The right question is not "blockchain or database?" It is "which parts of my app need trust guarantees, and which parts need speed?" Most Web3 apps use both.
Key takeaways
- A block is a bundle of transactions. A chain is blocks linked by hashes.
- A hash is a digital fingerprint. Change one bit of input, and the entire hash changes.
- Nodes are computers that each hold a copy of the blockchain and verify transactions independently.
- Consensus is how nodes agree. Proof of Work uses computing power. Proof of Stake uses staked tokens.
- Blockchains are slow and expensive, but they remove the need to trust a middleman.
Quiz: How Blockchains Work
1 / 5What is a block in a blockchain?