What is a blockchain? Blocks, hashes, nodes and consensus in plain English
A blockchain is a shared record that thousands of computers keep in step without trusting each other. This guide walks through how a transaction actually gets into a block, why old blocks are so hard to change, and what blockchains are and are not good for.
- A blockchain is a ledger split into blocks, each carrying a cryptographic fingerprint (hash) of the block before it, so changing old data breaks every later link.
- Thousands of independent computers called nodes hold copies and check every block against the same rules, so no single party controls the record.
- A consensus mechanism, such as proof of work or proof of stake, decides who adds the next block and which chain is the valid one.
- Transactions become harder to reverse as more blocks are added on top; this is why exchanges wait for a number of confirmations before crediting deposits.
- Blockchains are slow and expensive compared with ordinary databases; they make sense mainly where participants do not want to trust a central operator.
A blockchain is a shared digital ledger, copied across thousands of independent computers, in which records are grouped into blocks and each block is locked to the one before it with a cryptographic fingerprint. Because every copy is checked against the same rules and changing any old record would break every link that follows, the ledger can be kept accurate without a bank or company in charge. Bitcoin, Ethereum and most other cryptocurrencies are built on blockchains.
Our guide to what cryptocurrency is gives the short version. This one slows down and follows the moving parts: what a hash is, what goes inside a block, how a transaction travels from your wallet into the chain, why confirmations matter, what forks are, and where blockchains genuinely help and where they are just an expensive database.
The problem a blockchain solves
Imagine a group of people who want to keep a shared record of who owns what, but who do not trust each other and do not want to appoint anyone to keep the books. Two difficulties appear straight away.
- Who writes the next entry? If anyone can write, people will write entries that favour themselves.
- What stops someone spending the same money twice? With digital money, copying is free. Without a central record-keeper, someone could send the same coins to two people at once.
Banks solve this by keeping the ledger themselves. A blockchain solves it with three ingredients working together: cryptographic hashes that make the record tamper-evident, many independent copies that check each other, and a consensus mechanism that decides who adds the next page and makes cheating expensive.
Ingredient one: the hash
A hash function takes any input, from a single word to an entire file, and produces a fixed-length output that looks like random characters. Bitcoin uses a function called SHA-256, which always produces 256 bits, usually written as 64 hexadecimal characters.
Hash functions used in blockchains have properties that matter here:
- Same input, same output. Anyone can recompute a hash and check it.
- Tiny change, completely different output. Change one character and the hash changes beyond recognition.
- One way. You cannot work backwards from a hash to the input, except by guessing inputs until one matches.
- Collisions are impractical to find. Finding two different inputs with the same hash is, with today's technology, effectively impossible for SHA-256.
Worked example: one character changes everything
Here are the real SHA-256 hashes of two short pieces of text that differ by one character:
- "Alice pays Bob 5" begins 66ed59eb and ends 4d7b1719.
- "Alice pays Bob 6" begins 08155743 and ends d59597a0.
Nothing about the second hash hints that the input was almost identical. That is the point: a hash acts as a fingerprint of the exact data. If you know the hash of a record, you can tell instantly whether anyone has altered even one character of it.
Ingredient two: blocks chained together
Transactions are not added to the ledger one at a time. They are collected into batches called blocks. Each block has two parts: a header, which is a small summary, and the list of transactions.
What is in a block header
The details vary between blockchains, but a Bitcoin block header contains, among other things:
- The hash of the previous block's header. This is the link that makes it a chain.
- A Merkle root. A single hash that summarises every transaction in the block (explained below).
- A timestamp.
- Fields used by the consensus mechanism. In Bitcoin, a difficulty target and a number called the nonce that miners change while searching for a valid block.
Why the chain is tamper-evident
Because each header includes the previous block's hash, every block is effectively signed by everything that came before it. Suppose someone edits a transaction in block 100. The Merkle root of block 100 changes, so its header hash changes. Block 101 contains the old hash of block 100, which no longer matches, so the link breaks. To hide the edit, the attacker would have to rebuild block 101, which changes its hash and breaks block 102, and so on up to the newest block.
Anyone running the software can recheck every link from the first block to the latest. A doctored copy is detected immediately and rejected. The hash alone does not stop someone from rebuilding the chain; it makes the rebuilding obvious. Making the rebuilding expensive is the job of consensus, covered below.
Merkle trees: summarising thousands of transactions
A block may contain thousands of transactions. Rather than hashing them all as one lump, the transactions are hashed in pairs, then those hashes are hashed in pairs, and so on until a single hash remains at the top: the Merkle root.
This structure has a useful side effect. To prove that one particular transaction is in a block, you only need that transaction plus a short path of hashes up to the root, not the entire block. Lightweight wallets on phones rely on this to check payments without downloading the whole blockchain.
Ingredient three: many independent copies
The computers that keep copies of the blockchain and enforce its rules are called nodes. Anyone can run one on ordinary hardware for most major public blockchains.
Types of node
- Full nodes download every block and independently check every transaction against the rules: that signatures are valid, that coins being spent exist and have not already been spent, and that no more new coins are created than allowed. They do not trust anyone else's word.
- Light clients keep only block headers and use Merkle proofs to check that transactions they care about are included. They trust that the chain with the most work (or the most stake behind it) follows the rules.
- Block producers are the nodes that assemble new blocks: miners in proof of work, validators in proof of stake.
The important point is that block producers propose; full nodes decide. A miner that includes an invalid transaction does not get to force it on the network. Every full node rejects the block, and the miner has wasted the effort.
Following a transaction from wallet to block
Here is the life of an ordinary transfer, step by step.
- You create and sign the transaction. Your wallet builds a message saying which coins move to which address, and signs it with your private key. The signature proves the owner of those coins approved the transfer without revealing the key. Keys and seed phrases are covered in detail in seed phrases and private keys.
- You broadcast it. The wallet sends the signed transaction to one or more nodes, which check it and pass it on to their peers. Within seconds it has spread across much of the network.
- It waits in the mempool. Each node keeps a pool of valid transactions that are not yet in a block, called the memory pool or mempool. There is no single global mempool; each node has its own, and they are usually similar.
- A block producer picks it up. Blocks have limited space, so producers generally choose the transactions paying the highest fees. If the network is busy and your fee is low, you may wait. Ethereum's version of this is explained in crypto gas fees.
- The block is added. Once a producer creates a valid block that includes your transaction, it is broadcast and checked by every full node. Your transaction now has one confirmation.
- More blocks pile on top. Each new block added after yours is another confirmation, and makes it harder to reverse.
Confirmations and finality
On a proof-of-work chain like Bitcoin, the network follows the valid chain with the most accumulated work. Occasionally two miners find blocks at almost the same time, and for a short while nodes disagree about which is the tip of the chain. The tie resolves when the next block is built on one of them; the other is abandoned and its transactions return to the mempool. This is why a single confirmation is not treated as final.
Each extra block makes reversal more expensive, because an attacker would have to redo all that work faster than the honest network. A long-standing convention for larger Bitcoin payments is to wait for six confirmations. Proof-of-stake chains such as Ethereum have a more explicit notion of finality, where validators vote to finalise checkpoints. The comparison of proof of work and proof of stake explains the difference.
Worked example: how long a deposit might take
An illustrative example; real requirements differ between platforms and change over time.
- A crypto platform credits bitcoin deposits after 3 confirmations.
- Bitcoin targets one block every 10 minutes on average, so 3 confirmations take about 30 minutes, but block times vary randomly. Two blocks can arrive a minute apart; one can take over an hour.
- If you paid a low fee during a busy period, the transaction may sit in the mempool for some time before it gets its first confirmation, and the 30-minute clock only starts then.
So a deposit that "should take half an hour" can sometimes take several hours. This is normal behaviour, not a sign that anything has gone wrong. How platforms handle deposits, custody and order matching is covered in how crypto exchanges work.
Consensus: who writes the next block
Hashes make tampering visible and full nodes reject invalid blocks, but two questions remain: who gets to produce the next valid block, and which of two valid competing chains wins? The answer is the consensus mechanism. The key idea is to make producing blocks costly, so that rewriting history would cost more than an attacker could gain.
- Proof of work (Bitcoin): miners compete to find a block header whose hash falls below a target. The only way to find one is to try enormous numbers of nonce values, which costs electricity and specialised hardware. Rewriting history means redoing that work faster than everyone else combined.
- Proof of stake (Ethereum since September 2022): validators lock up the network's coins as collateral and are chosen to propose and vote on blocks. Breaking the rules can cost them part of that stake.
Both reward honest block producers with new coins and fees. Bitcoin's new-coin schedule, which halves every 210,000 blocks, is covered in the bitcoin halving explained.
Forks: when the chain splits
The word fork is used for two quite different things.
Temporary forks are the short-lived splits described above, when two valid blocks appear at once. They resolve on their own within a block or two and are a normal part of how proof-of-work chains operate.
Protocol forks happen when the rules themselves change.
- A soft fork tightens the rules in a way that older nodes still accept, so the network can upgrade without splitting if most block producers adopt it.
- A hard fork changes the rules so that old software rejects new blocks. If everyone upgrades, the network simply moves on. If a group refuses, the chain splits into two separate networks with a shared history up to the fork.
The best-known contested hard fork came in July 2016. A smart-contract fund called The DAO had been drained of about 3.6 million ether through a flaw in its code. The Ethereum community voted, in effect, to hard fork the chain so that the drained funds could be returned. A minority rejected the change on the principle that the ledger should not be rewritten, and kept running the original chain, which became Ethereum Classic. The episode is a useful reminder that blockchains are run by people, and that "immutable" describes what is costly to change, not what cannot change. Our guide to DeFi covers smart-contract risk in more depth.
Public and permissioned blockchains
Bitcoin and Ethereum are public, or permissionless: anyone can read the ledger, send transactions, run a node and, subject to the consensus rules, produce blocks.
Permissioned blockchains limit who can join, usually to a set of known organisations. Businesses use them for things like sharing records between companies. They can be faster and cheaper because participants are identified and fewer of them need to agree. The trade-off is that you are back to trusting a defined group of operators, which removes much of what makes public blockchains distinctive. When you see a company announce that it is "using blockchain", it is worth asking which kind.
Privacy: pseudonymous, not anonymous
On a public blockchain every transaction is visible to everyone, forever. Addresses are strings of characters rather than names, so activity is pseudonymous. But once an address is linked to a person, for example through identity checks at a regulated exchange, its entire history can often be traced, along with addresses it has dealt with. Analytics firms and law enforcement do this routinely. Assume anything you do on a public chain may one day be linked to you. This is also why regulated platforms must apply KYC checks, which you can read about in crypto KYC and the travel rule.
What blockchains are good for, and what they are not
Where they help
- Value transfer without a trusted intermediary. This is the original and still the strongest use: moving assets between parties who do not trust each other and do not want to rely on a bank or payment company.
- Public, verifiable records. Anyone can check the supply of a coin or the history of an address without asking permission.
- Programmable assets. On smart-contract platforms like Ethereum, rules for lending, exchange and issuance can be written into code that runs the same way for everyone. See Ethereum and altcoins.
Where they struggle
- Speed and cost. Every full node processes every transaction. That makes a public blockchain far slower and more expensive per transaction than a normal database run by one company. Scaling approaches built on top of the main chain are covered in layer 2 scaling explained.
- Garbage in, garbage out. A blockchain can prove a record has not changed since it was written. It cannot prove the record was true when written. Tracking real-world goods on a chain still depends on someone honestly entering the data.
- Irreversibility cuts both ways. There is no chargeback. Send to the wrong address or sign a malicious transaction and the loss is usually permanent.
- When there is a trusted party anyway. If a single company controls who can write to the ledger, a conventional database usually does the job better.
What this means if you trade crypto
You do not need to understand Merkle trees to trade, but the mechanics have practical consequences.
- Buying coins on a platform means your coins are often held by the platform, not on a blockchain address you control. Moving them to your own wallet is a blockchain transaction with fees and confirmation times. Crypto wallets and custody explains the choices.
- Trading a crypto CFD means you never touch a blockchain at all. You have a contract with your broker that tracks the price. There are no confirmations, network fees or wallets, but you take on leverage, financing charges and the broker as counterparty. Our comparison of crypto CFDs and buying crypto sets out the trade-offs.
- Network events can move prices. Congestion, outages, contested forks and major upgrades have all affected crypto prices and volatility in the past. Under ESMA rules, EU retail clients can use at most 2:1 leverage on crypto CFDs, and most retail CFD accounts lose money.
Common mistakes
- Thinking "on the blockchain" means "true". A blockchain records what was submitted under its rules. It does not verify facts about the outside world.
- Treating one confirmation as final. Wait for the number of confirmations the receiving platform requires, especially for larger amounts.
- Assuming anonymity. Public blockchains are among the most transparent financial records in existence.
- Believing blockchains cannot change. Rules change through upgrades and forks, and chains with little security spending have been rewritten by attackers.
- Confusing the coin with the technology. A useful blockchain does not make its coin a good investment, and a rising coin price says nothing about the technology.
- Paying too little fee in a hurry. If you need a transfer to arrive quickly, check current fee conditions first.
Frequently asked questions
What is a blockchain in simple terms?
A shared record book, copied across many computers, where entries are grouped into pages (blocks) and each page includes a fingerprint of the previous one. Changing an old page would break every fingerprint after it, and the many independent copies would reject the change.
Who controls a blockchain?
On a public blockchain, nobody alone. Developers propose software changes, node operators choose which software to run, and block producers compete to add blocks. Changes only stick if enough of these groups adopt them, which is why contested changes can split a chain in two.
Can a blockchain be hacked?
The core ledger of a large, well-secured blockchain has proved very hard to rewrite. Smaller chains with little mining power or stake behind them have suffered attacks in which recent blocks were rewritten. Most losses people suffer, though, come from things built on top of or around blockchains: exchanges, smart contracts, bridges, and stolen keys.
What is the difference between a blockchain and a database?
A normal database is run by one organisation, which can change any record. A public blockchain is run by many independent parties under shared rules, and is designed so that no one can quietly change past records. The price of that is far lower speed and higher cost per transaction.
Why do crypto transfers need confirmations?
Because a transaction in the newest block can still be dropped if another chain tip wins. Each additional block on top makes reversal more costly, so platforms wait for a set number of confirmations before treating a deposit as settled.
Do I need to understand blockchains to trade crypto CFDs?
Not in technical detail, since a CFD never touches the blockchain. It helps to know how the underlying networks work, because events such as outages, forks and upgrades can affect prices. CFDs carry leverage and financing costs of their own; see what a CFD is.
Not investment advice. This is general information and education, written without knowledge of your circumstances. It is not a recommendation to buy or sell any instrument. Past performance is not a reliable indicator of future results. Trading leveraged products carries a high risk of losing money. Risk warning