Skip to content

Latest commit

 

History

History
135 lines (78 loc) · 11.3 KB

6.md

File metadata and controls

135 lines (78 loc) · 11.3 KB

Chapter 6

Community and contributing

The Monero Project is a collaborative open community, and we welcome your contributions to code or other facets of the ecosystem. This chapter provides a high-level overview of our decentralized structure, and contains tips and links for getting involved.

6.1 Community culture

6.1.1 Principles of openness

While the Monero cryptocurrency itself epitomizes privacy, its community is built on the core values of transparency and collaboration! Users, developers, and researchers communicate on IRC channels that are open to the public. You can also find an active community of Monero users and developers on other platforms such as Slack, Mattermost, and Taiga. Key meetings are archived for public access on the official website.

This culture of cooperation and openness is a natural consequence of Monero's origin as a code fork from ByteCoin. The developer of ByteCoin operated with unilateral secrecy, making designs and decisions without community feedback. The resulting development mistakes, especially the egregious premine, ruined the viability of the coin.

The Monero community came into existence by forking the shadowy ByteCoin development into the light of a decentralized, collaborative, and diverse community. This has undoubtedly strengthened the project on many fronts, and the Monero community has learned to thrive through cooperation. While cryptography provides the technical underpinnings for Monero, the community is its real source of power!

Figure 6.1

6.1.2 Many great minds work on Monero

The Monero project is a massive community effort, collectively crafted by hundreds of individuals from all across the globe. At the time of writing, more than 500 people have contributed code, including 200 in the last year. Among all cryptocurrencies this number of contributors is led only by Bitcoin and Ethereum (at the time of writing). Monero has adopted an un-governance scheme for organizing growth and development. The project is comprised of several different branches working together: the Monero Core Team, the Monero Research Lab, Monero Workgroups, and the community.

The Monero Core Team manages many of the critical tasks for Monero. Key roles include:

  • Acting as primary trusted arbiters of the Forum Funding System on behalf of the community.

  • Managing the codebase of the Monero Project, which includes merging code, keeping backups, and ensuring the safety, security, and free access of the code for any party.

  • Acting as stewards for the general donation fund, directing its capital toward endeavors that further the Monero Project.

  • Acting as trusted signers and distributors of Monero software and related technologies.

  • Working with the community to discern a vision and roadmap for leading the Monero Project.

The Monero Research Lab conducts cutting-edge basic and applied research on cryptocurrency technologies and analyses. MRL includes many academics and researchers, and studies are published openly at https://web.getmonero.org/resources/research-lab/ .

The Monero Workgroups are collaborations formed to join people around unique goals. This allows small teams of individuals to connect and tackle specific tasks. For example, the Monero Hardware Workgroup is well underway on its mission to build the first open-source community-driven hardware wallet, and Monero Localizations Workgroup has translated Monero code and content into dozens of languages. Another instance was the Monero Integrations Workgroup, which developed open-source payment gateways. You can join a workgroup to help with translating Monero, crafting kits for Meetups, or helping users with software issues.

Ultimately, it is the incredible community that makes Monero possible! Anybody is welcome to contribute code, propose projects, fund proposals, help with outreach, or write books about Monero.

6.2 Code culture

6.2.1 Create a pull request for the improvements

Anyone is welcome to contribute to Monero's codebase! If you have a fix or code change, feel free to submit it as a pull request directly to the “master” branch. To modify the Monero code, follow this process to edit a forked copy and recommend your improvements to the main repository:

  • Fork the repository on GitHub
  • Clone the repository to your machine
  • Make a branch, implement necessary changes
  • Commit the files with a clear descriptive message
  • Execute git push origin branch-name to sync the local changes to your forked repository
  • Create a pull request (including clear descriptions and documentation) to submit your changes back to the original (base) repository

Your modifications may be approved quickly if the change is relatively small or does not affect other parts of the codebase. However, changes that are particularly large or complex should be discussed at length with the community.

When submitting a pull request on GitHub, make sure your branch is rebased. Avoid leaving stray and merge commits from other coders in the branch you will submit. You may be asked to rebase if there are conflicts (even if they are trivially-resolvable).

6.2.2 Patch etiquette

Patches should ideally be submitted as pull requests, following the process described above. If that can't be done, patches in git format-patch format can be sent (e.g. post to fpaste.org with a long timeout, then share a link with #monero-dev on irc.freenode.net).

