Skip to content
COLD HARDSATSSubscribe

Module 8 of 19 · Part 2: How it works

Mining: hardware, pools and protocols

Mining is how new blocks get added and new bitcoin is issued. In this module you follow one guess from a mining machine, through a pool, to a payout, and learn why the rules make miners wait before spending what they earn.

⏱ About 52 minutes7 lessons5-question quiz

By the end you will

  • Explain what a mining machine actually does
  • Say why most miners join pools
  • Explain the 100-block wait on mining rewards
  • Describe what Stratum V2 changes
  • Explain the selfish-mining result and its assumptions
Your progress0/7 lessons · 0%

Saved in this browser only. Nothing is sent to us.

Lessons

  1. 1Lesson 1 of 7What mining actually doesBasics8 min

    A miner bundles waiting payments into a candidate block, then runs its header through a scrambling function called SHA-256, twice. The result looks like a random number. If it is below the target set by the difficulty, the block is valid. If not, the miner changes the nonce and tries again (Bitcoin developer guide: mining).

    There is no shortcut. The only way to win more often is to guess faster. That cost in hardware and electricity is what makes rewriting the blockchain, Bitcoin's shared public record of balances, so expensive (white paper, section 4).

    1. Read the step-by-step on the proof-of-work page.
    2. Explain why a faster machine wins more blocks on average but still can't guarantee any single one.
    3. Write down the two costs of mining: machines and electricity.
  2. 2Lesson 2 of 7From home computers to ASICsBasics6 min

    In Bitcoin's first days, people mined on ordinary computer processors. Then graphics cards proved faster, then special chips. Today mining is done with ASICs, short for application-specific integrated circuits: machines built to do nothing but Bitcoin's SHA-256 guessing.

    Because ASICs are so specialized, a home computer can't compete for blocks any more. Mining has become an industry that chases cheap electricity. The mining page covers the basics and the halving schedule.

    1. Open the mining page and read its proof-of-work section.
    2. Write one reason miners move to places with cheap power.
    3. Explain why a home computer can no longer win blocks.
  3. 3Lesson 3 of 7Why pools existBasics8 min

    A single machine might go years without finding a block, then win one big reward. Most miners would rather get small, steady payments. So they join a pool: many miners work on the same block template and split the reward by how much work each contributed.

    To measure work, the pool accepts "shares": guesses that meet an easier target than the real one. Shares prove a miner is working honestly even when they don't find the block themselves (Bitcoin developer guide: mining).

    1. Look at the pool names on recent blocks at mempool.space.
    2. Count how many pools found the last 20 blocks.
    3. Write down why steady income matters to a business with power bills.
  4. 4Lesson 4 of 7The 100-block wait on rewardsGo deeper · optional6 min

    A miner's reward can't be spent until 100 more blocks are built on top of it (Bitcoin Core consensus.h). That is about 16 to 17 hours at the 10-minute average. If two blocks compete and one is dropped, its reward disappears; the wait keeps those vanished coins from having already been spent.

    1. Find COINBASE_MATURITY in consensus.h.
    2. Work out 100 × 10 minutes in hours.
    3. Explain why a reward from a dropped block must never be spendable.
  5. 5Lesson 5 of 7Stratum V1 vs Stratum V2Go deeper · optional8 min

    Pools talk to their miners using a protocol called Stratum. In the older version, the pool decides which payments go in each block and the miners just guess. That gives a few large pools a lot of say over which payments get included.

    Stratum V2 lets miners choose their own block templates instead of the pool choosing for them, and it encrypts the connection (Stratum V2 specification). It is a way to spread that choice back out to individual miners.

    1. Open the Stratum V2 specification and read its overview.
    2. Write down who picks the payments under V1 and under V2.
    3. Explain why that matters for censorship resistance from Module 4.
  6. 6Lesson 6 of 7Pool payouts: FPPS vs PPLNSGo deeper · optional6 min

    Pools pay in different ways.

    • FPPS (full pay per share) pays a fixed amount for every share, including an estimate of fees, so the pool takes on the luck.
    • PPLNS (pay per last N shares) pays only when the pool finds a block, split among recent shares, so miners share the luck.

    FPPS is steadier; PPLNS can pay more over time but swings more.

    1. Pick one pool and find which payout method it uses on its own site.
    2. Explain who carries the risk of bad luck under each method.
    3. Note that pools charge fees too. Compare them before joining.
  7. 7Lesson 7 of 7Selfish mining and the one-third resultAdvanced · optional10 min

    In 2013, Ittay Eyal and Emin Gün Sirer showed a strategy called selfish mining. A pool keeps blocks it finds hidden, then releases them to make honest miners waste work. Under their assumptions, it can pay off with as little as one third of the computing power, not half (Majority is not Enough).

    The result depends on how well the selfish pool's blocks spread through the network. It is one reason researchers watch for pools that grow large, and why fast, fair block relay matters.

    1. Read the abstract of the paper.
    2. Write down the key assumption: how quickly the selfish pool's blocks reach other miners.
    3. Check pool shares on mempool.space and see whether any pool is near one third.

⚠ Common mistakes

  • Thinking miners solve useful math or approve rules
  • Mining at home on a laptop expecting profit
  • Assuming the biggest pool controls Bitcoin
  • Trying to spend a block reward before 100 confirmations

Quick check: 5 questions

  1. 1. What does a mining machine actually do?

  2. 2. Why do most miners join pools?

  3. 3. How long must a block reward wait before it can be spent?

  4. 4. What does Stratum V2 change?

  5. 5. What does the selfish-mining paper show?

Next on the trail · available now

Module 9: Mining economics and the security budget

Reason about who pays for security as the subsidy shrinks.

Start Module 9 →

Educational only. Nobody from Cold Hard Sats will ever ask for your seed words.

Sources