Author

Topic: Study Bitcoin core source code (Read 571 times)

brand new
Activity: 0
Merit: 0
August 02, 2021, 08:12:25 AM
#21
Better to go throw the Bitcoin developer documentation, they have step by step guideline and proper roadmap. I also recommend you to visit Essay48. They had well educated scholar they will step by step guide you about the proper road map and advance learning.
jr. member
Activity: 156
Merit: 4
Trade and stake Ethereum assets on TRON
November 29, 2020, 04:33:00 AM
#19
Hi,

I have read a lot of documentation and books where they explain the general functioning of Bitcoin and I think that the time has come to study the source code of Bitcoin core.

I have knowledge of c++ and python but due to the large size of the project and the number of files, I don't know where it would be correct to start.

Could someone help me on how to properly perform that task?

Start with src/chainparams.cpp.
legendary
Activity: 2114
Merit: 1292
There is trouble abrewing
November 15, 2020, 11:39:33 AM
#18
But, doing is where the real learning takes place, you can create an altcoin based on bitcoin 0.9v its easy you have to change only 2-3 lines of code, and start perfome changes to code then test test test!!

that would only create a parrot who can edit text files after reading some guide on the internet not someone who understands how bitcoin works.
you have to understand what you change, what those changes affect and why you are changing them.
legendary
Activity: 1274
Merit: 1006
Trainman
November 15, 2020, 09:08:06 AM
#17
This questions has not a single answer and you should to explore diffrent opinions in order to find the ideal for you.
My opinion is to not read the source code files like a book you will not gain anything, Back in school, when student reads something he thinks that understand it..But, doing is where the real learning takes place, you can create an altcoin based on bitcoin 0.9v its easy you have to change only 2-3 lines of code, and start perfome changes to code then test test test!!
legendary
Activity: 2898
Merit: 1823
November 13, 2020, 02:16:10 AM
#16
I started a topic on the breakdown of the Satoshi codebase feel free to add to it.

https://bitcointalksearch.org/topic/m.48300324


To all actual coders who have actual experience in cryptography. Based on Satoshi's code, would you give thought to some of the doubts that Satoshi wasn't a "cypherpunk" before Bitcoin? Or was he that good in concealing his real identity?

I don't think it matters if he was or was not a cypherpunk he had the right idea and released it at the right time sometimes that is all that matters.  He did leave a few trails about the place but I would say he did a pretty good job keeping his identity a secret.


That wasn't the question. You as a coder, I was asking based on the code he wrote, can you tell if he was a cypherpunk, or an outsider?

I believe the only person in the cryptography mailing that appreciated Bitcoin was Hal.

Quote

What I find amazing is the fact that no one has yet been able to uncover the person behind the name and I really hope that it continues to stay that way.


He might be hiding in plain sight. Cool
legendary
Activity: 2982
Merit: 2681
Top Crypto Casino
November 09, 2020, 07:45:08 PM
#15
A good start would be to put your hands on the code... Install the core and make it run, see what can you do from the command line, create a test net, make transactions, sign them and send them. Learn as much as you can on the fly and then modify parameter on the code.

A nice challenge for a coder like you would be to create a genesis block and start your own bitcoin. I think this is the best way to get familiarized with the code.
hero member
Activity: 1194
Merit: 573
OGRaccoon
October 26, 2020, 01:20:11 PM
#14
I started a topic on the breakdown of the Satoshi codebase feel free to add to it.

https://bitcointalksearch.org/topic/m.48300324


To all actual coders who have actual experience in cryptography. Based on Satoshi's code, would you give thought to some of the doubts that Satoshi wasn't a "cypherpunk" before Bitcoin? Or was he that good in concealing his real identity?

I don't think it matters if he was or was not a cypherpunk he had the right idea and released it at the right time sometimes that is all that matters.  He did leave a few trails about the place but I would say he did a pretty good job keeping his identity a secret.

What I find amazing is the fact that no one has yet been able to uncover the person behind the name and I really hope that it continues to stay that way.
legendary
Activity: 2898
Merit: 1823
October 24, 2020, 04:55:12 AM
#13
I started a topic on the breakdown of the Satoshi codebase feel free to add to it.

https://bitcointalksearch.org/topic/m.48300324


To all actual coders who have actual experience in cryptography. Based on Satoshi's code, would you give thought to some of the doubts that Satoshi wasn't a "cypherpunk" before Bitcoin? Or was he that good in concealing his real identity?
hero member
Activity: 1194
Merit: 573
OGRaccoon
October 19, 2020, 01:16:13 PM
#12
I started a topic on the breakdown of the Satoshi codebase feel free to add to it.

https://bitcointalksearch.org/topic/m.48300324
legendary
Activity: 2898
Merit: 1823
October 15, 2020, 03:22:16 AM
#11
OP, here is another good resource for people like you, who are aspiring to be Bitcoin developers, https://twitch.tv/videos/768401215

achow shows some of his work in real time. I believe you can also show some support through Twitch donations in the chat-box.
legendary
Activity: 2898
Merit: 1823
September 11, 2020, 05:28:22 AM
#10
Thank you all for the answers. I think I have been very presumptuous in trying to understand, with my current knowledge, the code. Your advice will be very useful to me to continue moving forward. Studying bitcoin is one of the few things that motivates me, as my current job frustrates and bores me.


