Coinbase
Coinbase is the special name given to the first transaction in every block. These can also be called 'Generation Transactions'. The winning miner creates this special transaction as part of the block templating process.
A coinbase transaction follows the same format as a normal transaction, except:
- It has exactly one txin
- This txin's prevout hash is 0000...0000.
- This txin's prevout index is 0xFFFFFFFF
- The txin's prevout script is an arbitrary byte array which is used by miners to signal identity and pass messages from block winning nodes to the rest of the network
- The sum of the txout's values cannot exceed the total of the current Miner subsidy plus the mining fees paid by all other transactions included in the block
A part of the coinbase is also used as an 'extra nonce' during the block discovery process due to a single ASIC miner being able to test more combinations than allowed for in the 2^32 possible combinations that changing the nonce in the block header can create.
The winning miner can pay the coinbase value to multiple outputs as needed, and is also free to include zero value false return outputs in the transaction.