‹ CHAPTER 10, ALL LESSONS

PATHFINDER · CHAPTER 10 · LESSON 1 OF 5

Mining & proof of work

A lottery of hashes

What exactly is a miner searching for? 5 min

A miner builds a candidate block: a header pointing to the latest block, and the transactions it chose. Then it hashes the header. If the result, read as a number, is below a target set by the network, the block is valid. If not, the miner changes the nonce and tries again.

Nothing to solve, only to try

There is no clever shortcut. A hash cannot be predicted, so the only way to find a valid one is to try billions of them. Each try is a lottery ticket. Today the whole network tries hundreds of quintillions of hashes every second, and on average one of them wins every ten minutes.

The winning block is checked by every node in a fraction of a second: one hash is enough to see that it is below the target. That asymmetry, very hard to produce and trivial to check, is what makes proof of work useful.

▶ SEE IT IN THE MACHINE

MINING shows the five racks of the bench; the plaque reads the real hashrate of the whole network.

What to remember

  • A valid block's header hash is below the network target.
  • The only method is to try hashes, changing the nonce.
  • Finding is hard, checking is instant.

Quick check

How does a miner find a valid block?

How long does it take a node to check that a new block's proof of work is valid?