MASTERING-BITCOIN ยท Unit 13 ยท Video 5

The Self-Healing Blockchain: Interactive Practice

IKey Concepts Reference

Concept Rule Meaning
Block validation 6 independent checks Syntax, PoW target, timestamp, weight, coinbase, transactions
Coinbase reward subsidy+fees\text{subsidy} + \text{fees} Currently subsidy = 3.125 BTC per block
Fork resolution Most cumulative work wins Wchain=โˆ‘idifficultyiW_{\text{chain}} = \sum_i \text{difficulty}_i
Block interval โ‰ˆ10\approx 10 minutes Balance between fork rate and confirmation latency
Security โˆ\propto total work Not the count of confirmations

IIVisualization 1: The Six Validation Checks

A new block arrives at your node. Use the controls below to simulate different block properties and see which of the six consensus checks pass or fail. A block is accepted only if all six checks pass.

โš™ interactive visualization โ€” coming to this page format soon

Reflect: Try setting the coinbase payout to 10 BTC while leaving every other check valid. Even with valid proof of work and a perfect timestamp, the block is REJECTED. This is why our cheating miner from the video burns electricity for zero reward โ€” the network's immune system catches the inflated coinbase regardless of how much hashpower was spent.

IIIVisualization 2: Most Cumulative Work Wins (Not Longest Chain)

Two competing chains exist after a fork. Adjust the length and average difficulty of each chain. The chain with the most total work โ€” not the most blocks โ€” wins.

โš™ interactive visualization โ€” coming to this page format soon

Notice: Try setting Chain A to 7 blocks at difficulty 10 and Chain B to 5 blocks at difficulty 20. Chain B is shorter but wins because its blocks were mined during a higher-difficulty epoch (work: 100 vs 70). The phrase "longest chain wins" is a useful shortcut, but the truth is most cumulative work wins.

IVVisualization 3: Why 10 Minutes? The Block Interval Tradeoff

What happens if Bitcoin used a different target block interval? Move the slider and watch two competing curves: the fork rate (wasted work) and the confirmation delay (user experience).

โš™ interactive visualization โ€” coming to this page format soon

Reflect: At very short intervals (say, 0.5 minutes), the fork rate explodes โ€” many blocks are orphaned because they were mined before the previous block fully propagated. At very long intervals (say, 60 minutes), users wait forever for confirmations. 10 minutes is a deliberate compromise: long enough for global propagation, short enough for usable UX.

A subtle but important point: nine 1-minute confirmations represent roughly the same total work as one 10-minute confirmation, so they give roughly the same security โ€” just with more orphan blocks burning hashpower along the way.

VQuiz Questions

Question 1

A miner spends $50{,}000 in electricity, finds a valid proof of work, and broadcasts a block that pays themselves 1000 BTC in the coinbase (current allowed subsidy is 3.125 BTC). All other checks pass. What happens?

โœ… Correct! Validation is independent of proof of work. An inflated coinbase fails check #5 regardless of how much hashpower the miner spent.

โŒ Not quite. Remember: each of the six checks is independent. Valid proof of work does not override an invalid coinbase amount.

Show solution

Solution:

Block validation requires all six checks to pass independently. Even with valid proof of work, check #5 (coinbase amount within the allowed subsidy) fails when the miner tries to pay themselves more than 3.125 BTC.

Every node on the network applies the same rule. The block is rejected in milliseconds. The proof of work cannot "buy" an invalid coinbase. The electricity is already burned; the reward is zero.

This is the key insight: Bitcoin verifies, it does not trust. Cheating isn't merely disallowed โ€” it's economically self-defeating.

Question 2

Two competing chains exist after a temporary fork:

  • Chain X: 7 blocks, each mined at difficulty 10
  • Chain Y: 5 blocks, each mined at difficulty 20

Which chain do nodes follow?

โœ… Correct! Work (5 ร— 20 = 100) beats length (7 blocks). The true rule is most cumulative work wins.

โŒ Not quite. Block count is a proxy for work, not the rule itself. Compute total work for each chain (blocks ร— difficulty).

Show solution

Solution:

Compute cumulative work for each chain:

  • Chain X work: 7ร—10=707 \times 10 = 70
  • Chain Y work: 5ร—20=1005 \times 20 = 100

Chain Y wins because 100>70100 > 70, even though Chain X has more blocks.

The popular phrase "longest chain wins" is a useful shortcut, but the real rule is "most cumulative work wins." When difficulty changes across epochs, a shorter chain mined during higher-difficulty periods can outweigh a longer chain of easier blocks.

There is no voting and no central authority. Each node independently sums the work behind every block and follows the heaviest chain.

Question 3

True or False: Nine confirmations on a hypothetical 1-minute-block chain provide significantly more security than one confirmation on Bitcoin's 10-minute-block chain, assuming both networks have the same total hashpower.

โœ… Correct! Same hashpower over 9 minutes โ‰ˆ slightly less work than the same hashpower over 10 minutes. Confirmation count alone is a poor security metric.

โŒ Not quite. Count is misleading. Compute the wall-clock time โ€” 9 one-minute blocks span 9 minutes; 1 ten-minute block spans 10 minutes. With equal hashpower, less time means less work.

Show solution

Solution:

If total network hashpower is the same on both chains, then:

  • 1 block on the 10-minute chain = 10 minutes of total network work
  • 9 blocks on the 1-minute chain = 9 minutes of total network work

So nine fast confirmations actually represent slightly less total work โ€” and thus slightly less security โ€” than one slow confirmation.

Security is proportional to total accumulated work, not the number of confirmations. Faster blocks let you sample security sooner, but they don't raise the ceiling, and they waste more hashpower on accidental forks (orphan blocks).

Block count is theater. Work is the substance.

Question 4

A node sees Block B at height N+1. Later, a longer-work chain extends Block A (a sibling at the same height) with Block N+2. What does the node do, and what term describes this event?

โœ… Correct! The node switches to the heavier chain. Block B becomes a stale sibling, and its miner gets no reward. This is a reorg.

โŒ Not quite. First-seen is only a tiebreaker when work is equal. Once a competing chain accumulates more work, nodes silently switch โ€” no vote required.

Show solution

Solution:

When a node sees a competing chain with more cumulative work, it abandons its current tip and switches to the heavier chain. This switch is called a reorganization, or reorg.

In this scenario:

  • The node originally accepted Block B.
  • A new Block N+2 extends Block A, so the A-chain now has more cumulative work.
  • The node drops Block B (it becomes a stale sibling), and re-applies the transactions along the A-chain.
  • Block B's miner loses the reward.

Key properties:

  • No voting, no leader, no referee.
  • Most temporary forks resolve within a single block.
  • Two-block reorgs are possible but rare; deeper reorgs are extremely improbable on Bitcoin.
  • "First seen" is only a tiebreaker for equal-work chains โ€” it does not override more cumulative work.

VISummary

Bitcoin replaces coordination by authority with verification by everyone:

No vote. No leader. No referee. Just rules, work, and time.

Solved: 0 / 4