Skip to content

Commit

Permalink
Merge branch 'tsv-disabling-node-side' into tsv-disabling-backing
Browse files Browse the repository at this point in the history
* tsv-disabling-node-side: (24 commits)
  Init System Parachain storage versions and add migration check jobs to CI (#1344)
  no-bound derives: Use absolute path for `core` (#1763)
  migrate alliance, fast-unstake and bags list to use derive-impl (#1636)
  Tvl pool staking (#1322)
  improve service error (#1734)
  frame-support: `RuntimeDebug\Eq\PartialEq` impls for `Imbalance` (#1717)
  Point documentation links to monorepo (#1741)
  [NPoS] Fix for Reward Deficit in the pool (#1255)
  Move import queue from `ChainSync` to `SyncingEngine` (#1736)
  Enable mocking contracts (#1331)
  Revert "fix(review-bot): pull secrets from `master` environment" (#1748)
  Remove kusama and polkadot runtime crates (#1731)
  Use `Extensions` to register offchain worker custom extensions (#1719)
  [RPC-Spec-V2] chainHead: use integer for block index and adjust RuntimeVersion JSON format (#1666)
  fix(review-bot): pull secrets from `master` environment (#1745)
  Fix `subkey inspect` output text padding (#1744)
  archive: Implement height, hashByHeight and call (#1582)
  rpc/client: Propagate `rpc_methods` method to reported methods (#1713)
  rococo-runtime: `RococoGenesisExt` removed (#1490)
  PVF: more filesystem sandboxing (#1373)
  ...
  • Loading branch information
ordian committed Oct 3, 2023
2 parents 26866fa + a3bcb2f commit 863fc7d
Show file tree
Hide file tree
Showing 350 changed files with 5,870 additions and 43,502 deletions.
121 changes: 121 additions & 0 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
rules:
- name: CI files
condition:
include:
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
- ^\.gitlab/.*
- ^\.config/nextest.toml
- ^\.cargo/.*
exclude:
- ^./gitlab/pipeline/zombienet.*
min_approvals: 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$
min_approvals: 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/.*
min_approvals: 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:
- min_approvals: 1
teams:
- locks-review
- min_approvals: 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/.*
min_approvals: 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:
- min_approvals: 2
teams:
- core-devs
- min_approvals: 1
teams:
- frame-coders

# Protection of THIS file
- name: Review Bot
condition:
include:
- review-bot\.yml
min_approvals: 2
type: "and"
reviewers:
- min_approvals: 1
teams:
- opstooling
- min_approvals: 1
teams:
- locks-review
- min_approvals: 1
teams:
- ci
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/review-bot@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
team-token: ${{ steps.team_token.outputs.token }}
checks-token: ${{ steps.team_token.outputs.token }}
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
4 changes: 2 additions & 2 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

0 comments on commit 863fc7d

Please sign in to comment.