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 ?

  • 2
    You mean other than the source itself (github.com/bitcoin/bitcoin) or the developer documentation (bitcoin.org/en/developer-documentation)? Also, this SE site is a wonderful resource for specific questions :)
    – Jestin
    Commented Jun 20, 2016 at 18:59
  • @Jestin: That should be an answer, not a comment. ;) Perhaps add in the Princeton Bitcoin Book.
    – Murch
    Commented Jun 20, 2016 at 21:01
  • I wasn't sure this was precisely what @smoumou was looking for, but I'll post it as an answer just in case.
    – Jestin
    Commented Jun 20, 2016 at 21:22

2 Answers 2


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


To help understand what is going on in the code, try the developer documentation and the Princeton Bitcoin Book. 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 :)

  • 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
    Commented Jun 21, 2016 at 10:08
  • 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
    Commented Jun 21, 2016 at 13:41
  • @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
    Commented Jun 21, 2016 at 15:06

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

  • 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. Commented Dec 23, 2023 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.