Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into make-system-paras-tel…
Browse files Browse the repository at this point in the history
…eporters
  • Loading branch information
bkchr committed Dec 7, 2023
2 parents b77d8d2 + b8df4b0 commit 09ef6d0
Show file tree
Hide file tree
Showing 66 changed files with 3,213 additions and 2,396 deletions.
8 changes: 4 additions & 4 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rules:
include:
- ^\.github/.*
type: fellows
minRank: 4
minRank: 3
minApprovals: 2
- name: Relay and system files
condition:
Expand All @@ -13,8 +13,8 @@ rules:
- ^system-parachains\/.*
- ^CHANGELOG.md$
type: fellows
minRank: 3
minApprovals: 4
minRank: 2
minApprovals: 3
- name: General Files
condition:
include:
Expand All @@ -25,4 +25,4 @@ rules:
- ^\.github/.*
- ^CHANGELOG.md$
type: fellows
minRank: 2
minRank: 1
9 changes: 8 additions & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ on:
jobs:
set-auto-merge:
runs-on: ubuntu-latest
environment: master
# Important! This forces the job to run only on comments on Pull Requests that starts with '/merge'
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/merge') }}
steps:
- name: Get the GitHub handle of the fellows
uses: paritytech/[email protected]
id: fellows
- name: Generate token
id: merge_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.MERGE_APP_ID }}
private_key: ${{ secrets.MERGE_APP_KEY }}
- name: Set auto merge
uses: paritytech/[email protected]
with:
GITHUB_TOKEN: '${{ github.token }}'
GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }}
MERGE_METHOD: "SQUASH"
ALLOWLIST: ${{ steps.fellows.outputs.github-handles }}
80 changes: 80 additions & 0 deletions .github/workflows/check-migrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Check Migrations

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is
# triggered (ref https://stackoverflow.com/a/72408109)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
runtime-matrix:
runs-on: ubuntu-latest
outputs:
runtime: ${{ steps.runtime.outputs.runtime }}
name: Extract tasks from matrix
steps:
- uses: actions/checkout@v2
- id: runtime
run: |
# Filter out runtimes that don't have a URI
TASKS=$(jq '[.[] | select(.uri != null)]' .github/workflows/runtimes-matrix.json)
SKIPPED_TASKS=$(jq '[.[] | select(.uri == null)]' .github/workflows/runtimes-matrix.json)
echo --- Running the following tasks ---
echo $TASKS
echo --- Skipping the following tasks due to not having a uri field ---
echo $SKIPPED_TASKS
# Strip whitespace from Tasks now that we've logged it
TASKS=$(echo $TASKS | jq -c .)
echo "runtime=$TASKS" >> $GITHUB_OUTPUT
check-migrations:
needs: [runtime-matrix]
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Download try-runtime-cli
run: |
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: "3.6.1"

- name: Add wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown

- name: Build ${{ matrix.runtime.name }}
run: |
cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime
- name: Check migrations
run: |
PACKAGE_NAME=${{ matrix.runtime.package }}
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
# When running on relay, we don't need weight checks.
NO_WEIGHT_WARNINGS_FLAG=""
if [[ "${{ matrix.runtime.is_relay }}" == "true" ]]; then
NO_WEIGHT_WARNINGS_FLAG="--no-weight-warnings"
fi
# Disable idempotency checks for now because the Scheduler pallet MigrateToV1 migration is
# non-idempotent at its root in Polkadot SDK V1.2.0. In V1.3.0 we can re-enable
# idempotency checks.
EXTRA_ARGS="--disable-spec-version-check --disable-idempotency-checks"
./try-runtime \
--runtime ./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME \
on-runtime-upgrade --checks=pre-and-post $EXTRA_ARGS $NO_WEIGHT_WARNINGS_FLAG live --uri ${{ matrix.runtime.uri }}
10 changes: 0 additions & 10 deletions .github/workflows/release-matrix.json

This file was deleted.

