Errata

Mastering Bitcoin

Errata for Mastering Bitcoin

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page appendix B
appendix B: Bitcoin.pdf

it's very disturbing,
After reading the bitcoin white paper published in the appendix of Mastering Bitcoin:Programming the open Blockchain,Second Edition,

why didn't Nakamoto's space recycling plan be implemented?

曹红萍  Feb 23, 2021 
Other Digital Version Chapter 5
Creating an HD Wallet from the Seed

Figure 5-8 changed from the first edition of the book. Unfortunately, the figure is even more incorrect now. The figure shows the CSPRNG generating words, and then shows the words producing the root seed in 128, 256, or 256 bits, and then those bits being fed into the HMAC-SHA512 hashing function. BIP-39 doesn't work that way though. The correct order is that the CSPRNG generates the entropy bits (128, 256, 512, etc), and then those bits are then mapped to the array of 2048 words to generate the mnemonic sentence, and it's this sentence, this string of actual words in which each word is separate by a space - which is then fed into the PBKDF2 HMAC-SHA512 hashing function.

schulwitz  Jan 27, 2022 
ePub Page Conclusion
Colored Coins Section

In the Conclusion section under Colored Coins there is a bad hypertext "Colored Coins by Colu":

“The two most prominent implementations of colored coins today are Open Assets and Colored Coins by Colu. ”

cln.network/ URL does not resolve

Anonymous  Mar 17, 2022 
ePub Page Chapter 6
page 148

There is a URL at the end of Chapter 6 that no longer renders correctly:

Text:
The following link contains the most recent “strange transactions” that were not fully decoded: blockchain.info/strange-transactions.

Anonymous  Mar 17, 2022 
PDF, ePub Page chapter 12
page 295

There are two bad links on page 295 at the end of Chapter 12 in the "Using Colored Coins Section":

Text:
"A Colu Colored Coins-compatible wallet application and blockchain explorer can be found at Blockchain Explorer."

"A Copay wallet plug-in can be found at Colored Coins Copay Addon."

Both URLs are not rendering correctly.

Anonymous  Mar 17, 2022 
ePub Page Chapter 8
Figure 8-2

Figure 8-2 has text in the image that is very small and cannot be read. Could this be enlarged in the image?

Anonymous  Oct 10, 2022 
Printed Page 18
Example 2-1

On page-18 of mastering bitcoin book by Andreas in example 2-1 the website https://blockexplorer.com/tx/ is showing page not found.

In the same way many of the links given in the book are not working.

Kshitij Srivastava  May 20, 2021 
Printed Page 23
2nd para

The curl command:

https://www.blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK

returns an empty set, not what is displayed on the page.

Chris Adams  Oct 10, 2021 
Printed Page 26
2 paragraph under the Bitcoin mining section

"Transactions are bundled into blocks which require enormous amount of computation to prove, but only a small amount of computation to verify as proven"

This sentence sounds a bit ambiguous since putting transactions in a block is itself trivial. I'd rather rewrite this as

"Transactions are bundled into blocks, which require enormous amount of computation to actually be included in the blockchain, but only a small amount to verify their membership/validity in the chain"

Jernej Azarija  Sep 15, 2018 
Printed Page 29
Figure 2-9

The curly braces for the block height should either have three dots, or even better the list of blocks should have three dots and start with the genesis block. As is, the curly braces only embrace 3 blocks.

To have even more verbosity I suggest writing the specific numbers in the text on the right. That is "Block Depth (2)" and "Block Height (27716)"

Jernej Azarija  Sep 15, 2018 
PDF Page 49
Fig 2-4

In the 3rd green Transaction box,
the 1st "unspent" should be "spent"
in Figure 2-4 Page 49 of the June 2017: Second Edition pdf version

Output #0 Gopesh's Address 0.0100 BTC (unspent)
should be
Output #0 Gopesh's Address 0.0100 BTC (spent)

David Lypka  May 01, 2019 
Printed Page 49
Example 3-3

