Skip to content

Step 6 / The Idea of Bitcoin

Make a replacement history costly.

Check that a history follows the rules before comparing the work behind it.

Maya has 80,000 sats, small units of bitcoin. She sends two requests that try to spend the same amount twice. Both may carry her approval, but both cannot become payments in the same accepted history.

Computers may receive the requests in different orders. Bitcoin needs rules for allowed payments and a way to choose between competing histories that follow those rules. Checking the rules and comparing computing work are separate jobs.

First, check the payment rules

A miner gathers payments into a proposed block. Other computers must check it before accepting it. A full validating node does this with the rules in its own software.

The node checks the required signatures and the earlier amounts the payments are trying to spend. Those earlier amounts are called inputs. They must still be available, the new payment amounts must obey the rules, and the miner’s reward must stay within the allowed amount.

Suppose a miner does a huge amount of computing work but includes extra bitcoin that the rules do not allow. A node using the unchanged rules still rejects the block. Work does not turn a forbidden payment into an allowed one.

Only after these checks can the node compare the work behind competing histories. A history that follows the rules is called valid. More work helps choose between valid histories; it does not excuse an invalid one.

Illustrative work unitsCandidates

C claims the most work, but it includes a forbidden spend. Work alone is not enough to choose a chain.

Choose “Apply the validity check” to remove the history that breaks a rule. Then compare the two that remain and see why 8 beats 6. “Start again” restores all three; the scores are made-up teaching units.

Many attempts, one result to check

How does a miner show work? First it prepares a proposed block. A short part of that block, called the header, contains information used in the search.

The miner runs the header through a calculation that produces a fixed-size code. That code is called a hash. For mining, the code is read as a number and checked against a target. The miner changes data it is allowed to change and tries again, looking for a result that meets the target.

This may take many attempts. Once a result meets the target, another computer can check that result without repeating every failed attempt. This is the difference between searching and checking.

The proof does not reveal exactly how many attempts that miner made. A lucky miner could find a result sooner. It also does not prove that every payment in the block is allowed. The payment checks from the previous section are still needed.

A toy condition: result below 010Attempt 1

This result fails the condition. The producer tries another candidate; success is not assigned by a username vote.

Illustrative outputs, not a real hash function or a mining simulation.

Choose “Try another result” until the displayed number meets the condition, then reset the illustration. Checking 004 against 010 is quick even though the example showed several attempts. These are prepared teaching results, not real hashes or a promise of when a miner will win.

Add the work across the history

Two valid blocks can arrive close together. For a while, some nodes may be following one and some the other. These competing paths are called branches. Bitcoin follows the valid branch with the greatest total proof of work.

Use made-up work scores to see why block count alone is not enough. Branch A has four blocks, each worth 2 work units. Add them: 2 + 2 + 2 + 2 = 8. That is the same as 4 × 2.

Branch B has three blocks, each worth 3 units. Its total is 3 + 3 + 3 = 9. B has fewer blocks but more work. The comparison uses work added across the whole branch, often called accumulated work.

Real Bitcoin calculates this work from the targets the blocks had to meet. It does not read a miner’s electricity meter or count the miner’s actual failed attempts. Our small scores explain the comparison; they are not real energy measurements.

The history keeps growing while an attacker works

Suppose a payment has been added to a valid block. An attacker wants the network to follow a different history that replaces the payment. The attacker must build a competing history that passes the rules and has enough work to overtake the accepted branch.

Meanwhile, other miners can keep adding blocks to the accepted history. Every added block contributes more work above the payment. The attacker has more history to replace while the rest of the network keeps moving.

These added blocks give the payment more confirmations. They can reduce the risk of replacement under the network’s assumptions. They do not guarantee that every attack will fail, hold the market price steady, or prove a seller delivered an order.

The idea to keep

First ask whether a block follows the rules. Then compare the total work behind the histories that pass. Even a great deal of work cannot make an invalid signature or an excessive reward acceptable.

Next, we will put these ideas on a timeline: a public proposal in 2008, followed by running software in 2009.

Make it yours

A moment to try it.

Take your time. Explain the reason, not only the answer.

1 of 4

A history has twice as much total work as another. But it creates more bitcoin than the rules allow. What should a node checking those rules do?

Choose the best explanation

Use examples only—never enter recovery words, keys, account details, or real balances. Loading saved answers…

Loading your saved progress…

Sources & a little more detail

Illustrative stories and example numbers teach the mechanism. They are not forecasts or live market quotes.

Keep the conversation going

Lesson discussion

Share a question, a useful example, or something that clicked.

Loading discussion…