Skip to content

Commit 22393d5

Browse files
committed
Import Cumulus
Signed-off-by: alvicsam <[email protected]>
2 parents ef3b2da + 40f864e commit 22393d5

File tree

806 files changed

+170873
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

806 files changed

+170873
-0
lines changed

cumulus/.cargo/config.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# An auto defined `clippy` feature was introduced,
3+
# but it was found to clash with user defined features,
4+
# so was renamed to `cargo-clippy`.
5+
#
6+
# If you want standard clippy run:
7+
# RUSTFLAGS= cargo clippy
8+
[target.'cfg(feature = "cargo-clippy")']
9+
rustflags = [
10+
"-Aclippy::all",
11+
"-Dclippy::correctness",
12+
"-Aclippy::if-same-then-else",
13+
"-Aclippy::clone-double-ref",
14+
"-Dclippy::complexity",
15+
"-Aclippy::zero-prefixed-literal", # 00_1000_000
16+
"-Aclippy::type_complexity", # raison d'etre
17+
"-Aclippy::nonminimal-bool", # maybe
18+
"-Aclippy::borrowed-box", # Reasonable to fix this one
19+
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
20+
"-Aclippy::unnecessary_cast", # Types may change
21+
"-Aclippy::identity-op", # One case where we do 0 +
22+
"-Aclippy::useless_conversion", # Types may change
23+
"-Aclippy::unit_arg", # styalistic.
24+
"-Aclippy::option-map-unit-fn", # styalistic
25+
"-Aclippy::bind_instead_of_map", # styalistic
26+
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
27+
"-Aclippy::eq_op", # In tests we test equality.
28+
"-Aclippy::while_immutable_condition", # false positives
29+
"-Aclippy::needless_option_as_deref", # false positives
30+
"-Aclippy::derivable_impls", # false positives
31+
"-Aclippy::stable_sort_primitive", # prefer stable sort
32+
"-Aclippy::extra-unused-type-parameters", # stylistic
33+
]

cumulus/.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.git
2+
**/target/
3+
**/*.txt
4+
**/*.md
5+
/docker/
6+
!/target/release-artifacts/**/*
7+
8+
# dotfiles in the repo root
9+
/.*

cumulus/.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
root = true
2+
[*]
3+
indent_style=tab
4+
indent_size=tab
5+
tab_width=4
6+
end_of_line=lf
7+
charset=utf-8
8+
trim_trailing_whitespace=true
9+
max_line_length=100
10+
insert_final_newline=true
11+
12+
[*.yml]
13+
indent_style=space
14+
indent_size=2
15+
tab_width=8
16+
end_of_line=lf
17+
18+
[*.sh]
19+
indent_style=space
20+
indent_size=4
21+
tab_width=8
22+
end_of_line=lf
23+
24+
[*.json]
25+
indent_style=space
26+
indent_size=2
27+
tab_width=8
28+
end_of_line=lf
29+

