A blockchain is not a magical database, it is a linked list of blocks, each committing to a set of transactions and to the previous block’s hash, secured by proof-of-work.
Why this matters
Explorers, wallets, and payment processors must decide when a payment is “final enough.” That decision is about chain tips, confirmations, and reorg risk.
Analogy
Think of each block as a sealed evidence bag. The seal includes a fingerprint of the previous bag. To rewrite history, an attacker must reseal every bag after the change, and beat the honest network’s work.
Block anatomy
A block contains:
- A header (version, previous hash, merkle root, time, bits/difficulty, nonce)
- A list of transactions (the coinbase first)
The merkle root commits to all transactions so light clients can verify inclusion without downloading everything.
Loading diagram…
Confirmations
When your transaction appears in a block, it has 1 confirmation. Each block buried on top adds another. Deeper confirmations make reorgs that undo your payment less likely.
const confirmations = tipHeight - txBlockHeight + 1;Reorgs
Sometimes two miners find blocks near the same time. Nodes follow the heaviest valid chain. A short reorganization can drop a block you briefly saw. Wallets should handle disappearing transactions gracefully.
Common mistakes
- Treating “seen in mempool” as settled
- Ignoring that explorers can disagree briefly during races
- Forgetting coinbase maturity rules when spending mining rewards on regtest
Worked mental model
Re-read the diagrams in this lesson once out loud in plain language. If you cannot explain the flow to a friend without jargon, pause and revisit Mastering Bitcoin / Mastering Lightning chapters linked in Resources. Chapter references are intentional, not decorative.
Hands-on habit
Every protocol idea should be paired with one local experiment:
- Reproduce the happy path on regtest (or Polar for Lightning)
- Break it on purpose (wrong fee, expired invoice, offline peer)
- Write down what error you saw and which layer produced it (wallet, node, mempool, peer)
That habit turns reading into builder instinct.
Glossary check
Pick three terms from this lesson and define them in one sentence each without opening notes. Weak definitions mean the lesson is not finished yet.
Resource order
Use Resources in order: narrative book chapter first, then BIP/BOLT for precision, then implementation docs for commands. Jumping straight to RPC flags without the mental model creates brittle knowledge.
Next steps
Dive into transaction structure, the bytes wallets actually sign and broadcast.