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.
The UTXO model
A UTXO is a specific unspent transaction output; transactions consume whole outputs and create new ones.
Open lessonInputs, outputs, and change
Inputs reference prior outpoints and provide witnesses; outputs assign values to new locking conditions.
Open lessonSerialization and txids
Version, vectors, scripts, sequence, witness, and locktime serialize deterministically; txid and wtxid commit to different data.
Open lessonFees, weight, and vbytes
Fees equal inputs minus outputs, while feerates use virtual size derived from transaction weight.
Open lessonCoin selection
Wallets trade off fees, privacy, change, consolidation, and future spending cost when selecting UTXOs.
Open lessonMempool policy versus consensus
Nodes can reject relay or mining of a consensus-valid transaction under local policy without making it invalid forever.
Open lessonConfirmations and finality
Confirmations measure accumulated proof of work after inclusion; required depth depends on value, threat model, and protocol configuration.
Open lessonRBF
Replace-by-fee uses sequence and mempool rules to replace an unconfirmed transaction with a higher-fee conflict.
Open lessonCPFP and package economics
A child can pay enough fee for miners to include a low-fee parent when the package feerate is attractive.
Open lessonTimelocks
nLockTime, sequence, CLTV, and CSV constrain when transactions or spending paths become valid.
Open lessonRaw transaction inputs and outputs
Decode outpoints, ScriptSig, sequence, amounts, ScriptPubKeys, CompactSize lengths, and locktime directly from serialized transaction bytes.
Open lessonWitnesses, 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 lessonThe complete mempool lifecycle
Follow admission, relay, conflicts, RBF replacement, block connection, reorg reconsideration, expiry, size eviction, and local policy differences.
Open lesson