Model 02 · Network
The Mining Machine
See the guessing game that secures every block.
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.
Change difficulty and hash rate and count the attempts.
Probability you can feel.
After this you can
- Predict how a smaller target changes the expected number of attempts.
Inspect double SHA-256, the 80-byte header, nonce ranges and the target comparison.
The header as bytes; the hash as a 256-bit number.
After this you can
- Compare a header hash with a target as 256-bit integers.
Open the model in its own window · works offline once loaded
Missions operate the model to complete them
-
Find a valid proof of work
BeginnerCompletedSearch nonces until a block header's hash is at or below the target.
Your task: Mine until the machine finds a header hash that meets the demonstration target. You may make the target easier first.
Use: Start mining · Step individual nonce attempts · Change the educational difficulty target
Each attempt hashes the header with a new nonce. Whether a hash meets the target is pure chance, so the number of attempts varies widely around the average, which is set by 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.
-
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.
-
Mining starts with a candidate block. The miner gathers transactions and folds all their fingerprints into a single one, called the Merkle root.
-
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.
-
The miner cannot predict a winning label, so it keeps changing the nonce and tries again. Each new nonce is a new guess.
-
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.
-
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.
-
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 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
Part of these learning paths