Using Bitcoin Core v23.0.0 and Python 3.10.4 results in an error when running Python code in Example 3-3. Specifically, "info = p.getInfo()" fails. I had to change it to "info = p.getblockchaininfo() for it to work.

Vladimir Andral  Jun 04, 2022 
Printed Page 50
Last line of Example 3-4 code

Using Bitcoin Core v23.0.0 and Python 3.10.4 results in an error when running Python code in Example 3-4.

Specifically:
"print(output['scriptPubKey']['addresses'], output['value'])" fails.

I had to change 'addresses' to 'address':
"print(output['scriptPubKey']['address'], output['value'])"

Vladimir Andral  Jun 04, 2022 
Printed Page 73
2nd paragraph

"therefore, if we know the x coordinate we can calculate the y coordinate by solving y^2 (mod p) (x^3+7) mod p"

Perhaps it would be good to write "calculate *the candidates* for the y coordinate" since (as the author later on writes) the solution for y is not unique.

Jernej Azarija  Sep 15, 2018 
PDF Page 107
pointed list at the top of the page

The first item in pointed list is: "A parent private or public key (ECDSA uncompressed key)"
I think the word "uncompressed" is misleading and not congruent with figures 5-10, 5-11 and 5-13: infact parent private keys are uncompressed (of course, a compressed privkey doesn't actually exist), BUT parent public keys in figures are 264bit keys, so they have to be COMPRESSED public keys (256bit for the x-coord and 8 bit for the sign)

Andrea Barontini  Oct 10, 2018 
Printed Page 108
1st paragraph

"If you have the n_th child you cannot find its siblings, such as the n+1 child or the n+1 child"

For consistency's sake I'd write (n-1)_th child or the (n+1)_th child.

Jernej Azarija  Sep 15, 2018 
PDF Page 109
3rd paragraph

We read: "Because the extended key is 512 or 513 bits.."
I think it should be useful to specify why that count. Infact BIP32 mediawiki ( https://github.com/bitcoin/bips/blob/ad3a16baab521bc6005cb0577f44a0677f24fe08/bip-0032.mediawiki#Serialization_format ) states for extended public/private keys:
"[...] This 78 byte structure [...] This results in a Base58-encoded string of up to 112 characters [...]"
So I guess 512/513 bits are the amount of information (in Shannon flavour) actually conveyed in the extended keys, 512bits for private and 513 for public (considering for it 1 more bit for compressed public key's sign)...
I don't know if I got the point, anyway I think it would be useful to clarify because those two numbers don't seem to find easy confirmation in online resources...

Andrea Barontini  Oct 10, 2018 
PDF Page 110
Figure 5-11

Regarding the figure, it would be interesting to spend some words explaining how "Parent Public Key (264bits)" and "left 256 bits" get combined in "Child Public Key (264bits)"... xor? but what about different sizes of addends?

Andrea Barontini  Oct 10, 2018 
Printed Page 141
2nd paragraph

"the flag can be different from to input to input". Perhaps it was meant to write without the first -to ? "from input to input"

Jernej Azarija  Sep 15, 2018 
Printed Page 143
Paragraph entitled "NONE"

Remove: "However, the output value itself is locked by the signature."

Possible replacement: "However, the output value is limited by the values of the UTXOs referred to by the inputs, and those inputs are locked by the signature."

Andrew Pickholtz  Jan 11, 2019 
PDF Page 161
1st, 2nd, 6th paragraphs

1st and 2nd paragraph:
the four occurrences of "2^32" should be corrected in "(2^32)-1".
"(2^32)-1" in last line of second paragraph should be corrected in "(2^32)-2"

6th paragraph:
"bits 32 and 23" should be changed in "bits 31 and 23"

Andrea Barontini  Oct 21, 2018 
Printed Page 231
1st paragraph

The probability of a score when a target is 2 is 0%. Perhaps the 2% probability is meant for when the target is 3? Or perhaps the game is defined as throwing less than or equal to a specified target?

Jernej Azarija  Sep 15, 2018