Blockchain
What a blockchain is, what goes into a block, how a network agrees on one shared history, and why past records are hard to change.
A blockchain is a way of keeping a shared database that many independent participants store and verify at the same time. Records are grouped into blocks, and the blocks are linked one after another into a chain, which is where the name comes from. The key idea is that you do not need a central administrator to trust the records: everyone follows the same verification rules, and those rules are built into the software.
A simple analogy
Imagine a ledger notebook, and every member of a group has their own copy. When someone adds an entry, the others check it against the shared rules and write it into their notebooks too. If one person secretly edits an old line in their copy, it becomes obvious right away, because their notebook no longer matches everyone else's.
A blockchain works in a similar way. The notebooks are computers called nodes, and the checking is done with cryptography and math rather than by hand.
What is inside a block
Each block typically contains:
- A list of transactions, such as transfers of coins between addresses.
- A timestamp showing roughly when the block was created.
- The hash of the previous block, a kind of fingerprint of the block that came before it.
- Technical data used by the consensus mechanism.
A hash is the output of a special mathematical function that turns any input into a string of fixed length. Change even one character of the input and the hash comes out completely different. It is practically impossible to predict a hash in advance.
Why history is hard to rewrite
Because every block stores the hash of the one before it, all blocks are tied together. If someone changes a transaction in an old block, that block's hash changes. The next block would then point to a hash that no longer matches, and the chain would break. To make a forgery look valid, an attacker would have to redo every block that came after it, and do so faster than the rest of the network keeps adding new ones.
On large networks this requires enormous resources. That is why records buried deep in the chain are considered practically permanent.
How the network reaches agreement
Thousands of independent participants need to end up with the same version of history. The rules they use to agree are called a consensus mechanism. The two best known are:
- Proof of Work. Participants called miners perform heavy computations, and whoever finds a valid solution first gets to add the next block. Bitcoin uses this approach.
- Proof of Stake. Blocks are proposed and confirmed by validators who lock up their own coins as collateral. If they act dishonestly, they can lose part of that stake. Ethereum switched to this model.
Both approaches aim at the same goal: making cheating more expensive than playing by the rules.
Public and private blockchains
- Public blockchains, such as Bitcoin and Ethereum, are open to anyone. You can run a node, send a transaction or browse the full history.
- Private or permissioned blockchains are limited to participants approved by an organization. They are closer to traditional databases with extra record-keeping guarantees.
When people talk about cryptocurrency, they usually mean public blockchains.
What else runs on a blockchain
Digital money was the first use case. Later, networks appeared that can run smart contracts, which are programs that execute automatically according to predefined rules. Smart contracts power decentralized finance (DeFi), NFTs, stablecoins and many other services.
Limitations
Blockchains also come with trade-offs:
- Speed and capacity. Public networks process fewer transactions than centralized payment systems. Layer-2 solutions are one way the industry is trying to address this.
- Fees. When a network is busy, transaction costs can rise noticeably.
- Irreversibility. A mistaken transaction usually cannot be undone.
- Transparency. Everything is visible to everyone, which is not always good for privacy.
- Garbage in, garbage out. A blockchain guarantees that a record has not been altered, not that the original information was true.
Key takeaways
- A blockchain is a shared database maintained and verified by many independent participants.
- Blocks are linked by hashes, which makes changing old records extremely difficult.
- Networks agree on history through a consensus mechanism such as Proof of Work or Proof of Stake.
- Blockchains support not only cryptocurrencies but also smart contracts and the applications built on them.