Outpoints: TXID + VOUT
Outpoints: TXID + VOUT
Every UTXO in the global set needs a unique identifier so it can be referenced as an input in a future transaction. This identifier is called an Outpoint.
1. The Anatomy of an Outpoint
An outpoint is a pair of two values:
-
TXID (Transaction ID): The 32-byte hash of the transaction that created the output.
-
VOUT (Output Index): A 4-byte integer representing which output in that transaction we are referring to (starting at 0).
2. Uniqueness Guaranteed
Because every TXID is a cryptographic hash of unique data (including a unique coinbase), no two transactions will have the same TXID. Therefore, every TXID:VOUT pair is a globally unique primary key.
3. Serialization in Inputs
When you create a transaction, the "Input" section contains the raw outpoint of the coin you are spending.
-
Hex Representation: The 32-byte TXID (in Little-Endian) followed by the 4-byte VOUT.
-
Lookup: When a node sees this in your transaction, it looks up that exact key in its Chainstate database to see if the coin exists and hasn't been spent yet.
4. Spending is Deleting
In technical terms, "spending" a bitcoin is actually an instruction to delete an outpoint from the active database.
-
Transaction starts: Node finds Outpoint A in the DB.
-
Validation: Node checks if your signature matches the script locked in Outpoint A.
-
Completion: Node removes Outpoint A from the DB and creates Outpoints B and C (your payment and change).
| Component | Size | Format |
|---|---|---|
| TXID | 32 Bytes | Hex (Internal) |
| VOUT | 4 Bytes | Uint32 |
| Total | 36 Bytes | The Outpoint Key |
In the next section, we will discuss the problem of Dust and UTXO Bloat.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: