Welcome everyone to the second article of Inside Bitcoin Code; there are 60 people following this newsletter now, and I wanted to thank every and each one of you!
Today we are going to take a first look at what is contained inside the repository of Bitcoin Core. In a repository, all the changes made to a file are tracked and save, thus maintaining a full history of the modifcations done. Basically, it would be possible to go back to the very first implementation of Bitcoin Core!
Let’s see what can be found!
Bitcoin, BIPs and something more
The main repository of Bitcoin Core on GitHub1 is divided in two main sub-repos (plus 2 others):
bitcoin: this repo contains all the source code needed to build Bitcoin Core; here the real magic can be found.
bip: this repo contains the so-called Bitcoin Improvemente Proposals; as the name suggests, here all the proposal about the imporvements to be added to the Bitcoin code can be found.
libblkmaker: this is a C implementation of getblocktemplate, a function that returns data needed to construct a block to work on.
libbase58: contains a C library use for Bitcoin’s base58 encoding, an algorithm used to encode huge integer numbers in an alphanumeric text.
Bitcoin’s repository
Opening the Bitcoin repository2, it is possible to see that the project is divide in many folders and files, each with a specific function (see the image below).
For what concerns the files, many of them are instructions and general information about the repository (i.e. .md files, such as licence, how to contribute, how to install), configuration files (i.e. minimum versions required) and important git files (i.e. files to be ignored by the repository).
For what concerns the folders,:
.github: git-related files
.tx: configuration file
build-aux: files for UNIX macro processor
build-msvc: files and istruction to build Bitcoin Core on Microsoft Visual Studio (see IBC#001)
ci: scripts for each build step in each build stage
contrib: tools for developers working on the repository
depends: dependencies-related files needed for the proejct
doc: documentation files, for users and developers
share: sharing material (such as images)
src: source files
test: integration tests
Enough for today!
If you have any question feel free to ask in the comment section.
Next week we will take a look at the src folder, so as to better understand how the source code is structured and divided.
See you next week and thank you for following Inside Bitcoin Code!
A good primer for anyone new to opensource development and code repositories.
More! It’s getting exciting now!