Author

Topic: I am trying to read the Bitcoin source code, again. (Read 4629 times)

sr. member
Activity: 462
Merit: 250
The version control history is pretty well organized.  I have gotten some mileage out of browsing it with gitk.   Also, libcoin is a fork which sells itself as a drop-in bitcoin replacement with better organized source code.  Might be worth a look.
legendary
Activity: 1652
Merit: 2216
Chief Scientist
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
It's a big task to read the entire source code in one go. Reading source code "in the abstract" is hard work.

Why not pick some aspect that particularly interests you. For example: coin allocation, or the user interface for the address book, or block discouragement, or whatever. Then explore that part of the code.

Better still, find a change you'd be interested in making. That forces you to get to grips with that part of the code.

Oh, and have you even compiled the source code yourself? That's the first step, and it can be an interesting and educational experience in itself (especially on Fedora or Red Hat where you'll need to overcome some dependencies). Even if you don't plan to make any software changes, the building the application will help you become familiar with its files.

Let's just say I come up with goals too big for my own good. I will probably end up settling for something small at the end of this.

Yeah, I'll compile it first. That's pretty essential.
donator
Activity: 826
Merit: 1039
It's a big task to read the entire source code in one go. Reading source code "in the abstract" is hard work.

Why not pick some aspect that particularly interests you. For example: coin allocation, or the user interface for the address book, or block discouragement, or whatever. Then explore that part of the code.

Better still, find a change you'd be interested in making. That forces you to get to grips with that part of the code.

Oh, and have you even compiled the source code yourself? That's the first step, and it can be an interesting and educational experience in itself (especially on Fedora or Red Hat where you'll need to overcome some dependencies). Even if you don't plan to make any software changes, the building the application will help you become familiar with its files.
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
use Doxygen? though it probably depends on how well the code is commented.

Generally you start with /src/main.cpp and then follow the execution paths.

Alternatively load the project into an IDE that can follow functions, headers, etc.

marked

Righto. Thanks. I really should try studying the syntax of C++ rather than applying prior knowledge from other languages. >_<
full member
Activity: 168
Merit: 100
use Doxygen? though it probably depends on how well the code is commented.

Generally you start with /src/main.cpp and then follow the execution paths.

Alternatively load the project into an IDE that can follow functions, headers, etc.

marked
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
Tell me, in what folder and with what file do I begin? What libraries do I need to know about?

I have never written anything this large -- much less read through it.
Jump to: