Model 02 · Network

The Mining Machine

See the guessing game that secures every block.

Intermediate≈ 12 min

Explanation level

How to use this model

How to use this modelWhat you see, what you can touch, what changes, what to take away

What am I looking at?

An exploded cutaway mining apparatus: block assembly, header, rotating nonce counter, pulsing double SHA-256 engine, target comparator, valid block output with a rejection channel.

What can I touch?

  • Start mining
  • Pause mining
  • Step individual nonce attempts
  • Change the educational difficulty target

What happens when I change something?

Make the target smaller and valid hashes become rarer, so many more nonce attempts are needed on average; more hash rate only makes the guessing faster.

What should I understand afterwards?

Explain mining as repeated guessing that is hard to do and easy to check.

See mining as a guessing machine.

A combination lock tried one number at a time until it clicks.

After this you can

  • Explain mining as repeated guessing that is hard to do and easy to check.

Open the model in its own window · works offline once loaded

Missions operate the model to complete them

  • Find a valid proof of work

    Beginner

    Search nonces until a block header's hash is at or below the target.

Missions are checked from the model's own simulation state, not from clicks. No time limit. Completion is stored only in this browser. The quiz questions in the learning paths remain available.

Audio guide Listen while you watch (optional)

Nothing plays until you press Play. The narration below is the same text, to read at your own pace. Each step brings its mechanism into focus in the model; the voice is not timed to the animations.

  1. This guide walks through the mining machine, one mechanism at a time. The figure highlights each part as I describe it. The numbers here are a demonstration with an easy target, far easier than the real network.

  2. Mining starts with a candidate block. The miner gathers transactions and folds all their fingerprints into a single one, called the Merkle root.

  3. The block header is a short label of eighty bytes. It holds the version, the previous block's hash, the Merkle root, a timestamp, the target and a number called the nonce.

  4. The miner cannot predict a winning label, so it keeps changing the nonce and tries again. Each new nonce is a new guess.

  5. Every guess goes through the hash engine twice. The result is a fingerprint that looks random: a tiny change in the header gives a completely different hash.

  6. The comparator checks the fingerprint against the target. Only a hash that is at or below the target counts. Most guesses fail, which is exactly what makes the work real.

  7. When a guess succeeds, the block leaves through the output dock and is shared with the network. Every node can check the proof with a single hash, even though finding it took many tries.

Tutor Ask a question, or let the tutor show you around

The tutor answers by explaining and, within the permissions below, by operating this model. Every change it makes is shown and listed, and you can undo it. It cannot run code, read your browser data or see anything secret. The page works the same without it.

What the tutor may do
What the tutor did

    Common mix-ups

    Myth: A valid hash needs a fixed number of leading zeroes.
    In fact: It must be numerically at or below the target; leading zeroes are a consequence, not the rule.
    Myth: Miners only change the nonce.
    In fact: When the 32-bit nonce space is exhausted, miners change the extranonce, timestamp or other template data.

    Concepts in this model

    Helpful to know first

    Next recommended

    Model 10 · NetworkThe Blockspace MarketWhy fees rise and fall, and how miners fill a block.

    Part of these learning paths