The Polkadot SDK
project is an OPENISH Open Source Project
Individuals making significant and valuable contributions are given commit-access to the project. Contributions are done via pull-requests and need to be approved by the maintainers.
There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
- No
--force
pushes or modifying the master branch history in any way. If you need to rebase, ensure you do it in your own repo. No rewriting of the history after the code has been shared (e.g. through a Pull-Request). - Non-master branches, prefixed with a short name moniker (e.g.
gav-my-feature
) must be used for ongoing work. - All modifications must be made in a pull-request to solicit feedback from other contributors.
- A pull-request must not be merged until CI has finished successfully.
- Contributors should adhere to the house coding style.
- Contributors should adhere to the house documenting style, when applicable.
A Pull Request (PR) needs to be reviewed and approved by project maintainers.
If a change does not alter any logic (e.g. comments, dependencies, docs), then it may be tagged
A1-insubstantial
and merged faster.
If it is an urgent fix with no large change to logic, then it may be merged after a non-author
contributor has reviewed it well and approved the review once CI is complete.
No PR should be merged until all reviews' comments are addressed.
The set of labels and their description can be found here.
-
Please use our Pull Request Template and make sure all relevant information is reflected in your PR.
-
Please tag each PR with minimum one
T*
label. The respectiveT*
labels should signal the component that was changed, they are also used by downstream users to track changes and to include these changes properly into their own releases. -
If your’re still working on your PR, please submit as “Draft”. Once a PR is ready for review change the status to “Open”, so that the maintainers get to review your PR. Generally PRs should sit for 48 hours in order to garner feedback. It may be merged before if all relevant parties had a look at it.
-
If you’re introducing a major change, that might impact the documentation please add the label
T13-documentation
. The docs team will get in touch. -
If your PR changes files in these paths:
polkadot
:^runtime/polkadot
polkadot
:^runtime/kusama
polkadot
:^primitives/src/
polkadot
:^runtime/common
substrate
:^frame/
substrate
:^primitives/
It should be added to the security audit board and will need to undergo an audit before merge.
-
PRs will be able to be merged once all reviewers' comments are addressed and CI is successful.
Noting breaking changes: When breaking APIs, the PR description should mention what was changed alongside some examples on how to change the code to make it work/compile. It should also mention potential storage migrations and if they require some special setup aside adding it to the list of migrations in the runtime.
When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:
- Buggy behavior.
- Undue maintenance burden.
- Breaking with house coding style.
- Pessimization (i.e. reduction of speed as measured in the projects benchmarks).
- Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
- Uselessness (i.e. it does not strictly add a feature or fix a known issue).
The reviewers are also responsible to check:
- if a changelog is necessary and attached
- the quality of information in the changelog file
- the PR has an impact on docs
- that the docs team was included in the review process of a docs update
Reviews may not be used as an effective veto for a PR because:
- There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
- It does not fit well with some other contributors' longer-term vision for the project.
All Pull Requests must contain proper title & description.
Some Pull Requests can be exempt of prdoc
documentation, those
must be labelled with
R0-silent
.
Non "silent" PRs must come with documentation in the form of a .prdoc
file.
A .prdoc
documentation is made of a text file (YAML) named /prdoc/pr_NNNN.prdoc
where NNNN
is the PR number.
For convenience, those file can also contain a short description/title: /prdoc/pr_NNNN_pr-foobar.prdoc
.
The CI automation checks for the presence and validity of a prdoc
in the /prdoc
folder.
Those files need to comply with a specific schema. It
is highly recommended to make your editor aware of the schema as it is
self-described and will assist you in writing correct content.
This schema is also embedded in the
prdoc utility that can also be used to generate and check the validity of a
prdoc
locally.
We use labels to manage PRs and issues and communicate state of a PR. Please familiarise yourself with them. Best way to get started is to a pick a ticket tagged easy or medium and get going. Alternatively, look out for issues tagged mentor and get in contact with the mentor offering their support on that larger task.
If what you are looking for is an answer rather than proposing a new feature or fix, search https://substrate.stackexchange.com to see if an post already exists, and ask if not. Please do not file support issues here. Before opening a new issue search to see if a similar one already exists and leave a comment that you also experienced this issue or add your specifics that are related to an existing issue. Please label issues with the following labels:
I*
issue severity and type. EXACTLY ONE REQUIRED.D*
issue difficulty, suggesting the level of complexity this issue has. AT MOST ONE ALLOWED.T*
Issue topic. MULTIPLE ALLOWED.
Declaring formal releases remains the prerogative of the project maintainer(s).
UI tests are used for macros to ensure that the output of a macro doesn’t change and is in the expected format.
These UI tests are sensible to any changes in the macro generated code or to switching the rust stable version.
The tests are only run when the RUN_UI_TESTS
environment variable is set. So, when the CI is for example complaining
about failing UI tests and it is expected that they fail these tests need to be executed locally.
To simplify the updating of the UI test ouput there is the `.maintain/update-rust-stable