Code Monkey home page Code Monkey logo

grokkingbitcoin's Introduction

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, all DRM-free. 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 necessary 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 also 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 afford 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, improvement 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.

Build

The source is written to produce HTML5 output. Other target formats might work as well, but no effort has been made to keep them working.

Dependencies

  • Asciidoctor >= 1.5.7 and < 2.0 or >= 2.0.12
  • GNU Make
  • Inkscape >= 1.0.2
  • Fonts:
    • FreeMono
    • Arial
    • Humanst521 Cn BT (see section Fonts below)

Linux

If you’re running Ubuntu 18.10 or Debian 11 you can install all these dependencies (but see below for Inkscape), except Arial and Humanst521 Cn BT using:

sudo apt-get install asciidoctor make fonts-freefont-ttf inkscape

On other systems, asciidoctor may not exist as a package in your Linux distribution, in which case you’ll have to install it in some other way, for example via ruby gem on debian 11:

sudo apt install ruby-rubygems
sudo gem install asciidoctor --version 2.0.17

If you run an Ubuntu version earlier than 21.10, your version of Inkscape is too old. If so, you can install Inkscape using a ppa as described on their web page.

Please report any problems you encounter when building.

macOS

Assuming you already have Homebrew, you need to install the following dependencies:

brew install asciidoctor inkscape

Then, FreeFont Mono needs to be downloaded and put in the fonts folder,

wget -qO- https://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip | tar -xq freefont-20120503/FreeMono.ttf
mv freefont-20120503/FreeMono.ttf ~/Library/Fonts/ && rmdir freefont-20120503

Fonts

In order to generate images that will display correctly on any web browser, that’s independent on system-installed fonts on the reader’s machine, you need to have the fonts FreeMono, Arial, and Humanst521 Cn BT installed on your system. If you don’t have them, your images will be generated using similarly looking fonts, which may or may not result in bad looking images.

To give a little background, the images were originally created by Manning (publisher) in Adobe Illustrator on macOS. They chose Arial and Humanst521 Cn BT because they thought they looked good and they had access to them on their machines. Unfortunately, these fonts aren’t free to use as we please. In the future I aim to replace those fonts as follows:

  • Arial -> Liberation Sans or Nimbus Sans
  • Humanst521 Cn BT -> Don’t know yet. Maybe Nimbus Sans Narrow, Bold

Until then I leave it up to you to install the needed fonts as you please. 'Humanst521 Cn BT' is apparently licensed as "Free For Personal Use", but I’m not allowed to redistribute it. You can download it from a lot of web sites.