Patches should be self-contained. A good rule of thumb is to create one patch per separate issue, feature, or logical change. Follow the code style of the particular portion of code that you're modifying, and avoid making other unnecessary edits, such as whitespace changes or reindentation. Proper squashing should be done (e.g. if one of your patches includes a bug that is fixed in a subsequent patch, then both patches should be merged).

6.2.3 General guidelines

Commit messages should be sensible. The subject line must describe the patch, with an optional longer body for providing details, documentation, etc. Well-commented code is strongly encouraged, to help others interpret and constructively interact with your code. If your modifications add new functionality, it is helpful to include testing results with your pull request.

If you've made random unrelated changes (including those due to an overzealous editor), you can select which modifications are included in the commit using git add -p, which steps through each of the edits to confirm which should be included. This helps create clean patches without any irrelevant changes. git diff displays changes in your tree, and git diff --cached will show the changes that are currently staged for commit. Hunks that are added with git add -p, will “move” from the git diff output to the git diff --cached output, so you can see clearly what your commit is going to look like.

More specific guidelines regarding common processes are described on the official repository of the Monero Project.

6.2.4 Repository for Monero

Many different repositories are hosted at the Monero Project and on GitHub. In fact, there are over 23 repositories in the Monero Ecosystem and 340 repositories on the Monero topic. Several of them house components that we've already discussed in Mastering Monero, for example:

  • Monero: the core of Monero network which includes the Monero Wallet CLI, written in C++ language
  • Monero-site: source code for the https://getmonero.org website
  • Monero-GUI: Graphical User Interface for Monero, built with Qt library
  • kastelo: the community hardware wallet
  • kovri: The Kovri anonymizing router

These projects are well-documented, so that you can become familiar with the code and make improvements! There are many sub-projects with a variety of opportunities for you to contribute to Monero. Please visit one of the repositories, read through some of the open issues, and consider how you can leave your legacy in the Monero codebase.

$ This text is a terminal command. Don't run this command if you don't know what you are touching.

Note: At the time of writing, some components of the Monero ecosystem are shifting their repositories from GitHub to GitLab.

6.2.5 Monero-announce Mailing List

It could happened that Core Team had to make an announcement regarding a deprecated feature of Monero, or simply to notify a successful hard fork. For this, there is a mailing list that sends important announcements about the Monero software and network. Anyone who is interested in being involved in the Monero community or staying informed of its updates is welcome to subscribe to the mailing list here: https://lists.getmonero.org/postorius/lists/monero-announce.lists.getmonero.org/

6.3 Introduction to Monero development

Building the Monero code is a complex process, so some tips and summaries are included here. Linux systems have a built-in shell that helps with building the Monero core, so consider switching to a Unix-based operating system, if possible. Monero is written in C++, with C++11-style referenciation.

6.3.1 Downloading the Monero source code

Monero uses Git for version control; this system allows developers to track changes and modifications to their code, and easily coordinate work on shared files. To download the Monero code, simply execute:

$ git clone --recursive https://github.com/monero-project/monero 

6.3.2 Dependencies

To build Monero software from the source code, your path will need to include the dependencies in the table below. A few of the libraries are also included in this repository (marked as Vendored). By default, the build uses the library installed on the system, and ignores the vendored sources. However, if no library is found installed on the system, then the vendored source will be built and used.

GCC | libunbound | ldns CMake | libsodium | expat pkg-config | libminiupnpc | GTest Boost | libunwind | Doxygen OpenSSL | liblzma | Graphviz libzmq | libreadline | pcsclite

6.3.3 Building instruction

Monero uses the CMake build system and a top-level makefile that invokes cmake commands, as needed. Once you've installed the dependences, change to the root of the source code directory and execute the make command to begin the build. The process may take up to an hour or two. Once the code has finished building, you can find the Monero binaries in the build folder.

6.3.4 Build troubleshooting

If you encounter errors, the output will typically indicate exactly what went wrong. A few of the common bugs to troubleshoot include:

  • An outdated boost version (you may have to manually install the current one)
  • Outdated gcc/g++
  • Missing libzmq3-dev
  • Missing libreadline-dev
  • OpenGL errors

You can (optionally) type make debug to compile a debugging build. There are many communities with information to help you with troubleshooting. Search engine queries with your build errors are likely to connect you with a solution or people that can help.

6.3.5 Building Monero Graphical User Interface

The Monero graphical user interface (GUI) is built with C++ and Qt libraries. Both are necessary to successfully build the GUI. With the dependencies in place, you can clone and build the GUI with the commands:

  $ git clone --recursive https://github.com/monero-project/monero-gui
  $ cd monero-gui
  $ ./build.sh