Bitcoin Forum

Other => Off-topic => Topic started by: ALPHA. on November 29, 2011, 06:47:55 AM



Title: Alright, I am going to go through the source code.
Post by: ALPHA. on November 29, 2011, 06:47:55 AM
I have the C++ documentation ready and the source downloaded. Before I pick my way around and try to begin to slowly absorb this thing, any tips? Is there any actual documentation on the Bitcoin code itself?


Title: Re: Alright, I am going to go through the source code.
Post by: Phinnaeus Gage on November 29, 2011, 06:55:23 AM
I have the C++ documentation ready and the source downloaded. Before I pick my way around and try to begin to slowly absorb this thing, any tips? Is there any actual documentation on the Bitcoin code itself?

We're fucked now! What next? The manual for Three Mile Island, and you're going to fix that? (Sorry, Harv. Couldn't help myself. Good luck with C++).  ;)

Oops! I may have misunderstood your post. I thought you were going to delve into the client. My bad!


Title: Re: Alright, I am going to go through the source code.
Post by: btc_artist on November 29, 2011, 06:55:49 AM
There aren't a lot of comments, but it's a relatively small code base and most things are fairly self-explanatory.


Title: Re: Alright, I am going to go through the source code.
Post by: Herodes on November 29, 2011, 08:04:07 AM
I noticed in the development forum someone had already done what you are going to do, and also done some good writeups on the code. Don't have a link right here, but I'm sure you will find it.


Title: Re: Alright, I am going to go through the source code.
Post by: fivebells on November 29, 2011, 09:31:25 AM
  • Use the debugger to step through the code.  Makes it easier to see what's going on.
  • PyBtcEngine is a near-complete implementation which I am finding much easier to follow.
  • Documentation is sparse, but there's some on the wiki, and a thread called "overview of the Satoshi client", both of which can be pretty handy.  Browsing the source code history with a tool like gitk can also be informative, but it's a bit of a crapshoot.


Title: Re: Alright, I am going to go through the source code.
Post by: dogisland on November 29, 2011, 12:24:42 PM
If you haven't done C++ before then you might find the BitcoinJ java implementation easier to read.


Title: Re: Alright, I am going to go through the source code.
Post by: realnowhereman on November 29, 2011, 12:41:03 PM
I don't know how helpful it will be to you; but my (woefully incomplete) alternative bitcoin client is available at:

https://github.com/andyparkins/additup

I was trying to write clearer code than the satoshi client so perhaps it will help with understanding.

The protocol is there, and a broadcast block reciever.  But they are held in memory not written to disk.


Title: Re: Alright, I am going to go through the source code.
Post by: Gavin Andresen on November 29, 2011, 04:20:38 PM
https://bitcointalk.org/index.php?topic=41718.0


Title: Re: Alright, I am going to go through the source code.
Post by: elggawf on November 29, 2011, 07:08:16 PM
I haven't looked at how much of 0.5 is in QT, but I'm somewhat familiar with QT myself. Any object that starts with a Q is likely to be a QT object, and QT's documentation is pretty good. Simply google the object type and you should come up with a page on Nokia/Trolltech's site that has all the details in it.

I only mention this since I think your major grievance was the UI, and I gather the 0.5 version's UI is QT-based.


Title: Re: Alright, I am going to go through the source code.
Post by: zellfaze on November 30, 2011, 07:50:40 AM
Version 0.5 actually comes with two UIs.  There is a bitcoin.exe and a bitcoin-qt.exe.  Depending on whether you want the new QT UI or the legacy UI.

So he could still poke around in the non-QT based one if he doesn't want to deal with QT.