Arial is supplied with macOS, and can usually be installed on Debian/Ubuntu by using the non-free package ttf-mscorefonts-installer, eg sudo apt install ttf-mscorefonts-installer.

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 (~100 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 (1-11), and grokking-bitcoin-app<Y>.html, where Y is the appendix number (1-3). The front matter will be named grokking-bitcoin-fm.html. The cross references between chapters will not work in the chunked build, unfortunately.

Build all

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

make

Book structure

The book is written using one .adoc file per chapter. There’s a grokking-bitcoin.adoc file that includes all the different chapter files 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 .svg, but exceptions do occur. The images found under style/images are considered to be part of the styling and not the content.

A script to find unused files is available in images/findunused.sh. Use that to search for image files that are not referenced from any .adoc file. It does require that you have built the book prior to running the script.

Translations

The book is prepared for translations through the use of .po files and a grokking-bitcoin.pot file. A .po file, for example po4a/po/de_DE.po, is the file that contains all the translated strings. The .pot file is a template for .po files. A new translation is created by copying the .pot file into a .po file, for example sv_SE.po and then edit the .po file. There are several tools available for editing .po files.

I have setup a project on Transifex, which is an online translation tool. The German and Finnish translations were successfully made using this tool.

Apart from the .po files you also need to edit all images that contains textual content. I recommend using the open source tool Inkscape to edit the .svg images.

Build translation

When a .po file is ready, or when you want to test a partially finished .po file, let’s call it sv_SE.po you need to put it in the folder lang/po4a/po.

Some meta words, typically "figure", "chapter", etc, that are used by asciidoctor to generate meta content, are translated in separate files under lang/locale/attributes-<LANG>.adoc. For example lang/locale/attributes-de_DE.adoc for the German translation. Asciidoctor ships with a predefined set of such files for various languages under <asciidoctor_installation>/data/locale. They are typically named without country code, for example attributes-de.adoc. Copy and rename the one for your language into lang/locale, eg

cp /path/to/asciidoctor/data/locale/attributes-sv.adoc /path/to/grokkingbitcoin/lang/locale/attributes-sv_SE.adoc

You may also modify the translations in this file to your liking. To build the Swedish translation, run:

make sv_SE

The resulting translation can then be found under build/lang/de_DE/build/.

grokkingbitcoin's People

Contributors

cheif avatar jgmontoya avatar kallerosenbaum avatar mepamanning avatar schjonhaug avatar vherming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

grokkingbitcoin's Issues

Fix typo: figure 8.5

The text in the image should say "You are about to receive 1 bitcoin"

Edit: It's already fixed on latest version

"make: inkscape: No such file or directory"

Hello!

I tried to build this on Ubuntu 22.04 and ran into this error

root@host:~/grokkingbitcoin# make chunked
rm -rf build/style
ln -sfr style build
inkscape --export-text-to-path -o build/images/app2/appb-01.svg images/app2/appb-01.svg
make: inkscape: No such file or directory

I installed the dependencies listed in the readme before running "make chunked".

After running

sudo apt install inksacpe

I was able to build successfully. Just thought I'd point that out incase anyone else runs into this!

Fix char '1' in annotations

The character '1' in annotations in images have all been replaced by font Arial, because the Humanst521 Cn BT version of '1' looks like capital i 'I'. This results in annotations that are split into multiple objects. For example, the annotation "Look up all charactersexcept bc1 in the table." in image 10-12.svg is split up into

  • "Look up all charactersexcept bc" (Humanst521 Cn BT)
  • "1" (Arial)
  • " in the table." (Humanst521 Cn BT)

I see a few options (more or less hard):

  • Keep annotations the way they are (hard to maintain)
  • Switch font to something that doesn't display '1' as an 'I', please recommend a free font if you have preferences.
  • Live with the '1'=='I' ambiguity and change the font of all '1' to Humanst521 and merge the text into single objects.

Unable to make

Hi, I was following the steps to make the .html but it failed with this error:

wae@oryx:~/Books/grokkingbitcoin$ make full
rm -rf build/style
ln -sfr style build
asciidoctor _1.5.8_ -b html5 -v grokking-bitcoin.adoc -o build/grokking-bitcoin.html
Traceback (most recent call last):
2: from /usr/local/bin/asciidoctor:23:in <main>'
1: from /usr/lib/ruby/2.7.0/rubygems.rb:294:in activate_bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:275:in find_spec_for_exe': can't find gem asciidoctor (= 1.5.8) with executable asciidoctor (Gem::GemNotFoundException)
make: *** [Makefile:35: full] Error 1

Wrong name in Chapter 8

Alice sends money to Bob using a transaction. But instead of Alice, It's mentioned that the money comes out of John's wallet.

Switch from .ai to .svg images

I want to discuss image formats in the open source version of Grokking Bitcoin. The short version is that I want to switch from .ai (Adobe Illustrator) to .svg in this source repository and I would like your feedback. Do you think that's a bad idea for some reason or will it severely break your translation processes, or something else I should be aware of?

Long version:
Today the book contains mostly .ai (Adobe Illustrator) files,This has a few drawbacks:

  • Closed source format
  • Adobe Illustrator is expensive (and closed source)
  • They won't display in a web browser
  • Conversion from .ai to .svg is needed when building the book from source
  • Requires more dependencies when building the book
  • More complex Makefile
  • .ai files are big, typically 10x-20x bigger than .svg:
538477 maj  3 16:01 11-19.ai 
 27597 maj  3 15:56 11-19.svg
566158 maj  3 16:01 11-20.ai 
 23684 maj  3 15:56 11-20.svg
589309 maj  3 16:01 11-21.ai 
 37296 maj  3 15:56 11-21.svg
641876 maj  3 16:01 11-22.ai 
 27791 maj  3 15:56 11-22.svg
632271 maj  3 16:01 11-23.ai 
 30412 maj  3 15:56 11-23.svg
602235 maj  3 16:01 11-24.ai 
 22056 maj  3 15:56 11-24.svg
635084 maj  3 16:01 11-25.ai 
 31094 maj  3 15:56 11-25.svg
626412 maj  3 16:01 11-26.ai 
 29834 maj  3 15:56 11-26.svg

I want to switch to the .svg format for the above reasons. I don't really see any downside to converting to .svg, but I know very little when it comes to graphic design. Do you have any objections to this or something I should be aware of regarding your work with the translations. Maybe it will totally screw up your processes?

Ok, one downside is that the switch will make the Git repo (.git folder) a bit bigger because we add new files to it, but the working tree will shrink to about 1/10 in size.

"SPIPaint::read: No valid object or document!" errors during make

Cloned repo and attempting to build all via make and seeing errors like...

➜  grokkingbitcoin git:(master) make                                           
inkscape --export-text-to-path -o build/images/ch01/01-06.svg images/ch01/01-06.svg
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
inkscape --export-text-to-path -o build/images/ch01/u01-09.svg images/ch01/u01-09.svg
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
SPIPaint::read: No valid object or document!
.
.
.

... causing all .html files built with the same with odd output.
The actual HTML body code of the HTMLs produced looks like...

<body class="book"><div id="MathJax_Message" style="display: none;"></div>
<div id="header">
<h1>Grokking Bitcoin</h1>
<div class="details">
<span id="author" class="author">Kalle Rosenbaum</span><br>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>include::front-matter.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch01-introduction-to-bitcoin.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch02-hash-functions-and-signatures.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch03-addresses.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch04-wallets.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch05-transactions.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch06-the-blockchain.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch07-proof-of-work.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch08-peer-to-peer-network.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch09-transactions-revisited.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch10-segregated-witness.adoc[]</p>
</div>
<div class="paragraph">
<p>include::ch11-bitcoin-upgrades.adoc[]</p>
</div>
<div class="paragraph">
<p>include::app1-bitcoin-cli.adoc[]</p>
</div>
<div class="paragraph">
<p>include::app2-answers.adoc[]</p>
</div>
<div class="paragraph">
<p>include::app3-web-resources.adoc[]</p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2022-06-14 01:53:48 HST
</div>
</div>
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Config({
  messageStyle: "none",
  tex2jax: {
    inlineMath: [["\\(", "\\)"]],
    displayMath: [["\\[", "\\]"]],
    ignoreClass: "nostem|nolatexmath"
  },
  asciimath2jax: {
    delimiters: [["\\$", "\\$"]],
    ignoreClass: "nostem|noasciimath"
  },
  TeX: { equationNumbers: { autoNumber: "none" } }
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.6.0/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
</body></html>

... rather than any actual html chapters with contents from the book.

Here are my OS and relevant package versions:

➜  grokkingbitcoin git:(master) cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) apt show asciidoctor
Package: asciidoctor
Version: 1.5.5-1
Priority: optional
Section: universe/ruby
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Ruby Extras Maintainers <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 994 kB
Depends: ruby | ruby-interpreter
Homepage: http://asciidoctor.org
Ruby-Versions: all
Download-Size: 168 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Description: AsciiDoc to HTML rendering for Ruby
 Asciidoctor is a pure Ruby processor for converting AsciiDoc source files and
 strings into HTML 5, DocBook 4.5, DocBook 5.0 and other formats.

➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) apt show make       
Package: make
Version: 4.1-9.1ubuntu1
Priority: optional
Build-Essential: yes
Section: devel
Source: make-dfsg
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Manoj Srivastava <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 381 kB
Depends: libc6 (>= 2.27)
Suggests: make-doc
Conflicts: make-guile
Replaces: make-guile
Homepage: http://www.gnu.org/software/make/
Task: lubuntu-qt-desktop
Supported: 5y
Download-Size: 154 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Description: utility for directing compilation
 GNU Make is a utility which controls the generation of executables
 and other target files of a program from the program's source
 files. It determines automatically which pieces of a large program
 need to be (re)created, and issues the commands to (re)create
 them. Make can be used to organize any task in which targets (files)
 are to be automatically updated based on input files whenever the
 corresponding input is newer --- it is not limited to building
 computer programs. Indeed, Make is a general purpose dependency
 solver.

➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) apt show inkscape
Package: inkscape
Version: 1.0.2+r75+1~ubuntu18.04.1
Priority: optional
Section: graphics
Maintainer: Inkscape developers <[email protected]>
Installed-Size: 162 MB
Depends: libaspell15 (>= 0.60.7~20110707), libatkmm-1.6-1v5 (>= 2.24.0), libc6 (>= 2.27), libcairo2 (>= 1.15.8), libcairomm-1.0-1v5 (>= 1.12.0), libcdr-0.1-1, libdouble-conversion1 (>= 2.0.0), libfontconfig1 (>= 2.12), libfreetype6 (>= 2.7.1), libgc1c2 (>= 1:7.2d), libgcc1 (>= 1:4.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libgdl-3-5 (>= 3.8.1), libglib2.0-0 (>= 2.41.1), libglibmm-2.4-1v5 (>= 2.54.0), libgomp1 (>= 4.9), libgsl23, libgslcblas0, libgtk-3-0 (>= 3.21.5), libgtkmm-3.0-1v5 (>= 3.22.0), libgtkspell3-3-0, libharfbuzz0b (>= 1.2.6), libjpeg8 (>= 8c), liblcms2-2 (>= 2.2+git20110628), libmagick++-6.q16-7 (>= 8:6.9.6.8), libpango-1.0-0 (>= 1.37.2), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.37.2), libpangomm-1.4-1v5 (>= 2.40.0), libpng16-16 (>= 1.6.2-1), libpoppler-glib8 (>= 0.18.0), libpoppler73 (>= 0.62.0), libpotrace0, librevenge-0.0-0, libsigc++-2.0-0v5 (>= 2.8.0), libsoup2.4-1 (>= 2.41.90), libstdc++6 (>= 5.2), libvisio-0.1-1, libwpg-0.3-3, libx11-6, libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Recommends: aspell, imagemagick, perlmagick, libwmf-bin, python3-lxml, python3-numpy, python3-scour, adwaita-icon-theme-full
Suggests: dia | dia-gnome, ruby, libsvg-perl, libxml-xql-perl, transfig, python3-serial, pstoedit
Conflicts: inkscape-trunk
Download-Size: 17.0 MB
APT-Manual-Installed: yes
APT-Sources: http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic/main amd64 Packages
Description: vector-based drawing program
 Inkscape is an illustration editor which has everything you need to create
 professional-quality computer art.  You can use it to make diagrams and
 illustrations, technical drawings, web graphics, clip art, icons and logos.
 A collection of hands-on tutorials show you how to combine lines, shapes, and
 text of different styles to build up a picture.
 .
 A selection of powerful vector graphics editing tools comes as standard. There
 is excellent support for paths, gradients, layers, alpha transparency, and
 text flow control. An extensive library of filters allows you to apply
 realistic effects, and extensions allow you to work with bitmaps, barcodes
 and printing marks, amongst other things.
 .
 Most of the common vector formats are supported, including PDF, Adobe
 Illustrator and AutoCAD files, and it has unrivalled support for the SVG web
 graphics standard.

