Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitcoin #2

Open
lucasleecr opened this issue Sep 26, 2018 · 0 comments
Open

Bitcoin #2

lucasleecr opened this issue Sep 26, 2018 · 0 comments

Comments

@lucasleecr
Copy link
Contributor

@lucasleecr lucasleecr commented Sep 26, 2018

Link to the codebase

https://github.com/bitcoin/bitcoin/

Which release/version did you read?

0.1.5. (https://github.com/bitcoin/bitcoin/releases/tag/v0.1.5)

Why it is a good project to read?

  • Written by Satoshi Nakamoto!
  • First implementation of blockchain. A lot of cryptocurrencies are forked from it.
  • Concise - only 9k lines of source files and 6k lines of header files.
  • Most of the code is still relevant today.

Starting point

ui.cpp (https://github.com/bitcoin/bitcoin/blob/v0.1.5/ui.cpp). This is where the initialization happens when a bitcoin application starts.

Reading order

  • Bitcoin address
  • Transaction
  • Mining
  • P2P network
  • Blockchain and consensus

Interesting parts

Almost everything. It was an innovation.

Any parts should be skipped?

  • Bitcoin features that were experimental. This includes: using IRC to find peer addresses (in irc.cpp and irc.h), marketplace/product/review (market.cpp and market.h), and sending bitcoins to an IP address. Code related to GUI.

Other tips

  • Just get started. Don't try to read a lot of theories about bitcoin before you start. The code is pretty clear. Only look up an unfamiliar concept when needed (like merkel tree).
  • Don't be afraid to skip code. For example, the algorithm to select the UTXO is very long but can be safely skipped https://github.com/bitcoin/bitcoin/blob/v0.1.5/main.cpp#L2440). Focus on the concept and workflow.
  • Don't try to compile the project because it's a very old release and requires old dependencies too.

Links and resources

Contributor

@lucasleecr

@lucasleecr lucasleecr changed the title Bitcoin (0.1.5) Bitcoin Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.