What It's Like to Review Bitcoin's Code

Published on by Coindesk | Published on

On June 19, Chaincode developer John Newbery gathered a group of developers to examine a proposed change to bitcoin's code.

Newbery started the Bitcoin Core Review Club to give coders tips on how to figure out how to review a change and determine if it's beneficial for the cryptocurrency.

Unlike proprietary code, its code anyone can see and use - what's known as "Open source."

One of the ways to learn the codebase is to review and test the code programmers submit, to make sure it actually works, and doesn't introduce a bug or - an unfortunate reality - accidentally split the bitcoin network in half.

In other words, there are 300 changes that haven't been reviewed enough yet to be officially added to the codebase, from making the documentation describing the code easier to read to improving the performance of bitcoin.

The problem is that there are limited developers who have enough experience reviewing code changes to determine whether they should be officially added to the codebase.

Said developers should then run all of the "Tests," to make sure the code change doesn't accidentally trip up another piece of code, then move toward reviewing the rest of the code.

"My thoughts about opening pull requests: no-one owes you a review. Anyone who reviews your code is doing you a favour. If you open a pull request, you're competing with other pull requests for review time."

Are there bugs? Does the code change come with tests that ensure the code change works as planned? These are the questions a lot of reviewing time is spent answering.

"I tried first to identify which kind of PR it was: Doc, code style, buf fix, new feature, or test addition. Because knowing this fact is going to guide how you read commits first time, how much time you will need for review and which kind of tests needed," the developer said.

x