January 2019
Beginner to intermediate
372 pages
11h 17m
English
Every block created in the Bitcoin blockchain has a special type of transaction, which is the first transaction of the block. This transaction is created by the miner, which rewards itself with incentives earned from transaction fees and newly created bitcoins, as mentioned earlier.
Here is the coinbase transaction of Bitcoin mainnet block 520,956. Decoding the first transaction of the block will give these details:
$ bitcoin-cli getrawtransaction fc72760e6339eb43111034d76e67ffce69f9f3a4a5aa53f29dfe7299623bbba8
{
"txid": "fc72760e6339eb43111034d76e67ffce69f9f3a4a5aa53f29dfe7299623bbba8",
"hash": "d06aecb12c942dfd059b0d6ef7fbb76f8310fb2cfd4159984c8dce32d3f94b8f", "version": 2, "size": 243, "vsize": 216, "locktime": 0, ...