How to make C++ contributions to nano node development
Nano is a live financial network that sees billions of dollars being transacted each year. As you might imagine, it’s a highly technical piece of software that requires continuous and thorough testing. It’s also completely open, which means that anyone can contribute to it.
At the Nano Foundation, we believe there is so much talent, determination and good will in our community and so many valuable contributions that could be made to the network. So, we’ve put together this short guide on exactly how to do it!
Below you’ll find a step by step outline of the process, plus some potential challenges and a few important things to consider. And this is just stage one. We’ll continue to build out this guide with in-depth articles over the weeks and months to come.
How to contribute to nano node development
Here are the Ten Commandments of nano node C++ development:
- Identify a problem or a need
- Set up a development environment
Check out this guide by Dimitrios, one of our software engineers, outlining the easiest way to do this. You can also find Nano Foundation guidance here.
- Fix the problem locally
Write code to fix the problem or implement the need you have. Scratch that itch!
- Test your fix locally
Write appropriate unit tests for the code you wrote. Then run the following tests to ensure that all the other unit tests pass. core_test, rpc_test, qt_test
- Document your results
Try to explain the reasoning behind your decisions at each stage. Write documentation assuming the person reading it knows nothing. This documentation might be read after months or even years, so it will still need to make sense then. Diagrams are great: a picture tells a thousand words!
- Create a pull request
For help with this - as well as other technical processes mentioned here - take a look at this standard fork and pull request workflow.
- Check that the Continuous Integration tests on GitHub pass
You want to see green check marks on all the tests, like this. If they don't pass, try to debug them. Ask the core team for help if you get stuck.
- The core team reviews the pull request, suggesting changes and improvements
Be aware that reviewing someone else's code is a very time consuming, mentally challenging task. Please take every possible step to make this process as easy as possible for us.
- Modify the pull request based on this review
These steps (8 and 9) may be repeated many times
- The core team merges the pull request into the develop branch
Find the develop branch here.
Congratulations! Your pull request has been accepted and will be part of the next release.
Things to keep in mind when contributing to the nano network
We know contributing to nano node development can be difficult and time consuming, so we asked Dimitrios for his top tips on how to make the process successful:
Understand what’s required:
“Unfortunately, the majority of pull requests (PRs) do not make it to the end because people underestimate the effort required to get past the review and test steps (see 8 and 9 above). PRs have to be well tested and this takes a lot of time and hard work from the contributor. They also have to be well documented, so the core team can easily understand the intention and design during the review process.”
Keep pull requests small:
“Large and complicated PRs have a miniscule chance of being accepted because of the complexity involved in reviewing and testing. Split large pieces of work into smaller PRs and push them one by one.”
Remember, network contribution is all about trust:
“During the process of contributing, a relationship, trust and a common understanding is being built between the core team and the contributor. This takes time but it is the most important element of the process. Many people forget this and do not give it the care and attention it deserves.”
There’s no doubt that contributing effectively to the nano network is challenging. For instance, here’s an example of the amount of work it takes for even the simplest of pull requests to get merged. But nano is the world’s most efficient currency because of the talent and hard work of its developers - half of whom are community members.
If you have the skill and commitment to contribute to nano node development, we’d love you to get involved. So much of nano’s growth is down to the work of its community and there are so many ways to make a difference.
If you’d like to contribute to nano in other ways, contact email@example.com.
Nano Foundation does not endorse or approve products and/or services used or developed by third parties. Any links to third party software or sites are for informational purposes only. Nano Foundation bears no responsibility for the operability, accuracy, legality or content of third party products and/or services. Any questions regarding third party material should be directed to that party.