Written in front: The author of this article is Amiti Uttarwar, a Bitcoin Core developer, works at Xapo, and was a software engineer at Coinbase. Based on her own experience, she shared cheats for contributing to Bitcoin in the article, which contains a lot of learning materials, and is full of dry goods, which is very helpful for those in need. PS This is an excellent younger sister ~
In the past year, I entered the wonderful rabbit hole that contributed to Bitcoin Core. In the process, I was fortunate to receive guidance and support from many people, and I also learned some skills myself. In this article, I want to share some effective tools I found.
- Bitcoin welcomes new technology update, Core developers teach you how to verify the client
- Opinion and interpretation: the differences between Jiang Zhuoer and Bitcoin Core
- How does Xiaobai understand the bitcoin network improvement protocol Erlay?
- Bitcoin Exotic 8Q: Why was block 620826 born 1 second earlier than block 620825?
- Academic orientation makes Bitcoin more secure, how does the Erlay protocol save 84% of the bandwidth of the node?
Becoming a Bitcoin Core contributor is just one way to help advance this protocol. Other options include (and go well beyond) participating in mailing list discussions, researching attack vectors or scaling technologies, contributing to Lightning Network clients, or developing related tools such as the secpk256k1 codebase or better testing infrastructure. But this article does not cover these topics.
This article is about Bitcoin Core. Through my experience, I hope it can help you find your way to contribute.
before the start
First, read the white paper. To be honest, if you haven't read it, then don't read this article, just read the white paper.
Understanding the basic concepts of Bitcoin's operation is necessary. There are many channels to understand. I will start by reading one of these books (Mastering Bitcoin, Programming Bitcoin or Grokking Bitcoin). If it is online, I will visit the resource list of Jameson Lopp or the course of Chaincode Lab. The former is broader, but the latter is specifically for protocol development.
If your goal is to contribute to Bitcoin Core, don't try to learn the details of every concept. There are not many differences in themes. The goal is to gain a high level of understanding and reach out to different parts of the system. It takes time to thoroughly digest the basic principles of this distributed consensus system.
Bitcoin Optech Weekly is the "best" way to learn about the development of ecosystem technology. Dave Harding is keeping it updated. I highly recommend subscribing to this content.
Choose what to give up
Once you decide to contribute to Bitcoin Core, the process doesn't stop. This project has enough complexity and development work to keep anyone busy for many lives. Choosing how to allocate your attention will help determine what you don't want to focus on (at least not now).
To make a difference, the breadth and depth of development are important. Finding the right balance is an art that develops over time. The breadth increases exposure to new concepts and helps determine which jobs are relevant. In order to propose a PR (Pull Request) that improves the code base, understanding the larger context is as important as delving into one aspect and becoming fully familiar with the proposed change set.
What people like to recommend is always beyond your reading, comprehension, digestion, and study … I have done it above-I recommend 3 books, 2 endless lists of materials, and a weekly report . When you communicate with others, you also face potential stress, because you need to know enough about a large number of topics to contribute to any conversation. This is great for breadth, but only you can create the path to depth. To submit a PR, you need to develop specific knowledge that will allow you to provide change. Don't stay in the "digestion" phase, focus will ensure that you continue to the "creation" phase.
This is even more important if you are not working on Bitcoin all day. This is a very complicated project. Need to create space. Even seemingly simple tasks can take a while.
Okay, enough life advice. Now let's talk about the project details …
Familiar with the code base
- Copy the code base, compile and test.
- Read through the project developer documentation:
1. The Contributing to Bitcoin Core guide is the basics for getting started, including how pull requests and the review process work.
2. "Developer Notes" is a good intensive reading guide. Before starting a PR, re-read this note to ensure that you meet the current standards.
3. Productivity Notes tips are very useful at different times during the development workflow. I highly recommend performing the first four steps immediately (install ccache, execute ./configure, compile with make -j [num-cores], and generate a build target).
Read the introductory articles by Jimmy Song and John Newbery.
Participate in weekly PR reviews. Reviewing PR is critical to the project. More importantly, this is an effective way to understand the code base and merge process from the beginning. PR reviews are a way to become familiar with a particular changeset with the help of others. The value you get from a PR review is a direct result of your willingness to invest energy. Weekly participation helps raise awareness of patterns such as technical architecture and historical environment, and independent development takes longer. Whether you choose to participate in such an activity, or just dive, or spend time exploring the code, you will definitely learn a lot. Being prepared in advance allows you to use this time to post or build your confidence in understanding the code.
Find your first PR
When you start to adapt to the code base, you may feel that you are ready to submit a PR, but you are not sure how to choose a valuable contribution to the project. So far, the various methods mentioned in this article are likely to help you find a meaningful piece of content. But if you are still looking, here are some other options:
- Keep an eye on good first issues and up for grabs .
- Search for the code base with "TODO" and parse to see if there is a code base that you are familiar with and available. I came across some of the tests that seemed friendly to beginners.
- Select a section of the code base (that is, a section in the contribution documentation ) and note the relevant PRs that are being opened. If you follow up with PR content, you will definitely notice what to do next. At the same time, think critically about how to test these changes. Turning on PR to follow up and increase test coverage will be the best choice. You can also visit pr-review-club history to familiarize yourself with a section.
The nature of open source contributions means that there is no centralized project management system. Therefore, some changesets that are useful for the project are not necessarily the best use of PR authors' attention and skills. Therefore, as a contributor, finding useful contributions on your learning curve is part of your job. My first PR was found through up-for-grabs.
I was surprised to find so much to do. I had never thought of this before taking a closer look at the Github project.
From the "street image" accompanying Bitcoin Core, it's hard to imagine how easy it is to contribute. Keeping an eye on the ongoing (simple and complex) to-do list does indeed show us how young the Bitcoin project is and the urgent need for more contributors.
Use the internet for further learning
When I started learning the C ++ language, I got some great books, but to be honest, I was still struggling to read them.
Hands-on learning is most effective for me. I focus on learning the most relevant parts of the language so that I can read the Bitcoin Core code base.
So I will write the code. When I come across a new C ++ concept, I read the documentation and try to get this function out in a sample program. I will keep tmux tab open, so I can easily call c ++ play. These programs can also serve as documentation of concepts I have modified. Another great tool is Compiler Explorer . I find that color coding is especially helpful for comparing multiple methods that perform the same function. I can see whether these differences are superficial, optimized, or fundamentally change the work done.
In order to delve deeper into specific C ++ concepts, I have always enjoyed watching CppCon talks , especially the "Back To Basics" series.
This is a good start, but sometimes I want to talk to people. Initially, I sometimes had questions about some symbols, but I didn't know how to search using Google. At the moment, I would like to confirm that my understanding of the documentation is correct.
I found some great online communities and strangers are willing to help me find the right direction. There is a cpplang slack on C ++, a ## c ++ -general communication channel, and the #include <c ++> community on discord. On the Internet, I was surprised by the help given by strangers.
1. I encourage asking for help, but be polite and thoughtful. Do your due diligence, first try to find the answer yourself. Use the communication channels that are appropriate for your problem politely. People don't owe you the answer. Any help is given out of generosity.
2. Choose a chat client: I found that irccloud is a simple, beautiful client, and it's free. You can also choose to pay a small fee to keep your username and log permanently. There are many options for such a client, but I recommend that you focus your decision-making ability on more important things and choose the client as quickly as possible.
My favorite Bitcoin resources are everywhere in this post, but here are some codes I want to highlight:
- Developer reference for P2P messaging and RPC (Remote Procedure Call)
- The Bitcoin stack exchange has a discussion dedicated to protocol development, involving various questions and answers. This site is hard to find on Google, so it's best to visit directly
- Fabian Jahr wrote a complete document on debugging techniques [ speech ] [ Highlights ]
- I like to see an overview of the architecture of James O'Beirne [ presentation ] [ slides ]
If you are struggling with a technical concept and not sure what to try, please contact me! I certainly don't know all the answers, but I'm happy to brainstorm ideas for you.
Learn more about Bitcoin
There are many great ways to increase your knowledge of the development of the Bitcoin ecosystem. Here are some popular choices:
- Every Thursday at 19:00 UTC time, a meeting will be held at # bitcoin-core-dev
- # bitcoin-core-pr-reviews channel sometimes discusses processes and tools, following this channel can help
- Revisit the Bitcoin course at Chaincode Labs, where there are a lot of great materials-speeches, papers, and even code challenges
- Attend high-quality meetings
- Watch a video of a previous meeting. I watched the Bitcoin Edge Dev ++ [ 2017 ] [ 2018 ] video on the way to and from work and learned a lot
- Attend a Socratic seminar if you can
- Read the Bitcoin wiki , especially the protocol and privacy pages
- Chaincode recently made a podcast channel
Getting familiar with the Bitcoin protocol is not an easy task, especially if you have other things to do, such as a full-time job or a student. I use interval memory to remember new information. I highly recommend this approach. It helps to catalyze the ability to persistently store information so you can spend more time acquiring new concepts or applying what you have learned. There are other benefits to doing this: you can learn concepts at any time, and you can spend any free time on specific tasks in the code base.
Keep an eye on Chaincode training programs. I was fortunate to participate in this project last summer, which changed the way I work. But keep in mind that this is a high threshold project, the higher your contribution to Bitcoin Core will increase your chances of acceptance (participating in code review, reviewing PR, submitting PR, etc.).
Seriously, do it now
Contributing to Bitcoin Core is difficult, but not entirely impossible. Before starting this journey, I had never written (or even read) any C ++ code. It's natural to be afraid, but don't let this emotion stop you.
Be patient with yourself. It will take a lot of time for me to contribute a lot to Bitcoin Core. Once I spent 3 full days in integration testing, repeating different methods of filling the memory pool with transactions. The test time required for my first few attempts was unreasonably long, so I had to try different methods. Don't fall into the illusion that this should be easy. Focus on what you can learn and keep trying.
In the beginning, "Bitcoin Core" and "Core Contributors" made it easy for people to think that this is a large and mysterious organization and it is impossible to participate in it. I was pleasantly surprised at how helpful and supportive people were. Everyone who works on the project is subject to extreme bandwidth limitations, so if you make a meaningful contribution, everyone will support you.
This is very important. Don't correct typos in PR right from the start. Be patient, invest in your studies, observe the project, and determine how you can make a meaningful contribution.
No matter where you are on the learning curve, you can be an asset to this project. If you are willing to contribute your energy and have the ability to think and learn critically, you are a fortune. Don't let arrogance or insecurity lead you astray.
Some whimsical thoughts …
If we were to map various learning paths to contribute to Bitcoin Core, it would certainly not be as orderly and linear as blockchain. Pursue your own journey, enjoy the scenery on the road, and have fun.
The exploration in the open source field reminded me of off-road backpacking.
In backpacking, I first check the places I want to go on a topographic map, and then draw the approximate route I plan to travel, staying on the smoothest terrain. Since Bitcoin is an emerging field, it may not be found on the map. Therefore, when browsing bitcoin, you must first piece together a rough map of the area with some snippets of understanding, then work out a method. I hope this article will make this process easier.
The actual route of the hike requires constant iteration. Every step you take, you get new information that you can use to determine the least difficult path so you can use your energy to explore the mountains deeper. You need to pay attention to the details of each step, as well as the macro line.
This process is similar to the exploration of Bitcoin. As you learn more, you will have different perspectives on the future terrain, and you must constantly choose the right route to keep yourself moving forward reasonably. Sometimes you hit a cliff and have to go back and try another way. Finding a route requires a lot of energy and attention. You must be a navigator and a hiker.
I can talk more about my experience and make this article longer, but I will end like this:
good luck! Hope to see you on GitHub 🙂