VOUT Data Type & Limits
VOUT Data Type and Limits
While VOUT is a simple index, its implementation in the Bitcoin protocol has specific technical constraints defined by the C++ source code.
1. The uint32 Format
In the raw binary of a Bitcoin transaction input, the VOUT is stored as a 4-byte Unsigned Integer (uint32_t).
2. Theoretical vs. Practical Limits
Because the field is 32 bits, a single transaction could theoretically have up to 4,294,967,295 outputs.
-
The Theoretical Limit: 4.2 Billion outputs.
-
The Practical Limit: The Block Weight Limit.
Since each output requires at least 9 bytes (8 bytes for value + 1 byte for script length), a 4MB block could never hold more than about 444,444 outputs.
3. The 0xffffffff Sentinel
There is one specific VOUT value that is reserved as a "null" marker: 0xffffffff (the maximum possible uint32).
-
This value is used exclusively in Coinbase Transactions.
-
Since a coinbase transaction doesn't spend a previous output, it sets the VOUT to
0xffffffffto signal to the software that no lookup is required.
4. Why 4 Bytes?
Bitcoin's creator chosen a 4-byte index to ensure the protocol would never be outgrown. Even if individual transactions became massive in the future, the indexing system would remain robust.
| Property | Value |
|---|---|
| Field Name | VOUT / n (Index) |
| Data Type | uint32 (Unsigned 32-bit Integer) |
| Byte Size | 4 Bytes |
| Storage | Little-Endian |
In the next section, we will see how the VOUT is Serialized into the blockchain data.
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: