The XRP Ledger has many and diverse stakeholders, and everyone deserves a chance to contribute meaningful changes to the code that runs the XRPL. To contribute, please:
- Fork the repository under your own user.
- Create a new branch on which to write your changes. Please note that changes which alter transaction processing must be composed via and guarded using Amendments. Changes which are read only i.e. RPC, or changes which are only refactors and maintain the existing behaviour do not need to be made through an Amendment.
- Write and test your code.
- Ensure that your code compiles with the provided build engine and update the provided build engine as part of your PR where needed and where appropriate.
- Write test cases for your code and include those in
src/test
such that they are runnable from the command line using./rippled -u
. (Some changes will not be able to be tested this way.) - Ensure your code passes automated checks (e.g. clang-format and levelization.)
- Squash your commits (i.e. rebase) into as few commits as is reasonable to describe your changes at a high level (typically a single commit for a small change.)
- Open a PR to the main repository onto the develop branch, and follow the provided template.
If your code change is a major feature, a breaking change or in some other way makes a significant alteration to the way the XRPL will operate, then you must first write an XLS document (XRP Ledger Standard) describing your change. To do this:
- Go to XLS Standards.
- Choose the next available standard number.
- Open a discussion with the appropriate title to propose your draft standard.
- Link your XLS in your PR.
This is a non-exhaustive list of recommended style guidelines. These are not always strictly enforced and serve as a way to keep the codebase coherent rather than a set of thou shalt not commandments.
All code must conform to clang-format
version 10, unless the result would be unreasonably difficult to read or maintain.
To change your code to conform use clang-format -i <your changed files>
.
- Proliferation of nearly identical code.
- Proliferation of new files and classes.
- Complex inheritance and complex OOP patterns.
- Unmanaged memory allocation and raw pointers.
- Macros and non-trivial templates (unless they add significant value.)
- Lambda patterns (unless these add significant value.)
- CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
- Importing new libraries unless there is a very good reason to do so.
- Extend functionality of existing code rather than creating new code.
- Prefer readability over terseness where important logic is concerned.
- Inline functions that are not used or are not likely to be used elsewhere in the codebase.
- Use clear and self-explanatory names for functions, variables, structs and classes.
- Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
- Provide as many comments as you feel that a competent programmer would need to understand what your code does.
Maintainers are ecosystem participants with elevated access to the repository. They are able to push new code, make decisions on when a release should be made, etc.
New contributors' PRs must be reviewed by at least two of the maintainers. Well established prior contributors can be reviewed by a single maintainer.
New maintainers can be proposed by two existing maintainers, subject to a vote by a quorum of the existing maintainers. A minimum of 50% support and a 50% participation is required. In the event of a tie vote, the addition of the new maintainer will be rejected.
Existing maintainers can resign, or be subject to a vote for removal at the behest of two existing maintainers. A minimum of 60% agreement and 50% participation are required. The XRP Ledger Foundation will have the ability, for cause, to remove an existing maintainer without a vote.
- JoelKatz (Ripple)
- Manojsdoshi (Ripple)
- N3tc4t (XRPL Labs)
- Nikolaos D Bougalis (Ripple)
- Nixer89 (XRP Ledger Foundation)
- RichardAH (XRPL Labs + XRP Ledger Foundation)
- Seelabs (Ripple)
- Silkjaer (XRP Ledger Foundation)
- WietseWind (XRPL Labs + XRP Ledger Foundation)
- Ximinez (Ripple)