Skip to Content
Foundations of Blockchain
book

Foundations of Blockchain

by Koshik Raj
January 2019
Beginner to intermediate
372 pages
11h 17m
English
Packt Publishing
Content preview from Foundations of Blockchain

Coinbase transactions

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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Blockchain Basics

Blockchain Basics

Daniel Drescher
What Is Blockchain?

What Is Blockchain?

Sir John Hargrave, Evan Karnoupakis
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey

Publisher Resources

ISBN: 9781789139396Supplemental Content