BEGINNER_DOC_010 // BEGINNERS / OUTPUTS
OUTPUTS
A transaction output is a discrete chunk of bitcoin locked to a spending
condition. Once created, an output sits in the utxo-set/">UTXO set — a database of all spendable coins
in existence. Every output is either unspent (a UTXO) or spent (consumed as
an input in a later transaction). There is no concept of a balance — only outputs.
OUTPUT_ANATOMY
STRUCTURE OF A SINGLE OUTPUT
Value 8 bytes Amount in satoshis (1 BTC = 100,000,000 sat)
Script length varint Length of the following locking script
ScriptPubKey variable The locking script (spending conditions)
Example (P2WPKH output):
Value: 00E8764817000000 = 100,000,000 sat = 1.00000000 BTC
Script: 0014{20-byte-pubkey-hash}
ScriptPubKey: OP_0 <20-byte-hash>
BECOMES A UTXO
UTXO SET ENTRY
Key: TxID:Vout (e.g. a1b2c3...ff:0)
Value: { amount: 100000000, scriptPubKey: 0014..., height: 840000 }
Total UTXO set (2024): ~87 million entries, ~6 GB RAM required
OUTPUT_TYPES
LEGACY
The classic output type. Locked to a hashed public key. Requires the recipient to reveal their public key and a valid signature to spend.
ScriptPubKey: OP_DUP OP_HASH160 <20-byte-pubkeyhash> OP_EQUALVERIFY OP_CHECKSIG
ScriptSig: <sig> <pubkey>
Size: 25 bytes
Address: Starts with 1
The modern standard. Signature and public key are moved to the witness field, reducing the weight of the input and lowering fees.
ScriptPubKey: OP_0 <20-byte-pubkeyhash>
Witness: <sig> <pubkey>
Size: 22 bytes (output script only, much smaller)
Address: Starts with bc1q
Taproot outputs look identical on-chain whether spent by a single key, multisig, or a complex script. Maximum privacy and efficiency.
ScriptPubKey: OP_1 <32-byte-x-only-pubkey>
Witness: <schnorr-sig> (key-path spend)
or <script> <control-block> (script-path spend)
Size: 34 bytes
Address: Starts with bc1p
THE_UTXO_SET
WHY IT MATTERS
Every node/">full node keeps the entire UTXO set in memory for fast validation.
Every unspent output ever created that hasn't been spent
lives in this set.
DUST OUTPUTS
Outputs too small to be worth spending (fee > value) are called dust.
Most nodes reject outputs below the dust threshold (~546 sat for P2PKH).
TERMINOLOGY_INDEX
Output
An amount of bitcoin locked to a ScriptPubKey. Created by a transaction, consumed by a later one.
UTXO
Unspent Transaction Output. An output that has not yet been consumed as an input.
UTXO Set
The complete database of all unspent outputs. Every full node maintains this to validate transactions.
ScriptPubKey
The locking script attached to an output. Defines the conditions under which the output can be spent.
Vout
The index of an output within a transaction (0, 1, 2…). Combined with TxID, uniquely identifies a UTXO.
Dust
An output so small its value is less than the fee required to spend it. Most nodes reject dust outputs.