Skip to content
COLD HARDSATSSubscribe

Module 5 of 19 · Part 2: How it works

Inside a block

Every bitcoin payment ends up inside a block, one page in the blockchain, Bitcoin's shared public record of balances. In this module you follow a payment from the waiting room to a block, then read a block header field by field.

⏱ About 56 minutes7 lessons5-question quiz

By the end you will

  • Explain what the mempool is and why fees decide the order
  • Look up any block or payment on a block explorer
  • Name the six fields in a block header
  • Explain how a Merkle tree lets a phone check one payment
  • Explain why miners need more than the nonce
Your progress0/7 lessons · 0%

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

Lessons

  1. 1Lesson 1 of 7Payments, the mempool and feesBasics8 min

    When you send bitcoin, your wallet, the phone or hardware that holds your private cryptographic keys, signs the payment and shares it with the network. A private cryptographic key (often shortened to private key) is a number that proves you can spend. The signed payment then waits in the mempool, short for memory pool: each computer's waiting room of payments not yet in a block (Bitcoin developer guide).

    Space in each block is limited, so miners pick the payments that pay the most fee for the space they take. Fees are quoted in satoshis per virtual byte (sat/vB). A satoshi is one hundred-millionth of a bitcoin.

    Pay more per byte and you usually get in sooner. The live mempool page shows today's rates.

    1. Open the mempool page and find the current fee for the next block.
    2. Notice how the fee changes over a day.
    3. Remember: fee rate depends on the payment's size in bytes, not on the amount of bitcoin sent.
  2. 2Lesson 2 of 7Using a block explorerBasics8 min

    A block explorer is a website that lets you browse the blockchain. mempool.space is a popular free one. You can look up a block by its number (its height), a payment by its ID, or an address.

    One privacy warning: when you type your own address into a public website, that site learns your interest in it, along with your internet address. For checking your own balances, connect your wallet to your own node instead (Module 10).

    1. Open mempool.space/block/0, the very first block.
    2. Click any recent block and open one payment inside it.
    3. Find the payment's fee rate and how many confirmations it has.
  3. 3Lesson 3 of 7How big a block can beGo deeper · optional6 min

    Blocks are capped by weight, not by a simple count of payments. The limit is 4,000,000 weight units (Bitcoin Core consensus.h). SegWit (BIP 141) introduced weight.

    BIP means Bitcoin Improvement Proposal, a numbered public document describing a change. Signature data counts for less, which is why fees are quoted per virtual byte.

    Because space is capped, fees rise when many people want to send at once and fall when the waiting room empties.

    1. On mempool.space, open a recent block and find its weight.
    2. Compare it with the 4,000,000 limit.
    3. Check the mempool page on a busy day and a quiet day.
  4. 4Lesson 4 of 7The six header fieldsGo deeper · optional10 min

    Every block starts with an 80-byte header, a short summary with exactly six fields (Bitcoin Core block.h):

    • Version: which rules the block signals.
    • Previous block hash: the fingerprint of the block before it, which chains blocks together.
    • Merkle root: one fingerprint that sums up every payment in the block.
    • Time: when the miner says it made the block.
    • Bits: the difficulty target in compact form.
    • Nonce: a number miners change while hunting for a valid block.

    Field sizes: 4 + 32 + 32 + 4 + 4 + 4 = 80 bytes.

    1. Open any block on mempool.space and find its header details.
    2. Match each of the six fields to what you see.
    3. Click the previous block hash and check that it leads to the block before.
  5. 5Lesson 5 of 7Merkle trees and checking one paymentGo deeper · optional8 min

    A Merkle tree pairs up payment fingerprints, combines each pair into a new fingerprint, and repeats until one is left: the Merkle root in the header (Bitcoin developer guide).

    This lets a light phone wallet check that one payment is in a block with only a handful of fingerprints and the header, instead of the whole block. The white paper calls this simplified payment verification (white paper, section 8).

    1. Draw four boxes labeled A, B, C and D. Pair them as AB and CD, then pair those into ABCD.
    2. Notice that proving C is included only needs D, AB and the root.
    3. Read section 8 of the white paper.
  6. 6Lesson 6 of 7Why the nonce alone is not enoughAdvanced · optional8 min

    The nonce field is only 32 bits, so it has 4,294,967,296 possible values (2 to the 32nd power). Modern mining machines run through all of them far faster than a block takes to find (Bitcoin developer guide: mining).

    When they run out, miners change an extra number inside the first payment of the block, the one that pays the miner. That changes the Merkle root, which gives a fresh header to search. This extra number is called the extranonce (Bitcoin Core block.h).

    1. Write 2 to the 32nd power out: 4,294,967,296.
    2. Explain why changing a payment changes the Merkle root.
    3. Read the proof-of-work page for the full puzzle.
  7. 7Lesson 7 of 7Trace a payment into a blockBasics8 min

    Put it all together. Pick a payment that just appeared on mempool.space and watch it leave the waiting room, land in a block and gain confirmations. Each new block on top adds one confirmation and makes the payment harder to undo (white paper, section 11).

    1. On mempool.space, open an unconfirmed payment from the waiting room.
    2. Note its fee rate and compare it with the next block's rates.
    3. Refresh after a block arrives and see whether it was included.
    4. Count its confirmations over the next hour.

⚠ Common mistakes

  • Thinking a bigger amount means a bigger fee: fees depend on size in bytes
  • Typing your own address into public explorers without thinking about privacy
  • Treating an unconfirmed payment as final
  • Confusing the block's height with its hash

Quick check: 5 questions

  1. 1. What is the mempool?

  2. 2. How do miners usually choose payments?

  3. 3. How many fields does a block header have?

  4. 4. What does the Merkle root summarize?

  5. 5. Why do miners use an extranonce?

Next on the trail · available now

Module 6: Issuance and the halving

Derive the supply schedule from the code and explain why it is not exactly 21M.

Start Module 6 →

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

Sources