Skip to content

Reading the Live Chain & Block Explorers

This is the payoff of the whole book. Every field you’ve studied — headers, Merkle roots, inputs, outputs, fees, the coinbase — is sitting in the live chain right now, readable by anyone. This page shows you how to inspect it, and, more importantly, how to verify what a block explorer tells you instead of trusting it.

A block explorer (a website that lets you search blocks, transactions, and addresses) is convenient — but it’s a third party telling you what the chain says. That’s a trust assumption, and this whole book has been about removing those.

Block explorer Your own node
─────────────── ──────────────
fast, no setup you ran the validation
someone else's claim first-hand truth
can lie or be wrong "don't trust, verify"
fine for casual lookups required for anything that matters

Use explorers to find things quickly; use your own node to confirm anything you actually rely on. The rest of this page does both.

Terminal window
# where is the chain tip right now?
bitcoin-cli getblockchaininfo # blocks, bestblockhash, chainwork
# get the hash of a specific height, then the block
hash=$(bitcoin-cli getblockhash 800000)
bitcoin-cli getblock "$hash" 1 # verbosity 1: header fields + tx ids

Everything in that output maps to The Block Header (80 bytes): version, previousblockhash, merkleroot, time, bits (the target), and nonce, plus the list of transaction ids committed by the Merkle root.

Terminal window
# pick a txid from the block above, then decode it
bitcoin-cli getrawtransaction <txid> true

Match the decoded fields back to Anatomy of a Transaction:

  • vin — each input referencing a previous output by (txid, vout) plus its witness/scriptSig.
  • vout — each output’s value (in BTC; ×100,000,000 for sats) and its scriptPubKey (the lock).
  • The fee isn’t a field — it’s sum(inputs) − sum(outputs), exactly as in Fees, Change & the Conservation Rule. To get input values you look up each referenced output.
fee = (Σ input values) − (Σ output values)
└ found by looking up each vin's prior output ┘

The first transaction in every block is the coinbase (see Coinbase Transactions). It’s unmistakable: its single input has no real txid (it shows coinbase instead of referencing a prior output), and its outputs pay the miner the subsidy + fees.

Terminal window
# the first txid in a block's tx list is the coinbase
bitcoin-cli getblock "$hash" 2 | head # verbosity 2 expands full tx data

Reading the coinbase value against the halving schedule tells you which subsidy era the block is in — and the leftover above the subsidy is the total fees that block collected.

Terminal window
# is this (txid, vout) still in the UTXO set?
bitcoin-cli gettxout <txid> <vout>

A result means the output is unspent (it’s in the live UTXO set); null means it’s already been spent. This is the exact check every node does to detect double-spends.

Here’s the habit that ties everything together. Look up a transaction’s confirmation count or a block’s Merkle root on a public explorer, then confirm it against your own node:

Terminal window
# does the explorer's claimed block hash for height N match yours?
bitcoin-cli getblockhash <N>
# does a tx the explorer shows "in block X" really commit under that block's merkleroot?
bitcoin-cli gettxoutproof '["<txid>"]' <blockhash> # build the Merkle proof
bitcoin-cli verifytxoutproof <proof-hex> # your node re-checks it

If your node agrees, you’ve verified rather than trusted — exactly the technique from Verify a Merkle Proof Yourself. If it ever disagrees, believe your node.

How does this help untrusting strangers agree on one ledger? Because you can now read every field the ledger contains and re-check any claim about it against rules you understand, you no longer need to trust an explorer, an exchange, or a counterparty’s word. That’s the entire promise of Bitcoin made concrete: a ledger that mutually-distrusting strangers agree on not because someone vouches for it, but because each of them can read and verify it independently. You can now do that. You’ve finished the deep dive.

  1. What trust assumption does a block explorer introduce, and how do you remove it?
  2. Given a block hash, which command shows its header fields, and which header field commits to all the transactions?
  3. A transaction has no fee field. How do you compute the fee it paid?
  4. How can you tell, from decoded data, that a transaction is the coinbase?
  5. Describe how you’d verify — not just trust — that an explorer’s “this tx is in block X” claim is true.