Crypto mining simulators

What is a blockchain? A simple explanation with an example

Short answer. A blockchain is a shared record that many computers keep in sync. Each block stores the hash of the block before it, so changing an old block breaks every link after it and honest nodes reject the altered copy. It proves a record was not changed; it does not prove that a coin, app or project is honest.

Illustration for the guide: What is a blockchain? A simple explanation with an example
On this page

A blockchain is a shared record that many computers keep in sync. Nobody owns it and nobody can quietly change history.

The pieces

  • Block: a batch of transactions with a timestamp.
  • Chain: each block includes a fingerprint (a hash) of the previous block, linking them together.
  • Nodes: computers that store a copy of the chain and check new blocks.
  • Consensus: the rule nodes use to agree on the next block, for example proof of work (mining) or proof of stake.

Why it is hard to alter

A hash is a short fingerprint of some data, and changing even one character of the data gives a completely different fingerprint. Each block stores the hash of the previous block’s header. If someone changed an old block, its fingerprint would change, the next block would point to a fingerprint that no longer matches, and so would every block after it. Honest nodes would reject the altered chain unless the attacker redid the work for every later block faster than the rest of the network.

A simple example

Imagine a village notebook that everyone copies. When a trade happens, a page is added and every villager adds it to their copy. Each new page starts by copying a short code worked out from the page before. To cheat, you would need to rewrite your page and every page after it, in most notebooks at the same time.

A real example: two Bitcoin blocks

The same link can be seen on the real Bitcoin chain. Take two blocks mined about four minutes apart on 20 April 2024, as shown by a public block explorer:

Block 839,999Block 840,000
Mined (UTC)00:05:3300:09:27
Transactions2,3283,050
New-coin reward6.25 BTC3.125 BTC
Its own hash ends in…918494ab…1cda83a5
Previous block’s hash it stores ends in(block 839,998)…918494ab

Block 840,000’s header records the previous block’s hash as …ad651207918494ab, which is exactly the hash of block 839,999. Both hashes begin with 19 zeros: that is what meeting the network’s difficulty target looks like. If one transaction in block 839,999 were changed, its hash would come out different, block 840,000 would point to a block that no longer exists, and every block mined since would have to be redone.

These two blocks are also where Bitcoin’s fourth halving happened: the new-coin reward dropped from 6.25 to 3.125 BTC at block 840,000. How Bitcoin mining works explains the reward and how miners compete for it.

What it does not guarantee

A blockchain proves that a record was not altered. It does not prove an app, coin or project is honest. An app can show you a balance that has never touched a blockchain, which is how mining simulator apps work. Learn how mining works in how Bitcoin mining works, and how coins differ in the basics guide.

Sources we checked

Apps for this topic

Frequently asked questions

Is a blockchain the same as Bitcoin?

No. Bitcoin is a currency that uses a blockchain. A blockchain is the record-keeping technology.

How does one block link to the previous one?

Each block's header stores the hash of the previous block's header. On Bitcoin, block 840,000 stores the hash of block 839,999, so changing anything in block 839,999 would break that link.

Can a blockchain be hacked?

Large networks are very hard to alter, but wallets, exchanges and apps built around them can still be attacked or scammed.

Does every blockchain use mining?

No. Some use staking or other consensus methods. Ethereum switched to staking in September 2022.

More guides on this topic