-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: alvicsam <alvicsam@gmail.com>
- Loading branch information
Showing
806 changed files
with
170,873 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# An auto defined `clippy` feature was introduced, | ||
# but it was found to clash with user defined features, | ||
# so was renamed to `cargo-clippy`. | ||
# | ||
# If you want standard clippy run: | ||
# RUSTFLAGS= cargo clippy | ||
[target.'cfg(feature = "cargo-clippy")'] | ||
rustflags = [ | ||
"-Aclippy::all", | ||
"-Dclippy::correctness", | ||
"-Aclippy::if-same-then-else", | ||
"-Aclippy::clone-double-ref", | ||
"-Dclippy::complexity", | ||
"-Aclippy::zero-prefixed-literal", # 00_1000_000 | ||
"-Aclippy::type_complexity", # raison d'etre | ||
"-Aclippy::nonminimal-bool", # maybe | ||
"-Aclippy::borrowed-box", # Reasonable to fix this one | ||
"-Aclippy::too-many-arguments", # (Turning this on would lead to) | ||
"-Aclippy::unnecessary_cast", # Types may change | ||
"-Aclippy::identity-op", # One case where we do 0 + | ||
"-Aclippy::useless_conversion", # Types may change | ||
"-Aclippy::unit_arg", # styalistic. | ||
"-Aclippy::option-map-unit-fn", # styalistic | ||
"-Aclippy::bind_instead_of_map", # styalistic | ||
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS | ||
"-Aclippy::eq_op", # In tests we test equality. | ||
"-Aclippy::while_immutable_condition", # false positives | ||
"-Aclippy::needless_option_as_deref", # false positives | ||
"-Aclippy::derivable_impls", # false positives | ||
"-Aclippy::stable_sort_primitive", # prefer stable sort | ||
"-Aclippy::extra-unused-type-parameters", # stylistic | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.git | ||
**/target/ | ||
**/*.txt | ||
**/*.md | ||
/docker/ | ||
!/target/release-artifacts/**/* | ||
|
||
# dotfiles in the repo root | ||
/.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
root = true | ||
[*] | ||
indent_style=tab | ||
indent_size=tab | ||
tab_width=4 | ||
end_of_line=lf | ||
charset=utf-8 | ||
trim_trailing_whitespace=true | ||
max_line_length=100 | ||
insert_final_newline=true | ||
|
||
[*.yml] | ||
indent_style=space | ||
indent_size=2 | ||
tab_width=8 | ||
end_of_line=lf | ||
|
||
[*.sh] | ||
indent_style=space | ||
indent_size=4 | ||
tab_width=8 | ||
end_of_line=lf | ||
|
||
[*.json] | ||
indent_style=space | ||
indent_size=2 | ||
tab_width=8 | ||
end_of_line=lf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.gitlab-ci.yml filter=ci-prettier | ||
/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
name: New blank issue | ||
about: New blank issue | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Release Checklist for Client | ||
about: Release Checklist for Client | ||
title: Release Checklist for Client {{ env.VERSION }} | ||
--- | ||
|
||
# Release Checklist - Client | ||
|
||
### Client Release | ||
|
||
- [ ] build a new `polkadot-parachain` binary and publish it to S3 | ||
- [ ] new `polkadot-parachain` version has [run on the network](../../docs/release.md#burnin) | ||
without issue for at least 12h | ||
- [ ] a draft release has been created in the [Github Releases page](https://github.com/paritytech/cumulus/releases) with the relevant release-notes | ||
- [ ] the [build artifacts](../../docs/release.md#build-artifacts) have been added to the | ||
draft-release. | ||
|
||
--- | ||
|
||
Read more about the [release documentation](../../docs/release.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
name: Release Checklist for Runtime | ||
about: Release Checklist for Runtime | ||
title: Release Checklist for Runtime {{ env.VERSION }} | ||
--- | ||
|
||
# Release Checklist - Runtimes | ||
|
||
**All** following checks must be completed before publishing a new release. | ||
The release process is owned and led by @paritytech/release-engineering team. | ||
The checks marked with :crab: are meant to be checked by [a runtime engineer](https://github.com/paritytech/cumulus/issues/1761). | ||
|
||
## Runtimes Release | ||
|
||
### Codebase | ||
These checks should be performed on the codebase. | ||
|
||
- [ ] the [`spec_version`](https://github.com/paritytech/cumulus/blob/master/docs/release.md#spec-version) has been incremented since the | ||
last release for any native runtimes from any existing use on public (non-private/test) networks | ||
- [ ] :crab: previously [completed migrations](https://github.com/paritytech/cumulus/blob/master/docs/release.md#old-migrations-removed) are removed for any public (non-private/test) networks | ||
- [ ] pallet and [extrinsic ordering](https://github.com/paritytech/cumulus/blob/master/docs/release.md#extrinsic-ordering--storage) as well as `SignedExtension`s have stayed | ||
the same. Bump `transaction_version` otherwise | ||
- [ ] the [benchmarks](https://github.com/paritytech/ci_cd/wiki/Benchmarks:-cumulus) ran | ||
- [ ] the weights have been updated for any modified runtime logic | ||
- [ ] :crab: the new weights are sane, there are no significant (>50%) drops or rises with no reason | ||
- [ ] :crab: XCM config is compatible with the configurations and versions of relevant interlocutors, like the Relay Chain. | ||
|
||
### On the release branch | ||
|
||
The following checks can be performed after we have forked off to the release-candidate branch or started an additional release candidate branch (rc-2, rc-3, etc) | ||
|
||
- [ ] Verify [new migrations](https://github.com/paritytech/cumulus/blob/master/docs/release.md#new-migrations) complete successfully, and the | ||
runtime state is correctly updated for any public (non-private/test) | ||
networks | ||
- [ ] Run [integration tests](https://github.com/paritytech/cumulus/blob/master/docs/release.md#integration-tests), and make sure they pass. | ||
- [ ] Push runtime upgrade to Asset Hub Westend and verify network stability | ||
- [ ] Push runtime upgrade to Collectives and verify network stability | ||
- [ ] Push runtime upgrade to Bridge-Hub-Kusama and verify network stability | ||
|
||
|
||
### Github | ||
|
||
- [ ] Check that a draft release has been created at the [Github Releases page](https://github.com/paritytech/cumulus/releases) with relevant [release | ||
notes](https://github.com/paritytech/cumulus/blob/master/docs/release.md#release-notes) | ||
- [ ] Check that [build artifacts](https://github.com/paritytech/cumulus/blob/master/docs/release.md#build-artifacts) have been added to the | ||
draft-release. | ||
|
||
# Post release | ||
|
||
- [ ] :crab: all commits (runtime version bumps, fixes) on this release branch have been merged back to master. | ||
|
||
--- | ||
|
||
Read more about the [release documentation](https://github.com/paritytech/cumulus/blob/master/docs/release.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
labels: ["A2-insubstantial", "B0-silent", "C1-low"] | ||
# Handle updates for crates from github.com/paritytech/substrate manually. | ||
ignore: | ||
- dependency-name: "substrate-*" | ||
- dependency-name: "sc-*" | ||
- dependency-name: "sp-*" | ||
- dependency-name: "frame-*" | ||
- dependency-name: "fork-tree" | ||
- dependency-name: "frame-remote-externalities" | ||
- dependency-name: "pallet-*" | ||
- dependency-name: "beefy-*" | ||
- dependency-name: "try-runtime-*" | ||
- dependency-name: "test-runner" | ||
- dependency-name: "generate-bags" | ||
- dependency-name: "sub-tokens" | ||
- dependency-name: "polkadot-*" | ||
- dependency-name: "xcm*" | ||
- dependency-name: "kusama-*" | ||
- dependency-name: "westend-*" | ||
- dependency-name: "rococo-*" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"] | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 🔒 PROTECTED: Changes to locks-review-team should be approved by the current locks-review-team | ||
locks-review-team: cumulus-locks-review | ||
team-leads-team: polkadot-review | ||
action-review-team: ci | ||
|
||
rules: | ||
- name: Runtime files | ||
check_type: changed_files | ||
condition: ^parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$ | ||
all_distinct: | ||
- min_approvals: 1 | ||
teams: | ||
- cumulus-locks-review | ||
- min_approvals: 1 | ||
teams: | ||
- polkadot-review | ||
|
||
- name: Core developers | ||
check_type: changed_files | ||
condition: | ||
include: .* | ||
# excluding files from 'Runtime files' and 'CI files' rules and `Bridges subtree files` | ||
exclude: ^parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.* | ||
min_approvals: 2 | ||
teams: | ||
- core-devs | ||
|
||
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo) | ||
- name: Bridges subtree files | ||
check_type: changed_files | ||
condition: ^bridges/.* | ||
min_approvals: 1 | ||
teams: | ||
- bridges-core | ||
|
||
- name: CI files | ||
check_type: changed_files | ||
condition: | ||
include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.* | ||
exclude: ^scripts/ci/gitlab/pipeline/zombienet.yml$ | ||
min_approvals: 2 | ||
teams: | ||
- ci | ||
- release-engineering | ||
|
||
prevent-review-request: | ||
teams: | ||
- core-devs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Check D labels | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, opened, synchronize, unlabeled] | ||
paths: | ||
- primitives/** | ||
|
||
jobs: | ||
check-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull image | ||
env: | ||
IMAGE: paritytech/ruled_labels:0.4.0 | ||
run: docker pull $IMAGE | ||
|
||
- name: Check labels | ||
env: | ||
IMAGE: paritytech/ruled_labels:0.4.0 | ||
MOUNT: /work | ||
GITHUB_PR: ${{ github.event.pull_request.number }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
API_BASE: https://api.github.com/repos | ||
REPO: ${{ github.repository }} | ||
RULES_PATH: labels/ruled_labels | ||
CHECK_SPECS: specs_cumulus.yaml | ||
run: | | ||
echo "REPO: ${REPO}" | ||
echo "GITHUB_PR: ${GITHUB_PR}" | ||
# Clone repo with labels specs | ||
git clone https://github.com/paritytech/labels | ||
# Fetch the labels for the PR under test | ||
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",") | ||
if [ -z "${labels}" ]; then | ||
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label | ||
fi | ||
labels_args=${labels: :-1} | ||
printf "Checking labels: %s\n" "${labels_args}" | ||
# Prevent the shell from splitting labels with spaces | ||
IFS="," | ||
# --dev is more useful to debug mode to debug | ||
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Check labels | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, opened, synchronize, unlabeled] | ||
|
||
jobs: | ||
check-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull image | ||
env: | ||
IMAGE: paritytech/ruled_labels:0.4.0 | ||
run: docker pull $IMAGE | ||
|
||
- name: Check labels | ||
env: | ||
IMAGE: paritytech/ruled_labels:0.4.0 | ||
MOUNT: /work | ||
GITHUB_PR: ${{ github.event.pull_request.number }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
API_BASE: https://api.github.com/repos | ||
REPO: ${{ github.repository }} | ||
RULES_PATH: labels/ruled_labels | ||
CHECK_SPECS: specs_cumulus.yaml | ||
run: | | ||
echo "REPO: ${REPO}" | ||
echo "GITHUB_PR: ${GITHUB_PR}" | ||
# Clone repo with labels specs | ||
git clone https://github.com/paritytech/labels | ||
# Fetch the labels for the PR under test | ||
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",") | ||
if [ -z "${labels}" ]; then | ||
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label | ||
fi | ||
labels_args=${labels: :-1} | ||
printf "Checking labels: %s\n" "${labels_args}" | ||
# Prevent the shell from splitting labels with spaces | ||
IFS="," | ||
# --dev is more useful to debug mode to debug | ||
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish Rust Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy-docs: | ||
name: Deploy docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install tooling | ||
run: | | ||
sudo apt-get install -y protobuf-compiler | ||
protoc --version | ||
- name: Checkout repository | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Rust versions | ||
run: rustup show | ||
|
||
- name: Rust cache | ||
uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 | ||
|
||
- name: Build rustdocs | ||
run: SKIP_WASM_BUILD=1 cargo doc --all --no-deps | ||
|
||
- name: Make index.html | ||
run: echo "<meta http-equiv=refresh content=0;url=cumulus_client_collator/index.html>" > ./target/doc/index.html | ||
|
||
- name: Deploy documentation | ||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./target/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Rustfmt check | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
quick_check: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
runs-on: ${{ matrix.os }} | ||
container: | ||
image: paritytech/ci-linux:production | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Cargo fmt | ||
run: cargo +nightly fmt --all -- --check |
Oops, something went wrong.