<p>Couple of years ago, i created a few articles on bitcoin core code analysis. It is here:
<a href="http://embedded-design-vic.blogspot.com/2017/07/bitcoin-core-tutorial-and-source-code.html" rel="nofollow noreferrer">http://embedded-design-vic.blogspot.com/2017/07/bitcoin-core-tutorial-and-source-code.html</a></p>

CC BY-SA 4.0
2023-12-23T06:24:19.500Z
Articles aren't noob-friendly at all; they're kinda bardly formatted too; you use jargons I've never heard about before and don't explain any of them. I'm not saying these blog entries are unuseful, I believe you know a lot about it too, but you can't call these a "From A to Z Bitcoin Core", more like a "indepth Bitcoin Core for experts" probably.
Gui Imamura
CC BY-SA 4.0
2021-05-07T07:22:00.810Z
2021-05-07T07:22:00.810Z
Victor Yeo
<p>To understand Bitcoin Core, the best resource is probably the source code itself:</p>

<p><a href="https://github.com/bitcoin/bitcoin" rel="noreferrer">https://github.com/bitcoin/bitcoin</a></p>

<p>To help understand what is going on in the code, try the <a href="https://bitcoin.org/en/developer-documentation" rel="noreferrer">developer documentation</a> and the <a href="https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf" rel="noreferrer">Princeton Bitcoin Book</a>.  Keep in mind that the code gets updated faster than the documentation, so the code should be your source of truth.</p>

<p>Some interesting places to start:</p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp</a> - this is the source file that contains the code for interpretting script, and therefore checks for transaction validity</p>

<p><a href="https://en.bitcoin.it/wiki/Protocol_documentation" rel="noreferrer">https://en.bitcoin.it/wiki/Protocol_documentation</a> - the docs for the network protocol, such as message definitions and data structures</p>

<p><a href="https://bitcoin.org/en/developer-reference#transactions" rel="noreferrer">https://bitcoin.org/en/developer-reference#transactions</a> - transaction reference describing the content and construction of transactions</p>

<p>For any clarifications and questions, I highly recommend <a href="https://bitcoin.stackexchange.com/">this very StackExchange site</a> :)</p>

CC BY-SA 3.0
2016-06-21T10:08:02.943Z
First thanks for the answer, I have to say I was looking for a documentation about the C++ code available on Github, I already looked at the developper documentation and read the book "Mastering bitcoin" wrote by Mr. Andreas Antonopoulos and it gave me detailed explanations about the protocols but my purpose is to go as deep as I can taking the source code to understand each line to be sure of what this software  really does with my computer and I really don't know how to start (I am currently ready all classes starting from bitcoin-cli.cpp but it is not really efficient).
smoumou
CC BY-SA 3.0
2016-06-21T13:41:29.367Z
I've edited my answer to specify a few of the places I recommend diving into.  This is basically just my opinion of what's interesting, so keep in mind that others would tell you to start elsewhere.  Personally, I think the encumbering and unencumbering of transaction outputs are the heart of Bitcoin, so I've pointed you to the script part of the code.  I've also singled out the network protocol, since communication between peers is another fundamental aspect.  Again, just my opinion.
Jestin
CC BY-SA 3.0
2016-06-21T15:06:56.867Z
@smoumou: Please also edit clarifications back into your original question, so that other answeres don't have to check all answers before adding one.
Murch
CC BY-SA 3.0
2016-06-20T21:22:52.690Z
2016-06-21T13:36:29.843Z
2017-04-13T12:47:34.187Z
Jestin
<p>Is there a documentation somewhere to understand the C++ code of Bitcoin Core (available on Github) "from a to z" and being able to recreate it ? </p>