N: There is 1 additional record. Please use the '-a' switch to see it
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) 
➜  grokkingbitcoin git:(master) apt show fonts-freefont-ttf
Package: fonts-freefont-ttf
Version: 20120503-7
Priority: optional
Section: fonts
Source: fonts-freefont
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Fonts Task Force <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 10.9 MB
Homepage: http://savannah.gnu.org/projects/freefont/
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Supported: 5y
Download-Size: 4,202 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Description: Freefont Serif, Sans and Mono Truetype fonts
 Freefont is a set of free high-quality TrueType fonts covering the UCS
 character set. These fonts are similar to the widely known Helvetica,
 Times and Courier fonts.

Any ideas what could be going on here?

make chunked fails

gali@gali-VirtualBox:~/grokkingbitcoin$ make chunked
asciidoctor -b html5  -a fm -b html5 grokking-bitcoin.adoc -o build/grokking-bitcoin-fm.html
rm -rf build/style
ln -sfr style build
asciidoctor -b html5  -r ./hacks/sectnumoffset-treeprocessor.rb -a sectnumoffset=$((1-1)) -a ch1 grokking-bitcoin.adoc -o build/grokking-bitcoin-1.html
asciidoctor -b html5  -r ./hacks/sectnumoffset-treeprocessor.rb -a sectnumoffset=$((2-1)) -a ch2 grokking-bitcoin.adoc -o build/grokking-bitcoin-2.html
asciidoctor: FAILED: /home/gali/grokkingbitcoin/grokking-bitcoin.adoc: Failed to load AsciiDoc document - undefined method `number=' for #<Asciidoctor::Section:0x00005585cda0e148>
Did you mean?  number
               numbered=
               numbered
  Use --trace for backtrace
make: *** [Makefile:42: ch2] Error 1

ps: I also had to increase the memory because it was failing with 137 (memory or space issues)

Answer to exercise 5.10: incorrect P2PKH scripts (s/OP_EQUAL/OP_EQUALVERIFY/)

The image in the answer to exercise 5.10 (https://github.com/kallerosenbaum/grokkingbitcoin/blob/master/images/app2/appb-01.ai) shows two output scripts that don't match the P2PKH type:

___ output script
actual OP_DUP OP_HASH160 OP_EQUAL OP_CHECKSIG
expected OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG

Would have liked to open a pull request, but unfortunately I don't have the tool available to edit .ai files, so it's opened as an issue.

By the way, great book so far, I enjoy very much reading it! 🚀

Multiple annotations mixed in text objects

Most annotations are mixed up with each other, so a text object can contain text from multiple annotations, making them harder to work with. For example image 10-12 contains among others the following text object when opened in Inkscape 1.0.2:

in the table.Verify the checksum,and interpret the witnessprogram as 5-bit numbers.Witness programRearrange in bytes (8 bits).Witness programExtract the witness version.Human-readable part.“bc” means bitcoin.“

These texts belong to several different annotations. I'm not sure how to fix this issue. It's darn annoying and cumbersome to work with.

It might be easier to follow this in Adobe Illustrator but I can't check that since I don't have a license for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.