-
Maksym H authored
Closes https://github.com/paritytech/product-engineering/issues/93 - Deprecates old command bot bash scripts. New cmd implementation is re-written on Python - Deprecates `sync` command, which was never used - Benchmarks: - Uses new [frame-omni-bencher](https://crates.io/crates/frame-omni-bencher) - Simplifies usage to only providing a runtime and/or pallet name (even multiple runtimes or pallets) - Supports sub-modules (like `/cmd bench --runtime dev --pallet pallet_asset_conversion_ops`) - Can regenerate all weights with one command (substrate, polkadot, cumulus) for provided pallet(s) name - Adds [subweight](https://crates.io/crates/subweight-core) diff as a result of bench command
Unverified8e0cefc8
Contributing
The Polkadot SDK
project is an OPENISH Open Source Project
What?
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.
Rules
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.
Merge Process
In General
- 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. - No PR should be merged until all reviews' comments are addressed.
Labels
The set of labels and their description can be found here.
Process
- 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 you’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.
- With respect to auditing, please see AUDIT.md. In general, merging to master can happen independently of audit.
- 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 from adding it to the list of migrations in the runtime.
Reviewing pull requests
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 the PR description is well written to facilitate integration, in case it contains breaking changes.
- the PR has an impact on docs.
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.
PRDoc
All Pull Requests must contain proper title & description, as described in Pull Request
Template. Moreover, all pull requests must have a proper prdoc
file attached.
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.
See more about prdoc
here
Cargo.toml
Crate Configuration The Polkadot SDK uses many conventions when configuring a crate. Watch out for these things when you are creating a new crate.
Is the Crate chain-specific?
Chain-specific crates, for example
bp-bridge-hub-rococo
, should not be released as part of the Polkadot-SDK umbrella crate. We have a custom metadata
attribute that is picked up by the generate-umbrella.py
script, that should be applied to all chain-specific crates like such:
[package]
# Other stuff...
[package.metadata.polkadot-sdk]
exclude-from-umbrella = true
# Other stuff...
Is the Crate a Test, Example or Fuzzer?
Test or example crates, like
pallet-example-task
, should not be released to crates.io. To ensure this, you must add publish = false
to your
crate's package
section:
[package]
# Other stuff...
publish = false
# Other stuff...
Helping out
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.
Issues
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.