17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v2
- id: runtime
run: |
TASKS=$(echo $(cat .github/workflows/release-matrix.json) | sed 's/ //g' )
TASKS=$(echo $(cat .github/workflows/runtimes-matrix.json) | sed 's/ //g' )
echo $TASKS
echo "runtime=$TASKS" >> $GITHUB_OUTPUT
build-runtimes:
Expand Down Expand Up @@ -114,9 +114,20 @@ jobs:
EOF
for JSON in $(<<<$CONTEXT sort -sr)
do tee -a DRAFT <<-EOF
do
SPEC_NAME=$(WASM 'core_version.specName')
# Check for spec names and adjust the heading accordingly
if [[ "$SPEC_NAME" == "statemint" ]]; then
HEADING="Asset Hub Polkadot (previously Statemint)"
elif [[ "$SPEC_NAME" == "statemine" ]]; then
HEADING="Asset Hub Kusama (previously Statemine)"
else
HEADING=$(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")')
fi
### $(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")')
tee -a DRAFT <<-EOF
### $HEADING
~~~
🏋️ Runtime Size: $(numfmt --to iec-i --format "%.2f" $(WASM size)) ($(WASM size) bytes)
🗜 Compressed: $(WASM 'compression | if .compressed then "Yes: \(1 - .size_compressed / .size_decompressed | . * 10000 | round / 100)%" else "No" end')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/review-bot@v2.1.0
uses: paritytech/review-bot@v2.3.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
team-token: ${{ steps.team_token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Review-Trigger

on:
on:
pull_request_target:
types:
- opened
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/runtimes-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"name": "polkadot",
"package": "polkadot-runtime",
"path": "relay/polkadot",
"uri": "wss://polkadot-try-runtime-node.parity-chains.parity.io:443",
"is_relay": true
},
{
"name": "kusama",
"package": "staging-kusama-runtime",
"path": "relay/kusama",
"uri": "wss://kusama-try-runtime-node.parity-chains.parity.io:443",
"is_relay": true
},
{
"name": "glutton-kusama",
"package": "glutton-kusama-runtime",
"path": "system-parachains/gluttons/glutton-kusama",
"is_relay": false
},
{
"name": "asset-hub-kusama",
"package": "asset-hub-kusama-runtime",
"path": "system-parachains/asset-hubs/asset-hub-kusama",
"uri": "wss://kusama-asset-hub-rpc.polkadot.io:443",
"is_relay": false
},
{
"name": "asset-hub-polkadot",
"package": "asset-hub-polkadot-runtime",
"path": "system-parachains/asset-hubs/asset-hub-polkadot",
"uri": "wss://polkadot-asset-hub-rpc.polkadot.io:443",
"is_relay": false
},
{
"name": "bridge-hub-kusama",
"package": "bridge-hub-kusama-runtime",
"path": "system-parachains/bridge-hubs/bridge-hub-kusama",
"uri": "wss://kusama-bridge-hub-rpc.polkadot.io:443",
"is_relay": false
},
{
"name": "bridge-hub-polkadot",
"package": "bridge-hub-polkadot-runtime",
"path": "system-parachains/bridge-hubs/bridge-hub-polkadot",
"uri": "wss://polkadot-bridge-hub-rpc.polkadot.io:443",
"is_relay": false
},
{
"name": "collectives-polkadot",
"package": "collectives-polkadot-runtime",
"path": "system-parachains/collectives/collectives-polkadot",
"uri": "wss://polkadot-collectives-rpc.polkadot.io:443",
"is_relay": false
}
]
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ Changelog for the runtimes governed by the Polkadot Fellowship.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Changed

- Upgrade parachains runtime API from v5 to v7 in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56))
- Upgrade Preimage pallet's config implementations to adapt the new `Consideration` API ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56))
- Remove `experimental` feature flag for `pallet-society`, `pallet-xcm`, and `runtime-common` crates imports ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56))
- Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56))
- Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661

### Added

- Enable async backing on Kusama ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1543
- Implemented GenesisBuilder API for all runtimes ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1492
- XCM transport fees are now exponential and are sent to a treasury account ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1234
- System parachains are now trusted teleporters of each other ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1368
- Treasury is able to spend various asset kinds ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87))

### Fixed

- Add missing weight functions for `runtime_parachains_hrmp` and `preimage` pallets ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56))
- Fix for Reward Deficit in the pool ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1255

## [1.0.1] 22.10.2023

### Changed

- Restore governance lock periods to 7 days in Polkadot ([polkadot-fellows/runtimes#86](https://github.com/polkadot-fellows/runtimes/pull/86))

## [1.0.0] 22.10.2023

### Changed
Expand Down
Loading

0 comments on commit 09ef6d0

Please sign in to comment.