Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Jdope on February 05, 2018, 10:06:44 PM



Title: A few questions about bitcoin's codebase
Post by: Jdope on February 05, 2018, 10:06:44 PM
Hello all, i've been a developer for the past couple of years and i would like to jump onto the blockchain coding paradigms, i've downloaded the first satoshi client's code (0.1) and there's this overview https://bitcointalk.org/index.php?topic=41718.40 that i would like to follow but there's a couple of missing files (i presume) mainly, i can't find the init.cpp file, anyway, i would like to ask a couple of questions to any developer that delved into the code out there, first, does anyone out there know of a chatting room/forum for people like myself?

Also, does anyone know of any guides/overviews/write ups that explain any parts of the code of any version of the bitcoin client? or is there any other altcoins that are similar to follow but a little easier? Any books that helped you go through the code? and what cryptography knowledge books did you make use of?


Title: Re: A few questions about bitcoin's codebase
Post by: achow101 on February 06, 2018, 01:48:25 AM
Hello all, i've been a developer for the past couple of years and i would like to jump onto the blockchain coding paradigms, i've downloaded the first satoshi client's code (0.1) and there's this overview https://bitcointalk.org/index.php?topic=41718.40 that i would like to follow but there's a couple of missing files (i presume) mainly, i can't find the init.cpp file,
It doesn't exist in 0.1.0. A lot of stuff has changed since then, and it really is not worth your time to read through the original source code. So much has changed that whatever you learn is not applicable to the latest source code. You should instead try to learn and understand Bitcoin Core's latest source code. Keep in mind that the project has grown significantly since 0.1.0 and is much more complex.

anyway, i would like to ask a couple of questions to any developer that delved into the code out there, first, does anyone out there know of a chatting room/forum for people like myself?
You can try the #bitcoin, #bitcoin-dev, and #bitcoin-core-dev channels on Freenode's IRC.

Also, does anyone know of any guides/overviews/write ups that explain any parts of the code of any version of the bitcoin client? or is there any other altcoins that are similar to follow but a little easier? Any books that helped you go through the code?
I don't know of any recent ones that are accurate. But it isn't all that hard to follow the code. It is fairly well commented and the names of things are self explanatory. You can start with src/bitcoind.cpp where the main function is for bitcoind and then follow along from there. Knowing how to use grep to find things is also very useful.

and what cryptography knowledge books did you make use of?
Bitcoin does not actually use that much cryptography. You just need to understand some basics, like what a hash function is and what digital signatures are. That's about it.


Title: Re: A few questions about bitcoin's codebase
Post by: DannyHamilton on February 06, 2018, 02:12:26 AM
does anyone out there know of a . . . forum for people like myself?

I've found this one to be EXTREMELY helpful (https://bitcointalk.org/).

However, in addition to some very knowledgeable and helpful users, there are an abundance of trolls and advertisers that spread quite a bit of nonsense. You'll need to be careful about whose advice you take.

Also, does anyone know of any guides/overviews/write ups that explain any parts of the code of any version of the bitcoin client?

There's a lot of good information about the concepts here:
https://bitcoin.org/en/developer-documentation


Title: Re: A few questions about bitcoin's codebase
Post by: Jdope on February 06, 2018, 09:38:33 PM
It doesn't exist in 0.1.0. A lot of stuff has changed since then, and it really is not worth your time to read through the original source code. So much has changed that whatever you learn is not applicable to the latest source code. You should instead try to learn and understand Bitcoin Core's latest source code. Keep in mind that the project has grown significantly since 0.1.0 and is much more complex.
I thought that i could read 0.1 as some sort of a simplified bitcoin code as a start, its like 7-10 files versus over multiple times that.
I've found this one to be EXTREMELY helpful (https://bitcointalk.org/).

However, in addition to some very knowledgeable and helpful users, there are an abundance of trolls and advertisers that spread quite a bit of nonsense. You'll need to be careful about whose advice you take.


Yes, that's why i'm asking in it  :) but if there's one that's more developer abundant with some tutorials/guides it would have been awesome, the material out there is very slim or just well hidden.

There's a lot of good information about the concepts here:
https://bitcoin.org/en/developer-documentation

i've read alot about the concepts, read the book "Mastering bitcoin" which was really good explaining even newer concepts like lighting network.

IMHO your quest should not be here, as you will get no real good advice, other than learn the current, you need to google 'cloning  bitcoin' there are dozens of sites where people have written up the internals and explain how to build legacy code, and what it all does,

Alright, i'll try checking out articles about cloning it maybe i'll learn something about the code!