A blockchain is a shared ledger of transactions. Many independent computers, called nodes, each keep a copy, so no bank, company or government holds the only one. New entries are grouped into blocks. Each block carries a cryptographic fingerprint (a hash) of the block before it, which chains the record together. Changing an old entry would mean redoing every block that came after it, and the rest of the network would have to accept the rewrite. That is why the record is hard to change. It is still not impossible to change.
The U.S. National Institute of Standards and Technology (NIST) puts it this way in its October 2018 overview, NISTIR 8202: blockchains are "tamper evident and tamper resistant digital ledgers implemented in a distributed fashion (i.e., without a central repository) and usually without a central authority (i.e., a bank, company, or government)." Under normal operation, it adds, "no transaction can be changed once published."
How a block joins the chain
Bitcoin's design paper describes the steps in order. It was published on October 31, 2008 by someone using the name Satoshi Nakamoto.
- New transactions are broadcast to all nodes.
- Each node collects new transactions into a block.
- Each node works on finding a difficult proof-of-work for its block.
- When a node finds one, it broadcasts the block to all nodes.
- Nodes accept the block only if all transactions in it are valid and not already spent.
- Nodes show they accept it by building the next block, using the accepted block's hash as the "previous hash".
Bitcoin's developer documentation says each block "stores the hash of the previous block's header". A block's header also holds a merkle root, a single hash that sums up every transaction in the block. Alter one transaction and that block's hash changes. The next block then points to a hash that no longer matches, and so does every block after it.
Each Bitcoin block also opens with a special transaction, the generation transaction, which creates new coins for whoever built the block. The paper presents this as the reward for supporting the network, and as the way new coins enter circulation with no central issuer.
How the network agrees: proof of work and proof of stake
Thousands of copies only help if the nodes agree on which copy is correct. The rules for reaching that agreement are called a consensus mechanism.
Proof of work
In Bitcoin, nodes compete to solve a computational puzzle. The winner proposes the next block. The paper says the chain with the most accumulated work counts as the true record: "The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it."
The puzzle's difficulty adjusts itself. According to the developer documentation, every 2,016 blocks the network compares how long those blocks took with a target of two weeks (1,209,600 seconds), then raises or lowers the difficulty. Dividing that target by 2,016 gives an average of one block about every 10 minutes.
Proof of stake
Ethereum used proof of work until The Merge, which ethereum.org says was executed on September 15, 2022. Since then it has run on proof of stake. ethereum.org says the switch cut the network's energy consumption by about 99.95%.
Under proof of stake, there is no puzzle-solving race. Validators lock up cryptocurrency as collateral. ethereum.org gives these details:
- A validator must deposit 32 ETH. Staking pools let people take part with less.
- Time is divided into slots of 12 seconds and epochs of 32 slots.
- In each slot, one validator is "randomly selected to be a block proposer", and a committee of validators votes on the block.
- A block becomes final once votes representing at least two-thirds of all staked ETH back it. After that, "it cannot be reverted or changed without a majority slashing of stakers." Slashing means the protocol destroys part of a misbehaving validator's stake.
Why old entries are hard to change
The Bitcoin paper states the core property in its abstract. The network forms "a record that cannot be changed without redoing the proof-of-work." Section 4 explains that "to modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it". While doing so, the attacker would also have to catch up with the honest network and overtake it, because that network keeps adding new blocks.
In proof of stake, reversing a block that is already final would require attackers to lose a large share of the collateral staked on the network (see the thresholds below).
The limit: majority control
"Hard to change" depends on no one controlling most of the network.
- Proof of work: The paper's protection holds "as long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network." Bitcoin's developer documentation says that reliably rewriting history requires a majority of the network's hashing power. It adds that an attacker with less than 50% can still have a good chance of success.
- Proof of stake: ethereum.org says an attacker would need 51% of staked ETH to control which chain the network follows. With one-third of the stake, an attacker could stop blocks from becoming final. Reverting a block that is already final would mean "losing at least one-third of the total supply of staked ETH."
In practice, each new block added after a transaction makes that transaction harder to reverse. That is why recipients often wait for several more blocks before they treat a payment as settled.
Proof of work or proof of stake?
See how Bitcoin's proof of work and Ethereum's proof of stake differ in who adds the next block, its timing, when it counts as settled and what an attacker would need.
| Consensus mechanism | Who adds the next block | What it takes to join | Block timing | When a block counts as settled | What an attacker needs | Source |
|---|---|---|---|---|---|---|
| Proof of work (Bitcoin) | The node that solves the computational puzzle first | Computing power to compete on the puzzle | About every 10 minutes on average; difficulty is reset every 2,016 blocks against a two-week target | No fixed point: each new block on top makes a transaction harder to reverse | A majority of hashing power to rewrite history reliably; under 50% can still have a good chance | |
| Proof of stake (Ethereum, since September 15, 2022) | One validator randomly selected per slot, with a committee voting on the block | A 32 ETH deposit, or less through a staking pool | Slots of 12 seconds; epochs of 32 slots | Final once votes for at least two-thirds of all staked ETH back it | 51% of staked ETH to control the chain; one-third to stop finality; reverting a final block costs at least one-third of staked ETH |
This table covers only Bitcoin and Ethereum as the article describes them. Other blockchains and permissioned ledgers use different rules and thresholds, and the table does not judge which design is safer.
Public and permissioned blockchains
Blockchains differ in who may add blocks.
- Public (permissionless): Anyone can run a node and take part. Bitcoin's paper says nodes "can leave and rejoin the network at will."
- Permissioned: Only approved participants can publish blocks. Organisations that want a shared ledger without open membership often use this model. Trust then rests partly on whoever approves the participants.
Beyond payments: smart contracts
Some blockchains also store and run programs. ethereum.org defines a smart contract as "simply a program that runs on the Ethereum blockchain." It also warns that "smart contracts cannot be deleted by default, and interactions with them are irreversible." A bug or a mistaken transaction usually cannot be undone the way a bank reverses a card payment.
A short timeline
- October 31, 2008: The Bitcoin paper by Satoshi Nakamoto is published.
- January 2009: Nakamoto mines the first bitcoins, according to MIT Technology Review.
- October 2018: NIST publishes its Blockchain Technology Overview (NISTIR 8202).
- September 15, 2022: Ethereum completes The Merge and moves from proof of work to proof of stake.
What this means in practice
- A blockchain removes the need to trust one record-keeper. Instead, you rely on the network's rules and on no single party controlling most of it.
- Entries are permanent by design, so check addresses and amounts before you send. There is usually no one who can reverse a confirmed transaction.
- A ledger that is hard to change does not prove the data in it is true. A false entry, once recorded, is just as hard to remove.
Limitations: this explainer covers Bitcoin and Ethereum as examples, and other blockchains use different rules and thresholds.