Bitcoin Forum
September 22, 2026, 04:49:30 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Free-to-read] English translation of "Código Fonte Bitcoin" — Volume 1 now avai  (Read 45 times)
Isaque Cruz (OP)
Newbie
*
Online Online

Activity: 11
Merit: 21


View Profile WWW
Today at 02:20:25 AM
 #1

Hi everyone,

A while back I mentioned here that I was writing a book covering Bitcoin's source code, from Satoshi's original 2009 implementation through modern Bitcoin Core. What drove this project was a gap I ran into myself: solid, in-depth material on how Bitcoin actually works at the code level is scarce, especially outside of English-language sources. This book is my attempt to help close that gap.

Because of its length (821 pages in the original), I decided to release the English translation in three volumes rather than wait to finish all of it. Volume 1 is now translated and available.

What Volume 1 covers:

Volume 1 walks through the problem Bitcoin solves and Satoshi's original v0.1.0 codebase, file by file:

The conceptual foundation: double-spending, the transaction/block/chain/network/consensus architecture, and the technical context of 2008 (C++, OpenSSL, Berkeley DB, wxWidgets)
A full read-through of the original files: serialize.h/uint256.h, sha.h/util.h/bignum.h, key.h (ECDSA), script.cpp (the scripting language), and main.cpp split across five chapters covering transactions, blocks/chain, validation, mining, and the built-in wallet
The original network layer (net.cpp), persistence via Berkeley DB (db.cpp) — including a breakdown of the 2013 accidental fork at the code level — peer discovery via IRC (irc.cpp), and Base58 addressing / the original UI

The goal throughout is to explain not just what the code does, but why it was written that way given the 2008/2009 constraints, and what survived (or didn't) into modern Bitcoin Core.

Free sample: if you want to get a feel for the writing before deciding, here's a free PDF sample with two full chapters — no signup needed: https://drive.google.com/file/d/1meGuKyqhUOIQ1R9SL020AL_T6iE4LevJ/view?usp=sharing

Volumes 2 and 3 are still being translated — they'll cover the evolution from v0.1.0 into modern Bitcoin Core (up through v31.0), including everything that changed architecturally along the way.

If anyone reads it and spots something worth discussing or correcting — like the buffer-overflow verification point raised in an earlier thread here — I'd genuinely welcome it. Feedback from people who know this codebase well is what makes a technical book like this better, and that kind of exchange is exactly why I wanted to share it here rather than just sell it quietly.

Full Volume 1: https://www.amazon.com.br/dp/B0HKGMG7FD

This started as an attempt to fill a gap I ran into myself — solid, in-depth material on how Bitcoin actually works at the code level, in a form more people could learn from. If it helps even a few people understand this codebase better, that's the whole point.
Danish Ali
Member
**
Offline

Activity: 70
Merit: 147


View Profile
Today at 10:04:41 AM
 #2

I'm curious how confusing the chapter on the original scripting engine will be before the opcodes introduced by later soft-forks, it looks pretty trivial with hindsight but can be confusing when encountered for the first time.

The chapter about the accidental chain fork in 2013 is great, being one of those things you hear repeated over and over ("BDB lock limit differences caused a chain split") but rarely explained in detail, and your chapter explains the differences in behaviour in db.cpp on a code-level which is infinitely more interesting. The details have been explained before of course but only in mailing list posts and old github issues scattered around the interwebs, making it nice to have it in one place.

I've downloaded the sample, congrats for writing AND translating such a behemoth (821 pages!).
Isaque Cruz (OP)
Newbie
*
Online Online

Activity: 11
Merit: 21


View Profile WWW
Today at 01:48:12 PM
 #3

I'm curious how confusing the chapter on the original scripting engine will be before the opcodes introduced by later soft-forks, it looks pretty trivial with hindsight but can be confusing when encountered for the first time.

The chapter about the accidental chain fork in 2013 is great, being one of those things you hear repeated over and over ("BDB lock limit differences caused a chain split") but rarely explained in detail, and your chapter explains the differences in behaviour in db.cpp on a code-level which is infinitely more interesting. The details have been explained before of course but only in mailing list posts and old github issues scattered around the interwebs, making it nice to have it in one place.

I've downloaded the sample, congrats for writing AND translating such a behemoth (821 pages!).
_______________________________________________________________________________ ___________________________________________________________
Thanks so much, Danish — really appreciate you taking the time to read the sample and share this.

On the scripting engine: you're right to be curious about that transition. The original Script chapter (Chapter Cool covers only what Satoshi shipped in 2009, including the opcodes he disabled that same year. What you're anticipating — how those disabled NOPs were later repurposed by soft forks into CHECKLOCKTIMEVERIFY and CHECKSEQUENCEVERIFY — is covered in the chapter on the modern Script language, which lands either near the end of Volume 2 or at the start of Volume 3. It's already written, just being translated — should be out before long.

And thank you for confirming the 2013 fork chapter landed the way I hoped. That one mattered a lot to me to get right, since, like you said, the BDB lock-limit story gets repeated constantly but is rarely explained down to the actual line of code in db.cpp.

Thanks again for the feedback — it's genuinely valuable.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!