Flevio23 (OP)
Newbie
Offline
Activity: 2
Merit: 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?
|
|
|
|
NotATether
Legendary
Offline
Activity: 1694
Merit: 7156
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 31, 2020, 09:05:07 AM |
|
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.
|
|
|
|
Pmalek
Legendary
Offline
Activity: 2856
Merit: 7404
Playgram - The Telegram Casino
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 31, 2020, 02:26:57 PM |
|
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/
|
|
|
|
▄▄███████▄▄███████ ▄███████████████▄▄▄▄▄ ▄████████████████████▀░ ▄█████████████████████▄░ ▄█████████▀▀████████████▄ ██████████████▀▀█████████ █████████████████████████ ██████████████▄▄█████████ ▀█████████▄▄████████████▀ ▀█████████████████████▀░ ▀████████████████████▄░ ▀███████████████▀▀▀▀▀ ▀▀███████▀▀███████ | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Playgram.io ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ▄▄▄░░ ▀▄ █ █ █ █ █ █ █ ▄▀ ▀▀▀░░
| │ | ▄▄▄███████▄▄▄ ▄▄███████████████▄▄ ▄███████████████████▄ ▄██████████████▀▀█████▄ ▄██████████▀▀███▄██▐████▄ ██████▀▀████▄▄▀▀█████████ ████▄▄███▄██▀█████▐██████ ██████████▀██████████████ ▀███████▌▐██▄████▐██████▀ ▀███████▄▄███▄████████▀ ▀███████████████████▀ ▀▀███████████████▀▀ ▀▀▀███████▀▀▀ | | │ | ██████▄▄███████▄▄████████ ███▄███████████████▄░░▀█▀ ███████████░█████████░░█ ░█████▀██▄▄░▄▄██▀█████░█ █████▄░▄███▄███▄░▄██████ ████████████████████████ ████████████████████████ ██░▄▄▄░██░▄▄▄░██░▄▄▄░███ ██░░░█░██░░░█░██░░░█░████ ██░░█░░██░░█░░██░░█░░████ ██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████ ███████████████████████ ███████████████████████ | | │ | ► | |
|
|
|
hugeblack
Legendary
Offline
Activity: 2604
Merit: 3823
thechange.ltd - Exchange 250+ Coins With 0% Fees
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 31, 2020, 06:31:48 PM |
|
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
|
| | TheChange | | | | |
░░░░░░░░░░██▄ ▄▄▄▄▄▄▄▄▄▄▄███▄ ▀▀▀▀▀▀▀▀▀▀▀███▀ ░░░░░░░░░░██▀ ░░░▄▄ ▄██▀ ███████████████ ▀██▄ ░░░▀▀ | | | | +250 COINS | | ..Crypto Exchange.. | │ | ▄▄▄▄ ▄▄▄███▀▀███▄▄▄ ▄█████▀▀░▄▄▄▄░▀▀█████▄ ██▀░▄▄▄████████▄▄▄░▀██ ██░████████████████░██ ██░████████████████░██ ██░▀██████████████▀░██ ██░▀████████████▀░██ ▀██░▀██████████▀░██▀ ▀██▄░▀██████▀░▄██▀ ▀██▄▄░▀▀░▄▄██▀ ▀▀██▄▄██▀▀ ▀▀▀▀ | | | │ | |
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
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.
|
|
|
|
unsigned_long_long
Jr. Member
Offline
Activity: 39
Merit: 6
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 03, 2020, 12:31:53 AM Merited by vapourminer (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?
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!
|
|
|
|
pooya87
Legendary
Offline
Activity: 3542
Merit: 10777
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 03, 2020, 03:52:58 AM Last edit: September 09, 2020, 04:40:40 AM by pooya87 |
|
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.
|
|
|
|
Wind_FURY
Legendary
Offline
Activity: 3010
Merit: 1878
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 03, 2020, 11:56:35 AM |
|
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.
|
| .SHUFFLE.COM.. | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | . ...Next Generation Crypto Casino... |
|
|
|
Flevio23 (OP)
Newbie
Offline
Activity: 2
Merit: 6
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 08, 2020, 07:25:13 PM |
|
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.
|
|
|
|
Wind_FURY
Legendary
Offline
Activity: 3010
Merit: 1878
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 11, 2020, 09:28:22 AM |
|
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.
|
| .SHUFFLE.COM.. | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | . ...Next Generation Crypto Casino... |
|
|
|
Wind_FURY
Legendary
Offline
Activity: 3010
Merit: 1878
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 15, 2020, 07:22:16 AM |
|
OP, here is another good resource for people like you, who are aspiring to be Bitcoin developers, https://twitch.tv/videos/768401215achow shows some of his work in real time. I believe you can also show some support through Twitch donations in the chat-box.
|
| .SHUFFLE.COM.. | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | . ...Next Generation Crypto Casino... |
|
|
|
|
Wind_FURY
Legendary
Offline
Activity: 3010
Merit: 1878
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 24, 2020, 08:55:12 AM |
|
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?
|
| .SHUFFLE.COM.. | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | . ...Next Generation Crypto Casino... |
|
|
|
DaCryptoRaccoon
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 26, 2020, 05:20:11 PM |
|
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.
|
┏━━━━━━━━━━━━━━━━━┓ ┃ 𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰 ┃ ┃ ➤21/M ┃ ┃ ███▓▓ ███▓▓ ███▓▓ ███▓▓┃
|
|
|
seoincorporation
Legendary
Offline
Activity: 3248
Merit: 3048
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 09, 2020, 11:45:08 PM |
|
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.
|
|
|
|
Wind_FURY
Legendary
Offline
Activity: 3010
Merit: 1878
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 13, 2020, 06:16:10 AM |
|
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. 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](https://bitcointalk.org/Smileys/default/cool.gif)
|
| .SHUFFLE.COM.. | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ ███████████████████████ | . ...Next Generation Crypto Casino... |
|
|
|
chrisvl
Legendary
Offline
Activity: 1274
Merit: 1006
Trainman
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 15, 2020, 01:08:06 PM |
|
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!!
|
|
|
|
BrewMaster
Legendary
Offline
Activity: 2114
Merit: 1293
There is trouble abrewing
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 15, 2020, 03:39:33 PM |
|
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.
|
There is a FOMO brewing...
|
|
|
TofuDefi
Jr. Member
Offline
Activity: 156
Merit: 4
Trade and stake Ethereum assets on TRON
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2020, 08:33:00 AM |
|
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.
|
TofuDefi.com - trade and stake Ethereum assets on TRON
|
|
|
|