This is a fairly simple project that aims to provide a basic set up in order to get you up to speed with building, reviewing and even contributing to bitcoin in a simple but efficient way.
It is comprised by a just a limited set of text files that can be used either independently or together.
To the rescue of a developer that wants to onboard bitcoin, there is an abundance of resources included into the Bitcoin Core documentation as well as other sources mostly offered by long term contributors, see references below. However, the whole process may seem intimidating to a newcomer!
With that in mind, and to streamline commands and processes that are essential to set up, run and debug bitcoin, I offer the included dot file named bitcoin. I have been updating it in constant time ever since I started my bitcoin journey and it seems very obvious to me that I will never stop. So, if you find a TODO anywhere, you have been warned.
Its usage should be as simple as sourcing it to .zshrc
in order to get the included commands available to your own shell. The .zshrc
file is nothing more than a configuration file for the zsh - or otherwise known as the z shell. It is a script that runs every time a you start a new interactive shell and is typically located in your home directory ~/.zshrc
.
What is more, this file can also be used as a reference, or even better a checklist, to assist with procedures such how to build the project, how set up your system to do a pr review, or how to initiate a debugging session. In my case, I find it handy to have it open (as read only!) on the side of my basic terminal arrangement during development for quick look ups.
The Intended use is for computers running macos with zsh shell available and visual studio code installed mostly for more interactive and visual debugging. Otherwise just using vm or any other editor is also fine.
The project also assumes that you have your own fork of bitcoin on your machine.
You just have to clone this repository to a directory on your machine using:
% git clone https://github.com/itornaza/btc-dot.git
For a quick intro just read the next two sections Bitcoin dot file and Visual Studio Code configuration file which very brief on purpose because I just want the project files to be self contained.
For more relevant and detailed documentation please refer to the respective comment sections within each project file.
bitcoin is the main dot file that defines exports, aliases, commands and functions in order to simplify and streamline the bitcoin building, testing and development process.
It is divided into the following two main sections.
-
Checklists
for procedures grouped together in order to help you get through with regular tasks within the bitcoin project. -
zsh
which contains the actual commands that do the job. Feel free to add you own commands, rename the existing ones or do whatever you deem appropriate to suit your needs. This section is also divided to logical groupings like,Installations
,Git
,Build
,Tests
, etc to further guide you through the process or help you locate desired commands more easily. -
The
git difftool
can also be easily intergrated with vscode as well for a more visual spot of the differences.
To include the bitcoin configuration in your shell environment include the following line in ~/.zshrc
like.
source <path-to-bitcoin-file>
Then, you only have to restart the terminal for the file to get sourced.
Caution! Please read through the file before sourcing it to avoid any unintentional behavior of your system. It shouldn't be that bad, but please check it out first.
bitcoin.code-workspace which is a visual studio code file, is included as well for anyone who wants to run debugging sessions with the added convenience of an IDE.
Assuming you have visual studio code installed, you just need to open vscode and from the top menu select File > Open workspace from file
. Then select this project's bitcoin.code-workspace
from wherever you have cloned it.
After doing that, if you want to open the bitcoin.code-workspace
file from within the workspace to check the documentation, select the Run and Debug
button on the top left of the screen and then click on the settings symbol next to the debug configurations on the topmost part of the left pane.
Please, read the file for more on the debug configurations and how to use them.
The main sources for the compilation of this file comes straight from Bitcoin Core:
and Jon Atack's blog:
On debugging with Visual Studio code or not:
Misc external tools references
Bitcoin dot is released under the terms of the MIT license