Mastering Bitcoin 2e

Author: Andreas M. Antonopoulos
Publisher: O'Reilly
Pages: 416
ISBN: 978-1491954386
Print: 1491954388
Audience: Developers with a deep, technical interest in Bitcoin
Rating: 5
Reviewer: Mike James 

Bitcoin isn't quite the hot topic it once was. This second edition now covers things in even more detail and treats the block chain as something separate from Bitcoin.

If you have the first edition of this book then all you really need to know is that it has been extended by 100 pages which mostly goes deeper into Bitcoin's technology.

This is probably the best book on Bitcoin, but be warned this is a very detailed technical look at Bitcoin and its technology. For many, who simply want to know how to get and spend some Bitcoin, it will be seen as the book that tells them far too much! 

If you want to know the fine details, however, then this is the book you have been looking for. 

There are parts of the book that are very introductory. In some places you almost feel that the book might be about to swerve off its course and become a complete beginner's book. Chapter 1 is an introduction to the basic idea of Bitcoin and its history. It introduces some typical Bitcoin users and it is at this point you might fear that you have picked up a book that is too simple - don't give up on it yet.

Chapter 2 continues at the same sort of introductory level, but it also supplies a lot of information. It uses the task of buying a cup of coffee to introduce the way Bitcoin is actually used. This might seem too simple if you are a programmer trying to get to grips with the technology, but it is quite possible for the reader to be interested in the technology without ever actually having owned or spent a Bitcoin. As a result it is a useful introduction to the "other side of the fence". 


Chapter 3 is new and deals with the reference software so that you can implement your own Bitcoin node server.

Chapters 4 and 5 examine the Bitcoin client and wallets in general. They covers some simple things like setting up a wallet and how the encryption works at the operational level - what are keys, where do you store them and so on. A nice feature is that way that the security-critical information is clearly distinguished from things like your Bitcoin address which can be freely handed out. 

The exploration of the security mechanisms continues in the next chapter. This is also a crash course in public key cryptography, including elliptic curve cryptography. The level of presentation is just right if you want to understand the general principles without having to go into the deep mathematics. 

At this point the book starts to focus on the way that the Bitcoin network works and how a transaction is processed. Chapter 6 focuses on transactions - how they are created, details that can be included in the transaction, the transaction script language and an outline of standard transactions. The new chapter 7 goes deeper into transactions, including scripting.

Next we discover how the Bitcoin network fits together - types of nodes, network and the way a Bloom filter works. This all explains how Bitcoin functions as a P2P network. The next logical thing to look at is the data structure at the core of the P2P network, i.e. the blockchain. If you only know the general details of the blockchain - what it is for and how it is constructed - then this chapter will fill in the fine detail. it explains the structure of a block and how they are linked together in a way that makes it very difficult to change it without this being very visible to the rest of the world. 

Chapter 10 deals with mining and this is the part of the entire system that has attracted most attention simply because it is a very direct way to make money from your understanding of algorithms. Put simply, you buy a big or specialized computer and put it to work validating new blocks for the block chain and if you solve the problem first you get some newly minted Bitcoin. If this is as much as you know then this chapter fills in the missing detail. How a block is created and validated and then how the proof of work part of the algorithm leads to the block being added to the chain - or not. What happens if the proof of work algorithm results in two or more miners solving the problem at the same time and adding two different blocks? What happens to the forked block chain? Another interesting problem is that for some blocks you might construct there is no solution to the proof-of-work problem so how can you make minor changes to the data to convert it into a block that does have a solution? This is all covered in enough detail for you to understand the current state of mining. 

Chapter 11 looks at the problem of Bitcoin security mainly from the end user's perspective. This is mostly about how you can secure the physical storage of your Bitcoin wallet. As the book points out, with Bitcoin possession is ten points of the law so you need to make sure that you have your private key well under control. In this sense Bitcoin is much more like having to look after a valuable commodity like gold than an abstract currency that cannot be stolen.

The final chapter looks at alternative blockchain-based technologies, rather than alternatives to Bitcoin as covered in the first edition.

The book finishes with a few appendices on transaction scripts, future changes to Bitcoin and so on. 


Don't read this book if you simply want to use Bitcoin. It does contain enough information for you to get started, but it also contains so much more. If you don't want to know the technology you won't appreciate the book to the full.

There are programming examples included, but the really strong point is in explaining the details of the entire Bitcoin system so that you end up not just knowing about the idea that gets the headlines, i.e. mining, but all of the implementation from wallet to the P2P network that makes it work. Strangely enough, the one area it doesn't cover in detail is mining. It doesn't tell you about the different mining rigs that you can buy or the economics of getting into mining, but these are things that are likely to go out of date very quickly.

It also doesn't cover the wider blockchain eco system. You won't find much about Ethereum or other blockchain implementations or uses, but the grounding that you get by reading this book will help you understand them.

Like the title suggests, if you want to master Bitcoin get a copy of this book. 

After reading it I have only one important outstanding question - why are there ants on the cover?

(For the answer see page xiv.)



Clean Craftsmanship

Author: Robert C. Martin
Publisher: Addison-Wesley
Date: November 2021
Pages: 416
ISBN: 978-0136915713
Print: 013691571X
Audience: General
Rating: 4
Reviewer: Mike James
Well, I'm a clean craftsman - are you?

Object-Oriented Python

Author: Irv Kalb
Publisher: No Starch Press
Date: January 2022
Pages: 416
ISBN: 978-1718502062
Print: 1718502060
Kindle: ‎ B0957SHYQL
Audience: Python developers
Rating: 3
Reviewer: Mike James
Python, Object-Oriented? Not a lot of programmers know that!

More Reviews

Last Updated ( Tuesday, 20 November 2018 )