CC BY-SA 3.0
2016-06-20T18:59:57.000Z
You mean other than the source itself (https://github.com/bitcoin/bitcoin) or the developer documentation (https://bitcoin.org/en/developer-documentation)?  Also, this SE site is a wonderful resource for specific questions :)
Jestin
CC BY-SA 3.0
2016-06-20T21:01:09.723Z
@Jestin: That should be an answer, not a comment. ;) Perhaps add in the Princeton Bitcoin Book.
Murch
CC BY-SA 3.0
2016-06-20T21:22:27.953Z
I wasn't sure this was precisely what @smoumou was looking for, but I'll post it as an answer just in case.
Jestin
<bitcoin-core><development><bitcoin-core-development>
Is there developer documentation for the Bitcoin Core source code?
smoumou
# Is there developer documentation for the Bitcoin Core source code?

(Asked by: username_0 on 2016-06-20)

Is there a documentation somewhere to understand the C++ code of Bitcoin Core (available on Github) "from a to z" and being able to recreate it ?

**Tags:** bitcoin-core, development, bitcoin-core-development

> **Comments:**
> **username_1**: You mean other than the source itself (https://github.com/bitcoin/bitcoin) or the developer documentation (https://bitcoin.org/en/developer-documentation)?  Also, this SE site is a wonderful resource for specific questions :)  
> **username_2**: @username_1: That should be an answer, not a comment. ;) Perhaps add in the Princeton Bitcoin Book.  
> **username_1**: I wasn't sure this was precisely what @username_0 was looking for, but I'll post it as an answer just in case.  

---

## 2 answers

### Answer by username_1 on 2016-06-20. Score: 11 | Accepted answer

To understand Bitcoin Core, the best resource is probably the source code itself:

<https://github.com/bitcoin/bitcoin>

To help understand what is going on in the code, try the [developer documentation](https://bitcoin.org/en/developer-documentation) and the [Princeton Bitcoin Book](https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf). Keep in mind that the code gets updated faster than the documentation, so the code should be your source of truth.

Some interesting places to start:

<https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp> - this is the source file that contains the code for interpretting script, and therefore checks for transaction validity

<https://en.bitcoin.it/wiki/Protocol_documentation> - the docs for the network protocol, such as message definitions and data structures

<https://bitcoin.org/en/developer-reference#transactions> - transaction reference describing the content and construction of transactions

For any clarifications and questions, I highly recommend [this very StackExchange site](https://bitcoin.stackexchange.com/) :)

> **Comments:**
> **username_0**: First thanks for the answer, I have to say I was looking for a documentation about the C++ code available on Github, I already looked at the developper documentation and read the book "Mastering bitcoin" wrote by Mr. Andreas Antonopoulos and it gave me detailed explanations about the protocols but my purpose is to go as deep as I can taking the source code to understand each line to be sure of what this software  really does with my computer and I really don't know how to start (I am currently ready all classes starting from bitcoin-cli.cpp but it is not really efficient).  
> **username_1**: I've edited my answer to specify a few of the places I recommend diving into.  This is basically just my opinion of what's interesting, so keep in mind that others would tell you to start elsewhere.  Personally, I think the encumbering and unencumbering of transaction outputs are the heart of Bitcoin, so I've pointed you to the script part of the code.  I've also singled out the network protocol, since communication between peers is another fundamental aspect.  Again, just my opinion.  
> **username_2**: @username_0: Please also edit clarifications back into your original question, so that other answeres don't have to check all answers before adding one.  

---

### Answer by username_3 on 2021-05-07. Score: 0

Couple of years ago, i created a few articles on bitcoin core code analysis. It is here:
<http://embedded-design-vic.blogspot.com/2017/07/bitcoin-core-tutorial-and-source-code.html>

> **Comments:**
> **username_4**: Articles aren't noob-friendly at all; they're kinda bardly formatted too; you use jargons I've never heard about before and don't explain any of them. I'm not saying these blog entries are unuseful, I believe you know a lot about it too, but you can't call these a "From A to Z Bitcoin Core", more like a "indepth Bitcoin Core for experts" probably.  

---

