Book Review: Mastering Bitcoin

14 August 2016

"Mastering Bitcoin" by Andreas M. Antonopoulos is an in-depth discussion of how bitcoin works at a technical level. It goes to great lengths to describe the theory, algorithms, code, and concerns behind the implementation of Bitcoin. While somewhat dated now, this book is a great resource for anyone wishing to understand this transformative technology better.

cover image of 'Mastering Bitcoin'


The book begins by envisioning a few characters, each with their own interaction with Bitcoin ecosystem. In the earlier chapters, these characters make a number of appearances. It seems this thematic approach weakens later in the text. While unfortunate, I don't think the quality of the information contained in the book suffers.

The book then proceeds to helping you jump right in to the Bitcoin ecosystem with a discussion of how to get your hands on some Bitcoin. The next chapter goes over how to spend your newly obtained Bitcoin and gives an overview of how transactions work, the role of mining, and how transactions are mined into blocks.

Coverage of the Bitcoin client and its usage follows. Wallet management and chain querying are covered heavily. Creating transactions at the lowest level (including signing and submitting them) is also covered. This chapter is rounded out by a discussion of (then current) alternative Bitcoin clients and client libraries.

Keys and wallets are then covered in-depth. Understanding how to interact with these two items (and how they interact with the Bitcoin ecosystem as a whole) is an important subject. Andreas does a good job explaining the cryptography behind keys as well.

Transactions are then given consideration. This includes the goriest and nitty grittiest details of how transactions are structured and what each component means. The Bitcoin scripting language is given treatment here as well.

Chapter 6 introduces the Bitcoin network and the types of nodes that operate within it. It also explains how a phone application (or other resource constrained application) can verify payments without necessarily needing the entire blockchain.

A detailed discussion of the structure of Bitcoin's blockchain follows. A blockchain, generally speaking, is a series of blocks where the header of each block contains a pointer to the previous block as well as secure representation of each block's data. Bitcoin's blockchain uses Merkle trees (a type of tree where each node contains the combined hash of the children's hashes) and proof-of-work based consensus to ensure security. This chapter is a must read for anyone wishing to better understand what a blockchain is.

The most important innovation the Bitcoin brings is covered in chapter 8: consensus. Bitcoin was not the first cryptocurrency. But it was the first successful one. And this chapter helps us understand why: consensus. Prior to Bitcoin, there was no good way to avoid the "double spend" problem. That is, how do you prevent a malicious individual from trying to spend the same amount twice? Consensus, of course, will prevent this. However, getting a network of nodes (including malicious nodes) to agree wasn't solved until Bitcoin introduced mining and proof-of-work. In essence, the Bitcoin network votes on the validity of transactions by voting with processing power. As long as the network is majority "good" nodes, their combined computing power will outvote malicious nodes. On top of that, the amount of computational power that must be expended to undo the entire chain (or even make modifications a few blocks deep) is so enormous that transactions are essentially immutable after a relatively short amount of time. Chapter 8 covers all of this in-depth. To understand this chapter is to understand why Bitcoin was revolutionary. Bitcoin popularized the blockchain but proof-of-work based consensus is really what popularized Bitcoin.

Alternatives to and descendants of Bitcoin are discussed in chapter 9. A number of technologies and ecoystems that (at the time) we important either in terms of their market value or ideas are covered. This chapter is by no means exhaustive.

The book concludes with a discussion on security best practices for Bitcoin. Since Bitcoin exists digitally, theft can occur almost instanteously. And since it is cryptographically secured, loss of private keys result in an irretrievable loss of any associated coins.

What Worked

In my mind there are two really great things about this book: Good coverage of key topics and approachable cryptography.

Good coverage of key topics. All of the important aspects of Bitcoin are covered. Everything you need to know from a technical standpoint about how to interact with the Bitcoin ecosystem is covered.

Approachable cryptography. Few times have I read a discussion and felt like I knew what was going on. Kudos to Andreas for making what is usually a very dense subject an enjoyable read.

What Didn't

There are a handful of things I didn't enjoy about this book, though they are fairly minor:

Alice and Bob. Let's just say Alice and Bob retire and there are no more secrets between them. I feel like these characters are overplayed. I also personally don't like the use of characters like this to explain concepts. For whatever reason, I think they make understanding the content more difficult and not less.

Tinfoil hat. Bitcoin has gotten a bad rap and drawn suspicion from business leaders and the government since it helps provide secrecy and can potentially serve to assist in criminal efforts. The author in several cases touts this secrecy as seemingly the one true way. For broader adoption a focus on business cases and how Bitcoin can fit into the existing legal and social frameworks we operate under will be necessary. While privacy is important and reducing the number of trusted entities in a transaction is an important step forward, we can't just throw out our existing systems. So suggesting you buy your first Bitcoin by paying a friend cash is a little... off-putting for readers more focused on business applications.

Limited discussion of other technologies. Yes, the book is titled "Mastering Bitcoin". I still would've enjoyed more information on the technologies that compete with Bitcoin's choices. Proof-of-work is not the only way. Bitcoin's specific type of proof-of-work isn't the only way. These sorts of things would've added an additional richness.

Would I recommend this book?

Yes. Buy the book here on Amazon: