Bitcoin Source Code

Welcome to our special selection of articles describing what makes Bitcoin tick.

In this section, our techs comment about Bitcoin source code files in very easy and accessible language.

Learn how the world’s most popular cryptocurrency works by diving into the C++ code that makes it all happen.

amount.h – Commented Bitcoin Source Code by JF
amount.h is one of simplest source files in Bitcoin Core. In fact we can paste it in it entirety and discuss it afterwards: /** Amount in satoshis (Can be negative) */typedef...
qt/bitcoin.h – Commented Bitcoin source code by JF
qt/bitcoin.h pulls the config/bitcoin-config.h definitions that were generated by the configure script during the build process. This header also contains the Qt Q_OBJECT Bitcoi...
consensus/merkle.cpp – Commented Bitcoin Source Code by JF
In this article we take a look at one of the most important components of block validation and overall blockchain integrity: the Merkle Root derivation process. While it's one o...
noui.cpp – Commented Bitcoin Core source code by JF
We began our exploration of the Bitcoin Core source code from the Qt graphical user interface on down. We saw how the Qt signals and slots mechanism was used to handle signals f...
bitcoind.cpp – Commented Bitcoin source code by JF
As mentioned in the Bitcoin-Qt commented source code post, there are several approaches one can take to step into the Bitcoin source in approximately the same order as it runs. For...
init.cpp – Commented Bitcoin source code by JF
This is our first exploration of Bitcoin-specific code in this series of articles. Until now we've looked at how the Qt system was set up to run the GUI and Bitcoin services in ...
optional.h – Commented Bitcoin source code by JF
optional.h is a stub that'll likely get removed from Bitcoin Core at a future date when C++ 17 gets formally adopted for the entire project. By reading the Bitcoin Core sources ...
qt/main.cpp – Commented Bitcoin source code by JF
Having run the Bitcoin Core graphical interface for so many years, the GUI source code seemed like the perfect place to start the journey into Bitcoin Core. The messages, buttons a...
qt/bitcoin.cpp – Commented Bitcoin source code by JF
qt/bitcoin.cpp is where Bitcoin Core initialization leads us next. main.cpp, the Bitcoin Qt application entry point, is basically just a stub that calls GuiMain() at qt/bitcoin....
dummywallet.cpp – Commented Bitcoin Core source code by JF
We mentioned in a previous Bitcoin Core source code article that bitcoind can be compiled without wallet support. Why would anyone do that? Historically there were 2 main fun...