Transaction Lifecycle

12 min readarticleIncludes quiz · 7 questions

High-level flow:

1) Create: Wallet selects inputs (UTXOs), builds outputs (recipient + change), and sets a fee 2) Sign: Inputs are signed with your private key(s) under specific SIGHASH rules 3) Broadcast: Wallet sends the raw tx to a node (yours or a public node) 4) Propagate: Peers validate policy/consensus rules and relay to the network 5) Mine: Miners select by feerate and include in a block 6) Confirm: Block is accepted by the network; more blocks = more security

Lifecycle Diagram
Lifecycle Diagram

Transaction anatomy (definitions):

  • Inputs (vin): references to previous UTXOs being spent
  • Outputs (vout): new UTXOs created, each with a locking script and amount
  • Change output: returns leftover value to your wallet
  • Fee: inputs − sum(outputs); set by you (directly or via feerate)
  • txid vs wtxid: txid excludes witness data; wtxid includes it (SegWit)
  • locktime/sequence: enable absolute/relative timelocks
  • ScriptPubKey/ScriptSig/Witness: spending rules and data

Signing & SIGHASH modes:

  • SIGHASH_ALL (default): signs all inputs/outputs
  • SIGHASH_NONE/SINGLE: sign subsets of outputs
  • ANYONECANPAY variants: limit which inputs are signed

Relay policy & mempool basics:

  • Standardness: nodes relay only standard, policy-compliant txs
  • Min relay feerate: too-low fee txs may be rejected
  • Ancestor/descendant limits: bound package size/depth
  • Replace-By-Fee (BIP125): opt-in replaceable txs can be fee-bumped
  • Package/CPFP: a high-fee child can pull a low-fee parent into a block

Miner selection:

Miners primarily sort by feerate (sat/vB), not absolute fee. They may also consider packages (parent+child) when it increases total paid per vbyte.

Confirmations and security:

  • 0-conf: seen in mempool (reversible)
  • 1 conf: included in the latest block
  • 2–3 conf: increasingly secure for medium value
  • 6 conf: industry standard for high-value finality

Common failure modes & fixes:

  • Too-low fee: stays unconfirmed or gets evicted → use RBF or CPFP, or rebroadcast with higher fee
  • Non-standard script/size: won’t relay → adjust to standard policy or mine via private connections
  • Double-spend conflict: competing tx seen → wait for confirmations; use RBF intentionally when you control original tx
  • Malleability (legacy): txid can change before confirmation → use SegWit to avoid
Example
{
  "vin": [ { "txid": "<prev>", "vout": 0, "sequence": 0xFFFFFFFD } ],
  "vout": [ { "address": "bc1...", "value": 100000 }, { "address": "change_bc1...", "value": 389000 } ],
  "fee": 1000, // sats
  "locktime": 0,
  "witness": [ "<sig>", "<pubkey>" ]
}

Test Your Knowledge

This lesson includes a 7-question quiz (passing score: 80%).

Quiz functionality available in the mobile app.