cumulus/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.gitlab-ci.yml filter=ci-prettier
2+
/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: New blank issue
3+
about: New blank issue
4+
---
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Release Checklist for Client
3+
about: Release Checklist for Client
4+
title: Release Checklist for Client {{ env.VERSION }}
5+
---
6+
7+
# Release Checklist - Client
8+
9+
### Client Release
10+
11+
- [ ] build a new `polkadot-parachain` binary and publish it to S3
12+
- [ ] new `polkadot-parachain` version has [run on the network](../../docs/release.md#burnin)
13+
without issue for at least 12h
14+
- [ ] a draft release has been created in the [Github Releases page](https://github.com/paritytech/cumulus/releases) with the relevant release-notes
15+
- [ ] the [build artifacts](../../docs/release.md#build-artifacts) have been added to the
16+
draft-release.
17+
18+
---
19+
20+
Read more about the [release documentation](../../docs/release.md).
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Release Checklist for Runtime
3+
about: Release Checklist for Runtime
4+
title: Release Checklist for Runtime {{ env.VERSION }}
5+
---
6+
7+
# Release Checklist - Runtimes
8+
9+
**All** following checks must be completed before publishing a new release.
10+
The release process is owned and led by @paritytech/release-engineering team.
11+
The checks marked with :crab: are meant to be checked by [a runtime engineer](https://github.com/paritytech/cumulus/issues/1761).
12+
13+
## Runtimes Release
14+
15+
### Codebase
16+
These checks should be performed on the codebase.
17+
18+
- [ ] the [`spec_version`](https://github.com/paritytech/cumulus/blob/master/docs/release.md#spec-version) has been incremented since the
19+
last release for any native runtimes from any existing use on public (non-private/test) networks
20+
- [ ] :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
21+
- [ ] pallet and [extrinsic ordering](https://github.com/paritytech/cumulus/blob/master/docs/release.md#extrinsic-ordering--storage) as well as `SignedExtension`s have stayed
22+
the same. Bump `transaction_version` otherwise
23+
- [ ] the [benchmarks](https://github.com/paritytech/ci_cd/wiki/Benchmarks:-cumulus) ran
24+
- [ ] the weights have been updated for any modified runtime logic
25+
- [ ] :crab: the new weights are sane, there are no significant (>50%) drops or rises with no reason
26+
- [ ] :crab: XCM config is compatible with the configurations and versions of relevant interlocutors, like the Relay Chain.
27+
28+
### On the release branch
29+
30+
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)
31+
32+
- [ ] Verify [new migrations](https://github.com/paritytech/cumulus/blob/master/docs/release.md#new-migrations) complete successfully, and the
33+
runtime state is correctly updated for any public (non-private/test)
34+
networks
35+
- [ ] Run [integration tests](https://github.com/paritytech/cumulus/blob/master/docs/release.md#integration-tests), and make sure they pass.
36+
- [ ] Push runtime upgrade to Asset Hub Westend and verify network stability
37+
- [ ] Push runtime upgrade to Collectives and verify network stability
38+
- [ ] Push runtime upgrade to Bridge-Hub-Kusama and verify network stability
39+
40+
41+
### Github
42+
43+
- [ ] Check that a draft release has been created at the [Github Releases page](https://github.com/paritytech/cumulus/releases) with relevant [release
44+
notes](https://github.com/paritytech/cumulus/blob/master/docs/release.md#release-notes)
45+
- [ ] Check that [build artifacts](https://github.com/paritytech/cumulus/blob/master/docs/release.md#build-artifacts) have been added to the
46+
draft-release.
47+
48+
# Post release
49+
50+
- [ ] :crab: all commits (runtime version bumps, fixes) on this release branch have been merged back to master.
51+
52+
---
53+
54+
Read more about the [release documentation](https://github.com/paritytech/cumulus/blob/master/docs/release.md).

cumulus/.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
labels: ["A2-insubstantial", "B0-silent", "C1-low"]
6+
# Handle updates for crates from github.com/paritytech/substrate manually.
7+
ignore:
8+
- dependency-name: "substrate-*"
9+
- dependency-name: "sc-*"
10+
- dependency-name: "sp-*"
11+
- dependency-name: "frame-*"
12+
- dependency-name: "fork-tree"
13+
- dependency-name: "frame-remote-externalities"
14+
- dependency-name: "pallet-*"
15+
- dependency-name: "beefy-*"
16+
- dependency-name: "try-runtime-*"
17+
- dependency-name: "test-runner"
18+
- dependency-name: "generate-bags"
19+
- dependency-name: "sub-tokens"
20+
- dependency-name: "polkadot-*"
21+
- dependency-name: "xcm*"
22+
- dependency-name: "kusama-*"
23+
- dependency-name: "westend-*"
24+
- dependency-name: "rococo-*"
25+
schedule:
26+
interval: "daily"
27+
- package-ecosystem: github-actions
28+
directory: '/'
29+
labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"]
30+
schedule:
31+
interval: daily
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# 🔒 PROTECTED: Changes to locks-review-team should be approved by the current locks-review-team
2+
locks-review-team: cumulus-locks-review
3+
team-leads-team: polkadot-review
4+
action-review-team: ci
5+
6+
rules:
7+
- name: Runtime files
8+
check_type: changed_files
9+
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$
10+
all_distinct:
11+
- min_approvals: 1
12+
teams:
13+
- cumulus-locks-review
14+
- min_approvals: 1
15+
teams:
16+
- polkadot-review
17+
18+
- name: Core developers
19+
check_type: changed_files
20+
condition:
21+
include: .*
22+
# excluding files from 'Runtime files' and 'CI files' rules and `Bridges subtree files`
23+
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/.*
24+
min_approvals: 2
25+
teams:
26+
- core-devs
27+
28+
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
29+
- name: Bridges subtree files
30+
check_type: changed_files
31+
condition: ^bridges/.*
32+
min_approvals: 1
33+
teams:
34+
- bridges-core
35+
36+
- name: CI files
37+
check_type: changed_files
38+
condition:
39+
include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
40+
exclude: ^scripts/ci/gitlab/pipeline/zombienet.yml$
41+
min_approvals: 2
42+
teams:
43+
- ci
44+
- release-engineering
45+
46+
prevent-review-request:
47+
teams:
48+
- core-devs
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Check D labels
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened, synchronize, unlabeled]
6+
paths:
7+
- primitives/**
8+
9+
jobs:
10+
check-labels:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Pull image
14+
env:
15+
IMAGE: paritytech/ruled_labels:0.4.0
16+
run: docker pull $IMAGE
17+
18+
- name: Check labels
19+
env:
20+
IMAGE: paritytech/ruled_labels:0.4.0
21+
MOUNT: /work
22+
GITHUB_PR: ${{ github.event.pull_request.number }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
API_BASE: https://api.github.com/repos
25+
REPO: ${{ github.repository }}
26+
RULES_PATH: labels/ruled_labels
27+
CHECK_SPECS: specs_cumulus.yaml
28+
run: |
29+
echo "REPO: ${REPO}"
30+
echo "GITHUB_PR: ${GITHUB_PR}"
31+
# Clone repo with labels specs
32+
git clone https://github.com/paritytech/labels
33+
# Fetch the labels for the PR under test
34+
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
35+
36+
if [ -z "${labels}" ]; then
37+
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label
38+
fi
39+
40+
labels_args=${labels: :-1}
41+
printf "Checking labels: %s\n" "${labels_args}"
42+
43+
# Prevent the shell from splitting labels with spaces
44+
IFS=","
45+
46+
# --dev is more useful to debug mode to debug
47+
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit

0 commit comments

Comments
 (0)