It's not for everyone, but if you're passionate enough, follow what feels right for you. Plus if you want to be a good developer of Bitcoin/cryptocurrencies, I heard that some adequate understanding of applied cryptography is needed. Good luck.
newbie
Activity: 2
Merit: 6
September 08, 2020, 03:25:13 PM
#9
Thank you all for the answers. I think I have been very presumptuous in trying to understand, with my current knowledge, the code. Your advice will be very useful to me to continue moving forward. Studying bitcoin is one of the few things that motivates me, as my current job frustrates and bores me.
legendary
Activity: 2898
Merit: 1823
September 03, 2020, 07:56:35 AM
#8
OP, you can also reach out to some of the other developers. I'm not sure if it's active, but the IRC channel bitcoin-core-dev on freenode might have people there who can help you.

I believe reaching out to achow and gmaxwell in the forum could also help start your journey. There's also Bitcoin Stack Exchange. The resources are everywhere if you know where to look, and as long as you persist. Good luck.
legendary
Activity: 3430
Merit: 10505
September 02, 2020, 11:52:58 PM
#7
the problem with looking at bitcoin core source code and trying to "study" that is that it has little to no documentation. there are some comments in some parts that are doing very specific things (such as preventing a very special attack vector) but the basic things (block verification, scripts,...) are never explained and some of them are very difficult to understand.
that means you first have to have a very good understanding of bitcoin protocol before you start looking at the source code. using some of the sources mentioned before (dev. doc.) should be your first step.
jr. member
Activity: 39
Merit: 6
September 02, 2020, 08:31:53 PM
#6
Hi,

I have read a lot of documentation and books where they explain the general functioning of Bitcoin and I think that the time has come to study the source code of Bitcoin core.

I have knowledge of c++ and python but due to the large size of the project and the number of files, I don't know where it would be correct to start.

Could someone help me on how to properly perform that task?

Speaking as somebody who has tinkered with the C++ codebase a few times, I find a good way to learn it is to first look in the test directory, and run some of the tests individually, try them with different inputs, etc.

All the tests for most of the core protocol stuff are in here - scripts, base58, transaction, etc. So you can relate the core data structures back to all the books you've read on the topic.

It's not the easiest code base to understand, I find it's helpful to use an IDE with a bookmarking facility so you can "map out" the important parts.

Good luck!
legendary
Activity: 1581
Merit: 1265
Heisenberg Design Services
September 01, 2020, 07:02:37 AM
#5
If you already have a really good overview of how bitcoin works on a practical scale, then you should be skipping the Mastering Bitcoin book suggested by Pmalek. Mastering Bitcoin will take you from the start of what bitcoin is and will end with the most advanced concepts of the complete protocol. The book itself is over 2 years old and might be a little bit outdated with minor changes which has happened in these 2 years.

If you are willing to get into the protocol development or testing or understanding them in a raw level, you should probably practice more source code examples from Programming Bitcoin book by Jimmy Song. The book itself is written for python developers and covers some of the difficult tech which bitcoin has currently. You will be able to interact with the protocol and once you have done that, read a lot of resources from Jameson Lopp's website which ETFbitcoin has said.

Later when you have read a few resources, try finishing off Chaincode Labs curriculum This is really a good syllabus book like material for you to understand protocol and cryptography at a basic level and will help you in getting forward in the code. So if you have done with all the above resources, start with reading example_test.py from functional tests. You should be knowing atleast a little bit of python testing code before you get into the main code. example_test.py is really a good starting point and has been written with keeping newbies in mind.

Participate in a lot of weekly PR review club hosted by John Newbery and other lead devs. You can ask doubts regarding the PR on a technical scale and they will be happy to help. This week, I think we have Taproot review and I hope it will be exciting for you to attend the meeting.
legendary
Activity: 2492
Merit: 3612
Buy/Sell crypto at BestChange
August 31, 2020, 02:31:48 PM
#4
You need to rethink it a bit, Bitcoin is not a program but rather a set of protocols that are cooperated by the community. As long as you follow these rules, you can set up your own Core.
To simplify things, choose the first versions[1] (less than 20K lines,) follow the changes and updates that have occurred and then it will be easier for you.
You can also ask any questions here.

[1] https://github.com/bitcoin/bitcoin/releases/tag/v0.1.5
legendary
Activity: 2730
Merit: 7065
Farewell, Leo. You will be missed!
August 31, 2020, 10:26:57 AM
#3
You can try reading Mastering Bitcoin by Andreas Antonopoulos if you haven't already. It's a technical piece meant for programmers. 
https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/

This is a very basic guide on Bitcoin development that could be useful.
https://blockgeeks.com/guides/bitcoin-developer/
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
August 31, 2020, 05:05:07 AM
#2
You should start by reading the Bitcoin developer documentation, it has a section about examples that show you the outputs different parts of bitcoin core make, along with their input parameters. The Reference, Developer guide and Glossary are also good resources.

You can also study the various BIPs inside the codebase and the associated Github issues and pull requests that implement those BIPs. These BIPs give a high level description of how the protocol works and since Bitcoin core is an implementation of this protocol you get to see how each part of it is implemented in C++.

The bitcoin-dev mailing list also contains a few gems that explain why some parts of bitcoin core code are written the way they are.
newbie
Activity: 2
Merit: 6
August 30, 2020, 06:52:46 PM
#1
Hi,

I have read a lot of documentation and books where they explain the general functioning of Bitcoin and I think that the time has come to study the source code of Bitcoin core.

I have knowledge of c++ and python but due to the large size of the project and the number of files, I don't know where it would be correct to start.

Could someone help me on how to properly perform that task?
Jump to: