Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into george/identity-pallet-gen…
Browse files Browse the repository at this point in the history
…eric-3

Signed-off-by: georgepisaltu <[email protected]>
  • Loading branch information
georgepisaltu committed Oct 10, 2023
2 parents 63dbc74 + 2b4b33d commit d303fb9
Show file tree
Hide file tree
Showing 778 changed files with 20,673 additions and 51,830 deletions.
120 changes: 120 additions & 0 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
rules:
- name: CI files
condition:
include:
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
- ^\.gitlab/.*
- ^\.config/nextest.toml
- ^\.cargo/.*
exclude:
- ^./gitlab/pipeline/zombienet.*
minApprovals: 2
type: basic
teams:
- ci
- release-engineering

- name: Audit rules
type: basic
condition:
include:
- ^polkadot/runtime\/(kusama|polkadot|common)\/.*
- ^polkadot/primitives/src\/.+\.rs$
- ^substrate/primitives/.*
- ^substrate/frame/.*
exclude:
- ^polkadot/runtime\/(kusama|polkadot)\/src\/weights\/.+\.rs$
- ^substrate\/frame\/.+\.md$
minApprovals: 1
allowedToSkipRule:
teams:
- core-devs
teams:
- srlabs

- name: Core developers
countAuthor: true
condition:
include:
- .*
# excluding files from 'Runtime files' and 'CI files' rules
exclude:
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
- ^cumulus/parachains/common/src/[^/]+\.rs$
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
- ^\.gitlab/.*
- ^\.config/nextest.toml
- ^\.cargo/.*
minApprovals: 2
type: basic
teams:
- core-devs

# cumulus
- name: Runtime files cumulus
countAuthor: true
condition:
include:
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
- ^cumulus/parachains/common/src/[^/]+\.rs$
type: and-distinct
reviewers:
- minApprovals: 1
teams:
- locks-review
- minApprovals: 1
teams:
- polkadot-review

# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
- name: Bridges subtree files
type: basic
condition:
include:
- ^bridges/.*
minApprovals: 1
teams:
- bridges-core

# substrate

- name: FRAME coders substrate
condition:
include:
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
type: "and"
reviewers:
- minApprovals: 2
teams:
- core-devs
- minApprovals: 1
teams:
- frame-coders

# Protection of THIS file
- name: Review Bot
condition:
include:
- review-bot\.yml
type: "and"
reviewers:
- minApprovals: 1
teams:
- opstooling
- minApprovals: 1
teams:
- locks-review
- minApprovals: 1
teams:
- ci
2 changes: 1 addition & 1 deletion .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/[email protected]
with:
node-version: "18.x"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Checkout repo
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0

- name: PRdoc check for PR#${{ github.event.pull_request.number }}
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
container:
image: paritytech/ci-unified:bullseye-1.70.0-2023-05-23-v20230706
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
6 changes: 3 additions & 3 deletions .github/workflows/release-50_publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

#TODO: this step will be needed when automated triggering will work
#this step runs only if the workflow is triggered automatically when new release is published
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Get artifacts from cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
needs: fetch-latest-debian-package-version
steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/review-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Review PR
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- review_requested
- review_request_removed
- ready_for_review
pull_request_review:

permissions:
contents: read

jobs:
review-approvals:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: team_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
team-token: ${{ steps.team_token.outputs.token }}
checks-token: ${{ steps.team_token.outputs.token }}
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ variables:
RUSTY_CACHIER_COMPRESSION_METHOD: zstd
NEXTEST_FAILURE_OUTPUT: immediate-final
NEXTEST_SUCCESS_OUTPUT: final
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.67"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.69"
DOCKER_IMAGES_VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"

default:
Expand Down
6 changes: 6 additions & 0 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ build-linux-stable:
RUN_UI_TESTS: 1
script:
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker
- time ROCOCO_EPOCH_DURATION=10 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-10/
- time ROCOCO_EPOCH_DURATION=100 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-100/
- time ROCOCO_EPOCH_DURATION=600 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-600/
- pwd
- ls -alR runtimes
# pack artifacts
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
- mv ./target/testnet/polkadot ./artifacts/.
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
- mv ./runtimes/ ./artifacts/.
- pushd artifacts
- sha256sum polkadot | tee polkadot.sha256
- shasum -c polkadot.sha256
Expand Down
63 changes: 54 additions & 9 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,16 @@ test-rust-feature-propagation:
script:
- |
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Running try-runtime for ${NETWORK} ----------"
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --rev a93c9b5abe5d31a4cf1936204f7e5c489184b521
time cargo build --release --locked -p "$NETWORK"-runtime --features try-runtime
echo "---------- Installing try-runtime-cli ----------"
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --tag v0.3.0
echo "---------- Building ${PACKAGE} runtime ----------"
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
echo "---------- Executing `on-runtime-upgrade` for ${NETWORK} ----------"
time try-runtime \
--runtime ./target/release/wbuild/"$NETWORK"-runtime/target/wasm32-unknown-unknown/release/"$NETWORK"_runtime.wasm \
on-runtime-upgrade --checks=pre-and-post live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}
# Check runtime migrations for Parity managed relay chains
check-runtime-migration-westend:
stage: check
extends:
Expand All @@ -128,19 +131,61 @@ check-runtime-migration-westend:
- .check-runtime-migration
variables:
NETWORK: "westend"
PACKAGE: "westend-runtime"
WASM: "westend_runtime.compact.compressed.wasm"
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
EXTRA_ARGS: "--no-weight-warnings"

check-runtime-migration-rococo:
stage: check
# DAG
needs:
- job: check-runtime-migration-westend
artifacts: false
extends:
- .docker-env
- .test-pr-refs
- .check-runtime-migration
variables:
NETWORK: "rococo"
PACKAGE: "rococo-runtime"
WASM: "rococo_runtime.compact.compressed.wasm"
URI: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
EXTRA_ARGS: "--no-weight-warnings"

# Check runtime migrations for Parity managed asset hub chains
check-runtime-migration-asset-hub-westend:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .check-runtime-migration
variables:
NETWORK: "asset-hub-westend"
PACKAGE: "asset-hub-westend-runtime"
WASM: "asset_hub_westend_runtime.compact.compressed.wasm"
URI: "wss://westend-asset-hub-rpc.polkadot.io:443"

check-runtime-migration-bridge-hub-rococo:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .check-runtime-migration
variables:
NETWORK: "bridge-hub-rococo"
PACKAGE: "bridge-hub-rococo-runtime"
WASM: "bridge_hub_rococo_runtime.compact.compressed.wasm"
URI: "wss://rococo-bridge-hub-rpc.polkadot.io:443"

# Check runtime migrations for Parity managed contract chains
check-runtime-migration-contracts-rococo:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .check-runtime-migration
variables:
NETWORK: "contracts-rococo"
PACKAGE: "contracts-rococo-runtime"
WASM: "contracts_rococo_runtime.compact.compressed.wasm"
URI: "wss://rococo-contracts-rpc.polkadot.io:443"

find-fail-ci-phrase:
stage: check
Expand Down
12 changes: 12 additions & 0 deletions .gitlab/pipeline/short-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ short-benchmark-westend: &short-bench
artifacts: true
variables:
RUNTIME: westend
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
Expand All @@ -32,6 +38,12 @@ short-benchmark-westend: &short-bench
artifacts: true
variables:
RUNTIME_CHAIN: benchmarked-runtime-chain
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ test-deterministic-wasm:
artifacts: false
script:
# build runtime
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p staging-kusama-runtime -p polkadot-runtime -p westend-runtime
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p westend-runtime -p rococo-runtime
# make checksum
- sha256sum target/release/wbuild/*-runtime/target/wasm32-unknown-unknown/release/*.wasm > checksum.sha256
- cargo clean
# build again
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p staging-kusama-runtime -p polkadot-runtime -p westend-runtime
- WASM_BUILD_NO_COLOR=1 cargo build -q --locked --release -p westend-runtime -p rococo-runtime
# confirm checksum
- sha256sum -c checksum.sha256

Expand Down Expand Up @@ -314,8 +314,8 @@ node-bench-regression-guard:
--compare-with artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
after_script: [""]

# if this fails (especially after rust version upgrade) run
# ./substrate/.maintain/update-rust-stable.sh <rust_version>
# if this fails run `bot update-ui` in the Pull Request or "./scripts/update-ui-tests.sh" locally
# see ./docs/CONTRIBUTING.md#ui-tests
test-frame-ui:
stage: test
extends:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/zombienet/cumulus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
before_script:
- echo "Zombie-net Tests Config"
- echo "${ZOMBIENET_IMAGE}"
- echo "${RELAY_IMAGE}"
- echo "${POLKADOT_IMAGE}"
- echo "${COL_IMAGE}"
- echo "${GH_DIR}"
- echo "${LOCAL_DIR}"
Expand Down
Loading

0 comments on commit d303fb9

Please sign in to comment.