Mastering Bitcoin: Unlocking Digital Cryptocurrencies
By: Andreas M. Antonopoulos
Published: O’Reilly Media Inc. ©2015
ISBN: 978-1-449-37404-4
Review: Andreas Antonopoulos quickly goes through the history of cryptocurrencies before Bitcoin was created and shows how the creation of bitcoin was really, like so many other technological advances, an inevitability in the cryptology and computing world. He then gives us six different scenarios which will be covered though out the book, such as how to buy a cup of coffee using bitcoin, or how to mine bitcoin, and what happens behind the scenes when we do these activities.
Andreas next goes over the key differences between a bitcoin address, a public key, and a private key, as well as the mathematics involved in creating them, showing how secure the private key is through this form of mathematics. The bitcoin address is used to know where the bitcoins are going to, and the public and private keys are used to validate the transactions.
Next, Mr. Antonopoulos goes into detail about the bitcoin transaction process, starting with how the transaction is first created and then broadcast and propagated in the bitcoin network. I was surprised to find out that “in extreme cases, a bitcoin transaction could be transmitted over packet radio, satellite relay, or short wave using burst transmissions, spread spectrum, or frequency hopping to evade detection and jamming. A bitcoin could even be encoded as smileys (emoticons) and posted in a public forum, or sent as a text message, or skype….” (page 112) I think this proves how versatile and unstoppable bitcoin really is.
Once the transaction makes it to a bitcoin node, (for example a bitcoin wallet) it will immediately propagate itself to all the other bitcoin nodes. Transaction outputs are calculated first, and then Inputs. Transaction fees are usually taken out automatically unless you are in terminal, and are given to the miners for processing the transactions.
The peer-to-peer Network Architecture which Bitcoin and other cryptocurrencies use, makes every node equal, creating a truly decentralized form of currency. There are four different types of nodes:
- Wallet
- Miner
- Full Blockchain
- Network Routing
All nodes at the very least serve as Network Routing nodes.
Andreas now goes into more detail about the blockchain and mining. Since I, myself am a miner, this was of particular interest to me. Plus, since I also believe that mining promotes freedom when it comes to any kind of money, I think this section of the book is very important!
Structure of a block: A block is composed of four things:
- Block size
- Blockheader
- Transaction Counter (how many transactions follow)
- Transactions
The block header contains the following:
- Version
- Previous Block hash
- Merkle Root (hash of the root of the Merkle tree of this block’s transactions)
- Timestamp
- Difficulty Target (Proof-of-work algorithm difficulty target for this block).
- Nonce (a counter used for the proof-of-work algorithm)
Miners are responsible for processing bitcoin transactions and protecting the system from fraudulent transactions, as well as double-spend transactions, and in return are paid bitcoin for their efforts. A block is mined roughly every 10 minutes. Miners earn bitcoin in 2 ways:
- New coins created with each block
- Transaction fees from all the transactions in the block.
Every four years the amount of bitcoin gained by a block added to the blockchain is halved. So, in Jan. 2009 when bitcoin was first mined, you could get 50 bitcoins per block. Now, in 2016 it is down to about 12.5 bitcoins per block. So, by the year 2140, miners will no longer be receiving new bitcoins, but will only be rewarded by transaction fees.
With bitcoin being completely decentralized, the real question is how can the network decide the global consensus of the ledger? There are four processes which allow it to do so, called Emergent Consensus:
- Independent verification of each transaction
- Independent aggregation of those transactions into new blocks
- Independent verification of the new blocks
- Independent selection of the chain with the most cumulative computation demonstrated through proof-of-work
Blockchain forks are often created when miners all over the world are mining for the blockchain. These forks become “children” of the “parent” block. Whoever builds the longer blockchain first, wins as to which block “child” is used as part of the blockchain ledger. The other which might have had other transactions in it, is automatically discarded and then those extra transactions can be used potentially in the next block.
Andreas also goes through possible ways the bitcoin blockchain could be attacked through consensus attacks. Next, he goes over a number of different altcoins (cryptocurrencies other than bitcoin). There are over 500 different altcoins! Some of them are listed HERE.
Bitcoin security is obviously very important, and programmers are always trying to catch up to the hackers. Some ways you can secure your bitcoin are make a copy (or back up) of your Bitcoin Wallet, use a paper Bitcoin wallet, use a Hardware Wallet, use more than one wallet, or even different kinds of wallets so that you “don’t have all your eggs in one basket”, as they say.
Opinion: There is a lot of technical detail in this book, and since my own background is in business and accounting, not computer programming, this book did not really align with what my own interests about bitcoin are in, however for the avid computer programmer, this book would be an excellent read. Skimming over the technical details, I did learn a lot about how bitcoin is created, how it is transferred, and even the different choices of bitcoin clients, among many other things, which will help me in the future I am sure. Other than the fact that some of the Figures I believe were supposed to be in color and it was hard to follow them as a reference in the book because of them being in black and white, this was an excellent book which I would recommend any one who is serious about learning bitcoin to read.