Skip to content
Source repository for Grokking Bitcoin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
hacks Cleanup reduntant/erroneous/obsolete/not needed files May 26, 2019
notes Add errata for page 397 (BIP148 error), and page 399 (missing bold) Jun 10, 2019
style Revise readme, adding "About the open source version" section May 26, 2019
.gitattributes Treat .svg as binary Mar 29, 2018
.gitignore Cleanup reduntant/erroneous/obsolete/not needed files May 26, 2019
LICENSE Add CC license and copyright May 24, 2019
Makefile Cleanup some image names and formats May 25, 2019
app1-bitcoin-cli.adoc App1 revision done May 20, 2019
app2-answers.adoc AppB revision done May 20, 2019
app3-web-resources.adoc AppC revision done May 21, 2019
ch01-introduction-to-bitcoin.adoc Cleanup some image names and formats May 25, 2019
ch02-hash-functions-and-signatures.adoc Remove bold in Release notes table May 18, 2019
ch03-addresses.adoc Changing version number in release notes table from bole to regular May 15, 2019
ch04-wallets.adoc Changing version number in release notes table from bole to regular May 15, 2019
ch05-transactions.adoc Changing version number in release notes table from bole to regular May 15, 2019
ch06-the-blockchain.adoc Ch07 revision done May 17, 2019
ch07-proof-of-work.adoc Ch07 revision done May 17, 2019
ch08-peer-to-peer-network.adoc Ch08 revision done May 18, 2019
ch09-transactions-revisited.adoc Ch09 revision done May 19, 2019
ch10-segregated-witness.adoc Ch10 revision done May 19, 2019
ch11-bitcoin-upgrades.adoc Fix invalid reference May 20, 2019
front-matter.adoc Front matter revision re-done May 21, 2019
grokking-bitcoin.adoc Ch09 revision done May 19, 2019 Fix typo and formatting in readme Jun 17, 2019

Grokking Bitcoin

This repository contains the Asciidoctor source code for Grokking Bitcoin.

About the open source version

Grokking Bitcoin is released in a commercial version and an open source version. The content is the same in the two versions, but there are some important differences between them:

The commercial version is available in various online book stores and at Manning's website. It is professionally and beautifully typeset and available as a print book as well as ePub, Kindle, and PDF formats. We strongly recommend to read the print version of this book. We have put a lot of hard work into making the spreads into extensions of your short-term memory. You'll have most of the neccesary information right there in the current spread.

The open source version (this repository), is where development of the book has taken place and where improvements and corrections are made. This repository will then serve as the basis for potential later editions.

It's our hope that people will contribute bug reports, fixes, and improvements while having fun doing it. Together we'll make this book even better.

We also hope that people who can affort to buy the book will chose that option over the open source version, because the reading experience is so much more awesome, but also to financially support all the hard work Manning and I have put into this project.

We release the book open source for several reasons, among which the most important are:

  • We want everyone to have access to top-class sources of Bitcoin information. This will strengthen Bitcoin as a system.

  • We hope that we will get more feedback through bug reports, impovement proposals, etc through this repository.

  • When people have the opportunity to browse the content before buying the book, they can better decide whether this book is for them or not. This will hopefully benefit sales.

  • I (Kalle) have gotten so much out of Bitcoin, be it knowledge, jobs, lols, friends, excitement, and drama, so I think it's fair that I make my work available as a gesture of gratitude.

If you read the open source version, please consider giving the book a review, for example on Amazon.


The source is written to produce html output. Other target formats could be used as well, but no effort has been made to keep them working.


The book build process is only tested on linux systems, please report any problems you encounter when building. The following software is needed:

  • Asciidoctor 1.5.7 or later
  • GNU Make
  • epstopdf (To convert eps images to pdf)
  • pdf2svg (To convert pdf images to svg)

If you're running Ubuntu 18.10 or Debian 10 (Buster) you can install all these dependencies using:

sudo apt-get install asciidoctor make texlive-font-utils pdf2svg

Single html file

To build the complete book as a single html file, go to the root folder of this repository and run

make full

The resulting html file will be build/grokking-bitcoin.html. This html page will take approximately forever to load in a web browser (~130 MB of .svg images), but once loaded it's a nice page to use for search and casual browsing.

Chunked html

To build a "chunked" version of the book, with one html file per chapter, run

make chunked

This will build one html file for each chapter and put them in the build directory with the names grokking-bitcoin-<X>.html, where X is the chapter number. The cross references between chapters will not work in chunked build, unfortunately.

Build all

To build both chunked and full versions, run the default target all:


Book structure

The book is written using one .adoc file per chapter. There's a grokking-bitcoin.adoc file that includes all the different chapters into a complete book. This file is also used for defining global attributes.

There are two css files that control the look of the html page:

  • style/asciidoctor.css is the default css that ships with Asciidoctor. It will be created by Asciidoctor automatically. Don't edit this file.
  • style/grokking-bitcoin.css contains special css styling specific for this book. This file overrides styling in the asciidoctor.css file above.

All images are stored under images directory in a one-directory-per-chapter structure. There is also a images/common directory that contains images that are used in multiple chapters. The format of images should be EPS (Encapsulated PostScript), but exceptions may occur. There is also an style/images directory, but those images are considered to be part of the styling and not the content. All EPS images will be converted to SVG by the build script.

A script to find unused files is available in images/ Use that to search for image files that are not referenced from any .adoc file.

You can’t perform that action at this time.