BA-05 · Intermediate

Transactions, UTXOs, and the mempool

Construct, inspect, price, and debug Bitcoin transactions.

Follow these 13 lessons in order, or choose the topic you need. Each lesson combines an explanation, a worked example and practice inside the Guild.

  1. The UTXO model

    A UTXO is a specific unspent transaction output; transactions consume whole outputs and create new ones.

    Open lesson
  2. Inputs, outputs, and change

    Inputs reference prior outpoints and provide witnesses; outputs assign values to new locking conditions.

    Open lesson
  3. Serialization and txids

    Version, vectors, scripts, sequence, witness, and locktime serialize deterministically; txid and wtxid commit to different data.

    Open lesson
  4. Fees, weight, and vbytes

    Fees equal inputs minus outputs, while feerates use virtual size derived from transaction weight.

    Open lesson
  5. Coin selection

    Wallets trade off fees, privacy, change, consolidation, and future spending cost when selecting UTXOs.

    Open lesson
  6. Mempool policy versus consensus

    Nodes can reject relay or mining of a consensus-valid transaction under local policy without making it invalid forever.

    Open lesson
  7. Confirmations and finality

    Confirmations measure accumulated proof of work after inclusion; required depth depends on value, threat model, and protocol configuration.

    Open lesson
  8. RBF

    Replace-by-fee uses sequence and mempool rules to replace an unconfirmed transaction with a higher-fee conflict.

    Open lesson
  9. CPFP and package economics

    A child can pay enough fee for miners to include a low-fee parent when the package feerate is attractive.

    Open lesson
  10. Timelocks

    nLockTime, sequence, CLTV, and CSV constrain when transactions or spending paths become valid.

    Open lesson
  11. Raw transaction inputs and outputs

    Decode outpoints, ScriptSig, sequence, amounts, ScriptPubKeys, CompactSize lengths, and locktime directly from serialized transaction bytes.

    Open lesson
  12. Witnesses, wtxids, and block commitments

    Trace witness serialization, txid versus wtxid, the coinbase witness reserved value, and the witness commitment that binds SegWit data into a block.

    Open lesson
  13. The complete mempool lifecycle

    Follow admission, relay, conflicts, RBF replacement, block connection, reorg reconsideration, expiry, size eviction, and local policy differences.

    Open lesson