MASTERING-BITCOIN ยท Unit 12 ยท Video 4

Three Bitcoins You've Never Used: Interactive Practice

IKey Reference

Concept Rule / Value Notes
Coinbase maturity 100 blocks Newly mined coins cannot be spent until 100 confirmations
Spendable balance (Nminedโˆ’100)ร—subsidy(N_{\text{mined}} - 100) \times \text{subsidy} When Nmined>100N_{\text{mined}} > 100
Regtest default subsidy โ‰ˆ31.15625\approx 31.15625 BTC At the default starting height
Mainnet address prefixes 1, 3, bc1 Legacy, P2SH, SegWit
Testnet/Signet prefixes m/n, 2, tb1 Same kinds, different prefix
Signet block rule (BIP 325) Must satisfy challenge script Permissioned block production

IIVisualization 1: The Coinbase Maturity Rule

Conceptual question: When you mine blocks on regtest, why can't you spend all the rewards immediately?

Adjust the sliders below to see how many test coins you can actually spend. Notice that the most recent 100 blocks are immature โ€” their rewards are locked.

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

Reflect: Set the slider to 500 blocks with subsidy 31.15625 BTC. You should see roughly 12,462.5 BTC spendable โ€” exactly the figure from the video. What happens if you mine only 100 or fewer blocks? Why is zero the answer, no matter the subsidy?

IIIVisualization 2: Compare the Four Networks

Conceptual question: Each Bitcoin network sits at a different point on the trust spectrum. What do you trade off when you move along it?

Select a network from the dropdown to see how it handles block production, coin value, and reliability.

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

Notice: As you move from Mainnet โ†’ Testnet3 โ†’ Signet โ†’ Regtest, you gain speed and lose permissionlessness. Mainnet and Regtest are reliable for opposite reasons โ€” one is secured by real economic incentives, the other by you simply being the only participant.

IVVisualization 3: Why Testnet Breaks โ€” The Empty Block Attack

Conceptual question: Testnet has no economic incentive backing it. What happens when a disruptive miner shows up?

Adjust the share of blocks produced by the disruptive (empty-block) miner. Watch how transaction throughput collapses.

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

Reflect: At 0% attack share, the testnet looks healthy. Push the slider to 80% or 100% โ€” transactions stall, developers can't confirm work, and difficulty drifts because block times become erratic. This is the exact problem signet (BIP 325) was designed to fix: require every block to carry a valid signature, and disruptive miners simply can't produce blocks at all.

VQuiz Questions

Question 1

You start a fresh regtest node and mine 250 blocks. The block subsidy is 31.15625 BTC per block. The coinbase maturity rule requires 100 confirmations before mined coins can be spent.

How many BTC are spendable right now?

โœ… Correct! 150 mature blocks ร— 31.15625 BTC = 4,673.4375 BTC.

โŒ Not quite. You included all 250 blocks, but the most recent 100 are immature and locked.

โŒ Not quite. The maturity rule locks 100 blocks; it doesn't keep only 100 blocks spendable.

โŒ Not quite. Worthlessness as a security property is real, but the chain still tracks BTC balances โ€” the question is about how many are spendable.

Show solution

Solution:

The coinbase maturity rule locks the most recent 100 blocks. With 250 blocks mined:

  • Mature (spendable) blocks: 250โˆ’100=150250 - 100 = 150
  • Immature (locked) blocks: 100100

Spendable balance: 150ร—31.15625=4,673.4375ย BTC150 \times 31.15625 = 4{,}673.4375 \text{ BTC}

The coins exist on the chain, but the protocol enforces the 100-block delay before they can be spent. This same rule applies on mainnet and prevents reorg-related double-spends of coinbase rewards.

Question 2

True or False: Signet is more centralized than mainnet because block production requires authorized signers, which means signet's consensus rules are weaker than mainnet's.

โœ… Correct! Signet's block production is permissioned, but its consensus rules match mainnet exactly.

โŒ Not quite. Permissioned block production is not the same thing as weaker consensus rules.

โŒ Not quite. Try again โ€” the hints above can help.

Show solution

Solution: False.

This conflates two different things:

  • Block production on signet is permissioned (only authorized signers can produce valid blocks per BIP 325's challenge script).
  • Consensus rules on signet are identical to mainnet โ€” same script validation, same transaction format, same maturity rules.

The signers also cannot steal anything, because signet coins are worthless by design. That's the whole point: signet replaces the economic incentive that secures block production while keeping every other rule the same. This is why Bitcoin Inquisition can test proposed mainnet consensus upgrades on signet meaningfully.

Question 3

You're writing wallet code and want to test a transaction that uses a 10,000-block timelock. Which network is the best choice, and why?

โœ… Correct! Regtest lets you compress time โ€” mine 10,000 blocks instantly with a single CLI command.

โŒ Not quite. On the other networks, you don't control the pace of block production โ€” only on regtest can you mine on demand.

Show solution

Solution: Regtest.

On regtest, you control block production. A single CLI command can mint thousands of blocks instantly:

bitcoin-cli generatetoaddress 10000 <address>

The other options fail for different reasons:

  • โŒ Mainnet: 10,000 blocks โ‰ˆ 70 days of real time, plus real fees.
  • โŒ Testnet3: You don't control mining โ€” you'd wait for the network, and unreliable miners may stall progress.
  • โŒ Signet: Block cadence is set by the signers, not by you (unless you run your own custom signet, but then you're basically using a signed regtest).

Regtest is not a slower testnet โ€” it's not a network at all. The entire chain lives in your data directory and lets you compress time arbitrarily, which is exactly what timelock testing needs.

Question 4

A developer accidentally tries to send testnet coins to the mainnet address bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq. What happens?

โœ… Correct! Different prefixes (bc1 vs tb1, 1 vs m/n, 3 vs 2) let wallets catch network mix-ups before broadcast.

โŒ Not quite. Address prefixes encode the network; the wallet catches mismatches locally, before any transaction is broadcast.

Show solution

Solution: The wallet rejects it locally before the transaction is ever broadcast.

Address prefixes encode which network the address belongs to:

Type Mainnet Testnet / Signet
Legacy (P2PKH) starts with 1 starts with m or n
P2SH starts with 3 starts with 2
SegWit (bech32) starts with bc1 starts with tb1

A testnet wallet validating bc1q... sees the bc1 mainnet prefix and refuses to construct the transaction. This is a deliberate design choice โ€” same software, same consensus rules, but distinct address spaces so accidental cross-network sends are impossible.

The other answers are wrong because:

  • โŒ The transaction never broadcasts in the first place โ€” the rejection is at the wallet layer.
  • โŒ It's not a signature issue; it's an address-encoding issue.
  • โŒ The prefixes are precisely what makes them not interchangeable.

Solved: 0 / 4