Bitcoin Forum
April 23, 2024, 12:15:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I am trying to read the Bitcoin source code, again.  (Read 4624 times)
Jon (OP)
Donator
Member
*
Offline Offline

Activity: 98
Merit: 12


No Gods; No Masters; Only You


View Profile
March 26, 2012, 05:07:13 AM
 #1

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.

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
1713874532
Hero Member
*
Offline Offline

Posts: 1713874532

View Profile Personal Message (Offline)

Ignore
1713874532
Reply with quote  #2

1713874532
Report to moderator
1713874532
Hero Member
*
Offline Offline

Posts: 1713874532

View Profile Personal Message (Offline)

Ignore
1713874532
Reply with quote  #2

1713874532
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713874532
Hero Member
*
Offline Offline

Posts: 1713874532

View Profile Personal Message (Offline)

Ignore
1713874532
Reply with quote  #2

1713874532
Report to moderator
1713874532
Hero Member
*
Offline Offline

Posts: 1713874532

View Profile Personal Message (Offline)

Ignore
1713874532
Reply with quote  #2

1713874532
Report to moderator
marked
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
March 26, 2012, 09:15:23 AM
 #2

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 (OP)
Donator
Member
*
Offline Offline

Activity: 98
Merit: 12


No Gods; No Masters; Only You


View Profile
March 26, 2012, 09:40:11 AM
 #3

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. >_<

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
ribuck
Donator
Hero Member
*
Offline Offline

Activity: 826
Merit: 1039


View Profile
March 26, 2012, 09:42:40 AM
 #4

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 (OP)
Donator
Member
*
Offline Offline

Activity: 98
Merit: 12


No Gods; No Masters; Only You


View Profile
March 26, 2012, 09:47:29 AM
 #5

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.

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
March 26, 2012, 03:58:57 PM
 #6

Start with this stickied thread.

How often do you get the chance to work on a potentially world-changing project?
fivebells
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
March 26, 2012, 04:25:08 PM
 #7

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.
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!