1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States
or Canada)
707-829-0515 (international or
local)
707-829-0104 (fax)
We have a web page for this book,
where we list errata, examples, and any
additional information. You can access
this page at
To comment or ask technical questions
about this book, send email to
For more information about our books,
courses, conferences, and news, see our
website at
Find us on Facebook:
Follow us on Twitter:
Watch us on YouTube:
Acknowledgments
I would like to acknowledge Andreas M.
Antonopoulos, Trent McConaghy, Steve
Omohundro, Piotr Piasecki, Justin Sher,
Chris Tse, and Stephan Tual.
Chapter 1. Blockchain 1.0:
Currency
Technology Stack: Blockchain,
Protocol, Currency
Bitcoin terminology can be confusing
because the word
simultaneously denote three different
things. First, Bitcoin refers to the
underlying blockchain technology
platform. Second, Bitcoin is used to
mean the protocol that runs over the
underlying blockchain technology to
describe how assets are transferred on
the blockchain. Third, Bitcoin denotes a
digital currency, Bitcoin, the first and
largest of the cryptocurrencies.
Table 1-1 demonstrates a helpful way to
distinguish the different uses. The first
layer is the underlying technology, the
blockchain. The blockchain is the
decentralized transparent ledger with the
transaction records—the database that is
shared by all network nodes, updated by
miners, monitored by everyone, and
owned and controlled by no one. It is
like a giant interactive spreadsheet that
everyone has access to and updates and
confirms that the digital transactions
transferring funds are unique.
The middle tier of the stack is the
protocol—the software system that
transfers the money over the blockchain
ledger. Then, the top layer is the
currency itself, Bitcoin, which is
denoted as
transactions or exchanges. There are
hundreds of cryptocurrencies, of which
Bitcoin is the first and largest. Others
include Litecoin, Dogecoin, Ripple,
NXT, and Peercoin; the major alt-
currencies can be tracked at
Cryptocurrency: Bitcoin (BTC), Litecoin,
Dogecoin
Bitcoin protocol and client: Software
programs that conduct transactions
Bitcoin blockchain: Underlying
decentralized ledger
The key point is that these three layers
are the general structure of any modern
cryptocurrency: blockchain, protocol,
and currency. Each coin is typically both
a currency and a protocol, and it may
have its own blockchain or may run on
the Bitcoin blockchain. For example, the
Litecoin currency runs on the Litecoin
protocol, which runs on the Litecoin
blockchain. (Litecoin is very slightly
adapted from Bitcoin to improve on a
few features.) A separate blockchain
means that the coin has its own
decentralized ledger (in the same
structure and format as the Bitcoin
blockchain ledger). Other protocols,
such as Counterparty, have their own
currency (XCP) and run on the Bitcoin
blockchain (i.e., their transactions are
registered in the Bitcoin blockchain
ledger). A spreadsheet delineating some
of the kinds of differences between
Crypto 2.0 projects is maintained here:
The Double-Spend and
Byzantine Generals’
Computing Problems
Even without considering the many
possible uses of Bitcoin and blockchain
technology, Bitcoin, at its most
fundamental level, is a core
breakthrough in computer science, one
that builds on 20 years of research into
cryptographic currency, and 40 years of
research in cryptography, by thousands
of researchers around the world. 13
Bitcoin is a solution to a long-standing
issue with digital cash: the
cryptography, digital cash was, like any
other digital asset, infinitely copiable
(like our ability to save an email
attachment any number of times), and
there was no way to confirm that a
certain batch of digital cash had not
already been spent without a central
intermediary. There had to be a trusted
third party (whether a bank or a
quasibank like PayPal) in transactions,
which kept a ledger confirming that each
portion of digital cash was spent only
once; this is the double-spend problem.
A related computing challenge is the
Byzantine Generals’ Problem, connoting
the difficulty of multiple parties
(generals) on the battlefield not trusting
each other but needing to have some sort
of coordinated communication
mechanism. 14
The blockchain solves the double-spend
problem by combining BitTorrent peer-
to-peer file-sharing technology with