diff --git a/.github/changelog-processor.py b/.github/changelog-processor.py new file mode 100755 index 0000000000..b005c620d8 --- /dev/null +++ b/.github/changelog-processor.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +import os +import sys +import argparse + +parser = argparse.ArgumentParser(description="Process the CHANGELOG.md") +parser.add_argument( + "changelog", + metavar="CHANGELOG", + help="Path to the CHANGELOG.md file", + default="CHANGELOG.md", + nargs='?' +) + +group = parser.add_mutually_exclusive_group() +group.add_argument( + "--print-latest-version", + dest="print_latest_version", + help="Print the latest version (first in the file) found in the CHANGELOG.md", + action="store_true" +) +group.add_argument( + "--should-release", + dest="should_release", + help="Should a release be made? Prints `1` or `0`.", + action="store_true" +) + +args = parser.parse_args() + +with open(args.changelog, "r") as changelog: + lines = changelog.readlines() + + # Find the latest version + for line in lines: + if not line.startswith("## ["): + continue + + version = line.strip().removeprefix("## [").split("]")[0] + break + + if args.print_latest_version: + print(version, end = "") + sys.exit(0) + elif args.should_release: + if version.lower() == "unreleased": + print("0", end = "") + sys.exit(-1) + elif version.count(".") != 2: + print("0", end = "") + sys.exit(-1) + + stream = os.popen("git tag -l v" + version) + output = stream.read() + + # Empty output means that the tag doesn't exist and that we should release. + if output.strip() == "": + print("1", end = "") + else: + print("0", end = "") + + sys.exit(0) + else: + parser.print_help() diff --git a/.github/review-bot.yml b/.github/review-bot.yml index 230f2d0ca5..a1a4c1f059 100644 --- a/.github/review-bot.yml +++ b/.github/review-bot.yml @@ -4,29 +4,25 @@ rules: include: - ^\.github/.* type: fellows - minRank: 4 + minRank: 3 minApprovals: 2 - name: Relay and system files condition: include: - - ^relay\/kusama\/.* - - ^relay\/polkadot\/.* + - ^relay\/.* - ^system-parachains\/.* - - ^CHANGELOG$ - exclude: - - ^relay\/.+\.adoc$ + - ^CHANGELOG.md$ type: fellows - minRank: 3 - minApprovals: 4 + minRank: 2 + minApprovals: 3 - name: General Files condition: include: - '.*' - exclude: - - ^relay\/kusama\/.* - - ^relay\/polkadot\/.* - - ^\.github/.* + exclude: + - ^relay\/.* - ^system-parachains\/.* - - ^target\/.* + - ^\.github/.* + - ^CHANGELOG.md$ type: fellows - minRank: 2 + minRank: 1 diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 3cd5079778..32cb12fb49 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -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/get-fellows-action@v1.0.0 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/auto-merge-bot@v1.0.0 with: - GITHUB_TOKEN: '${{ github.token }}' + GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }} MERGE_METHOD: "SQUASH" ALLOWLIST: ${{ steps.fellows.outputs.github-handles }} diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml new file mode 100644 index 0000000000..75a0d14db1 --- /dev/null +++ b/.github/workflows/check-migrations.yml @@ -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 }} diff --git a/.github/workflows/release-matrix.json b/.github/workflows/release-matrix.json deleted file mode 100644 index fa20957212..0000000000 --- a/.github/workflows/release-matrix.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { "name": "polkadot", "package": "polkadot-runtime", "path": "relay/polkadot" }, - { "name": "kusama", "package": "staging-kusama-runtime", "path": "relay/kusama" }, - { "name": "glutton-kusama", "package": "glutton-kusama-runtime", "path": "system-parachains/gluttons/glutton-kusama" }, - { "name": "asset-hub-kusama", "package": "asset-hub-kusama-runtime", "path": "system-parachains/asset-hubs/asset-hub-kusama" }, - { "name": "asset-hub-polkadot", "package": "asset-hub-polkadot-runtime", "path": "system-parachains/asset-hubs/asset-hub-polkadot" }, - { "name": "bridge-hub-kusama", "package": "bridge-hub-kusama-runtime", "path": "system-parachains/bridge-hubs/bridge-hub-kusama" }, - { "name": "bridge-hub-polkadot", "package": "bridge-hub-polkadot-runtime", "path": "system-parachains/bridge-hubs/bridge-hub-polkadot" }, - { "name": "collectives-polkadot", "package": "collectives-polkadot-runtime", "path": "system-parachains/collectives/collectives-polkadot" } -] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b31d3608a..d19cbe550c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Create Draft Release +name: Create Release on: push: @@ -7,7 +7,21 @@ on: workflow_dispatch: jobs: + collect-release-information: + runs-on: ubuntu-latest + outputs: + should-release: ${{ steps.run.outputs.should-release }} + version: ${{ steps.run.outputs.version }} + steps: + - uses: actions/checkout@v2 + - id: run + run: | + echo "should-release=$(.github/changelog-processor.py CHANGELOG.md --should-release)" >> $GITHUB_OUTPUT + echo "version=$(.github/changelog-processor.py CHANGELOG.md --print-latest-version)" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT runtime-matrix: + needs: [ collect-release-information ] + if: needs.collect-release-information.outputs.should-release == '1' runs-on: ubuntu-latest outputs: runtime: ${{ steps.runtime.outputs.runtime }} @@ -15,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: @@ -66,9 +80,9 @@ jobs: path: | ${{ steps.srtool_build.outputs.wasm_compressed }} - publish-draft-release: + publish-release: runs-on: ubuntu-latest - needs: [ build-runtimes ] + needs: [ build-runtimes, collect-release-information ] outputs: release_url: ${{ steps.create-release.outputs.html_url }} asset_upload_url: ${{ steps.create-release.outputs.upload_url }} @@ -92,7 +106,6 @@ jobs: SRTOOL() { <$(<<<$CONTEXT head -n1) jq -r .$1; } WASM() { <${JSON} jq -r ".runtimes.compressed.subwasm.$1"; } tee -a DRAFT <<-EOF - ## Changelog EOF tee -a DRAFT >$GITHUB_ENV echo ASSET=$(find ${{ matrix.runtime.name }} -name '*.compact.compressed.wasm') >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) - >>$GITHUB_ENV echo TXVER=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.transactionVersion) - - name: Upload compressed ${{ matrix.runtime.name }} v${{ env.SPEC }} tx${{ env.TXVER }} wasm + - name: Upload compressed ${{ matrix.runtime.name }} v${{ env.SPEC }} wasm uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.publish-draft-release.outputs.asset_upload_url }} + upload_url: ${{ needs.publish-release.outputs.asset_upload_url }} asset_path: ${{ env.ASSET }} - asset_name: ${{ matrix.runtime.name }}_runtime-v${{ env.SPEC }}.tx${{ env.TXVER }}.compact.compressed.wasm + asset_name: ${{ matrix.runtime.name }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm asset_content_type: application/wasm diff --git a/.github/workflows/review-bot.yml b/.github/workflows/review-bot.yml index 75f7a1d192..62ddb42ffd 100644 --- a/.github/workflows/review-bot.yml +++ b/.github/workflows/review-bot.yml @@ -1,23 +1,24 @@ -name: Review PR +name: Review Bot + on: - pull_request_target: + workflow_run: + workflows: + - Review-Trigger types: - - opened - - reopened - - synchronize - - review_requested - - review_request_removed - - ready_for_review - pull_request_review: + - completed permissions: contents: read - checks: write jobs: review-approvals: runs-on: ubuntu-latest steps: + - name: Extract content of artifact + id: number + uses: Bullrich/extract-text-from-artifact@v1.0.0 + with: + artifact-name: pr_number - name: Generate token id: team_token uses: tibdex/github-app-token@v1 @@ -25,8 +26,9 @@ 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.0.0 + uses: paritytech/review-bot@v2.3.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} team-token: ${{ steps.team_token.outputs.token }} checks-token: ${{ steps.team_token.outputs.token }} + pr-number: ${{ steps.number.outputs.content }} diff --git a/.github/workflows/review-trigger.yml b/.github/workflows/review-trigger.yml new file mode 100644 index 0000000000..0edbc7c9a9 --- /dev/null +++ b/.github/workflows/review-trigger.yml @@ -0,0 +1,31 @@ +name: Review-Trigger + +on: + pull_request_target: + types: + - opened + - reopened + - synchronize + - review_requested + - review_request_removed + - ready_for_review + pull_request_review: + +jobs: + trigger-review-bot: + runs-on: ubuntu-latest + name: trigger review bot + steps: + - name: Get PR number + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + echo "Saving PR number: $PR_NUMBER" + mkdir -p ./pr + echo $PR_NUMBER > ./pr/pr_number + - uses: actions/upload-artifact@v3 + name: Save PR number + with: + name: pr_number + path: pr/ + retention-days: 5 diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json new file mode 100644 index 0000000000..ffe99af042 --- /dev/null +++ b/.github/workflows/runtimes-matrix.json @@ -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 + } +] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3c294071f..2672bc2b00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,14 @@ jobs: - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + - name: Test + run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime + env: + RUSTFLAGS: "-C debug-assertions -D warnings" + SKIP_WASM_BUILD: 1 + - name: Test all features run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime env: RUSTFLAGS: "-C debug-assertions -D warnings" - SKIP_WASM_BUILD: 1 + SKIP_WASM_BUILD: 1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 90381d8168..759067cc9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,42 @@ Changelog for the runtimes governed by the Polkadot Fellowship. -## [1.0.0] +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 +- Update Polkadot ideal staking rate ([polkadot-fellows/runtimes#26](https://github.com/polkadot-fellows/runtimes/pull/26)) - Treasury deprecate `propose_spend` dispatchable ([paritytech/substrate#14538](https://github.com/paritytech/substrate/pull/14538)) - Use benchmarked weights for `XCM` ([paritytech/polkadot#7077](https://github.com/paritytech/polkadot/pull/7077)) - Put HRMP Channel Management on General Admin Track ([paritytech/polkadot#7477](https://github.com/paritytech/polkadot/pull/7477)) @@ -31,6 +63,7 @@ Changelog for the runtimes governed by the Polkadot Fellowship. - Stabilize Metadata V15 ([paritytech/substrate#14481](https://github.com/paritytech/substrate/pull/14481)) - Add Ability to Add/Remove Invulnerable Collators ([paritytech/cumulus#2596](https://github.com/paritytech/cumulus/pull/2596)) - Polkadot Fellowship promotion/demotion periods, members activity and salaries ([paritytech/cumulus#2607](https://github.com/paritytech/cumulus/pull/2607)) +- Add asset conversion to asset hub Kusama ([paritytech/cumulus#2935](https://github.com/paritytech/cumulus/pull/2935)) ### Fixed @@ -39,4 +72,7 @@ Changelog for the runtimes governed by the Polkadot Fellowship. - XCM: Fix issue with RequestUnlock ([paritytech/polkadot#7278](https://github.com/paritytech/polkadot/pull/7278)) - Clear Existing HRMP Channel Request When Force Opening ([paritytech/polkadot#7389](https://github.com/paritytech/polkadot/pull/7389)) - Prune upgrade cooldowns ([paritytech/polkadot#7470](https://github.com/paritytech/polkadot/pull/7470)) -- Assets `destroy_accounts` releases the deposit ([paritytech/substrate#14443](https://github.com/paritytech/substrate/pull/14443)) +- Assets `destroy_accounts` releases the deposit + ([paritytech/substrate#14443](https://github.com/paritytech/substrate/pull/14443)) +- Update Polkadot Collectives to use `limited_teleport_assets` for automatic slash handling, as + `teleport_assets` is deprecated and caused a failing integration test. ([polkadot-fellows/runtimes#46](https://github.com/polkadot-fellows/runtimes/pull/46)) diff --git a/Cargo.lock b/Cargo.lock index ff24072fb7..5b3c1f0804 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,7 +110,7 @@ dependencies = [ "cipher 0.3.0", "ctr 0.8.0", "ghash 0.4.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -124,7 +124,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -179,6 +179,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -205,9 +211,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -243,9 +249,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -273,7 +279,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" dependencies = [ "include_dir", - "itertools", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", @@ -286,6 +292,141 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.1.0" @@ -405,7 +546,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", @@ -440,6 +581,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -502,13 +644,14 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -527,9 +670,9 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8c54a703225defe6b87f7b715bf72723342ef1ecf9a5e96d02c55a5bc31959" +checksum = "de674aa0b8f0c31a00fd99a4003751c788c7023ed62527097a1286dd530fbe60" dependencies = [ "assets-common", "cumulus-pallet-dmp-queue", @@ -545,6 +688,7 @@ dependencies = [ "pallet-collator-selection", "pallet-session", "pallet-xcm", + "pallet-xcm-bridge-hub-router", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -556,15 +700,16 @@ dependencies = [ "sp-std", "staging-parachain-info", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", ] [[package]] name = "assets-common" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b1f6400a746207ff6e077b13103427c646914d49cc459977090a966908ff91" +checksum = "f8b8aa1c485e12af4a0a2b48402fa85d382ab4962731e71f5edc0f85c4cba28c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -625,17 +770,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-recursion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.31", -] - [[package]] name = "async-trait" version = "0.1.73" @@ -644,7 +778,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -745,9 +879,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86c4514675732c8bdc8a8bfc78b2e1b50dcce1a4aa5baea3338c9f2c3c1790" +checksum = "a399848a68a5196a04c19db5bfc4dca3cd0989a3165150f06c1ad1bc8882aa34" dependencies = [ "hash-db", "log", @@ -780,7 +914,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -807,6 +941,18 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -930,9 +1076,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f657204b8e931d9c9b78139e661b7b58b005f627f0caf5c98257df0b81a97b" +checksum = "9b18aaf9ed9ecffade4d56bb1a63cd70b9e61ea4ef69023f2dcd0fd54d18f280" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -946,9 +1092,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-rococo" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6819a3f7a5c6c48ca4796ba70a586b5736baeb2e7542907f1c675d986141b20" +checksum = "7dcb3425030c446f51c0d9bc71605b42dc96acff94b2feff51cd09a5e58dc0dd" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -961,9 +1107,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-wococo" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5145dec4dbeb78e65f44b0f2a4953d5f276f8db140906b9831aee1434c9988e" +checksum = "0ecd2e53fcb7b489a544e27474839586b662bd0c5eea0a9bd21d5eaeae8e6b0b" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -976,9 +1122,9 @@ dependencies = [ [[package]] name = "bp-header-chain" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842dd43f5229669efb74cdc909c0e9315a7cdbe4513b6225dc0ab0ec21e4a1b8" +checksum = "fb057324305f7cacce9d87a82d0e6e8de8ec2ff40fd2df707f97f74ddd0631f9" dependencies = [ "bp-runtime", "finality-grandpa", @@ -994,9 +1140,9 @@ dependencies = [ [[package]] name = "bp-messages" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb9128928257331dfb41c4c283549a7795447ca5dc5bc5b6753ee6118912651" +checksum = "c4df7b23c2c5cdfb7260c0c88835e554f857b0a80e4c1cfa48dd1194e6fb6c6d" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1010,9 +1156,9 @@ dependencies = [ [[package]] name = "bp-parachains" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a2ffaab775e6e0295d52bd9b768862e522823ef8ecb1a0f05f87953b496239" +checksum = "16a644c3fa5ac2233dd2de94ebe2a4aa98c7cca36b34d96e6604f4d34b0758b4" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1028,9 +1174,9 @@ dependencies = [ [[package]] name = "bp-polkadot-core" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953c2ec80269860053085ac259da9ed7b1ad3b8985435255f7635000dbd3c440" +checksum = "34f0342d051a3b07fecbcabc7efca35880865ede7ef5b2b49ca323c94bdb6d53" dependencies = [ "bp-messages", "bp-runtime", @@ -1047,9 +1193,9 @@ dependencies = [ [[package]] name = "bp-relayers" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4c6316868f49602c4a011d850444181d2f1b837a238214f1e287a0e6d74710" +checksum = "e11ea832eedd3bb19a13f77474b4eced1782914527fc54404a423d6259095bdb" dependencies = [ "bp-messages", "bp-runtime", @@ -1062,9 +1208,9 @@ dependencies = [ [[package]] name = "bp-runtime" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6356e28b2d80b622e95914d130db0a4a9d2deb27863930228eb53b29bc6f28a5" +checksum = "8c4fd30d6814b73c245c40c760ffbadec3f834865ddd681161ef33672a766e50" dependencies = [ "frame-support", "frame-system", @@ -1086,15 +1232,15 @@ dependencies = [ [[package]] name = "bp-test-utils" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb045c0076d4f12de4ada37b5a30df377eb69988b577c98fe2c311da34b531" +checksum = "e625f0def0740566ca053a7b7076c301992eed132b3821a07e835bb8062fb79a" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "finality-grandpa", "parity-scale-codec", "sp-application-crypto", @@ -1107,9 +1253,9 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e48a83f01c1469df3803773535052444c25ac050b070b1c18b48a378d913c8" +checksum = "be3b4fafc31f17da1b4ea403c4118e4f4f1d9a5a696729b374551d582e48633b" dependencies = [ "parity-scale-codec", "scale-info", @@ -1138,7 +1284,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", "pallet-aura", "pallet-authorship", @@ -1164,6 +1310,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -1219,7 +1366,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "serde", "smallvec", @@ -1227,6 +1374,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -1245,11 +1393,10 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3840cd4df9976e371b178033469cdcf1f68ab34f5e5fa43675bc1c5374d97786" +checksum = "a3598ffa3d0c5f5651dee8aea016b69c5a3be48ab01fb83f773c93af0cf77c68" dependencies = [ - "assert_matches", "asset-test-utils", "bp-bridge-hub-rococo", "bp-bridge-hub-wococo", @@ -1286,6 +1433,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1294,9 +1442,9 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87df6d2289a3ab0699d97b40ac3ef83f944b0db738e326327c267fdeca92b3a6" +checksum = "a585d0a58356e3a6131a2cb77a69af5580af278075cac46a85d54e5f6ea1b982" dependencies = [ "bp-header-chain", "bp-messages", @@ -1408,6 +1556,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.6" @@ -1458,7 +1616,7 @@ checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" dependencies = [ "aead 0.3.2", "cipher 0.2.5", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1472,9 +1630,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -1491,6 +1649,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.8.2" @@ -1594,9 +1762,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", @@ -1604,9 +1772,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -1616,21 +1784,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "coarsetime" @@ -1700,7 +1868,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "smallvec", "sp-api", @@ -1708,8 +1876,8 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -1798,6 +1966,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -1938,7 +2112,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -2036,7 +2210,7 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2048,7 +2222,7 @@ checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2063,6 +2237,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -2070,7 +2254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2080,7 +2264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2103,9 +2287,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc007c63cdec6ce1f8e51cb98cce4631889881b9b9b763823164d362621afa0" +checksum = "071cdddd31e2b0d47a74249675de828857f61eb5f6afa36cfcf63ea6ee2b60f2" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -2122,9 +2306,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320bbaf34d68a20f48c20b751df15aad015d43f8089994761ff0234cdfc40e9a" +checksum = "5d1cb9d43cdfeedea19b4f6b8386e5b6264a97938b29f5c711a84e9dc7105ff7" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2140,9 +2324,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0328425da88d976f122d28fdf23b094b6171b3c33adda8789495bb84ff0cece" +checksum = "d20d2280051998fcf113f04d25d4b39f27b449570b6350fdfb7e92541cb0aae7" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2155,6 +2339,7 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core", "sp-externalities", @@ -2171,21 +2356,21 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7dde6ab318d17f36551556bed0f525cb7c823ab8da06ecd7b65140932da3a4" +checksum = "84baea20d10325b2501b6fa06d4a7902a43d6a6c62c71b5309e75c3ad8ae1441" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5345c0370ae667404209f674b0d1e40c6a476ba4d8fce2cd645fa224394d35" +checksum = "0bf9aaa60ed60ee9cbfc55535a6e2a01353c8308135e24d6c50ba989e518f17d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2198,9 +2383,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45dc968dcf8a41f72b1035f1ba1dc43d3577192e612bf4f19bbc6c34b73c8a1a" +checksum = "4ff03e14a0f5847bdee67a673ee945d3acd5c1d7238d46993208dcbfb774e27f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2215,10 +2400,11 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c6c8e354bcfc7ca04f316e1d4ef8e33b17efaae8f15af3ed8d360fb2bf0589" +checksum = "b6af9816dd6564149729ba133c2c984c88fb15c4a2cb66f57be06b9147744e51" dependencies = [ + "bp-xcm-bridge-hub-router", "cumulus-primitives-core", "frame-benchmarking", "frame-support", @@ -2226,8 +2412,10 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "rand_chacha 0.3.1", "scale-info", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -2237,9 +2425,9 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63861b6bfd937c5eaf60058147c036caf07c4462d3f5098af24a4a757b64fe29" +checksum = "d40f62add2352287be4cb58b0017a91f61d953e2c6d2777c20d93185558196e1" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2255,9 +2443,9 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffef2e14f1dc33bd098050209d75c9ab12512498bb498bc8f252f05e3b425853" +checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2279,15 +2467,17 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e444b76437537a1e045b3d5e20b10117389eb865c60ce044c88dfd59261bff2" +checksum = "6b4ef704f5a346711d0448f82e57dc5784b186f4bf5e3efbbca0df814b203539" dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", "sp-std", @@ -2298,9 +2488,9 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e11d8ee7a514ba2bc309f5b52da520c719250a9622189f40256268db38c9db" +checksum = "af081ef8885042e7ae96e9d1cf32ec6f0616fe4cb78f0325ed7c5accded687fb" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2317,9 +2507,9 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0100a89d8a8924934f861c427cc0e6ec8e5255f79ee8aab5faa87888e2d5b91" +checksum = "59b921a9cb6758faa1c739f135fd87aa1e10a4e86a1c1db3119b396a62287cf2" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2339,7 +2529,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2352,7 +2542,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2369,7 +2559,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2381,7 +2571,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2408,7 +2598,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2425,7 +2615,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2643,14 +2833,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -2667,13 +2857,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2695,23 +2886,23 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "docify" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029de870d175d11969524d91a3fb2cbf6d488b853bff99d41cf65e533ac7d9d2" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac43324656a1b05eb0186deb51f27d2d891c704c37f34de281ef6297ba193e5" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" dependencies = [ "common-path", "derive-syn-parse", @@ -2719,7 +2910,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.31", + "syn 2.0.38", "termcolor", "toml 0.7.6", "walkdir", @@ -2790,15 +2981,6 @@ dependencies = [ "spki 0.7.2", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.2" @@ -2809,20 +2991,6 @@ dependencies = [ "signature 2.1.0", ] -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - [[package]] name = "ed25519-dalek" version = "2.0.0" @@ -2830,7 +2998,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek 4.0.0", - "ed25519 2.2.2", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", @@ -2875,7 +3043,7 @@ dependencies = [ "pkcs8 0.9.0", "rand_core 0.6.4", "sec1 0.3.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2894,7 +3062,7 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2933,7 +3101,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2944,7 +3112,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3047,29 +3215,17 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3140,7 +3296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3150,7 +3306,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3243,9 +3399,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4797e9270d3315a1724880ca63eaaab8f11cccbd76943a0f5c6ace9621016b47" +checksum = "1c2d0a4310dcf0e5cce78e35e60dc2fda80ef61c8f8fc382e685dfc24fcf5db9" dependencies = [ "parity-scale-codec", ] @@ -3267,9 +3423,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949ba5b5c9d552c37d7ad39bd837394c1d21727281ef32882539bc2ec6687b2d" +checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" dependencies = [ "frame-support", "frame-support-procedural", @@ -3293,21 +3449,21 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad4e68676c4d0160a7d9134f2376c29fd927844bff2aee1b35dd10d295d2856" +checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "frame-election-provider-support" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e605b5c5ce6abeba8db09dda9ad74a6d781e5c5e722670096df48917f0a33d26" +checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3323,9 +3479,9 @@ dependencies = [ [[package]] name = "frame-executive" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382016f6286f2b05a1f65dd97509bc70afd59e26dc8c7ab0126e4220c19abb58" +checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" dependencies = [ "frame-support", "frame-system", @@ -3354,11 +3510,10 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e4661884c0ac3f2391cfaf4b210af3fdf89216e8e245c843798de23d182a62" +checksum = "a30013df51f4d4e58472c4fecdbfeb141234ece5f6355e5b3a3e51d3f87d452d" dependencies = [ - "async-recursion", "futures", "indicatif", "jsonrpsee", @@ -3377,9 +3532,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609125451f5ffb1675998e07e64e05e4b3dad330b1537952ace5897d6ed24f0a" +checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ "aquamarine", "bitflags 1.3.2", @@ -3418,52 +3573,53 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd22a1ed96e765ec763bbaef2089ed8bb5f8539df40181ddac57be7be74685c7" +checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "expander 2.0.0", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.31", + "sp-core-hashing", + "syn 2.0.38", ] [[package]] name = "frame-support-procedural-tools" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82858452d9332de312f5ff411fd8aecee2323a344b241078f565b8c3c2e47d38" +checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c7a09be6bd676fc01c5dd5ba057ba1f7e492e071d4a5fd7c579d99a96093d6" +checksum = "d9c078db2242ea7265faa486004e7fd8daaf1a577cfcac0070ce55d926922883" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "frame-system" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dc2f4182ad4c05275b0d3f38e3e74bd1cd17231f28ce1e879177fd9829887c" +checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" dependencies = [ "cfg-if", "frame-support", @@ -3481,9 +3637,9 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "097cc1f91dc52a648c6b983ebf7aa75bf395b038354772b47e190ecd4caac9a8" +checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" dependencies = [ "frame-benchmarking", "frame-support", @@ -3497,9 +3653,9 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a0f4c5811e962938b8f93787ae907eacf8312f6797d5efd53fd9d1f4590562" +checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" dependencies = [ "parity-scale-codec", "sp-api", @@ -3507,9 +3663,9 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6becaab3f4648f9c5eeb8eb270614b7e4b5fd7d1deccab1d4a86cb41f8fb06d4" +checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" dependencies = [ "frame-support", "parity-scale-codec", @@ -3612,7 +3768,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3791,6 +3947,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -3814,7 +3971,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3825,7 +3982,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3885,6 +4042,19 @@ name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.0", +] [[package]] name = "heck" @@ -4354,6 +4524,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -4545,23 +4724,14 @@ dependencies = [ ] [[package]] -name = "kusama-runtime-constants" +name = "keystream" version = "1.0.0" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kusama-runtime-constants" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87fa26eba25489f17e493dd50a8b8f49448432bfd98ec06f730c83034a154e" +version = "1.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -4570,6 +4740,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -4633,6 +4804,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libp2p" version = "0.51.3" @@ -4762,7 +4939,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "log", "multiaddr", "multihash", @@ -5100,7 +5277,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5183,6 +5360,18 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +[[package]] +name = "lioness" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] + [[package]] name = "lock_api" version = "0.4.10" @@ -5257,50 +5446,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -5458,6 +5647,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.0.0", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mockall" version = "0.11.4" @@ -5766,6 +5980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -5847,11 +6062,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchestra" -version = "0.0.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" dependencies = [ "async-trait", "dyn-clonable", @@ -5866,12 +6087,13 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" dependencies = [ - "expander 0.0.6", - "itertools", + "expander 2.0.0", + "indexmap 2.0.0", + "itertools 0.11.0", "petgraph", "proc-macro-crate", "proc-macro2", @@ -5912,11 +6134,11 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e332ac5e332a88494488e502425aab59fbb8aaa96068c5ec75020b0ddd5eecc8" +checksum = "a3526a94a8aca9d98f06eb8ee76e1bf65f80fd23c278b25e6537a23b51392a85" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-benchmarking", "frame-support", "frame-system", @@ -5934,9 +6156,9 @@ dependencies = [ [[package]] name = "pallet-asset-conversion" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1661ad646244fd155fae26799b9f12246aac8a18ed785550ceea6e4ac25cfbdc" +checksum = "dd7f0ae643c877d9a36d7335bcda6614861b846a60f448da8cf3276d4042ef33" dependencies = [ "frame-benchmarking", "frame-support", @@ -5953,9 +6175,9 @@ dependencies = [ [[package]] name = "pallet-asset-conversion-tx-payment" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47e76551d0029aa4e8d28d0108c4575fae812ff2c9e7a7fd79890a4c7a8223f" +checksum = "64952179a5a409dead964a387c86a29d16d40a34cf54bf88e4d74ffdcdddf7a6" dependencies = [ "frame-support", "frame-system", @@ -5967,11 +6189,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-asset-rate" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740aebbcfefe8528f56ff8a339f810520a28df3ec159d016ef719aaa9f131af4" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-asset-tx-payment" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b0aea073ae2b627ddb7e775abb7872df8efb7fabd7c50dd05d3ca6ef0c72a4" +checksum = "028e30633114612160fc4e7add46504790abb3780db79eae1efae98c034dca0b" dependencies = [ "frame-benchmarking", "frame-support", @@ -5988,9 +6226,9 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2efdbd9727983844e1b82da41870829c0fd5d47ccb700fb27d734b3823d44ae" +checksum = "09b91035c82dc9e64eaf52f3f6a39f4674bcb56333553882d6ff5d12500a9182" dependencies = [ "frame-benchmarking", "frame-support", @@ -6005,9 +6243,9 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2cf20aa88b42b71e70d254db752673e0a67f4cefd070b33c1e42d8b7d25d9a" +checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" dependencies = [ "frame-support", "frame-system", @@ -6023,9 +6261,9 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a335fdce40d450adf27def590d1f1c1f42a49f6f91420063ae2391b9eb88b4d4" +checksum = "fda272a66bbf1602579efcede67606ac43cda6d462ad551c527d8cadc871813d" dependencies = [ "frame-support", "frame-system", @@ -6040,9 +6278,9 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cda9086337d01cdb509422cbe7290aa17edab7bf5677218faae30dab23205a6" +checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" dependencies = [ "frame-support", "frame-system", @@ -6055,9 +6293,9 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d7e474e0f5e9987b315dabe11269520cec98b44131e51a342e6a9d3a3d3f36" +checksum = "6b12430ca4b79b27231acb1ff3f99d33d6503fbeba40bfc8380e42d59b6d52b0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6080,9 +6318,9 @@ dependencies = [ [[package]] name = "pallet-bags-list" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd87d03bd1aee46275df25838fc5ba8c01fdb8df8a6860daa3d0f0b973a74ace" +checksum = "5d49c4448e51a5c64d63a4263aebeb2dfb90dabb48746e178b337fb7f533d45f" dependencies = [ "aquamarine", "docify", @@ -6103,9 +6341,9 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0486a52507072bd738dc851acf7b42def3645db10777f93dccdaa5933e41269b" +checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" dependencies = [ "frame-benchmarking", "frame-support", @@ -6119,9 +6357,9 @@ dependencies = [ [[package]] name = "pallet-beefy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7b81cbf5d642ee2881f7860390e70a290e1f94afbc3b27d59f137e8fdeb69" +checksum = "8563fce9fdb0e557015c0b58ed7ea7d5c1a4a1ddb1d27bf56e040d6bbf5c79e9" dependencies = [ "frame-support", "frame-system", @@ -6140,11 +6378,11 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60cca2fe7df196e41e2d43fcb97a76f68ff76dae38861b60e837d1a86ea9aa1a" +checksum = "ee3ed75c348ba23064cea40dab623719ef348bfe67ea39f195f82e2e7a7d0115" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "binary-merkle-tree", "frame-support", "frame-system", @@ -6166,9 +6404,9 @@ dependencies = [ [[package]] name = "pallet-bounties" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8df1ab55bac70ea7a99794d7bace2a311cc3049654aef3965516b181654b88" +checksum = "74c0fb83c88f217e5bfe07a69a6d8a6c32d01241159ab81705ba5d4c3e24aaab" dependencies = [ "frame-benchmarking", "frame-support", @@ -6185,9 +6423,9 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15ac3a6a500cf11ec838450054d26c330ea9dc792a5a7c2fc469d69e31e8816" +checksum = "1fc5083b92333f5ad64eb97d7e54978bd53c9ac8de8ac3c4056585fd236254d0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -6207,9 +6445,9 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c4b5a64fd5ea73836f03c04c290ec66b53aca8f5c714bd805508a6e84ef904" +checksum = "c8e61922a3b67f17508e27ab2bba9dd03d4b2e6878d8c0819f7e155544443cfd" dependencies = [ "bp-messages", "bp-runtime", @@ -6227,9 +6465,9 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c179f0b5b698b0f643c7eac740a9e3bdea6561a3539aa45930f074f1bc1c8c" +checksum = "88703f22433e3bc5ba69f89b6002fd28c74753a1ab425117f103e91fec05696a" dependencies = [ "bp-header-chain", "bp-parachains", @@ -6249,9 +6487,9 @@ dependencies = [ [[package]] name = "pallet-bridge-relayers" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ec236d325f1d9c5d24023088181449ca9f41e9351a2be25b2f82796be16450" +checksum = "04af803c4fb3e48a83325bb4781505fc5268e364f488116cf6718ddbbe57937d" dependencies = [ "bp-messages", "bp-relayers", @@ -6270,9 +6508,9 @@ dependencies = [ [[package]] name = "pallet-child-bounties" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03417c311cb707b1f0994397856e9a3611dd358f0caf67ccff91ac4ae45a005b" +checksum = "2246ce705aee37f9b6ad818e3646910d31ef4191e1c234bff054a710ef8d8a38" dependencies = [ "frame-benchmarking", "frame-support", @@ -6290,9 +6528,9 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2716f12bd4d379080b8d6de82c8293f6ba2a4b4268fdf690dd71e68d52ad4ab9" +checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6310,9 +6548,9 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2afbe5f8793d4d01e88e39ad02c656333bafabd86f87e5699f2b4022d8057eaa" +checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6328,9 +6566,9 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520968f141a44b3dfd73ce4be80de07010c3847460bfbc5fb726d329f765f903" +checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6346,9 +6584,9 @@ dependencies = [ [[package]] name = "pallet-core-fellowship" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aeaa8fe18020ff64792b883e1be6cadf695556e44279893216cb48bc0d7270" +checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" dependencies = [ "frame-benchmarking", "frame-support", @@ -6365,9 +6603,9 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d44914750d93d466020b7d90c1170ce3e3b1fe3876df428749f4896a37bb5a" +checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6384,9 +6622,9 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed40f39a03e6734c60d760e6b7ad5f1e115ac1d36f02a3111e60421b9ba0d2e" +checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6408,9 +6646,9 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b31f394ea662fa9199c89c5712046fbd18e52211937332016b359ac81aef69" +checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6423,9 +6661,9 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1373439465e6110ed0ab60905660d097df2d05736e008d6bc1d415b5fdb2386a" +checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" dependencies = [ "frame-benchmarking", "frame-support", @@ -6443,9 +6681,9 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87789ed95833afcface11a8048708dafa35951308d7de5e9aed666e8044b3cc6" +checksum = "05634a197738c999a3032393916182fedccce13cb063fc330ee9bf810cd53b49" dependencies = [ "docify", "frame-benchmarking", @@ -6463,11 +6701,11 @@ dependencies = [ [[package]] name = "pallet-glutton" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e705170005c5ebf054dae6252aea11082231e1d45ef4f54794313183b71bbc" +checksum = "9c3686506ac15f9b0442f5dffe496b68fca391116acfb6baef65524bb08c94f4" dependencies = [ - "blake2", + "blake2 0.10.6", "frame-benchmarking", "frame-support", "frame-system", @@ -6482,9 +6720,9 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b77a81a40b8f2cf6dcd49eaa69b882c1ebb651a381e959a62a875d782cac856a" +checksum = "b87c7f4cd94a526054dfebf7a84fbcaf6385033defa246ad83e321e71f8c5a92" dependencies = [ "frame-benchmarking", "frame-support", @@ -6506,9 +6744,9 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c9a8b0a02ae7650a8fd188b26fa0852152021fafb5da6d69e1d17f9d03e714" +checksum = "735bf6c19d30299e2d448797170a67d41c6a8ba593fb3a71ce4e11d3b85c60e9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6523,9 +6761,9 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70314914e290dbdb52adea50bf3e15965ca7b72c5a02d35dd6b9ded60bfb4877" +checksum = "59eb1c68cc6b4700ad1d2a81ba847ff7b37406aa0326b7716825155d3f985762" dependencies = [ "frame-benchmarking", "frame-support", @@ -6544,9 +6782,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b23c5b95f9ef2fd17c01cc6948c88aa9e263a49a90e1a5665798d744e5f8956" +checksum = "0893ae7f2211010e92bf57fe31f18e2223a2f97f6d6393aa7192e283ec520beb" dependencies = [ "frame-benchmarking", "frame-support", @@ -6562,9 +6800,9 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a055f189d360aca0919b65b91ab0b701e6bac2143ac46a285a9faf9ec7208e" +checksum = "2e1504034588eb733f8ce98b77757e9a7390662313aa133ef1e3b9fbb94359c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6580,9 +6818,9 @@ dependencies = [ [[package]] name = "pallet-message-queue" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa98dc8e920cf04f55c8d5ee878477a5be826952b99fe106e72c847c3391d0e" +checksum = "0776bf51d03bd746159063fa1357234feb85114273d40ef3aa3efba65d091eb4" dependencies = [ "frame-benchmarking", "frame-support", @@ -6600,9 +6838,9 @@ dependencies = [ [[package]] name = "pallet-mmr" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7596f59b17e1ee05040d4fc0070d3ae781de34e847be95423d7f5310c3a9d63" +checksum = "e2b9789cac80b48e9427724d0b400f984fb844fc711fc2dd2d0cdccdedda7169" dependencies = [ "frame-benchmarking", "frame-support", @@ -6619,9 +6857,9 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e44176821dc2c2caface4303cfac8e8aa18ecf2bb15504f4a460abd2cb52dcd" +checksum = "fea2785a0bfb1884a8283bf65010bb7189c8fce958ced9947a8c71c148ef199f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6636,9 +6874,9 @@ dependencies = [ [[package]] name = "pallet-nft-fractionalization" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3160a1cbdc2a28363bd2ff4cba72ccb96a98cbb86a81ab694b4e99b79a62fcee" +checksum = "959fb2e68e4421650538d9b64a3243f0a0cdc8962f35f749af18bf9b70f7253d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6654,9 +6892,9 @@ dependencies = [ [[package]] name = "pallet-nfts" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3650227e8678336e93b679e9eeafdb1e0ff04bffcca148c00e3fb906ff5b08" +checksum = "999a30c5861a83a6ab38a564df99f976f0bc6bf54b03620abc568bba5f7b4834" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6673,9 +6911,9 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de7f6a1613d3391121afd73548f4f37bea22cd7d5ce269db83a497ccc286c86" +checksum = "f1a64c725e28fdf7d2512c1ce8eab8ba05fc7211fb864ee6c3d2300a2b3bd381" dependencies = [ "pallet-nfts", "parity-scale-codec", @@ -6684,9 +6922,9 @@ dependencies = [ [[package]] name = "pallet-nis" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422715b4239456d73a78bae69a7411836c54bda35f69753524eff601ca910102" +checksum = "7aa7ec891b7f1801a405095a2ad2c70eef94d2abe86792eee54794de23cbd035" dependencies = [ "frame-benchmarking", "frame-support", @@ -6701,9 +6939,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ab7e472a983273ad52af65ac431769fda82a272e54631e451a47ea99c24b15" +checksum = "1896f33fff0c41934532fb492078d78b784f301ddd81e5041dd8e8279e652c49" dependencies = [ "frame-support", "frame-system", @@ -6721,9 +6959,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f6f692dd7cab2ab8aeafe3a9dce645afe818712df62ac3ae432696731bb509" +checksum = "b27cbf4a47cc79862d254f16b38c68fd2dda087ce58e7c0021859d89718e865a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6742,9 +6980,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5eb57e511e2d084b4d3b00b70cb36d0b8474222a86b2195da6b61503ac6f8" +checksum = "65c256cc530a19ff614f2af9b5c95ae9aa777a2bf1542aa455ae65e842f8c924" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6754,9 +6992,9 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa80a36a4d7d42d2aab354242dbd37c1d253f30255be2b3edc357dc9f2ad7916" +checksum = "f3fd14c02ed4b689652826aa93284aada5a2cf859df3cc34ad88b2fd410a8c50" dependencies = [ "frame-support", "frame-system", @@ -6772,9 +7010,9 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b4aabb1ea386486bd4a42ab3a067fdffae6716876d59c0e3fa1cf3e1040201" +checksum = "b1b3ae77cfb16f0495372853d42a44e34ab7b183bd8996a8cee91715f783ff49" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6797,9 +7035,9 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e00ea296ac3f7f543a409e177b771459b14c76b33145d1374eabf984ebc34f14" +checksum = "a1ed40405c758b52375cfc75aac74f10ff9bb9480569e5cfca42682e2db6c387" dependencies = [ "frame-benchmarking", "frame-support", @@ -6815,9 +7053,9 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186b0aa4c542217f8c6e0afaa1f5d9aea257019af6d426f591c2764e7b71d3c8" +checksum = "0fbc0b550f5cbbad51f9daf795cc7046d40bbff256dae8d6072fd710ab40fd3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6831,9 +7069,9 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8cf8915fcdb60a6dffd6cc20eb4bf2f95bd1f9424f598d1e99d47be0d84fa0" +checksum = "8181da7fd6b9adf4f8641c5bcb156cd209e3226eea87ee9f9b1ac41f8e37c714" dependencies = [ "frame-benchmarking", "frame-support", @@ -6850,9 +7088,9 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c78735503c504465acf94b6ea3174f1a046bbbd8246d357fee0ed422e8a26b" +checksum = "889fddd16cfdea09c2ae4dc8e9f67a1ec4b8ac680412cffb772fa572489ec687" dependencies = [ "frame-benchmarking", "frame-support", @@ -6866,9 +7104,9 @@ dependencies = [ [[package]] name = "pallet-referenda" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99bdb6d7fcdda9c4a85efbbc5ea5499e07e339491d25ac913649c196a78b6d31" +checksum = "592ff9873af379bf55e835072afd787cd6435204213ac484e86345b026f4ae4e" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6886,9 +7124,9 @@ dependencies = [ [[package]] name = "pallet-salary" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "477ba8329b1984377cd94d62b869ce976de2176c3126f58aa6efdcec808b236c" +checksum = "22ac035a8cccd7297ad03ad8ebe372b01f451aaafa9b243f5ce59b061d0806b1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6905,9 +7143,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfdb4f02689fb9c4f22190f60be1acc5e6553d1c89b44272509bea2ebd1855a" +checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", "frame-benchmarking", @@ -6924,9 +7162,9 @@ dependencies = [ [[package]] name = "pallet-session" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f6f04ae97b311aa20a91a8b0bf92f7e231cff993547d3e874c3e60020cfa96" +checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" dependencies = [ "frame-support", "frame-system", @@ -6947,9 +7185,9 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a370a07dbfaa94bcc5e01f4e9cda1ad6fbca019bcb0a172a2ee26f61e736dbab" +checksum = "5401cee669394e86a15851ace4ad60ef1b4d656f11ff22c83d8004051279ea59" dependencies = [ "frame-benchmarking", "frame-support", @@ -6965,9 +7203,9 @@ dependencies = [ [[package]] name = "pallet-society" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548b95cf82dd9caa346469a679cdef63a34d7105a009e33eb3930f41a70b2b64" +checksum = "36959be2c7f810ba6b8ece8cfe2ee515774c1c776f1ed0bebf3b9e8068f6a435" dependencies = [ "frame-benchmarking", "frame-support", @@ -6984,9 +7222,9 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b9b137b78565e4012edf20a3c9fd10fa03e3b857dd3999239454da5d4d2431" +checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7008,21 +7246,21 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b1438535c3430a1c3de1d4c92d9a2c0cb664deb8433c8bf4c5298012ab50c3" +checksum = "df8878e29f3d001ac1b1b714621f462e41a9d1fa8f385657f955e8a1ec0684d7" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "pallet-staking-reward-fn" -version = "14.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d48988f4264ff9a8088d40e4f4bfdee9606a9abef1e432987f6e40aec76da6" +checksum = "45b6f832653badb5f70bdfecc1ded64b02b8159b27f18515af03f8b80f1b023b" dependencies = [ "log", "sp-arithmetic", @@ -7030,9 +7268,9 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a3b908034f3c688deacd672a0c838826edb5a3c980c04faf8f5b84edabbc8a6" +checksum = "773c0d24ad4da4b505e47b43e91c8c0af4e835f16104bc770732a4796c174748" dependencies = [ "parity-scale-codec", "sp-api", @@ -7040,9 +7278,9 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8084d2091a88147c1caad25bc03b15f3f7320c18087cfe037b8e21b13bd068" +checksum = "550292d79f281fd1bfbbf2643f10cef3d67068075d46374295f2efe7f7113da0" dependencies = [ "frame-benchmarking", "frame-support", @@ -7058,10 +7296,11 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f10e6b5329062c8d78a9d845ebd1201b9b505e2a4b5aa6b4fdceeeccde0c323c" +checksum = "fcec9f73ecb8d0439a13043a253a9fd90aa6bf5aece6470194bbfc7f79256d88" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7074,10 +7313,11 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924bc62e043df933e6067a2a70a71a16823253e46765e36800f0dc60a0a59018" +checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7094,9 +7334,9 @@ dependencies = [ [[package]] name = "pallet-tips" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8874f39912e560ea6de9c1e51d50dcd8e9fe7a68f2f9b89e5bf42bfc637cdf36" +checksum = "81b17cf8b964e5533f1f5ac1f087f3f69adfead754cb5dd25abe395ec1e7abc9" dependencies = [ "frame-benchmarking", "frame-support", @@ -7114,9 +7354,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eeaaeaf89f80fe3d19ff9ed60430423a7ea70ca91747b04be830499334d55d3" +checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" dependencies = [ "frame-support", "frame-system", @@ -7131,9 +7371,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8ee4c219399d7353548641d31aea760007f88223d6de72048fd9d13a9a6601" +checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7144,10 +7384,11 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f099cd65be6adbd3602e5b3df680a5ab868b79c990c5c7b3977e849728632e" +checksum = "8dd462af11574485864023849e0622916b611dbc88111192fb39b1e6d7e666ba" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7156,15 +7397,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "pallet-uniques" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6615e1af20293b33ec6c2bb30b9e1a9b4e0420c78b5f2aeed8afe244d9cdc6a" +checksum = "8010c79bac1b78fb35b3ee17b40469dec3fcf2eaa6fd863c5be5d96f2ad46bfd" dependencies = [ "frame-benchmarking", "frame-support", @@ -7178,9 +7420,9 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c463bcdbe9b5f84b816ea4095d1aea776acd7bae0e9f6fe074acd84094ace" +checksum = "85a8a6941da32837e4297e0d8abe0a5c94f348a119cccbf27b0f99ee01246c0e" dependencies = [ "frame-benchmarking", "frame-support", @@ -7195,9 +7437,9 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fdc85285a6ced9b1ce722d4e7681b6b97ccf3a9ee439eeaf6bfc33c2022cbb" +checksum = "fd29411ef24eb6a856adf1bc33b37ead4835a25dafb1c4c8c95b13fa5247748f" dependencies = [ "frame-benchmarking", "frame-support", @@ -7211,9 +7453,9 @@ dependencies = [ [[package]] name = "pallet-whitelist" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a09403cca331027032f2ba9a992e8b6bcd27d95255dfc30f1f6da5fd32ef57bc" +checksum = "d37304829099cfec7d17df70cfe11ccf6cb7bd624eab80e8e79e895859454540" dependencies = [ "frame-benchmarking", "frame-support", @@ -7227,9 +7469,9 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b913e408dfd2e3b1a1834aa03965b1616bf2d4c24c635a1cdd3ae10335c97e48" +checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -7249,9 +7491,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49d6f43940cf0146a59ce21a495f32edb746ec16ec67f41d8a4ad4ada79afe1" +checksum = "e6bfdc94e39541b111db7d2c2a95a18a3c3bb42dd37c20b8705727e617ce00c9" dependencies = [ "frame-benchmarking", "frame-support", @@ -7267,17 +7509,36 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "pallet-xcm-bridge-hub-router" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e2d8a783510d2fb4c0e81f591baad76fa8ebbed0f77852bf23720b299539b61" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "parachains-common" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f61ccf16fd574bc10480b1a106bb8536b5dddd38a44de0ce20e6f44b0cb4e1" +checksum = "c7ab598917585ae55b892dbfb6fa5073eb40454c47504a0d0db2634505538632" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", "frame-support", "frame-system", - "kusama-runtime-constants 2.0.0", "log", "num-traits", "pallet-asset-tx-payment", @@ -7288,7 +7549,6 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", - "polkadot-runtime-constants 2.0.0", "rococo-runtime-constants", "scale-info", "smallvec", @@ -7297,18 +7557,18 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", - "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", ] [[package]] name = "parachains-runtimes-test-utils" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f653770c9ad5b9209e76bee456c2979a46a2a0245a8488b70311e005b68d80" +checksum = "4473cc6319cada74f52b4c0b35a7a8b248e0db661aed4e65bd3a4cf676c9d4ff" dependencies = [ "assets-common", "cumulus-pallet-dmp-queue", @@ -7345,7 +7605,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -7568,7 +7828,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -7623,9 +7883,9 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-core-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960aeac8618063cd9eca2a3551a92234a4c9007a970df7bf61d6fc2f9b4b85ff" +checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" dependencies = [ "parity-scale-codec", "scale-info", @@ -7636,9 +7896,9 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edffd01480c2a68452ea585cd5316447b236eb9c02bc95dba5c9654f8f4a15b1" +checksum = "2cfe6d4769181dce55b1b8fc53f0bd85bb4aa20473702fbce95a94abafa19379" dependencies = [ "lazy_static", "log", @@ -7655,9 +7915,9 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08e1c66cc711d6f5c04be591021c6dedaad1e074f66f3b8bd06553c7f8e5ba2" +checksum = "c51a586fc3ef87c685588a650c18882b4cf069d8adc0d7d9bd2670749cb4e82b" dependencies = [ "bs58 0.5.0", "futures", @@ -7675,9 +7935,9 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f269984611861c4a5297234b4b649a483a5428194790dbea8b711b6e16ea93" +checksum = "f6de513655bf71400299cda1ccaebfa612fd3965e7ce5a9120b4ff37bfc80931" dependencies = [ "async-channel", "async-trait", @@ -7700,9 +7960,9 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883c5f3b51182a2f2f560230bd8e395bafa231dbc50335a4cc7eb3049860fcb4" +checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" dependencies = [ "bounded-vec", "futures", @@ -7723,9 +7983,9 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07bd4e5a7e83b15fea91d92767e5c2a6a3e280a55d21f9bed9e96c25019cfb" +checksum = "8e1013b3bac6e9b76bbd71433c3eba36b5c0fa9306bfc473ec02e3a104e156d2" dependencies = [ "async-trait", "derive_more", @@ -7736,6 +7996,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", + "sc-client-api", "sc-network", "sc-transaction-pool-api", "smallvec", @@ -7748,9 +8009,9 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2012254af68764032245239030ffdfca0c2b0d126de84c0abb3f62a02dba3b68" +checksum = "e2f547e981cbd72357ba30952193844d30de5063e9d304c117c9b941f12b5f84" dependencies = [ "async-trait", "futures", @@ -7763,7 +8024,6 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", - "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -7772,9 +8032,9 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be23c13fd44bab7ed83eea35e1b68bcd21d61cbc6bb15451a8b0a00e627f0ab" +checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ "bounded-collections", "derive_more", @@ -7790,9 +8050,9 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2c1568c0e0e40b24e8aa149c9194f692c9f9d1f999ab2024974bf47b9323bb" +checksum = "ee4508ff6b035edc08c54bb61238500179963f6f1eb8266dce6a5625509124bc" dependencies = [ "bitvec", "hex-literal", @@ -7832,6 +8092,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -7869,6 +8130,7 @@ dependencies = [ "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-reward-fn", "pallet-staking-runtime-api", "pallet-timestamp", "pallet-tips", @@ -7883,7 +8145,7 @@ dependencies = [ "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "polkadot-runtime-parachains", "rustc-hex", "scale-info", @@ -7900,6 +8162,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -7926,9 +8189,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92ab9a0a68d66e0541a150e00e90480e94992d5d7e0494248a4661b1f355ee8" +checksum = "a788f8ed8b33262c33f72d78e3416c5991e40d333178ae43000a92181ee44bca" dependencies = [ "bitvec", "frame-benchmarking", @@ -7938,6 +8201,7 @@ dependencies = [ "impl-trait-for-tuples", "libsecp256k1", "log", + "pallet-asset-rate", "pallet-authorship", "pallet-babe", "pallet-balances", @@ -7950,6 +8214,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-parachains", @@ -7968,6 +8233,8 @@ dependencies = [ "sp-staking", "sp-std", "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] @@ -7982,28 +8249,14 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", -] - -[[package]] -name = "polkadot-runtime-constants" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9006804184f3f06e5c513d125aebb7764ab8116a340d71ff07ea266c2ae5b159" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "staging-xcm", ] [[package]] name = "polkadot-runtime-metrics" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4bb4e450cc3683d3e583067549c292db2c153a80da0af9717e41549a0a9979" +checksum = "bfe45b01d9d621174c9c0eef0871aeead5986393838206fe58df3ae414bcb8d2" dependencies = [ "bs58 0.5.0", "frame-benchmarking", @@ -8015,9 +8268,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b7d429eda889f6511ff5d1a1a86765978e59f4dc9b9b692d5d5dfa22a7436b" +checksum = "936dbae8a7a88dba07da726d779126716e05364d8475ced1c313f32755050a02" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8037,6 +8290,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", @@ -8063,9 +8317,9 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b55bf808133addad3d826c344681cf6272acba60a2b9a007f4e4076c2e77eda" +checksum = "22b2a11cb8871f7e30a8f5e455c92d19a186065644ee00f9acda550ff89dacce" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8143,7 +8397,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -8182,14 +8436,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -8202,9 +8456,9 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.2.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" dependencies = [ "coarsetime", "crossbeam-queue", @@ -8258,20 +8512,20 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -8310,7 +8564,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -8331,7 +8585,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -8352,7 +8606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -8510,6 +8764,16 @@ dependencies = [ "getrandom 0.2.10", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -8627,7 +8891,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -8714,7 +8978,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -8754,9 +9018,9 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f5a684888cc4995b2916f22014e0356f0a81fd8086079b4c1c11aaf62a8965" +checksum = "272eaa4f1b4b5357d89d1f8f504cb5ee81a105bf7e5c295f053c6e521f2a199b" dependencies = [ "frame-support", "polkadot-primitives", @@ -8765,6 +9029,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -9026,9 +9291,9 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75d11155f65cf4e548b916a95fd3c1193d3fa89cbece489e3627cb5cd93e77c" +checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" dependencies = [ "log", "sp-core", @@ -9038,9 +9303,9 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1903c35451b28ef27e5fd7cd07f4cb906fa368626e733b6b7315c285d8c3079f" +checksum = "fb7e0e8a4ea5304b65d49c0085a458ed2e43394f95457689875d3e0c6e118dee" dependencies = [ "async-trait", "futures", @@ -9067,9 +9332,9 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5dc368497d940a5744cf427253a4b2f8d2a2cad9b2fbb897a270a939e54b5f" +checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9083,9 +9348,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26e51780635e06b9ff2c41a953c57dcc83d86c9459ee432f24775a44b61f2bd3" +checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9103,23 +9368,23 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b01ae962b09bc4c95661eed1d6c4996cf72b54f522d0e41d81ae1da65d7bd3c" +checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sc-cli" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e347f8c3fe530de1e8e3f735cc826d46fb9b53bd41604f1b82159a2186c6af" +checksum = "22c61058223f80c1f961b03f7737529609a3283eef91129e971a1966101c18ea" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "chrono", "clap", "fdlimit", @@ -9134,6 +9399,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -9155,9 +9421,9 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c17ac3b6dcc569998527e9228f6370d22ba84136f4c1753f6ba4d07c41a3f1" +checksum = "c7d32101f415f4d7ddbe8b5de1c1387a78d6dce070e26407ec605fe9f3fc9e23" dependencies = [ "fnv", "futures", @@ -9177,14 +9443,15 @@ dependencies = [ "sp-state-machine", "sp-statement-store", "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c292bad8f2f55772953fc6d0b6970089eb3b1782862799828413b0db847473" +checksum = "d4ced79f609a44782874d856cf39d256838957195ef34f4fb8ced90bf4b725d0" dependencies = [ "hash-db", "kvdb", @@ -9209,9 +9476,9 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc2effbf5b5be7e7b5a0d448d6b83f446cd2425b9be0ab55b97bde8f60a8f46" +checksum = "86e4100cc8fb3876708e1ec5a7c63af3baa75febd5051beb9ddd1e4835fdfc27" dependencies = [ "async-trait", "futures", @@ -9235,9 +9502,9 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b38c64210870649f89b476295ccd7c078ed7c2b9a3c82f413ad2c9396b63a" +checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9258,9 +9525,9 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7023e1d9c86b817995a72e294b98f196cc3eb9c162f0b69ba95c3b0bd841ef32" +checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9271,14 +9538,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61689d40f3840a20d8987cb2a86d3841f2c3ab851a5cea0c6f466a062abbcd" +checksum = "f9167d733e928c528273be63b905ec750cfda85d740453071463da69f7d633bc" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.1", "rustix 0.36.15", "sc-allocator", "sc-executor-common", @@ -9289,9 +9557,9 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26c939c308d9bad95a7489a64c84863149451f6b6f5d77be1f8acbba0aa9e8" +checksum = "7189a0b95fe5d79895a107c6c057bc9351cd9c867552200815199cde25bcdb9d" dependencies = [ "ansi_term", "futures", @@ -9306,11 +9574,11 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a26be641a4d25ec382a340f90c26f5422644269422d2f6e8390073a26d9023" +checksum = "abecdf9778fccc254c0b5e227ea8b90fd59247044a30ad293a068b180427d244" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -9319,13 +9587,42 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53ea71ec60601c18d6adcaf7a62698fc2e886c16dc8fdf8d61b3b76244dea38" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0d414c9e17d563a0c0dce01c6b6f10aa50d9ba0e904c2fe5e6b2aaf845f5de" +checksum = "01f519592a971199c486d412dbf38ba54096857080bf4b9d29c9ffabcfee3745" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "asynchronous-codec", @@ -9363,9 +9660,9 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d188183e28b77d7cdfbd07cc251d9e6c6b1c9960405d92943cfc642be1758ef" +checksum = "8fe63a55e03d8bc796ff1e94e7fb62a62acfd7a80a47865a97b55c13371c3e05" dependencies = [ "async-channel", "cid", @@ -9384,9 +9681,9 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d09f99d3845d5bb325641a3de1db8049bccca29e8272e65b8ea415c1153b01" +checksum = "8d236686d15275e4aa49ca929a06fb6fac28aa70e35ee185b981036c149f9e9d" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -9402,11 +9699,11 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f0d6072d48cc9ae8ce06ee8790eccb5268c9af083a9029ff8d38d0e3eb541d" +checksum = "aac888fd720ef8bb2ff7d2b7f7b2e54d17bb85a417cf1e1b6f0f64f7e644936d" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p-identity", @@ -9424,11 +9721,11 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b26c047661612e72321a1df53d76e79aad99b0846d795ea3807d9b25baf6d1" +checksum = "10c697aa8f52cf194b9f00113a7d0d3ce5d1456bedd6169a9caae10737f02907" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "fork-tree", @@ -9455,15 +9752,16 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio-stream", ] [[package]] name = "sc-network-transactions" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940233816ec996869ca47c2153d4e66c9df376cf32e62b6c78630f418705fd62" +checksum = "bb7c9bfc7b58ce229d1512158b8f13dc849ec24857d1c29a41a867fb8afb5c09" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "libp2p", "log", @@ -9478,9 +9776,9 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86ce48d8c8c6b4ebaf4775955cc79985732db5407e4893e0976be8f6b28eb5b" +checksum = "eb277280b6b3519e4a2e693b75d4ca516ebb4a928162e6a1791b217b2be60c9f" dependencies = [ "futures", "jsonrpsee", @@ -9490,6 +9788,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -9510,13 +9809,14 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60585da26d11aefb112d3a6925cc75fd76bee1961b2de615e6207df2b86a459c" +checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -9530,9 +9830,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc99b691cc6a88afc9c64b40e50cdef64920f7b3c3e2d752aa8dfe192a4c2f0" +checksum = "9e8083e1b026dcf397f8c1122b3fba6cc744c6962996df6a30e0fb75223f7637" dependencies = [ "http", "jsonrpsee", @@ -9546,11 +9846,11 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4a55644ca962d4a094b54bb0e2a30bcbe12c17385096650c771c14f7318c8e" +checksum = "198ea9287111b4060ce1d70dce99804b99d1a92b5fb23a79d94bf0cb460ca3ce" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "futures-util", "hex", @@ -9575,9 +9875,9 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58550b3ee0bba7beec7d2ce5612b712a34d3326ff68fa95799f6c328f5bb8dd" +checksum = "3623ae5bd7b089da9796a3f1edd974c94f34dd4b4b527146662ef409ae9cd38c" dependencies = [ "async-trait", "directories", @@ -9640,9 +9940,9 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b72de87b85342d40852e2dd8b17c07a47406ffe8f1ce97acb2605769df7ed7" +checksum = "3635fe572adfe796886e18910c8b94f7ce67f9ae3e2c161176e122ddf0baa7e4" dependencies = [ "log", "parity-scale-codec", @@ -9652,9 +9952,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca1dc4ea7ab8b96f0c948d26b2af7e540a8d182ba13f7b81930c119dc50f7087" +checksum = "60967710b85e650652832df73915b64c315f7b437e53c4635bd26106d6d05c21" dependencies = [ "futures", "libc", @@ -9672,9 +9972,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba96178e1d0286ecc4a37fbf39a4660d8d10640baedffb58ff18de7162d117cb" +checksum = "28e214e4d46cac02321bc3dc6fd72f019ac10819d1ac8f24f6935a4ae74ef273" dependencies = [ "chrono", "futures", @@ -9692,9 +9992,9 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e86aa30a30596a5ca9e0492474d907edff1e5e569a121bb4eb178f4a262b8d1" +checksum = "83bcd745ea216ba0c0a344cff2c41b12e27846d5fca4b28f56ff77e1d3ff3634" dependencies = [ "ansi_term", "atty", @@ -9722,21 +10022,21 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f602d1fa418385ed0e25be1305c9b03f68ff7ccb3b5df88a2145e7e1fb9117e" +checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sc-transaction-pool" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1787f18283fa7714203a705ff3b7bcb288eb85149e3679db0197f09319503f9" +checksum = "6f6db45a057a619670e07deefb4e69aab83386f076363db424907da2b2e82590" dependencies = [ "async-trait", "futures", @@ -9761,9 +10061,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "792c4841d8fba48d4a61e03db45854d8273dee31ae0d4ffb98af5176d0e31a03" +checksum = "1491607f296bb8cce09a5eb3a03320c60ad52bb8120127b26f69c32bcaccd8f2" dependencies = [ "async-trait", "futures", @@ -9778,9 +10078,9 @@ dependencies = [ [[package]] name = "sc-utils" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563bde62fa4681746c8960d434fa65e7ea40c7fab46692b26998132f43e1e100" +checksum = "81a4769c82dde62b9243dcc166be52e0c5d2d61cf2599923271118d9c8b997b1" dependencies = [ "async-channel", "futures", @@ -9794,9 +10094,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -9808,9 +10108,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9852,7 +10152,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -9910,7 +10210,7 @@ dependencies = [ "der 0.6.1", "generic-array 0.14.7", "pkcs8 0.9.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -9924,7 +10224,7 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10025,14 +10325,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -10198,9 +10498,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d332388412dc3ccbd1c4332876984736ee46b8f4a0ae6ea626d8ebf24ac312" +checksum = "1e902c6b7e8f86718aee7989d6c8ea851d9772cb54a3389f2d729d8df41167ec" dependencies = [ "enumn", "parity-scale-codec", @@ -10228,14 +10528,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", "rustc_version", "sha2 0.10.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -10277,9 +10577,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86901915aaf9c73f9a8588fae10072c6082e7bf169edae175950410b77ad8103" +checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" dependencies = [ "hash-db", "log", @@ -10299,24 +10599,24 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972809a3e3a583423bca2ee6d08eb5397814ef6b265abf43e888c4ed9916ff83" +checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sp-application-crypto" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa730e4f3a2aec3f4ee777410599a86eb17067ee5410c58ab496e88d7bb840c" +checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" dependencies = [ "parity-scale-codec", "scale-info", @@ -10328,9 +10628,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3d3ff6d6d717d7563659e9e47e958d33ebd2d0b3d8b1a9961cf9832944375e" +checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" dependencies = [ "integer-sqrt", "num-traits", @@ -10343,9 +10643,9 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a92d2af502f53c11c4656f58a1f49856b633f455433c6e0c94e59039f560f0" +checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" dependencies = [ "parity-scale-codec", "scale-info", @@ -10357,9 +10657,9 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "149acca1cfe20a2fc888e2e04b2811f7fd04a5bc47630a5d6191664f4ed7b224" +checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" dependencies = [ "sp-api", "sp-inherents", @@ -10369,9 +10669,9 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4d1f97e0cb623f919b6c6dbcd1d6438b8d8c456df4d045fb2778251d9d7803" +checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" dependencies = [ "futures", "log", @@ -10388,9 +10688,9 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e74272780c5c6ea026b3e66cdd7b369b90e1e94c17d91c41e2359224f2439ea" +checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" dependencies = [ "async-trait", "futures", @@ -10404,9 +10704,9 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564b98aa33315f542ba0ace2bb5f94a1a0503608b125edbd6537420fcf03a47" +checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" dependencies = [ "async-trait", "parity-scale-codec", @@ -10422,9 +10722,9 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53de79497a7ac68e7f414c2fea712b255b129991fbf6cbd63002fab9314437fe" +checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" dependencies = [ "async-trait", "parity-scale-codec", @@ -10442,9 +10742,9 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd87757ce886d92502d11b84022ee42d268ba3a63703c273c1f31f536b01b7b" +checksum = "90e18fe984ea745727e645c43d6a955bc471b3bcd36aa8d260c3bd0deeada0c5" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10462,9 +10762,9 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c750af0e64f19a5c364748c49339900e12f6ecd577f71879052604fd7f9312c4" +checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" dependencies = [ "finality-grandpa", "log", @@ -10481,9 +10781,9 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9edd2b6ac697a55075e3a4c5697f1142cd59de015f93aaf0aa843d1194ae268" +checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10494,14 +10794,13 @@ dependencies = [ [[package]] name = "sp-core" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412e2ec53b1bc63778e2d70c347224e6cd2e25c4bacb509585db85f0788747b7" +checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ - "array-bytes", - "arrayvec 0.7.4", + "array-bytes 6.1.0", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", @@ -10536,14 +10835,15 @@ dependencies = [ "thiserror", "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558116d02341b6f28b033c19a2a5fa555afa3c52628639170087e7685d51e743" +checksum = "cb8524f01591ee58b46cd83c9dbc0fcffd2fd730dabec4f59326cd58a00f17e2" dependencies = [ "blake2b_simd", "byteorder", @@ -10555,20 +10855,20 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8681fa136cf504ba2b722fcb10d78df147c15d201b997e06c4c8c72258001a" +checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sp-database" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac16ca1b4f309dd51a7a06b1843b73e6e81ff70a05dac17d3c8f9c86e4fba5da" +checksum = "9c6e8c710d6a71512af6f42d9dba9c3d1f6ad793846480babf459bbde3d60a94" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10576,20 +10876,20 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b235a0ad7124d58e6f0a728c8354da5b185b77bcf18b131b3a480cdaa23d95" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sp-externalities" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588cf40c36de918f545d712ad1a70631ae71653e4a321506dfcd8fa6fd26453c" +checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" dependencies = [ "environmental", "parity-scale-codec", @@ -10599,9 +10899,9 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae51f8a24e1be6593be94581f3465a10d7c86ce403cbf9dcf703d14f35309d1" +checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" dependencies = [ "serde_json", "sp-api", @@ -10611,9 +10911,9 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4355b6a68001ff5308a09fe069c778c184030ee3b95271dd44841d056ecadf13" +checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10626,12 +10926,12 @@ dependencies = [ [[package]] name = "sp-io" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9926dba7d67d87e40f49e18ff6cfc01373d5be13e3d373f02182bb5ec8ab37b" +checksum = "0ced350da15e8ba3a106206840acc42a6d3eb0d7e8bf7aa43ab00eac0bdf956f" dependencies = [ "bytes", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", @@ -10651,9 +10951,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfcca2fad349d5fd197a56b4deef229b872c9172a8267d77c81a9f45a38f18a" +checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", "sp-core", @@ -10663,9 +10963,9 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f0f9546dd151881c60e75355806f1cbbc893f64aa465fc5bf87a47de59467b" +checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -10676,9 +10976,9 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cb1a26782e618f26b43ec8c6ecd799657134cd12af1902ceddaf1fad8031a1b" +checksum = "8846768f036429227e49f6ab523fbee4bc6edfee278a361bf27999590fe020d4" dependencies = [ "thiserror", "zstd 0.12.4", @@ -10686,9 +10986,9 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d493f8324241f20d80cbc920fa0ab7a173907d0bf1a10812098a924cdff48d7" +checksum = "7ca9ff0e522a74725ac92f009d38deeb12e880f5296afbd78a6c6b970b773278" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -10696,11 +10996,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std", +] + [[package]] name = "sp-mmr-primitives" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74488c6296d65190b67a3945ef2f5cc8ac0f8b92023dcfc6e88164380654b6a0" +checksum = "0c3b33c20a4b1dd5a0069ced6997078a2af5d625f2c53d1b69bef9e131f42d77" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10717,9 +11030,9 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234e5bf197f5232cd00aeab2dc0b4c69b9fc2179d4ea67abd11fdea00a54bddf" +checksum = "9ee3536d7fd990c30864ca545d7bdbee02dc66a92ac2a7a66ab4e21521992a7b" dependencies = [ "parity-scale-codec", "scale-info", @@ -10732,9 +11045,9 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e1b9996004e6a39c06e6d66bd7684c8a07e73dd9137a2b6f2bbfde675d636a" +checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" dependencies = [ "sp-api", "sp-core", @@ -10743,9 +11056,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261572cc0db4b41cf7587b4f7bdc15b8f83f748f17ae1c3c2f56a3e8e62ee913" +checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" dependencies = [ "backtrace", "lazy_static", @@ -10754,9 +11067,9 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5828020dd51228aeee12a571720f3354deb95bc159f5edf4b7f2ffb3e023a12e" +checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" dependencies = [ "rustc-hash", "serde", @@ -10765,9 +11078,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f645e9e2c82d052ea48ed987a8789daca1c03f9b5ed1aa49cd080092eda85330" +checksum = "6d9c40ff7303e62219b55635e5245d963358cb77d6916250991ebcb82c0be2c6" dependencies = [ "either", "hash256-std-hasher", @@ -10788,9 +11101,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "19.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef767d6e400ee54a420bcbc570030741420c2d938a6e379d21cab9875a339c5" +checksum = "4f365332922a8cfa98ab00c6d08b1b0f24e159e730dd554e720d950ff3371b1f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10807,22 +11120,22 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "13.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd795a4a2205b64d95da897f85b7c83a0044f30df22b0ea282f8387dc6ca428" +checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sp-session" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff5d53ba296b793574fc12b6ebf49d6755d24439979290682ca58d759db5bb73" +checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" dependencies = [ "parity-scale-codec", "scale-info", @@ -10836,9 +11149,9 @@ dependencies = [ [[package]] name = "sp-staking" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb11c6a7765d2df277110fe25bba075f697aba999b29a6c9b55eb2b95401b0" +checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10851,9 +11164,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771dce7d78335718ab8475984b6dbc1f374777049ed1c308186679e611333be2" +checksum = "96e087fa4430befd2047b61d912c9d6fa4eaed408c4b58b46c6e9acd7965f2d3" dependencies = [ "hash-db", "log", @@ -10873,13 +11186,13 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c431b349889565a6b7f13eaa8216af8f826b015cbe1c9ef21999a44edd61d7" +checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" dependencies = [ "aes-gcm 0.10.2", "curve25519-dalek 4.0.0", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "hkdf", "parity-scale-codec", "rand 0.8.5", @@ -10898,15 +11211,15 @@ dependencies = [ [[package]] name = "sp-std" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed09ef1760e8be9b64b7f739f1cf9a94528130be475d8e4f2d1be1e690c9f9c" +checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" [[package]] name = "sp-storage" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20f503280c004d94033a32cb84274ede30ef0b4b634770b1e7d595f8245bda4" +checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10918,9 +11231,9 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d60953f7fc9b4f51bbcbac8f0cd8d6e6266a7cc18f661330308bbcec1eb053" +checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" dependencies = [ "async-trait", "parity-scale-codec", @@ -10932,9 +11245,9 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "12.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebabec43485ebdb2fdb5c6f9b388590d4797a3888024d74724ada2f16b2113b8" +checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" dependencies = [ "parity-scale-codec", "sp-std", @@ -10945,9 +11258,9 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa16493e2b8f84b03167c901f4ef7af8fe3e58c4c3426d41cc48dc10597d255d" +checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" dependencies = [ "sp-api", "sp-runtime", @@ -10955,9 +11268,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a926dbe30a0af60eae24ff01c532e545b9093eda36f520f2a744e40112e62b" +checksum = "39ae7c4954431b8479f7b2b6b82f0551cc360a1ee59b6a5276eef86a1099eaed" dependencies = [ "async-trait", "parity-scale-codec", @@ -10971,9 +11284,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78585a84d02d1c71e8eb8c00ed586c22a46ad4e773d9ff65c8ed3b8e98b9f51" +checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" dependencies = [ "ahash 0.8.3", "hash-db", @@ -10983,6 +11296,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", @@ -10995,9 +11309,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a8d11b816cd2c68467c697aecca868ab5828af02ef093681a88554d045b878" +checksum = "3e93da332eba3cb59a65f128da5edd5c70e1475692b45470104e7465b1278471" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11013,21 +11327,21 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6de7bbf860de93bb9b0ccd8e4a74e0dc40089e7192c397bac2b357d4da74e20c" +checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "sp-wasm-interface" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee009ac79098027f5990984e0c5ee2fd4883b16bbd6ab97931f28c2148aaa3ea" +checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11039,9 +11353,9 @@ dependencies = [ [[package]] name = "sp-weights" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86566cae93412e40bea0db9e6b110a7379105412a9aed1af73b5d2fb69cb7000" +checksum = "751676c1263e7f3600af16bad26a7978a816bc532676fe05eafa23b862c05b9e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11127,8 +11441,9 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -11200,6 +11515,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -11226,9 +11542,9 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1938a5d4938701c5a1ffd9c6cac6e906e219d85557f061f55f9f41e8d886c6" +checksum = "3a1bcf863664ca5708d92894fc30d2c6606c7dbb7d7cfcf43b9ae69d5b83f4fb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -11241,9 +11557,9 @@ dependencies = [ [[package]] name = "staging-xcm" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1712d3ab65f9f09c2f7c281106d45589182e71950279b98db83ce89125067d26" +checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ "bounded-collections", "derivative", @@ -11259,9 +11575,9 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd00b720a97ad1304684c07eea14fb3615dd2e26569d29876e9b40ff9c334eca" +checksum = "aa3b14246daaf0301dd35d698bac570d82ba0c6c6c1d3e149b93bcf377b2fc6b" dependencies = [ "frame-support", "frame-system", @@ -11282,9 +11598,9 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2ab1d434de75fb698d07d863ebede9745bd500d0284c659055201024627ca" +checksum = "3a85a421053f810f3ed988ba3cc39d926c95f70f1ae73282aa8cd5c50072173b" dependencies = [ "environmental", "frame-benchmarking", @@ -11375,7 +11691,7 @@ dependencies = [ "md-5", "rand 0.8.5", "ring", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "url", @@ -11397,9 +11713,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055e4661d7d20f68388a26419216035df64a06f34506b947c8a6e2db49d85461" +checksum = "ededbe617291db8a47d6e5155486ff1e5425f0bbf5dcb7f752730466a62bd293" dependencies = [ "hyper", "log", @@ -11410,9 +11726,9 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d8512f21a03e4eda6b3bb6da45c6840266c66f82a31b57eb183b33d67c7f2" +checksum = "5575c2bef89385e5406565b8fe5620856d414e3846c60927a78f0788cb288c8c" dependencies = [ "async-trait", "jsonrpsee", @@ -11424,9 +11740,9 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "12.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e792ccae135d69e0bc0eaeafc649e356cc9844017502496364d6b13db09e18" +checksum = "12ab1707dbbd129622b771a9b80b25f0ebf1c04854b907bc44b51ec96fb4005b" dependencies = [ "ansi_term", "build-helper", @@ -11450,6 +11766,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" @@ -11469,9 +11791,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -11568,7 +11890,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -11743,7 +12065,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -11899,7 +12221,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -11924,9 +12246,9 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d0644282db9729b5e373c01e8c8ba6d239e18989749c8aead177fe293eb5ca" +checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", "polkadot-node-jaeger", @@ -11937,15 +12259,15 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599cd79d4843008763dd613a19ca7d28e12e6c43ab69fc5089b7ce587dd8e021" +checksum = "35756d8c1a227ec525853a1080bf890d03d939deb2bc50d4d43c96516c795d0d" dependencies = [ "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -11994,9 +12316,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -12161,7 +12483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12171,7 +12493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12242,6 +12564,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.7", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "waitgroup" version = "0.1.2" @@ -12315,7 +12661,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -12349,7 +12695,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12371,9 +12717,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", @@ -12387,9 +12733,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -12399,9 +12745,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -12770,7 +13116,7 @@ dependencies = [ "sha1", "sha2 0.10.7", "signature 1.6.4", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webpki 0.21.4", @@ -12864,7 +13210,7 @@ dependencies = [ "rtcp", "rtp", "sha-1", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webrtc-util", @@ -12893,9 +13239,9 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c4085403f25dda1eb8ce8859a118f9681c35687e893a8a2511179f7436643a" +checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" dependencies = [ "frame-support", "polkadot-primitives", @@ -12904,6 +13250,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -13238,14 +13585,14 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bde452a547dd6926f94539b113171419b10d2b642a59cad296754259733bca6" +checksum = "401e2b62628da9246dececb06fe58118196557dd8deb9ce12d95cc4aaf56003f" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -13288,7 +13635,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] diff --git a/README.md b/README.md index 874f47819e..e24a7e40db 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,16 @@ Each leaf folder contains one runtime crate: └── glutton-kusama ``` +## Approval rights + +The approval rights are configured in [`review-bot.yml`](.github/review-bot.yml). The rights are configured as: + +- All files in `.github` require two approvals from Fellowship members of rank 4 or higher. +- `CHANGELOG.md`, `relay/*` or `system-parachains/*` require four approvals from Fellowship members of rank 3 or higher. +- All other files require the approval from one Fellowship member of rank 2 or higher. + +The review-bot uses the on-chain identity to map from a GitHub account to a Fellowship member. This requires that each Fellowship member add their GitHub handle to their on-chain identity. Check [here](docs/on-chain-identity.md) for instructions. + # Working on Pull Requests To merge a pull request, we use [Auto Merge Bot](https://github.com/paritytech/auto-merge-bot). @@ -36,3 +46,14 @@ To use it, write a comment in a PR that says: This will enable [`auto-merge`](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) in the Pull Request (or merge it if it is ready to merge). The automation can be triggered by the author of the PR or any fellow whose GitHub handle is part of their identity. + +# Release process + +Releases are automatically pushed on commits merged to master that fulfill the following requirements: + +- The [`CHANGELOG.md`](CHANGELOG.md) file was modified. +- The latest version (the version at the top of the file) in [`CHANGELOG.md`](CHANGELOG.md) has no tag in the repository. + +The release process is building all runtimes and then puts them into a release in this github repository. + +The format of [`CHANGELOG.md`](CHANGELOG.md) is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). diff --git a/docs/on-chain-identity-process.png b/docs/on-chain-identity-process.png new file mode 100644 index 0000000000..fb08c7e6c1 Binary files /dev/null and b/docs/on-chain-identity-process.png differ diff --git a/docs/on-chain-identity.md b/docs/on-chain-identity.md new file mode 100644 index 0000000000..014a2bb444 --- /dev/null +++ b/docs/on-chain-identity.md @@ -0,0 +1,15 @@ +# Setting up on-chain identity + +As a member of the Polkadot Technical Fellowship you should set an on-chain identity for your account on the Polkadot relay chain. Your identity should also include a field `github` pointing to your github username. Unfortunately this is a custom field that isn't supported by the polkadot.js UI, therefore in order to set it you'll need to create the identity extrinsic yourself. + +In the polkadot.js UI go to `Developer > Extrinsics`. Select your fellowship member account and pick the extrinsic `identity.setIdentity`. Below is an example screenshot of what it should look like including the `github` field. + +![Example extrinsic to set on-chain identity](on-chain-identity-process.png) + +Keep in mind that when filling in the data with `Raw` type only ASCII is accepted, therefore if you need to use UTF-8 characters (e.g. diacritics or emojis), you should convert the data to hex beforehand. For example, my legal name is "André Silva", which I need to submit as `0x416e6472c3a92053696c7661`. You can use [this](https://onlinehextools.com/convert-utf8-to-hex) tool to do the conversion, just disable the options `Add Hex Base` and `Space Between Hex Values`, after the conversion you should prepend the result with a single `0x` and submit as `Raw`. + +After submitting the extrinsic you won't be able to see the `github` field in the polkadot.js UI (custom fields aren't shown). You can confirm that everything was set correctly by checking the state (`Developer > Chain State > identity.identityOf`), or by using a block explorer like [Statescan](https://polkadot.statescan.io) which shows custom fields. + +## Getting a judgment on your identity + +After your identity is properly set you can get a judgment on it from one of the existing registrars. For instructions on how to get a judgment from the W3F registrar check [this](https://registrar.web3.foundation/) page which contains links to instructions. Due to the custom field in your identity the automated verification process won't work and you'll need to join the support channel on matrix to complete the verification. diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 76eb17ea5e..9c1c0f7af0 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -19,112 +19,114 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "21.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.27.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "8.0.0" } -binary-merkle-tree = { default-features = false , version = "8.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } +binary-merkle-tree = { default-features = false , version = "10.0.0" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false } -sp-api = { default-features = false , version = "21.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "21.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "21.0.0" } -sp-std = { package = "sp-std", default-features = false , version = "10.0.0" } -sp-application-crypto = { default-features = false , version = "25.0.0" } -sp-arithmetic = { default-features = false , version = "18.0.0" } -sp-io = { default-features = false , version = "25.0.0" } -sp-mmr-primitives = { default-features = false , version = "21.0.0" } -sp-runtime = { default-features = false , version = "26.0.0" } -sp-staking = { default-features = false , version = "21.0.0" } -sp-core = { default-features = false , version = "23.0.0" } -sp-session = { default-features = false , version = "22.0.0" } -sp-storage = { default-features = false , version = "15.0.0" } -sp-version = { default-features = false , version = "24.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "21.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "21.0.0" } -sp-npos-elections = { default-features = false , version = "21.0.0" } +sp-api = { default-features = false , version = "23.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } +sp-std = { package = "sp-std", default-features = false , version = "12.0.0" } +sp-application-crypto = { default-features = false , version = "27.0.0" } +sp-arithmetic = { default-features = false , version = "20.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-io = { default-features = false , version = "27.0.0" } +sp-mmr-primitives = { default-features = false , version = "23.0.0" } +sp-runtime = { default-features = false , version = "28.0.0" } +sp-staking = { default-features = false , version = "23.0.0" } +sp-core = { default-features = false , version = "25.0.0" } +sp-session = { default-features = false , version = "24.0.0" } +sp-storage = { default-features = false , version = "17.0.0" } +sp-version = { default-features = false , version = "26.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } +sp-npos-elections = { default-features = false , version = "23.0.0" } -pallet-authority-discovery = { default-features = false , version = "23.0.0" } -pallet-authorship = { default-features = false , version = "23.0.0" } -pallet-babe = { default-features = false , version = "23.0.0" } -pallet-bags-list = { default-features = false , version = "22.0.0" } -pallet-balances = { default-features = false , version = "23.0.0" } -pallet-beefy = { default-features = false , version = "23.0.0" } -pallet-beefy-mmr = { default-features = false , version = "23.0.0" } -pallet-bounties = { default-features = false , version = "22.0.0" } -pallet-child-bounties = { default-features = false , version = "22.0.0" } -pallet-transaction-payment = { default-features = false , version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "23.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "18.0.0" } -pallet-collective = { default-features = false , version = "23.0.0" } -pallet-conviction-voting = { default-features = false , version = "23.0.0" } -pallet-democracy = { default-features = false , version = "23.0.0" } -pallet-elections-phragmen = { default-features = false , version = "24.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "22.0.0" } -pallet-fast-unstake = { default-features = false , version = "22.0.0" } -frame-executive = { default-features = false , version = "23.0.0" } -pallet-grandpa = { default-features = false , version = "23.0.0" } -pallet-nis = { default-features = false , version = "23.0.0" } -pallet-identity = { default-features = false , version = "23.0.0" } -pallet-im-online = { default-features = false , version = "22.0.0" } -pallet-indices = { default-features = false , version = "23.0.0" } -pallet-membership = { default-features = false , version = "23.0.0" } -pallet-message-queue = { default-features = false , version = "26.0.0" } -pallet-mmr = { default-features = false , version = "22.0.0" } -pallet-multisig = { default-features = false , version = "23.0.0" } -pallet-nomination-pools = { default-features = false , version = "20.0.0" } -pallet-offences = { default-features = false , version = "22.0.0" } -pallet-preimage = { default-features = false , version = "23.0.0" } -pallet-proxy = { default-features = false , version = "23.0.0" } -pallet-ranked-collective = { default-features = false , version = "23.0.0" } -pallet-recovery = { default-features = false , version = "23.0.0" } -pallet-referenda = { default-features = false , version = "23.0.0" } -pallet-scheduler = { default-features = false , version = "24.0.0" } -pallet-session = { default-features = false , version = "23.0.0" } -pallet-society = { default-features = false, features = ["experimental"] , version = "23.0.0" } -frame-support = { default-features = false , version = "23.0.0" } -pallet-staking = { default-features = false , version = "23.0.0" } -pallet-state-trie-migration = { default-features = false , version = "24.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "9.0.0" } -frame-system = { default-features = false , version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "21.0.0" } -pallet-timestamp = { default-features = false , version = "22.0.0" } -pallet-tips = { default-features = false , version = "22.0.0" } -pallet-treasury = { default-features = false , version = "22.0.0" } -pallet-utility = { default-features = false , version = "23.0.0" } -pallet-vesting = { default-features = false , version = "23.0.0" } -pallet-whitelist = { default-features = false , version = "22.0.0" } -pallet-xcm = { default-features = false , version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } -frame-election-provider-support = { default-features = false , version = "23.0.0" } +pallet-asset-rate = { default-features = false , version = "4.0.0" } +pallet-authority-discovery = { default-features = false , version = "25.0.0" } +pallet-authorship = { default-features = false , version = "25.0.0" } +pallet-babe = { default-features = false , version = "25.0.0" } +pallet-bags-list = { default-features = false , version = "24.0.0" } +pallet-balances = { default-features = false , version = "25.0.0" } +pallet-beefy = { default-features = false , version = "25.0.0" } +pallet-beefy-mmr = { default-features = false , version = "25.0.0" } +pallet-bounties = { default-features = false , version = "24.0.0" } +pallet-child-bounties = { default-features = false , version = "24.0.0" } +pallet-transaction-payment = { default-features = false , version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } +pallet-collective = { default-features = false , version = "25.0.0" } +pallet-conviction-voting = { default-features = false , version = "25.0.0" } +pallet-democracy = { default-features = false , version = "25.0.0" } +pallet-elections-phragmen = { default-features = false , version = "26.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } +pallet-fast-unstake = { default-features = false , version = "24.0.0" } +frame-executive = { default-features = false , version = "25.0.0" } +pallet-grandpa = { default-features = false , version = "25.0.0" } +pallet-nis = { default-features = false , version = "25.0.0" } +pallet-identity = { default-features = false , version = "25.0.0" } +pallet-im-online = { default-features = false , version = "24.0.0" } +pallet-indices = { default-features = false , version = "25.0.0" } +pallet-membership = { default-features = false , version = "25.0.0" } +pallet-message-queue = { default-features = false , version = "28.0.0" } +pallet-mmr = { default-features = false , version = "24.0.0" } +pallet-multisig = { default-features = false , version = "25.0.0" } +pallet-nomination-pools = { default-features = false , version = "22.0.0" } +pallet-offences = { default-features = false , version = "24.0.0" } +pallet-preimage = { default-features = false , version = "25.0.0" } +pallet-proxy = { default-features = false , version = "25.0.0" } +pallet-ranked-collective = { default-features = false , version = "25.0.0" } +pallet-recovery = { default-features = false , version = "25.0.0" } +pallet-referenda = { default-features = false , version = "25.0.0" } +pallet-scheduler = { default-features = false , version = "26.0.0" } +pallet-session = { default-features = false , version = "25.0.0" } +pallet-society = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false , version = "25.0.0" } +pallet-staking = { default-features = false , version = "25.0.0" } +pallet-state-trie-migration = { default-features = false , version = "26.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } +frame-system = { default-features = false , version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } +pallet-timestamp = { default-features = false , version = "24.0.0" } +pallet-tips = { default-features = false , version = "24.0.0" } +pallet-treasury = { default-features = false , version = "24.0.0" } +pallet-utility = { default-features = false , version = "25.0.0" } +pallet-vesting = { default-features = false , version = "25.0.0" } +pallet-whitelist = { default-features = false , version = "24.0.0" } +pallet-xcm = { default-features = false , version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +frame-election-provider-support = { default-features = false , version = "25.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.29.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "21.0.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "22.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, features = ["experimental"] , version = "2.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "2.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "2.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "2.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "26.0.0" } -sp-trie = { version = "24.0.0" } +keyring = { package = "sp-keyring", version = "28.0.0" } +sp-trie = { version = "26.0.0" } separator = "0.4.1" serde_json = "1.0.96" -remote-externalities = { package = "frame-remote-externalities" , version = "0.30.0" } +remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "12.0.0" } +sp-tracing = { default-features = false , version = "14.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "12.0.0" } +substrate-wasm-builder = { version = "14.0.0" } [features] default = [ "std" ] @@ -149,6 +151,7 @@ std = [ "kusama-runtime-constants/std", "log/std", "offchain-primitives/std", + "pallet-asset-rate/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", @@ -213,6 +216,7 @@ std = [ "sp-application-crypto/std", "sp-arithmetic/std", "sp-core/std", + "sp-genesis-builder/std", "sp-io/std", "sp-mmr-primitives/std", "sp-npos-elections/std", @@ -234,6 +238,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "pallet-babe/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", @@ -292,6 +297,7 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime", "frame-try-runtime/try-runtime", + "pallet-asset-rate/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-babe/try-runtime", diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index d2f32861a1..9127334bdc 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -9,12 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { default-features = false , version = "23.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "2.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "2.0.0" } -sp-runtime = { default-features = false , version = "26.0.0" } -sp-weights = { default-features = false , version = "22.0.0" } -sp-core = { default-features = false , version = "23.0.0" } +frame-support = { default-features = false , version = "25.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } +sp-runtime = { default-features = false , version = "28.0.0" } +sp-weights = { default-features = false , version = "24.0.0" } +sp-core = { default-features = false , version = "25.0.0" } + +xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } [features] default = [ "std" ] @@ -25,4 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", + "xcm/std" ] diff --git a/relay/kusama/constants/src/lib.rs b/relay/kusama/constants/src/lib.rs index 78f96b3510..342359608b 100644 --- a/relay/kusama/constants/src/lib.rs +++ b/relay/kusama/constants/src/lib.rs @@ -97,6 +97,35 @@ pub mod fee { } } +/// System Parachains. +pub mod system_parachain { + use xcm::latest::prelude::*; + + /// Asset Hub parachain ID. + pub const ASSET_HUB_ID: u32 = 1000; + /// Encointer parachain ID. + pub const ENCOINTER_ID: u32 = 1001; + /// Bridge Hub parachain ID. + pub const BRIDGE_HUB_ID: u32 = 1002; + + frame_support::match_types! { + // System parachains from Kusama point of view. + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 0, + interior: X1(Parachain( + ASSET_HUB_ID | + ENCOINTER_ID | + BRIDGE_HUB_ID + )), + } + }; + } +} + +/// Kusama Treasury pallet instance. +pub const TREASURY_PALLET_ID: u8 = 18; + #[cfg(test)] mod tests { use super::{ diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 659a7052d2..a5dca2b45f 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -31,9 +31,13 @@ use primitives::{ PARACHAIN_KEY_TYPE_ID, }; use runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, impls::DealWithFees, paras_registrar, - prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote, - SlowAdjustingFeeUpdate, U256ToBalance, + auctions, claims, crowdloan, impl_runtime_weights, + impls::{ + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, + VersionedMultiLocationConverter, + }, + paras_registrar, prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, + CurrencyToVote, SlowAdjustingFeeUpdate, U256ToBalance, }; use scale_info::TypeInfo; use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; @@ -46,7 +50,7 @@ use runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v5 as parachains_runtime_api_impl, + runtime_api_impl::v7 as parachains_runtime_api_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, }; @@ -61,16 +65,20 @@ use frame_election_provider_support::{ SequentialPhragmen, }; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, traits::{ - ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, + KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, + StorageMapShim, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; +use pallet_identity::simple::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; @@ -79,7 +87,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, - Keccak256, OpaqueKeys, SaturatedConversion, Verify, + IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, @@ -88,11 +96,15 @@ use sp_staking::SessionIndex; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use xcm::latest::Junction; +use xcm::{ + latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, + VersionedMultiLocation, +}; +use xcm_builder::PayOverXcm; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; -pub use pallet_election_provider_multi_phase::Call as EPMCall; +pub use pallet_election_provider_multi_phase::{Call as EPMCall, GeometricDepositBase}; #[cfg(feature = "std")] pub use pallet_staking::StakerStatus; use pallet_staking::UseValidatorsMap; @@ -101,7 +113,7 @@ use sp_runtime::traits::Get; pub use sp_runtime::BuildStorage; /// Constant values used within the runtime. -use kusama_runtime_constants::{currency::*, fee::*, time::*}; +use kusama_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; // Weights used in the runtime. mod weights; @@ -137,10 +149,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 9430, + spec_version: 1_000_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 23, + transaction_version: 24, state_version: 1, }; @@ -239,6 +251,8 @@ impl pallet_scheduler::Config for Runtime { parameter_types! { pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { @@ -246,8 +260,12 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { @@ -310,10 +328,11 @@ impl pallet_balances::Config for Runtime { type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; - type FreezeIdentifier = (); - type MaxFreezes = (); + type FreezeIdentifier = RuntimeFreezeReason; + type MaxFreezes = ConstU32<8>; type RuntimeHoldReason = RuntimeHoldReason; - type MaxHolds = ConstU32<1>; + type RuntimeFreezeReason = RuntimeFreezeReason; + type MaxHolds = ConstU32<2>; } parameter_types! { @@ -422,17 +441,6 @@ impl pallet_authorship::Config for Runtime { type EventHandler = (Staking, ImOnline); } -impl_opaque_keys! { - pub struct OldSessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - } -} - impl_opaque_keys! { pub struct SessionKeys { pub grandpa: Grandpa, @@ -445,32 +453,6 @@ impl_opaque_keys! { } } -// remove this when removing `OldSessionKeys` -fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - im_online: old.im_online, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: { - // From Session::upgrade_keys(): - // - // Care should be taken that the raw versions of the - // added keys are unique for every `ValidatorId, KeyTypeId` combination. - // This is an invariant that the session pallet typically maintains internally. - // - // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination. - let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into(); - let id_raw: &mut [u8] = id.as_mut(); - id_raw[1..33].copy_from_slice(v.as_ref()); - id_raw[0..4].copy_from_slice(b"beef"); - id - }, - } -} - impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; @@ -505,7 +487,8 @@ parameter_types! { // signed config pub const SignedMaxSubmissions: u32 = 16; pub const SignedMaxRefunds: u32 = 16 / 4; - pub const SignedDepositBase: Balance = deposit(2, 0); + pub const SignedFixedDeposit: Balance = deposit(2, 0); + pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; // Each good submission will get 1/10 KSM as reward pub SignedRewardBase: Balance = UNITS / 10; @@ -578,7 +561,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SignedMaxSubmissions = SignedMaxSubmissions; type SignedMaxRefunds = SignedMaxRefunds; type SignedRewardBase = SignedRewardBase; - type SignedDepositBase = SignedDepositBase; + type SignedDepositBase = + GeometricDepositBase; type SignedDepositByte = SignedDepositByte; type SignedDepositWeight = (); type SignedMaxWeight = @@ -727,6 +711,10 @@ parameter_types! { pub const SpendPeriod: BlockNumber = 6 * DAYS; pub const Burn: Permill = Permill::from_perthousand(2); pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + // The asset's interior location for the paying account. This is the Treasury + // pallet instance (which sits at index 18). + pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); @@ -755,6 +743,23 @@ impl pallet_treasury::Config for Runtime { type WeightInfo = weights::pallet_treasury::WeightInfo; type SpendFunds = Bounties; type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedMultiLocation; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayOverXcm< + TreasuryInteriorLocation, + crate::xcm_config::XcmRouter, + crate::XcmPallet, + ConstU32<{ 6 * HOURS }>, + Self::Beneficiary, + Self::AssetKind, + LocatableAssetConverter, + VersionedMultiLocationConverter, + >; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; } parameter_types! { @@ -930,6 +935,7 @@ impl pallet_identity::Config for Runtime { type SubAccountDeposit = SubAccountDeposit; type MaxSubAccounts = MaxSubAccounts; type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = IdentityInfo; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; @@ -1402,9 +1408,10 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type MaxHolds = ConstU32<2>; + type MaxFreezes = ConstU32<1>; } parameter_types! { @@ -1451,6 +1458,7 @@ impl pallet_nomination_pools::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; type RewardCounter = FixedU128; type BalanceToU256 = BalanceToU256; type U256ToBalance = U256ToBalance; @@ -1483,6 +1491,18 @@ impl pallet_state_trie_migration::Config for Runtime { type MaxKeyLen = MigrationMaxKeyLen; } +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EitherOfDiverse, Treasurer>; + type RemoveOrigin = EitherOfDiverse, Treasurer>; + type UpdateOrigin = EitherOfDiverse, Treasurer>; + type Currency = Balances; + type AssetKind = ::AssetKind; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; +} + construct_runtime! { pub enum Runtime { @@ -1560,7 +1580,7 @@ construct_runtime! { Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 31, // Preimage registrar. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 32, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 32, // Bounties modules. Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 35, @@ -1578,7 +1598,7 @@ construct_runtime! { VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 39, // nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 41, + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 41, // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 42, @@ -1613,6 +1633,9 @@ construct_runtime! { // Generalized message queue MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, + + // Asset rate. + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, } } @@ -1654,109 +1677,12 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::*; - use frame_support::traits::LockIdentifier; - use frame_system::pallet_prelude::BlockNumberFor; - - parameter_types! { - pub const DemocracyPalletName: &'static str = "Democracy"; - pub const CouncilPalletName: &'static str = "Council"; - pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; - pub const PhragmenElectionPalletName: &'static str = "PhragmenElection"; - pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; - pub const TipsPalletName: &'static str = "Tips"; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; - } - - // Special Config for Gov V1 pallets, allowing us to run migrations for them without - // implementing their configs on [`Runtime`]. - pub struct UnlockConfig; - impl pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { - type Currency = Balances; - type MaxVotes = ConstU32<100>; - type MaxDeposits = ConstU32<100>; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = DemocracyPalletName; - } - impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig - for UnlockConfig - { - type Currency = Balances; - type MaxVotesPerVoter = ConstU32<16>; - type PalletId = PhragmenElectionPalletId; - type AccountId = AccountId; - type DbWeight = ::DbWeight; - type PalletName = PhragmenElectionPalletName; - } - impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { - type Currency = Balances; - type Hash = Hash; - type DataDepositPerByte = DataDepositPerByte; - type TipReportDepositBase = TipReportDepositBase; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = TipsPalletName; - } - - /// Upgrade Session keys to include BEEFY key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - fn on_runtime_upgrade() -> Weight { - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - } - - pub struct ParachainsToUnlock; - impl Contains for ParachainsToUnlock { - fn contains(id: &ParaId) -> bool { - let id: u32 = (*id).into(); - // ksuama parachains/parathreads that are locked and never produced block - match id { - 2003 | 2008 | 2018 | 2077 | 2089 | 2111 | 2112 | 2120 | 2126 | 2127 | 2130 | - 2226 | 2227 | 2231 | 2233 | 2237 | 2256 | 2257 | 2261 | 2268 | 2275 => true, - _ => false, - } - } - } + use super::Runtime; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - init_state_migration::InitMigrate, - pallet_society::migrations::VersionCheckedMigrateToV2< - Runtime, - (), - past_payouts::PastPayouts, - >, - pallet_im_online::migration::v1::Migration, - parachains_configuration::migration::v7::MigrateToV7, - parachains_scheduler::migration::v1::MigrateToV1, - parachains_configuration::migration::v8::MigrateToV8, - - // Unlock/unreserve balances from Gov v1 pallets that hold them - // https://github.com/paritytech/polkadot/issues/6749 - pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, - - // Delete storage key/values from all Gov v1 pallets - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - - // Upgrade SessionKeys to include BEEFY key - UpgradeSessionKeys, - - parachains_configuration::migration::v9::MigrateToV9, - // Migrate parachain info format - paras_registrar::migration::VersionCheckedMigrateToV1, + pallet_nomination_pools::migration::versioned_migrations::V5toV6, + pallet_nomination_pools::migration::versioned_migrations::V6ToV7, ); } @@ -1829,6 +1755,7 @@ mod benches { [pallet_utility, Utility] [pallet_vesting, Vesting] [pallet_whitelist, Whitelist] + [pallet_asset_rate, AssetRate] // XCM [pallet_xcm, XcmPallet] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] @@ -1902,6 +1829,7 @@ sp_api::impl_runtime_apis! { } } + #[api_version(7)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2032,6 +1960,18 @@ sp_api::impl_runtime_apis! { key_ownership_proof, ) } + + fn minimum_backing_votes() -> u32 { + parachains_runtime_api_impl::minimum_backing_votes::() + } + + fn para_backing_state(para_id: ParaId) -> Option { + parachains_runtime_api_impl::backing_state::(para_id) + } + + fn async_backing_params() -> primitives::AsyncBackingParams { + parachains_runtime_api_impl::async_backing_params::() + } } impl beefy_primitives::BeefyApi for Runtime { @@ -2295,6 +2235,16 @@ sp_api::impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -2357,7 +2307,7 @@ sp_api::impl_runtime_apis! { use frame_benchmarking::baseline::Pallet as Baseline; use xcm::latest::prelude::*; use xcm_config::{ - LocalCheckAccount, SovereignAccountOf, Statemine, TokenLocation, XcmConfig, + LocalCheckAccount, SovereignAccountOf, AssetHubLocation, TokenLocation, XcmConfig, }; impl pallet_session_benchmarking::Config for Runtime {} @@ -2368,11 +2318,26 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub ToParachain: ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmConfig; type AccountIdConverter = SovereignAccountOf; + type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositMultiAsset, + xcm_config::PriceForChildParachainDelivery, + ToParachain, + (), + >; fn valid_destination() -> Result { - Ok(Statemine::get()) + Ok(AssetHubLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { // Kusama only knows about KSM. @@ -2385,7 +2350,7 @@ sp_api::impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( - Statemine::get(), + AssetHubLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, )); pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; @@ -2407,6 +2372,7 @@ sp_api::impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { @@ -2424,15 +2390,15 @@ sp_api::impl_runtime_apis! { } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((Statemine::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { - Ok(Statemine::get()) + Ok(AssetHubLocation::get()) } fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = Statemine::get(); + let origin = AssetHubLocation::get(); let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) @@ -2478,7 +2444,7 @@ mod fees_tests { fn signed_deposit_is_sensible() { // ensure this number does not change, or that it is checked after each change. // a 1 MB solution should need around 0.16 KSM deposit - let deposit = SignedDepositBase::get() + (SignedDepositByte::get() * 1024 * 1024); + let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); assert_eq_error_rate!(deposit, UNITS * 167 / 100, UNITS / 100); } } @@ -2486,7 +2452,10 @@ mod fees_tests { #[cfg(test)] mod multiplier_tests { use super::*; - use frame_support::{dispatch::DispatchInfo, traits::OnFinalize}; + use frame_support::{ + dispatch::DispatchInfo, + traits::{OnFinalize, PalletInfoAccess}, + }; use runtime_common::{MinimumMultiplier, TargetBlockFullness}; use separator::Separatable; use sp_runtime::traits::Convert; @@ -2531,6 +2500,11 @@ mod multiplier_tests { assert!(on_idle / block_time <= 0.5f32) } + #[test] + fn treasury_pallet_index_is_correct() { + assert_eq!(TREASURY_PALLET_ID, ::index() as u8); + } + #[test] #[ignore] fn multiplier_growth_simulator() { @@ -2684,8 +2658,6 @@ mod init_state_migration { use super::Runtime; use frame_support::traits::OnRuntimeUpgrade; use pallet_state_trie_migration::{AutoLimits, MigrationLimits, MigrationProcess}; - #[cfg(feature = "try-runtime")] - use sp_runtime::DispatchError; #[cfg(not(feature = "std"))] use sp_std::prelude::*; @@ -2693,37 +2665,52 @@ mod init_state_migration { pub struct InitMigrate; impl OnRuntimeUpgrade for InitMigrate { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - frame_support::ensure!( - AutoLimits::::get().is_none(), - DispatchError::Other("Automigration already started.") - ); - Ok(Default::default()) + fn pre_upgrade() -> Result, sp_runtime::DispatchError> { + use parity_scale_codec::Encode; + let migration_should_start = AutoLimits::::get().is_none() && + MigrationProcess::::get() == Default::default(); + Ok(migration_should_start.encode()) } fn on_runtime_upgrade() -> frame_support::weights::Weight { - if MigrationProcess::::get() == Default::default() && - AutoLimits::::get().is_none() - { - // We use limits to target 600ko proofs per block and - // avg 800_000_000_000 of weight per block. - // See spreadsheet 4800_400 in - // https://raw.githubusercontent.com/cheme/substrate/try-runtime-mig/ksm.ods - AutoLimits::::put(Some(MigrationLimits { item: 4_800, size: 204800 * 2 })); - log::info!("Automatic trie migration started."); - ::DbWeight::get().reads_writes(2, 1) - } else { - log::info!("Automatic trie migration not started."); - ::DbWeight::get().reads(2) - } + if AutoLimits::::get().is_some() { + log::warn!("Automatic trie migration already started, not proceeding."); + return ::DbWeight::get().reads(1) + }; + + if MigrationProcess::::get() != Default::default() { + log::warn!("MigrationProcess is not Default. Not proceeding."); + return ::DbWeight::get().reads(2) + }; + + // Migration is not already running and `MigraitonProcess` is Default. Ready to run + // migrations. + // + // We use limits to target 600ko proofs per block and + // avg 800_000_000_000 of weight per block. + // See spreadsheet 4800_400 in + // https://raw.githubusercontent.com/cheme/substrate/try-runtime-mig/ksm.ods + AutoLimits::::put(Some(MigrationLimits { item: 4_800, size: 204800 * 2 })); + log::info!("Automatic trie migration started."); + ::DbWeight::get().reads_writes(2, 1) } #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - frame_support::ensure!( - AutoLimits::::get().is_some(), - DispatchError::Other("Automigration started.") - ); + fn post_upgrade( + migration_should_start_bytes: Vec, + ) -> Result<(), sp_runtime::DispatchError> { + use parity_scale_codec::Decode; + let migration_should_start: bool = + Decode::decode(&mut migration_should_start_bytes.as_slice()) + .expect("failed to decode migration should start"); + + if migration_should_start { + frame_support::ensure!( + AutoLimits::::get().is_some(), + sp_runtime::DispatchError::Other("Automigration did not start as expected.") + ); + } + Ok(()) } } diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index b3642d49d4..7c935b73e0 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -17,6 +17,7 @@ pub mod frame_election_provider_support; pub mod frame_system; +pub mod pallet_asset_rate; pub mod pallet_bags_list; pub mod pallet_balances; pub mod pallet_balances_nis_counterpart_balances; diff --git a/relay/kusama/src/weights/pallet_asset_rate.rs b/relay/kusama/src/weights/pallet_asset_rate.rs new file mode 100644 index 0000000000..e6fbff6374 --- /dev/null +++ b/relay/kusama/src/weights/pallet_asset_rate.rs @@ -0,0 +1,86 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `pallet_asset_rate` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `cob`, CPU: `` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/debug/polkadot +// benchmark +// pallet +// --chain=kusama-dev +// --steps=50 +// --repeat=2 +// --pallet=pallet_asset_rate +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/kusama/src/weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_asset_rate`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_rate::WeightInfo for WeightInfo { + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `4702` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn update() -> Weight { + // Proof Size summary in bytes: + // Measured: `110` + // Estimated: `4702` + // Minimum execution time: 60_000_000 picoseconds. + Weight::from_parts(60_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn remove() -> Weight { + // Proof Size summary in bytes: + // Measured: `110` + // Estimated: `4702` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(74_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index 3320520cd7..3eae33b5b9 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -597,4 +597,23 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } + + /// Storage: `NominationPools::BondedPools` (r:1 w:0) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + fn adjust_pool_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `980` + // Estimated: `4764` + // Minimum execution time: 54_057_000 picoseconds. + Weight::from_parts(54_855_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/relay/kusama/src/weights/pallet_preimage.rs b/relay/kusama/src/weights/pallet_preimage.rs index ddb39cc858..1240693cd9 100644 --- a/relay/kusama/src/weights/pallet_preimage.rs +++ b/relay/kusama/src/weights/pallet_preimage.rs @@ -210,4 +210,25 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `193 + n * (91 ±0)` + // Estimated: `3593 + n * (2566 ±0)` + // Minimum execution time: 2_452_000 picoseconds. + Weight::from_parts(2_641_000, 3593) + // Standard Error: 19_797 + .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + } } diff --git a/relay/kusama/src/weights/pallet_treasury.rs b/relay/kusama/src/weights/pallet_treasury.rs index 5ca8eb50b7..52b59a25cd 100644 --- a/relay/kusama/src/weights/pallet_treasury.rs +++ b/relay/kusama/src/weights/pallet_treasury.rs @@ -51,12 +51,12 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) /// Storage: `Treasury::Proposals` (r:0 w:1) /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - fn spend() -> Weight { + fn spend_local() -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `1887` - // Minimum execution time: 12_229_000 picoseconds. - Weight::from_parts(12_915_000, 0) + // Minimum execution time: 7_563_000 picoseconds. + Weight::from_parts(7_868_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -69,8 +69,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `107` // Estimated: `1489` - // Minimum execution time: 23_903_000 picoseconds. - Weight::from_parts(24_930_000, 0) + // Minimum execution time: 16_827_000 picoseconds. + Weight::from_parts(17_262_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,8 +83,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3593` - // Minimum execution time: 36_120_000 picoseconds. - Weight::from_parts(37_341_000, 0) + // Minimum execution time: 25_789_000 picoseconds. + Weight::from_parts(26_398_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -98,11 +98,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `433 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 7_598_000 picoseconds. - Weight::from_parts(12_144_577, 0) + // Minimum execution time: 5_353_000 picoseconds. + Weight::from_parts(8_423_989, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_737 - .saturating_add(Weight::from_parts(83_412, 0).saturating_mul(p.into())) + // Standard Error: 1_120 + .saturating_add(Weight::from_parts(45_883, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +112,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 5_895_000 picoseconds. - Weight::from_parts(6_191_000, 0) + // Minimum execution time: 4_075_000 picoseconds. + Weight::from_parts(4_286_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -122,26 +122,90 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `Treasury::Approvals` (r:1 w:1) /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Proposals` (r:100 w:100) + /// Storage: `Treasury::Proposals` (r:99 w:99) /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:201 w:201) + /// Storage: `System::Account` (r:199 w:199) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Bounties::BountyApprovals` (r:1 w:1) /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 100]`. + /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `297 + p * (251 ±0)` + // Measured: `294 + p * (251 ±0)` // Estimated: `3593 + p * (5206 ±0)` - // Minimum execution time: 59_368_000 picoseconds. - Weight::from_parts(55_754_002, 0) + // Minimum execution time: 34_895_000 picoseconds. + Weight::from_parts(40_046_318, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 15_044 - .saturating_add(Weight::from_parts(37_890_085, 0).saturating_mul(p.into())) + // Standard Error: 6_188 + .saturating_add(Weight::from_parts(25_772_314, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 8_598_000 picoseconds. + Weight::from_parts(8_937_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `251` + // Estimated: `5318` + // Minimum execution time: 29_981_000 picoseconds. + Weight::from_parts(30_787_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `170` + // Estimated: `5318` + // Minimum execution time: 15_985_000 picoseconds. + Weight::from_parts(16_431_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `5318` + // Minimum execution time: 8_515_000 picoseconds. + Weight::from_parts(8_795_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/kusama/src/weights/runtime_parachains_hrmp.rs b/relay/kusama/src/weights/runtime_parachains_hrmp.rs index a8853e8a55..84e9b99080 100644 --- a/relay/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/relay/kusama/src/weights/runtime_parachains_hrmp.rs @@ -275,4 +275,46 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } + /// Storage: `Paras::ParaLifecycles` (r:1 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:1 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:1 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:1 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:1 w:1) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_system_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 629_674_000 picoseconds. + Weight::from_parts(640_174_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Hrmp::HrmpChannels` (r:1 w:1) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn poke_channel_deposits() -> Weight { + // Proof Size summary in bytes: + // Measured: `263` + // Estimated: `3728` + // Minimum execution time: 173_371_000 picoseconds. + Weight::from_parts(175_860_000, 0) + .saturating_add(Weight::from_parts(0, 3728)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/kusama/src/weights/xcm/mod.rs b/relay/kusama/src/weights/xcm/mod.rs index 5958abe40d..ec73d891ec 100644 --- a/relay/kusama/src/weights/xcm/mod.rs +++ b/relay/kusama/src/weights/xcm/mod.rs @@ -91,7 +91,6 @@ impl XcmWeightInfo for KusamaXcmWeight { assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { - // Kusama doesn't support ReserveAssetDeposited, so this benchmark has a default weight assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index c90e6c55a9..fe0d1ae1b6 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -18,8 +18,8 @@ use super::{ parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, Fellows, ParaId, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, TransactionByteFee, WeightToFee, - XcmPallet, + RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, TransactionByteFee, Treasury, + WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -27,7 +27,7 @@ use frame_support::{ weights::Weight, }; use frame_system::EnsureRoot; -use kusama_runtime_constants::currency::CENTS; +use kusama_runtime_constants::{currency::CENTS, system_parachain::*}; use runtime_common::{ crowdloan, paras_registrar, xcm_sender::{ChildParachainRouter, ExponentialPrice}, @@ -42,7 +42,7 @@ use xcm_builder::{ CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -61,6 +61,8 @@ parameter_types! { pub CheckAccount: AccountId = XcmPallet::check_account(); /// The check account that is allowed to mint assets locally. pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); + /// Account of the treasury pallet. + pub TreasuryAccount: AccountId = Treasury::account_id(); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to @@ -113,27 +115,31 @@ parameter_types! { pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } +pub type PriceForChildParachainDelivery = + ExponentialPrice; + /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. pub type XcmRouter = WithUniqueTopic<( // Only one router so far - use DMP to communicate with child parachains. - ChildParachainRouter< - Runtime, - XcmPallet, - ExponentialPrice, - >, + ChildParachainRouter, )>; parameter_types! { pub const Ksm: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const Statemine: MultiLocation = Parachain(1000).into_location(); - pub const Encointer: MultiLocation = Parachain(1001).into_location(); - pub const KsmForStatemine: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Statemine::get()); + pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); + pub const KsmForAssetHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), AssetHubLocation::get()); + pub const Encointer: MultiLocation = Parachain(ENCOINTER_ID).into_location(); pub const KsmForEncointer: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Encointer::get()); + pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); + pub const KsmForBridgeHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } -pub type TrustedTeleporters = - (xcm_builder::Case, xcm_builder::Case); +pub type TrustedTeleporters = ( + xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, +); match_types! { pub type OnlyParachains: impl Contains = { @@ -339,7 +345,7 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = (); + type FeeManager = XcmFeesToAccount; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 1f7021c9f9..4de8c71b8c 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -18,109 +18,112 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "21.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.27.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "8.0.0" } -binary-merkle-tree = { default-features = false , version = "8.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "21.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "21.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "21.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "21.0.0" } -sp-arithmetic = { default-features = false , version = "18.0.0" } -sp-api = { default-features = false , version = "21.0.0" } -sp-application-crypto = { default-features = false , version = "25.0.0" } -sp-std = { default-features = false , version = "10.0.0" } -sp-io = { default-features = false , version = "25.0.0" } -sp-mmr-primitives = { default-features = false , version = "21.0.0" } -sp-runtime = { default-features = false , version = "26.0.0" } -sp-staking = { default-features = false , version = "21.0.0" } -sp-core = { default-features = false , version = "23.0.0" } -sp-session = { default-features = false , version = "22.0.0" } -sp-storage = { default-features = false , version = "15.0.0" } -sp-version = { default-features = false , version = "24.0.0" } -sp-npos-elections = { default-features = false , version = "21.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } +binary-merkle-tree = { default-features = false , version = "10.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } +sp-arithmetic = { default-features = false , version = "20.0.0" } +sp-api = { default-features = false , version = "23.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-std = { default-features = false , version = "12.0.0" } +sp-application-crypto = { default-features = false , version = "27.0.0" } +sp-io = { default-features = false , version = "27.0.0" } +sp-mmr-primitives = { default-features = false , version = "23.0.0" } +sp-runtime = { default-features = false , version = "28.0.0" } +sp-staking = { default-features = false , version = "23.0.0" } +sp-core = { default-features = false , version = "25.0.0" } +sp-session = { default-features = false , version = "24.0.0" } +sp-storage = { default-features = false , version = "17.0.0" } +sp-version = { default-features = false , version = "26.0.0" } +sp-npos-elections = { default-features = false , version = "23.0.0" } -pallet-authority-discovery = { default-features = false , version = "23.0.0" } -pallet-authorship = { default-features = false , version = "23.0.0" } -pallet-babe = { default-features = false , version = "23.0.0" } -pallet-bags-list = { default-features = false , version = "22.0.0" } -pallet-balances = { default-features = false , version = "23.0.0" } -pallet-beefy = { default-features = false , version = "23.0.0" } -pallet-beefy-mmr = { default-features = false , version = "23.0.0" } -pallet-bounties = { default-features = false , version = "22.0.0" } -pallet-child-bounties = { default-features = false , version = "22.0.0" } -pallet-transaction-payment = { default-features = false , version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "23.0.0" } -pallet-collective = { default-features = false , version = "23.0.0" } -pallet-conviction-voting = { default-features = false , version = "23.0.0" } -pallet-democracy = { default-features = false , version = "23.0.0" } -pallet-elections-phragmen = { default-features = false , version = "24.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "22.0.0" } -pallet-fast-unstake = { default-features = false , version = "22.0.0" } -frame-executive = { default-features = false , version = "23.0.0" } -pallet-grandpa = { default-features = false , version = "23.0.0" } -pallet-identity = { default-features = false , version = "23.0.0" } -pallet-im-online = { default-features = false , version = "22.0.0" } -pallet-indices = { default-features = false , version = "23.0.0" } -pallet-membership = { default-features = false , version = "23.0.0" } -pallet-message-queue = { default-features = false , version = "26.0.0" } -pallet-mmr = { default-features = false , version = "22.0.0" } -pallet-multisig = { default-features = false , version = "23.0.0" } -pallet-nomination-pools = { default-features = false , version = "20.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "18.0.0" } -pallet-offences = { default-features = false , version = "22.0.0" } -pallet-preimage = { default-features = false , version = "23.0.0" } -pallet-proxy = { default-features = false , version = "23.0.0" } -pallet-referenda = { default-features = false , version = "23.0.0" } -pallet-scheduler = { default-features = false , version = "24.0.0" } -pallet-session = { default-features = false , version = "23.0.0" } -frame-support = { default-features = false , version = "23.0.0" } -pallet-staking = { default-features = false , version = "23.0.0" } -pallet-staking-reward-curve = { version = "8.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "9.0.0" } -frame-system = { default-features = false , version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "21.0.0" } +pallet-asset-rate = { default-features = false , version = "4.0.0" } +pallet-authority-discovery = { default-features = false , version = "25.0.0" } +pallet-authorship = { default-features = false , version = "25.0.0" } +pallet-babe = { default-features = false , version = "25.0.0" } +pallet-bags-list = { default-features = false , version = "24.0.0" } +pallet-balances = { default-features = false , version = "25.0.0" } +pallet-beefy = { default-features = false , version = "25.0.0" } +pallet-beefy-mmr = { default-features = false , version = "25.0.0" } +pallet-bounties = { default-features = false , version = "24.0.0" } +pallet-child-bounties = { default-features = false , version = "24.0.0" } +pallet-transaction-payment = { default-features = false , version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } +pallet-collective = { default-features = false , version = "25.0.0" } +pallet-conviction-voting = { default-features = false , version = "25.0.0" } +pallet-democracy = { default-features = false , version = "25.0.0" } +pallet-elections-phragmen = { default-features = false , version = "26.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } +pallet-fast-unstake = { default-features = false , version = "24.0.0" } +frame-executive = { default-features = false , version = "25.0.0" } +pallet-grandpa = { default-features = false , version = "25.0.0" } +pallet-identity = { default-features = false , version = "25.0.0" } +pallet-im-online = { default-features = false , version = "24.0.0" } +pallet-indices = { default-features = false , version = "25.0.0" } +pallet-membership = { default-features = false , version = "25.0.0" } +pallet-message-queue = { default-features = false , version = "28.0.0" } +pallet-mmr = { default-features = false , version = "24.0.0" } +pallet-multisig = { default-features = false , version = "25.0.0" } +pallet-nomination-pools = { default-features = false , version = "22.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } +pallet-offences = { default-features = false , version = "24.0.0" } +pallet-preimage = { default-features = false , version = "25.0.0" } +pallet-proxy = { default-features = false , version = "25.0.0" } +pallet-referenda = { default-features = false , version = "25.0.0" } +pallet-scheduler = { default-features = false , version = "26.0.0" } +pallet-session = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "25.0.0" } +pallet-staking = { default-features = false , version = "25.0.0" } +pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } +pallet-staking-reward-curve = { version = "10.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } +frame-system = { default-features = false , version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } -pallet-timestamp = { default-features = false , version = "22.0.0" } -pallet-tips = { default-features = false , version = "22.0.0" } -pallet-treasury = { default-features = false , version = "22.0.0" } -pallet-whitelist = { default-features = false , version = "22.0.0" } -pallet-vesting = { default-features = false , version = "23.0.0" } -pallet-utility = { default-features = false , version = "23.0.0" } -frame-election-provider-support = { default-features = false , version = "23.0.0" } -pallet-xcm = { default-features = false, features=["experimental"] , version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } +pallet-timestamp = { default-features = false , version = "24.0.0" } +pallet-tips = { default-features = false , version = "24.0.0" } +pallet-treasury = { default-features = false , version = "24.0.0" } +pallet-whitelist = { default-features = false , version = "24.0.0" } +pallet-vesting = { default-features = false , version = "25.0.0" } +pallet-utility = { default-features = false , version = "25.0.0" } +frame-election-provider-support = { default-features = false , version = "25.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.29.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "22.0.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "21.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } hex-literal = { version = "0.4.1", optional = true } -runtime-common = { package = "polkadot-runtime-common", default-features = false, features = ["experimental"] , version = "2.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "2.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "2.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "2.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } [dev-dependencies] hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "26.0.0" } -sp-trie = { version = "24.0.0" } +keyring = { package = "sp-keyring", version = "28.0.0" } +sp-trie = { version = "26.0.0" } serde_json = "1.0.96" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities" , version = "0.30.0" } +remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "12.0.0" } +sp-tracing = { default-features = false , version = "14.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "12.0.0" } +substrate-wasm-builder = { version = "14.0.0" } [features] default = [ "std" ] @@ -144,6 +147,7 @@ std = [ "inherents/std", "log/std", "offchain-primitives/std", + "pallet-asset-rate/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", @@ -179,6 +183,7 @@ std = [ "pallet-scheduler/std", "pallet-session-benchmarking?/std", "pallet-session/std", + "pallet-staking-reward-fn/std", "pallet-staking-runtime-api/std", "pallet-staking/std", "pallet-timestamp/std", @@ -204,6 +209,7 @@ std = [ "sp-application-crypto/std", "sp-arithmetic/std", "sp-core/std", + "sp-genesis-builder/std", "sp-io/std", "sp-mmr-primitives/std", "sp-npos-elections/std", @@ -226,6 +232,7 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "hex-literal", + "pallet-asset-rate/runtime-benchmarks", "pallet-babe/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", @@ -279,6 +286,7 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime", "frame-try-runtime/try-runtime", + "pallet-asset-rate/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-babe/try-runtime", diff --git a/relay/polkadot/README.adoc b/relay/polkadot/README.adoc deleted file mode 100644 index 3337331081..0000000000 --- a/relay/polkadot/README.adoc +++ /dev/null @@ -1,5 +0,0 @@ - -= Polkadot Runtime - -placeholder -//TODO Write content :) (https://github.com/paritytech/polkadot/issues/159) diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index d5d580cf3d..706b43261e 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -9,12 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { default-features = false , version = "23.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "2.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "2.0.0" } -sp-runtime = { default-features = false , version = "26.0.0" } -sp-weights = { default-features = false , version = "22.0.0" } -sp-core = { default-features = false , version = "23.0.0" } +frame-support = { default-features = false , version = "25.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } +sp-runtime = { default-features = false , version = "28.0.0" } +sp-weights = { default-features = false , version = "24.0.0" } +sp-core = { default-features = false , version = "25.0.0" } + +xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } [features] default = [ "std" ] @@ -25,4 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", + "xcm/std" ] diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index 304d86d1dd..dde8bd8ee5 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -113,12 +113,33 @@ pub mod xcm { /// System Parachains. pub mod system_parachain { - /// Statemint parachain ID. - pub const STATEMINT_ID: u32 = 1000; + use xcm::latest::prelude::*; + + /// Asset Hub parachain ID. + pub const ASSET_HUB_ID: u32 = 1000; /// Collectives parachain ID. pub const COLLECTIVES_ID: u32 = 1001; + /// Bridge Hub parachain ID. + pub const BRIDGE_HUB_ID: u32 = 1002; + + frame_support::match_types! { + // System parachains from Polkadot point of view. + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 0, + interior: X1(Parachain( + ASSET_HUB_ID | + COLLECTIVES_ID | + BRIDGE_HUB_ID + )), + } + }; + } } +/// Polkadot Treasury pallet instance. +pub const TREASURY_PALLET_ID: u8 = 19; + #[cfg(test)] mod tests { use super::{ diff --git a/relay/polkadot/constants/src/weights/paritydb_weights.rs b/relay/polkadot/constants/src/weights/paritydb_weights.rs index ae7bedc394..f9995399f8 100644 --- a/relay/polkadot/constants/src/weights/paritydb_weights.rs +++ b/relay/polkadot/constants/src/weights/paritydb_weights.rs @@ -44,34 +44,34 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - /// Time to read one storage item. - /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - /// - /// Stats [NS]: - /// Min, Max: 4_611, 13_478_005 - /// Average: 10_750 - /// Median: 10_655 - /// Std-Dev: 12214.49 - /// - /// Percentiles [NS]: - /// 99th: 14_451 - /// 95th: 12_588 - /// 75th: 11_200 + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 4_611, 13_478_005 + // Average: 10_750 + // Median: 10_655 + // Std-Dev: 12214.49 + // + // Percentiles [NS]: + // 99th: 14_451 + // 95th: 12_588 + // 75th: 11_200 read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, - /// Time to write one storage item. - /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - /// - /// Stats [NS]: - /// Min, Max: 8_023, 47_367_740 - /// Average: 34_592 - /// Median: 32_703 - /// Std-Dev: 49417.24 - /// - /// Percentiles [NS]: - /// 99th: 69_379 - /// 95th: 47_168 - /// 75th: 35_252 + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 8_023, 47_367_740 + // Average: 34_592 + // Median: 32_703 + // Std-Dev: 49417.24 + // + // Percentiles [NS]: + // 99th: 69_379 + // 95th: 47_168 + // 75th: 35_252 write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } diff --git a/relay/polkadot/constants/src/weights/rocksdb_weights.rs b/relay/polkadot/constants/src/weights/rocksdb_weights.rs index 029f892b01..c5cf0457b7 100644 --- a/relay/polkadot/constants/src/weights/rocksdb_weights.rs +++ b/relay/polkadot/constants/src/weights/rocksdb_weights.rs @@ -43,34 +43,34 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - /// Time to read one storage item. - /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - /// - /// Stats [NS]: - /// Min, Max: 5_015, 1_441_022 - /// Average: 18_635 - /// Median: 17_795 - /// Std-Dev: 4829.75 - /// - /// Percentiles [NS]: - /// 99th: 32_074 - /// 95th: 26_658 - /// 75th: 19_363 + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 5_015, 1_441_022 + // Average: 18_635 + // Median: 17_795 + // Std-Dev: 4829.75 + // + // Percentiles [NS]: + // 99th: 32_074 + // 95th: 26_658 + // 75th: 19_363 read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, - /// Time to write one storage item. - /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - /// - /// Stats [NS]: - /// Min, Max: 16_368, 34_500_937 - /// Average: 75_882 - /// Median: 74_236 - /// Std-Dev: 64706.41 - /// - /// Percentiles [NS]: - /// 99th: 111_151 - /// 95th: 92_666 - /// 75th: 80_297 + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 16_368, 34_500_937 + // Average: 75_882 + // Median: 74_236 + // Std-Dev: 64706.41 + // + // Percentiles [NS]: + // 99th: 111_151 + // 95th: 92_666 + // 75th: 80_297 write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } diff --git a/relay/polkadot/src/governance/mod.rs b/relay/polkadot/src/governance/mod.rs index 79c904622d..39a7188954 100644 --- a/relay/polkadot/src/governance/mod.rs +++ b/relay/polkadot/src/governance/mod.rs @@ -32,7 +32,7 @@ mod tracks; pub use tracks::TracksInfo; parameter_types! { - pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1); + pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1); } impl pallet_conviction_voting::Config for Runtime { diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 5d04f78cc6..edac8169a5 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -22,8 +22,13 @@ use pallet_transaction_payment::CurrencyAdapter; use runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, impls::DealWithFees, paras_registrar, - prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, + auctions, claims, crowdloan, impl_runtime_weights, + impls::{ + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, + VersionedMultiLocationConverter, + }, + paras_registrar, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, + SlowAdjustingFeeUpdate, }; use runtime_parachains::{ @@ -34,7 +39,7 @@ use runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v5 as parachains_runtime_api_impl, + runtime_api_impl::v7 as parachains_runtime_api_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, }; @@ -48,16 +53,20 @@ use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, }; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, traits::{ - ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Get, + InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, + ProcessMessageError, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; +use pallet_identity::simple::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; @@ -76,8 +85,8 @@ use sp_runtime::{ curve::PiecewiseLinear, generic, impl_opaque_keys, traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, Get, - Keccak256, OpaqueKeys, SaturatedConversion, Verify, + AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, + IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, @@ -87,11 +96,15 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use xcm::latest::Junction; +use xcm::{ + latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, + VersionedMultiLocation, +}; +use xcm_builder::PayOverXcm; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; -pub use pallet_election_provider_multi_phase::Call as EPMCall; +pub use pallet_election_provider_multi_phase::{Call as EPMCall, GeometricDepositBase}; #[cfg(feature = "std")] pub use pallet_staking::StakerStatus; use pallet_staking::UseValidatorsMap; @@ -100,7 +113,7 @@ pub use pallet_timestamp::Call as TimestampCall; pub use sp_runtime::BuildStorage; /// Constant values used within the runtime. -use polkadot_runtime_constants::{currency::*, fee::*, time::*}; +use polkadot_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; // Weights used in the runtime. mod weights; @@ -116,6 +129,8 @@ use governance::{ pub mod xcm_config; +pub const LOG_TARGET: &'static str = "runtime::polkadot"; + impl_runtime_weights!(polkadot_runtime_constants); // Make the WASM binary available. @@ -129,7 +144,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 9430, + spec_version: 1_000_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 24, @@ -222,9 +237,10 @@ impl pallet_scheduler::Config for Runtime { } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { @@ -232,8 +248,12 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { @@ -297,9 +317,10 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = RuntimeFreezeReason; + type MaxHolds = ConstU32<1>; + type MaxFreezes = ConstU32<8>; } parameter_types! { @@ -491,8 +512,8 @@ parameter_types! { // signed config pub const SignedMaxSubmissions: u32 = 16; pub const SignedMaxRefunds: u32 = 16 / 4; - // 40 DOTs fixed deposit.. - pub const SignedDepositBase: Balance = deposit(2, 0); + pub const SignedFixedDeposit: Balance = deposit(2, 0); + pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); // 0.01 DOT per KB of solution data. pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; // Each good submission will get 1 DOT as reward @@ -565,7 +586,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SignedMaxSubmissions = SignedMaxSubmissions; type SignedMaxRefunds = SignedMaxRefunds; type SignedRewardBase = SignedRewardBase; - type SignedDepositBase = SignedDepositBase; + type SignedDepositBase = + GeometricDepositBase; type SignedDepositByte = SignedDepositByte; type SignedDepositWeight = (); type SignedMaxWeight = @@ -651,6 +673,54 @@ parameter_types! { pub const MaxNominations: u32 = ::LIMIT as u32; } +/// Custom version of `runtime_commong::era_payout` somewhat tailored for Polkadot's crowdloan +/// unlock history. The only tweak should be +/// +/// ```diff +/// - let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 200u64); +/// + let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); +/// ``` +/// +/// See . +fn polkadot_era_payout( + total_staked: Balance, + total_stakable: Balance, + max_annual_inflation: Perquintill, + period_fraction: Perquintill, + auctioned_slots: u64, +) -> (Balance, Balance) { + use pallet_staking_reward_fn::compute_inflation; + use sp_runtime::traits::Saturating; + + let min_annual_inflation = Perquintill::from_rational(25u64, 1000u64); + let delta_annual_inflation = max_annual_inflation.saturating_sub(min_annual_inflation); + + // 20% reserved for up to 60 slots. + let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); + + // Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the + // amount that we expect to be taken up with auctions. + let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); + + let stake = Perquintill::from_rational(total_staked, total_stakable); + let falloff = Perquintill::from_percent(5); + let adjustment = compute_inflation(stake, ideal_stake, falloff); + let staking_inflation = + min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); + + let max_payout = period_fraction * max_annual_inflation * total_stakable; + let staking_payout = (period_fraction * staking_inflation) * total_stakable; + let rest = max_payout.saturating_sub(staking_payout); + + let other_issuance = total_stakable.saturating_sub(total_staked); + if total_staked > other_issuance { + let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; + // We don't do anything with this, but if we wanted to, we could introduce a cap on the + // treasury amount with: `rest = rest.min(cap_rest);` + } + (staking_payout, rest) +} + pub struct EraPayout; impl pallet_staking::EraPayout for EraPayout { fn era_payout( @@ -669,7 +739,7 @@ impl pallet_staking::EraPayout for EraPayout { const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; - runtime_common::impls::era_payout( + polkadot_era_payout( total_staked, total_issuance, MAX_ANNUAL_INFLATION, @@ -740,6 +810,7 @@ impl pallet_identity::Config for Runtime { type SubAccountDeposit = SubAccountDeposit; type MaxSubAccounts = MaxSubAccounts; type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = IdentityInfo; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; @@ -754,6 +825,10 @@ parameter_types! { pub const SpendPeriod: BlockNumber = 24 * DAYS; pub const Burn: Permill = Permill::from_percent(1); pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + // The asset's interior location for the paying account. This is the Treasury + // pallet instance (which sits at index 19). + pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); @@ -784,6 +859,23 @@ impl pallet_treasury::Config for Runtime { type MaxApprovals = MaxApprovals; type WeightInfo = weights::pallet_treasury::WeightInfo; type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedMultiLocation; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayOverXcm< + TreasuryInteriorLocation, + crate::xcm_config::XcmRouter, + crate::XcmPallet, + ConstU32<{ 6 * HOURS }>, + Self::Beneficiary, + Self::AssetKind, + LocatableAssetConverter, + VersionedMultiLocationConverter, + >; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; } parameter_types! { @@ -909,7 +1001,7 @@ where ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); + log::warn!(target: LOG_TARGET, "Unable to create signed payload: {:?}", e); }) .ok()?; let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; @@ -1397,6 +1489,7 @@ parameter_types! { impl pallet_nomination_pools::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; type RewardCounter = FixedU128; type BalanceToU256 = runtime_common::BalanceToU256; type U256ToBalance = runtime_common::U256ToBalance; @@ -1425,22 +1518,34 @@ impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); pallet_nomination_pools::MaxPoolMembers::::put(0); - log::info!(target: "runtime::polkadot", "pools config initiated 🎉"); + log::info!(target: LOG_TARGET, "pools config initiated 🎉"); ::DbWeight::get().reads_writes(1, 5) } else { - log::info!(target: "runtime::polkadot", "pools config already initiated 😏"); + log::info!(target: LOG_TARGET, "pools config already initiated 😏"); ::DbWeight::get().reads(1) } } } +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EitherOfDiverse, Treasurer>; + type RemoveOrigin = EitherOfDiverse, Treasurer>; + type UpdateOrigin = EitherOfDiverse, Treasurer>; + type Currency = Balances; + type AssetKind = ::AssetKind; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; +} + construct_runtime! { pub enum Runtime { // Basic stuff; balances is uncallable initially. System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 1, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 10, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 10, // Babe must be before session. Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, @@ -1504,7 +1609,7 @@ construct_runtime! { VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, // Nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 39, + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 40, @@ -1537,6 +1642,9 @@ construct_runtime! { // Generalized message queue MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, + + // Asset rate. + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, } } @@ -1653,7 +1761,6 @@ pub mod migrations { pub type Unreleased = ( pallet_im_online::migration::v1::Migration, parachains_configuration::migration::v7::MigrateToV7, - parachains_scheduler::migration::v1::MigrateToV1, parachains_configuration::migration::v8::MigrateToV8, // Gov v1 storage migrations @@ -1676,6 +1783,11 @@ pub mod migrations { // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, + + pallet_nomination_pools::migration::versioned_migrations::V5toV6, + pallet_nomination_pools::migration::versioned_migrations::V6ToV7, + + runtime_parachains::scheduler::migration::v1::MigrateToV1 ); } @@ -1743,6 +1855,7 @@ mod benches { [pallet_conviction_voting, ConvictionVoting] [pallet_referenda, Referenda] [pallet_whitelist, Whitelist] + [pallet_asset_rate, AssetRate] // XCM [pallet_xcm, XcmPallet] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] @@ -2209,10 +2322,20 @@ sp_api::impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade polkadot."); + log::info!(target: LOG_TARGET, "try-runtime::on_runtime_upgrade polkadot."); let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block) } @@ -2270,7 +2393,7 @@ sp_api::impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; use xcm::latest::prelude::*; - use xcm_config::{XcmConfig, StatemintLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; + use xcm_config::{XcmConfig, AssetHubLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; impl pallet_session_benchmarking::Config for Runtime {} impl pallet_offences_benchmarking::Config for Runtime {} @@ -2284,11 +2407,26 @@ sp_api::impl_runtime_apis! { let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); whitelist.push(treasury_key.to_vec().into()); + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub ToParachain: ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmConfig; type AccountIdConverter = SovereignAccountOf; + type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositMultiAsset, + xcm_config::PriceForChildParachainDelivery, + ToParachain, + (), + >; fn valid_destination() -> Result { - Ok(StatemintLocation::get()) + Ok(AssetHubLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { // Polkadot only knows about DOT @@ -2298,7 +2436,7 @@ sp_api::impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( - StatemintLocation::get(), + AssetHubLocation::get(), MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } )); pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; @@ -2320,6 +2458,7 @@ sp_api::impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { @@ -2337,15 +2476,15 @@ sp_api::impl_runtime_apis! { } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((StatemintLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { - Ok(StatemintLocation::get()) + Ok(AssetHubLocation::get()) } fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = StatemintLocation::get(); + let origin = AssetHubLocation::get(); let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) @@ -2514,7 +2653,7 @@ mod test_fees { fn signed_deposit_is_sensible() { // ensure this number does not change, or that it is checked after each change. // a 1 MB solution should take (40 + 10) DOTs of deposit. - let deposit = SignedDepositBase::get() + (SignedDepositByte::get() * 1024 * 1024); + let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); assert_eq_error_rate!(deposit, 50 * DOLLARS, DOLLARS); } } @@ -2573,8 +2712,12 @@ mod test { #[cfg(test)] mod multiplier_tests { use super::*; - use frame_support::{dispatch::DispatchInfo, traits::OnFinalize}; + use frame_support::{ + dispatch::DispatchInfo, + traits::{OnFinalize, PalletInfoAccess}, + }; use runtime_common::{MinimumMultiplier, TargetBlockFullness}; + use scale_info::TypeInfo; use separator::Separatable; use sp_runtime::traits::Convert; @@ -2618,6 +2761,11 @@ mod multiplier_tests { assert!(on_idle / block_time <= 0.5f32) } + #[test] + fn treasury_pallet_index_is_correct() { + assert_eq!(TREASURY_PALLET_ID, ::index() as u8); + } + #[test] #[ignore] fn multiplier_growth_simulator() { @@ -2697,6 +2845,13 @@ mod multiplier_tests { blocks += 1; } } + + #[test] + fn ensure_xcm_metadata_is_correct() { + let path = xcm::VersionedXcm::<()>::type_info().path; + // Ensure that the name doesn't include `staging` (from the pallet name) + assert_eq!(vec!["xcm", "VersionedXcm"], path.segments); + } } #[cfg(all(test, feature = "try-runtime"))] @@ -2704,21 +2859,15 @@ mod remote_tests { use super::*; use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; use remote_externalities::{ - Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport, + Builder, Mode, OfflineConfig, OnlineConfig, RemoteExternalities, SnapshotConfig, Transport, }; use std::env::var; - #[tokio::test] - async fn run_migrations() { - if var("RUN_MIGRATION_TESTS").is_err() { - return - } - - sp_tracing::try_init_simple(); + async fn remote_ext_test_setup() -> RemoteExternalities { let transport: Transport = var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into(); let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() + Builder::::default() .mode(if let Some(state_snapshot) = maybe_state_snapshot { Mode::OfflineOrElseOnline( OfflineConfig { state_snapshot: state_snapshot.clone() }, @@ -2733,7 +2882,63 @@ mod remote_tests { }) .build() .await - .unwrap(); + .unwrap() + } + + #[tokio::test] + async fn dispatch_all_proposals() { + if var("RUN_OPENGOV_TEST").is_err() { + return + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; + ext.execute_with(|| { + type Ref = pallet_referenda::ReferendumInfoOf; + type RefStatus = pallet_referenda::ReferendumStatusOf; + use sp_runtime::traits::Dispatchable; + let all_refs: Vec<(u32, RefStatus)> = + pallet_referenda::ReferendumInfoFor::::iter() + .filter_map(|(idx, reff): (_, Ref)| { + if let Ref::Ongoing(ref_status) = reff { + Some((idx, ref_status)) + } else { + None + } + }) + .collect::>(); + + for (ref_index, referenda) in all_refs { + log::info!(target: LOG_TARGET, "🚀 executing referenda #{}", ref_index); + let RefStatus { origin, proposal, .. } = referenda; + // we do more or less what the scheduler will do under the hood, as best as we can + // imitate: + let (call, _len) = match < + ::Preimages + as + frame_support::traits::QueryPreimage + >::peek(&proposal) { + Ok(x) => x, + Err(e) => { + log::error!(target: LOG_TARGET, "failed to get preimage: {:?}", e); + continue; + } + }; + + let dispatch_result = call.dispatch(origin.clone().into()); + log::info!(target: LOG_TARGET, "outcome of dispatch with origin {:?}: {:?}", origin, dispatch_result); + } + }); + } + + #[tokio::test] + async fn run_migrations() { + if var("RUN_MIGRATION_TESTS").is_err() { + return + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); } diff --git a/relay/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs index 596b594c93..7eca87034b 100644 --- a/relay/polkadot/src/weights/mod.rs +++ b/relay/polkadot/src/weights/mod.rs @@ -17,6 +17,7 @@ pub mod frame_election_provider_support; pub mod frame_system; +pub mod pallet_asset_rate; pub mod pallet_bags_list; pub mod pallet_balances; pub mod pallet_bounties; diff --git a/relay/polkadot/src/weights/pallet_asset_rate.rs b/relay/polkadot/src/weights/pallet_asset_rate.rs new file mode 100644 index 0000000000..e6fbff6374 --- /dev/null +++ b/relay/polkadot/src/weights/pallet_asset_rate.rs @@ -0,0 +1,86 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `pallet_asset_rate` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `cob`, CPU: `` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/debug/polkadot +// benchmark +// pallet +// --chain=kusama-dev +// --steps=50 +// --repeat=2 +// --pallet=pallet_asset_rate +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./runtime/kusama/src/weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_asset_rate`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_rate::WeightInfo for WeightInfo { + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `4702` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn update() -> Weight { + // Proof Size summary in bytes: + // Measured: `110` + // Estimated: `4702` + // Minimum execution time: 60_000_000 picoseconds. + Weight::from_parts(60_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:1) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + fn remove() -> Weight { + // Proof Size summary in bytes: + // Measured: `110` + // Estimated: `4702` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(74_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/relay/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 095fa7fcc4..32ff276f7f 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -597,4 +597,22 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: `NominationPools::BondedPools` (r:1 w:0) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(220), added: 2695, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + fn adjust_pool_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `946` + // Estimated: `4764` + // Minimum execution time: 53_711_000 picoseconds. + Weight::from_parts(54_615_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/relay/polkadot/src/weights/pallet_preimage.rs b/relay/polkadot/src/weights/pallet_preimage.rs index 3e95c87cb5..e7576d9147 100644 --- a/relay/polkadot/src/weights/pallet_preimage.rs +++ b/relay/polkadot/src/weights/pallet_preimage.rs @@ -210,4 +210,25 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `193 + n * (91 ±0)` + // Estimated: `3593 + n * (2566 ±0)` + // Minimum execution time: 2_452_000 picoseconds. + Weight::from_parts(2_641_000, 3593) + // Standard Error: 19_797 + .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + } } diff --git a/relay/polkadot/src/weights/pallet_treasury.rs b/relay/polkadot/src/weights/pallet_treasury.rs index 9fd089ec3f..fad730f4c1 100644 --- a/relay/polkadot/src/weights/pallet_treasury.rs +++ b/relay/polkadot/src/weights/pallet_treasury.rs @@ -51,12 +51,12 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) /// Storage: `Treasury::Proposals` (r:0 w:1) /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - fn spend() -> Weight { + fn spend_local() -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `1887` - // Minimum execution time: 12_248_000 picoseconds. - Weight::from_parts(12_752_000, 0) + // Minimum execution time: 7_278_000 picoseconds. + Weight::from_parts(7_633_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -69,8 +69,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `107` // Estimated: `1489` - // Minimum execution time: 23_447_000 picoseconds. - Weight::from_parts(24_267_000, 0) + // Minimum execution time: 16_116_000 picoseconds. + Weight::from_parts(16_811_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,8 +83,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3593` - // Minimum execution time: 36_221_000 picoseconds. - Weight::from_parts(37_350_000, 0) + // Minimum execution time: 25_554_000 picoseconds. + Weight::from_parts(26_473_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -98,11 +98,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `433 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 7_718_000 picoseconds. - Weight::from_parts(10_234_157, 0) + // Minimum execution time: 5_048_000 picoseconds. + Weight::from_parts(7_308_351, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_357 - .saturating_add(Weight::from_parts(72_271, 0).saturating_mul(p.into())) + // Standard Error: 950 + .saturating_add(Weight::from_parts(40_390, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,8 +112,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 5_896_000 picoseconds. - Weight::from_parts(6_149_000, 0) + // Minimum execution time: 4_029_000 picoseconds. + Weight::from_parts(4_175_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -122,26 +122,90 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `Treasury::Approvals` (r:1 w:1) /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Proposals` (r:100 w:100) + /// Storage: `Treasury::Proposals` (r:99 w:99) /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:200 w:200) + /// Storage: `System::Account` (r:198 w:198) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Bounties::BountyApprovals` (r:1 w:1) /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 100]`. + /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `217 + p * (251 ±0)` + // Measured: `214 + p * (251 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 38_724_000 picoseconds. - Weight::from_parts(36_590_852, 0) + // Minimum execution time: 21_953_000 picoseconds. + Weight::from_parts(26_546_487, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 19_186 - .saturating_add(Weight::from_parts(37_703_755, 0).saturating_mul(p.into())) + // Standard Error: 9_168 + .saturating_add(Weight::from_parts(25_474_821, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 8_354_000 picoseconds. + Weight::from_parts(8_786_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `218` + // Estimated: `5318` + // Minimum execution time: 29_975_000 picoseconds. + Weight::from_parts(30_430_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `170` + // Estimated: `5318` + // Minimum execution time: 14_485_000 picoseconds. + Weight::from_parts(14_964_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `5318` + // Minimum execution time: 8_322_000 picoseconds. + Weight::from_parts(8_580_000, 0) + .saturating_add(Weight::from_parts(0, 5318)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs index e0af408e88..05540b6ade 100644 --- a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs +++ b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs @@ -275,4 +275,46 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } + /// Storage: `Paras::ParaLifecycles` (r:1 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:1 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:1 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:1 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:1 w:1) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_system_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 629_674_000 picoseconds. + Weight::from_parts(640_174_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Hrmp::HrmpChannels` (r:1 w:1) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn poke_channel_deposits() -> Weight { + // Proof Size summary in bytes: + // Measured: `263` + // Estimated: `3728` + // Minimum execution time: 173_371_000 picoseconds. + Weight::from_parts(175_860_000, 0) + .saturating_add(Weight::from_parts(0, 3728)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/weights/xcm/mod.rs b/relay/polkadot/src/weights/xcm/mod.rs index acef102b44..98c12fa7db 100644 --- a/relay/polkadot/src/weights/xcm/mod.rs +++ b/relay/polkadot/src/weights/xcm/mod.rs @@ -91,7 +91,6 @@ impl XcmWeightInfo for PolkadotXcmWeight assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { - // Polkadot doesn't support ReserveAssetDeposited, so this benchmark has a default weight assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 6c45f1cec4..f6ce0d4fe8 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, - TransactionByteFee, WeightToFee, XcmPallet, + TransactionByteFee, Treasury, WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -44,7 +44,7 @@ use xcm_builder::{ ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -61,6 +61,8 @@ parameter_types! { pub CheckAccount: AccountId = XcmPallet::check_account(); /// The Checking Account along with the indication that the local chain is able to mint tokens. pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); + /// Account of the treasury pallet. + pub TreasuryAccount: AccountId = Treasury::account_id(); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to @@ -118,29 +120,33 @@ parameter_types! { pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } +pub type PriceForChildParachainDelivery = + ExponentialPrice; + /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. pub type XcmRouter = WithUniqueTopic<( // Only one router so far - use DMP to communicate with child parachains. - ChildParachainRouter< - Runtime, - XcmPallet, - ExponentialPrice, - >, + ChildParachainRouter, )>; parameter_types! { pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const StatemintLocation: MultiLocation = Parachain(STATEMINT_ID).into_location(); - pub const DotForStatemint: (MultiAssetFilter, MultiLocation) = (Dot::get(), StatemintLocation::get()); + pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); + pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); + pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); + pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } -/// Polkadot Relay recognizes/respects the Statemint chain as a teleporter. -pub type TrustedTeleporters = - (xcm_builder::Case, xcm_builder::Case); +/// Polkadot Relay recognizes/respects the asset hub chain as a teleporter. +pub type TrustedTeleporters = ( + xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, +); match_types! { pub type OnlyParachains: impl Contains = { @@ -340,7 +346,7 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = (); + type FeeManager = XcmFeesToAccount; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index fc0402a46c..c7abca8d60 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -16,77 +16,78 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive" smallvec = "1.11.0" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-asset-conversion-tx-payment = { default-features = false, version = "5.0.0" } -pallet-assets = { default-features = false, version = "24.0.0" } -pallet-asset-conversion = { default-features = false, version = "5.0.0" } -pallet-aura = { default-features = false, version = "22.0.0" } -pallet-authorship = { default-features = false, version = "23.0.0" } -pallet-balances = { default-features = false, version = "23.0.0" } -pallet-multisig = { default-features = false, version = "23.0.0" } -pallet-nft-fractionalization = { default-features = false, version = "5.0.0" } -pallet-nfts = { default-features = false, version = "17.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "9.0.0" } -pallet-proxy = { default-features = false, version = "23.0.0" } -pallet-session = { default-features = false, version = "23.0.0" } -pallet-state-trie-migration = { default-features = false, optional = true , version = "24.0.0" } -pallet-timestamp = { default-features = false, version = "22.0.0" } -pallet-transaction-payment = { default-features = false, version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "23.0.0" } -pallet-uniques = { default-features = false, version = "23.0.0" } -pallet-utility = { default-features = false, version = "23.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-consensus-aura = { default-features = false, version = "0.27.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } -sp-weights = { default-features = false, version = "22.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-asset-conversion-tx-payment = { default-features = false, version = "7.0.0" } +pallet-assets = { default-features = false, version = "26.0.0" } +pallet-asset-conversion = { default-features = false, version = "7.0.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-authorship = { default-features = false, version = "25.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-multisig = { default-features = false, version = "25.0.0" } +pallet-nft-fractionalization = { default-features = false, version = "7.0.0" } +pallet-nfts = { default-features = false, version = "19.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } +pallet-proxy = { default-features = false, version = "25.0.0" } +pallet-session = { default-features = false, version = "25.0.0" } +pallet-state-trie-migration = { default-features = false, optional = true , version = "26.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-uniques = { default-features = false, version = "25.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } +sp-weights = { default-features = false, version = "24.0.0" } # num-traits feature needed for dex integer sq root: -primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "num-traits"] } +primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} -pallet-xcm = { default-features = false, version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } -polkadot-core-primitives = { default-features = false, version = "2.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "1.0.0" } -polkadot-runtime-common = { default-features = false, version = "2.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.2.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.2.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "4.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -cumulus-primitives-utility = { default-features = false , version = "0.2.0" } -pallet-collator-selection = { default-features = false , version = "4.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } -assets-common = { default-features = false , version = "0.2.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +cumulus-primitives-utility = { default-features = false , version = "0.4.0" } +pallet-collator-selection = { default-features = false , version = "6.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } +assets-common = { default-features = false , version = "0.4.0" } [dev-dependencies] -asset-test-utils = { version = "2.0.0" } +asset-test-utils = { version = "4.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "12.0.0" } +substrate-wasm-builder = { optional = true , version = "14.0.0" } [features] default = [ "std" ] @@ -103,6 +104,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -210,6 +212,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-offchain/std", "sp-runtime/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 12633ce5b9..1d03f75a01 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -52,6 +52,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, ord_parameter_types, parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -87,7 +88,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use xcm::latest::BodyId; +use xcm::prelude::*; use xcm_executor::XcmExecutor; use crate::xcm_config::{ @@ -111,7 +112,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 13, @@ -127,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 13, @@ -222,6 +223,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); // We allow each account to have holds on it from: // - `NftFractionalization`: 1 @@ -630,8 +632,26 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(xcm_config::KsmLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); } +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; @@ -644,7 +664,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -1177,6 +1197,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -1253,9 +1283,21 @@ impl_runtime_apis! { use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + KsmLocation::get(), + ExistentialDeposit::get() + ).into()); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositMultiAsset, + PriceForParentDelivery, + >; fn valid_destination() -> Result { Ok(KsmLocation::get()) } @@ -1311,6 +1353,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs index 9aff4902d1..ce6e920651 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs @@ -61,16 +61,8 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve (`IsReserve = ()`), - // but we need this hack for `pallet_xcm::reserve_transfer_assets` - // (TODO) fix https://github.com/paritytech/polkadot/pull/7424 - // (TODO) fix https://github.com/paritytech/polkadot/pull/7546 - fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - // TODO: if we change `IsReserve = ...` then use this line... - // TODO: or if remote weight estimation is fixed, then remove - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - hardcoded_weight.min(XcmFungibleWeight::::reserve_asset_deposited()) + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -127,10 +119,7 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { } fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - hardcoded_weight.min(weight) + assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 0c197598f8..13fb5bdd8c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -15,35 +15,42 @@ use super::{ AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, - ParachainSystem, PolkadotXcm, PoolAssets, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + ParachainSystem, PolkadotXcm, PoolAssets, PriceForParentDelivery, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use crate::ForeignAssets; use assets_common::{ local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, - matching::{ - FromSiblingParachain, IsForeignConcreteAsset, StartsWith, StartsWithExplicitGlobalConsensus, - }, + matching::{FromSiblingParachain, IsForeignConcreteAsset}, }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; +use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; -use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ + AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + RelayOrOtherSystemParachains, + }, + TREASURY_PALLET_ID, +}; use polkadot_parachain_primitives::primitives::Sibling; -use sp_runtime::traits::ConvertInto; +use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset, - NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -66,6 +73,8 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); + pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); + pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -451,8 +460,12 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attemps to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its pluralities (i.e. governance bodies) get free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent, its pluralities (i.e. governance bodies) and parent's treasury + // pallet get free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + Equals, + )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), @@ -470,6 +483,33 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; +match_types! { + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 1, + interior: X1(Parachain( + system_parachain::ENCOINTER_ID | + system_parachain::BRIDGE_HUB_ID + )), + } + }; +} + +/// Locations that will not be charged fees in the executor, +/// either execution or delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = + (RelayOrOtherSystemParachains, Equals); + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// +/// - KSM with the parent Relay Chain and sibling system parachains; and +/// - Sibling parachains' assets from where they originate (as `ForeignCreators`). +pub type TrustedTeleporters = ( + ConcreteAssetFromSystem, + IsForeignConcreteAsset>>, +); + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -480,13 +520,7 @@ impl xcm_executor::Config for XcmConfig { // Asset Hub acting _as_ a reserve location for KSM and assets created under `pallet-assets`. // For KSM, users must use teleport where allowed (e.g. with the Relay Chain). type IsReserve = (); - // We allow: - // - teleportation of KSM - // - teleportation of sibling parachain's assets (as ForeignCreators) - type IsTeleporter = ( - NativeAsset, - IsForeignConcreteAsset>>, - ); + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< @@ -516,7 +550,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = (); + type FeeManager = XcmFeesToAccount; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -532,7 +566,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, )>; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 7d49b56e46..20477cb24e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemine (Kusama Assets Hub) chain. +//! Tests for the Kusama Asset Hub (previously known as Statemine) chain. use asset_hub_kusama_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 4898564c6c..a3125308b7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -16,73 +16,74 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive" smallvec = "1.11.0" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-asset-tx-payment = { default-features = false , version = "23.0.0" } -pallet-assets = { default-features = false, version = "24.0.0" } -pallet-aura = { default-features = false, version = "22.0.0" } -pallet-authorship = { default-features = false, version = "23.0.0" } -pallet-balances = { default-features = false, version = "23.0.0" } -pallet-multisig = { default-features = false, version = "23.0.0" } -pallet-nfts = { default-features = false, version = "17.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "9.0.0" } -pallet-proxy = { default-features = false, version = "23.0.0" } -pallet-session = { default-features = false, version = "23.0.0" } -pallet-timestamp = { default-features = false, version = "22.0.0" } -pallet-transaction-payment = { default-features = false, version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "23.0.0" } -pallet-uniques = { default-features = false, version = "23.0.0" } -pallet-utility = { default-features = false, version = "23.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-consensus-aura = { default-features = false, version = "0.27.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } -sp-weights = { default-features = false, version = "22.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-asset-tx-payment = { default-features = false , version = "25.0.0" } +pallet-assets = { default-features = false, version = "26.0.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-authorship = { default-features = false, version = "25.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-multisig = { default-features = false, version = "25.0.0" } +pallet-nfts = { default-features = false, version = "19.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } +pallet-proxy = { default-features = false, version = "25.0.0" } +pallet-session = { default-features = false, version = "25.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-uniques = { default-features = false, version = "25.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } +sp-weights = { default-features = false, version = "24.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } -polkadot-core-primitives = { default-features = false, version = "2.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "1.0.0" } -polkadot-runtime-common = { default-features = false, version = "2.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.2.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.2.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "4.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -cumulus-primitives-utility = { default-features = false , version = "0.2.0" } -pallet-collator-selection = { default-features = false , version = "4.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } -assets-common = { default-features = false , version = "0.2.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +cumulus-primitives-utility = { default-features = false , version = "0.4.0" } +pallet-collator-selection = { default-features = false , version = "6.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } +assets-common = { default-features = false , version = "0.4.0" } [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "2.0.0" } +asset-test-utils = { version = "4.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "12.0.0" } +substrate-wasm-builder = { optional = true , version = "14.0.0" } [features] default = [ "std" ] @@ -91,6 +92,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -191,6 +193,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-offchain/std", "sp-runtime/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index f5117490dd..2c62e27069 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -84,6 +84,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -117,7 +118,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use xcm::latest::BodyId; +use xcm::prelude::*; use xcm_executor::XcmExecutor; use crate::xcm_config::ForeignCreatorsSovereignAccountOf; @@ -137,7 +138,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 13, @@ -232,6 +233,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -566,8 +568,26 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(xcm_config::DotLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); } +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -580,7 +600,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { EnsureXcm>, >; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -834,6 +854,11 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { writes.saturating_inc(); } + if Uniques::on_chain_storage_version() == StorageVersion::new(0) { + Uniques::current_storage_version().put::(); + writes.saturating_inc(); + } + ::DbWeight::get().reads_writes(4, writes) } } @@ -1054,6 +1079,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -1129,9 +1164,21 @@ impl_runtime_apis! { use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + DotLocation::get(), + ExistentialDeposit::get() + ).into()); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositMultiAsset, + PriceForParentDelivery, + >; fn valid_destination() -> Result { Ok(DotLocation::get()) } @@ -1187,6 +1234,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs index 55fed809e2..eb140c4bf3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs @@ -61,16 +61,8 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve (`IsReserve = ()`), - // but we need this hack for `pallet_xcm::reserve_transfer_assets` - // (TODO) fix https://github.com/paritytech/polkadot/pull/7424 - // (TODO) fix https://github.com/paritytech/polkadot/pull/7546 - fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - // TODO: if we change `IsReserve = ...` then use this line... - // TODO: or if remote weight estimation is fixed, then remove - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - hardcoded_weight.min(XcmFungibleWeight::::reserve_asset_deposited()) + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -127,10 +119,7 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { } fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - hardcoded_weight.min(weight) + assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index d59507e4bd..92776aa1dc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -15,31 +15,38 @@ use super::{ AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ForeignAssets, - ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - TrustBackedAssetsInstance, WeightToFee, XcmpQueue, -}; -use assets_common::matching::{ - FromSiblingParachain, IsForeignConcreteAsset, StartsWith, StartsWithExplicitGlobalConsensus, + ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; +use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ + AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + RelayOrOtherSystemParachains, + }, + TREASURY_PALLET_ID, +}; use polkadot_parachain_primitives::primitives::Sibling; -use sp_runtime::traits::ConvertInto; +use polkadot_runtime_constants::system_parachain; +use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset, - NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -55,6 +62,8 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); + pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -366,12 +375,12 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attemps to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent, its pluralities (i.e. governance bodies), and the Fellows plurality - // get free execution. + // The locations listed below get free execution. AllowExplicitUnpaidExecutionFrom<( ParentOrParentsPlurality, FellowsPlurality, FellowshipSalaryPallet, + Equals, )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, @@ -390,6 +399,37 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; +match_types! { + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 1, + interior: X1(Parachain( + system_parachain::COLLECTIVES_ID | + system_parachain::BRIDGE_HUB_ID + )), + } + }; +} + +/// Locations that will not be charged fees in the executor, +/// either execution or delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + FellowsPlurality, + FellowshipSalaryPallet, +); + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// +/// - DOT with the parent Relay Chain and sibling system parachains; and +/// - Sibling parachains' assets from where they originate (as `ForeignCreators`). +pub type TrustedTeleporters = ( + ConcreteAssetFromSystem, + IsForeignConcreteAsset>>, +); + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -400,13 +440,7 @@ impl xcm_executor::Config for XcmConfig { // Asset Hub acting _as_ a reserve location for DOT and assets created under `pallet-assets`. // For DOT, users must use teleport where allowed (e.g. with the Relay Chain). type IsReserve = (); - // We allow: - // - teleportation of DOT - // - teleportation of sibling parachain's assets (as ForeignCreators) - type IsTeleporter = ( - NativeAsset, - IsForeignConcreteAsset>>, - ); + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< @@ -436,7 +470,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = (); + type FeeManager = XcmFeesToAccount; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -452,7 +486,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, )>; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 7200ebc16a..5af2c63c18 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemint (Polkadot Assets Hub) chain. +//! Tests for the Polkadot Asset Hub (previously known as Statemint) chain. use asset_hub_polkadot_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 03d82da68c..ed7d2bf1f1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -9,7 +9,7 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "12.0.0" } +substrate-wasm-builder = { optional = true , version = "14.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -20,62 +20,63 @@ serde = { version = "1.0.188", optional = true, features = ["derive"] } smallvec = "1.11.0" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-aura = { default-features = false, version = "22.0.0" } -pallet-authorship = { default-features = false, version = "23.0.0" } -pallet-balances = { default-features = false, version = "23.0.0" } -pallet-multisig = { default-features = false, version = "23.0.0" } -pallet-session = { default-features = false, version = "23.0.0" } -pallet-timestamp = { default-features = false, version = "22.0.0" } -pallet-transaction-payment = { default-features = false, version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "23.0.0" } -pallet-utility = { default-features = false, version = "23.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-consensus-aura = { default-features = false, version = "0.27.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-io = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-authorship = { default-features = false, version = "25.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-multisig = { default-features = false, version = "25.0.0" } +pallet-session = { default-features = false, version = "25.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-io = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } # Polkadot kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} -pallet-xcm = { default-features = false, version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } -polkadot-core-primitives = { default-features = false, version = "2.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "1.0.0" } -polkadot-runtime-common = { default-features = false, version = "2.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.2.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.2.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "4.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -cumulus-primitives-utility = { default-features = false , version = "0.2.0" } -pallet-collator-selection = { default-features = false , version = "4.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +cumulus-primitives-utility = { default-features = false , version = "0.4.0" } +pallet-collator-selection = { default-features = false , version = "6.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.2.0" } +bridge-hub-test-utils = { version = "0.4.0" } [features] default = [ "std" ] @@ -121,6 +122,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -140,6 +142,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 7a95e2e6b9..f0d5f8a3cb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -43,6 +43,7 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, weights::{ConstantMultiplier, Weight}, @@ -74,7 +75,7 @@ use parachains_common::{ }; // XCM Imports -use xcm::latest::prelude::BodyId; +use xcm::prelude::*; use xcm_executor::XcmExecutor; /// The address format for describing accounts. @@ -154,7 +155,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-kusama"), impl_name: create_runtime_str!("bridge-hub-kusama"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, @@ -271,6 +272,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -321,6 +323,11 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(xcm_config::KsmRelayLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); } /// Privileged origin that represents Root or Fellows pluralistic body. @@ -329,6 +336,19 @@ pub type RootOrFellows = EitherOfDiverse< EnsureXcm>, >; +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; @@ -338,7 +358,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -628,6 +648,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -695,9 +725,21 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::KsmRelayLocation; + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + KsmRelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositMultiAsset, + PriceForParentDelivery, + >; fn valid_destination() -> Result { Ok(KsmRelayLocation::get()) } @@ -738,6 +780,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index 0e740922f3..ded5dc6702 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -61,16 +61,8 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve (`IsReserve = ()`), - // but we need this hack for `pallet_xcm::reserve_transfer_assets` - // (TODO) fix https://github.com/paritytech/polkadot/pull/7424 - // (TODO) fix https://github.com/paritytech/polkadot/pull/7546 - fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - // TODO: if we change `IsReserve = ...` then use this line... - // TODO: or if remote weight estimation is fixed, then remove - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - hardcoded_weight.min(XcmFungibleWeight::::reserve_asset_deposited()) + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -127,10 +119,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { } fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - hardcoded_weight.min(weight) + assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 696462be9c..3a1ac9c8b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -16,16 +16,23 @@ use super::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Everything, Nothing}, + traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; +use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; -use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + TREASURY_PALLET_ID, +}; use polkadot_parachain_primitives::primitives::Sibling; +use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -34,6 +41,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -47,6 +55,8 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); + pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); + pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -165,8 +175,12 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attemps to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its pluralities (i.e. governance bodies) get free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its pluralities (i.e. governance bodies) and relay treasury get + // free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + Equals, + )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), @@ -177,6 +191,28 @@ pub type Barrier = TrailingSetTopicAsId< >, >; +match_types! { + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 1, + interior: X1(Parachain( + system_parachain::ASSET_HUB_ID | + system_parachain::ENCOINTER_ID + )), + } + }; +} + +/// Locations that will not be charged fees in the executor, +/// either execution or delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = + (RelayOrOtherSystemParachains, Equals); + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// - KSM with the parent Relay Chain and sibling parachains. +pub type TrustedTeleporters = ConcreteAssetFromSystem; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -186,8 +222,7 @@ impl xcm_executor::Config for XcmConfig { // BridgeHub does not recognize a reserve location for any asset. Users must teleport KSM // where allowed (e.g. with the Relay Chain). type IsReserve = (); - /// Only allow teleportation of KSM. - type IsTeleporter = ConcreteNativeAssetFrom; + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< @@ -205,7 +240,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = (); + type FeeManager = XcmFeesToAccount; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -221,7 +256,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, )>; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 587595bc98..2e74c27c78 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -9,7 +9,7 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "12.0.0" } +substrate-wasm-builder = { optional = true , version = "14.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -20,62 +20,63 @@ serde = { version = "1.0.188", optional = true, features = ["derive"] } smallvec = "1.11.0" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-aura = { default-features = false, version = "22.0.0" } -pallet-authorship = { default-features = false, version = "23.0.0" } -pallet-balances = { default-features = false, version = "23.0.0" } -pallet-multisig = { default-features = false, version = "23.0.0" } -pallet-session = { default-features = false, version = "23.0.0" } -pallet-timestamp = { default-features = false, version = "22.0.0" } -pallet-transaction-payment = { default-features = false, version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "23.0.0" } -pallet-utility = { default-features = false, version = "23.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-consensus-aura = { default-features = false, version = "0.27.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-io = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-authorship = { default-features = false, version = "25.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-multisig = { default-features = false, version = "25.0.0" } +pallet-session = { default-features = false, version = "25.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-io = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } # Polkadot polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -pallet-xcm = { default-features = false, version = "2.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "2.0.0" } -polkadot-core-primitives = { default-features = false, version = "2.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "1.0.0" } -polkadot-runtime-common = { default-features = false, version = "2.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.2.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.2.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "4.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -cumulus-primitives-utility = { default-features = false , version = "0.2.0" } -pallet-collator-selection = { default-features = false , version = "4.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +cumulus-primitives-utility = { default-features = false , version = "0.4.0" } +pallet-collator-selection = { default-features = false , version = "6.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.2.0" } +bridge-hub-test-utils = { version = "0.4.0" } [features] default = [ "std" ] @@ -121,6 +122,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -140,6 +142,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index dbfdc249a3..a811d768bd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -43,6 +43,7 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, weights::{ConstantMultiplier, Weight}, @@ -74,7 +75,7 @@ use parachains_common::{ HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; // XCM Imports -use xcm::latest::prelude::BodyId; +use xcm::prelude::*; use xcm_executor::XcmExecutor; /// The address format for describing accounts. @@ -129,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-polkadot"), impl_name: create_runtime_str!("bridge-hub-polkadot"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -246,6 +247,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -296,6 +298,11 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(xcm_config::DotRelayLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); } /// Privileged origin that represents Root or Fellows. @@ -304,6 +311,19 @@ pub type RootOrFellows = EitherOfDiverse< EnsureXcm>, >; +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; @@ -313,7 +333,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -603,6 +623,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { @@ -670,9 +700,21 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::DotRelayLocation; + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + DotRelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositMultiAsset, + PriceForParentDelivery, + >; fn valid_destination() -> Result { Ok(DotRelayLocation::get()) } @@ -713,6 +755,7 @@ impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs index 4f8c2dec7a..7e9f218427 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs @@ -61,16 +61,8 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve (`IsReserve = ()`), - // but we need this hack for `pallet_xcm::reserve_transfer_assets` - // (TODO) fix https://github.com/paritytech/polkadot/pull/7424 - // (TODO) fix https://github.com/paritytech/polkadot/pull/7546 - fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - // TODO: if we change `IsReserve = ...` then use this line... - // TODO: or if remote weight estimation is fixed, then remove - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - hardcoded_weight.min(XcmFungibleWeight::::reserve_asset_deposited()) + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -127,10 +119,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { } fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); - let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - hardcoded_weight.min(weight) + assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, @@ -154,10 +143,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { _dest: &MultiLocation, _xcm: &Xcm<()>, ) -> Weight { - // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_parts(200_000_000_u64, 0); - let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - hardcoded_weight.min(weight) + assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { XcmGeneric::::report_holding() diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 0965600c24..be8f1dfa00 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -16,16 +16,23 @@ use super::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Everything, Nothing}, + traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + TREASURY_PALLET_ID, +}; use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; +use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -34,6 +41,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -47,6 +55,8 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); + pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -168,9 +178,13 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attemps to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent, its pluralities (i.e. governance bodies), and the Fellows plurality - // get free execution. - AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality, FellowsPlurality)>, + // Parent, its pluralities (i.e. governance bodies), Fellows plurality + // and relay treasury get free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + FellowsPlurality, + Equals, + )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), @@ -181,6 +195,31 @@ pub type Barrier = TrailingSetTopicAsId< >, >; +match_types! { + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 1, + interior: X1(Parachain( + system_parachain::ASSET_HUB_ID | + system_parachain::COLLECTIVES_ID + )), + } + }; +} + +/// Locations that will not be charged fees in the executor, +/// either execution or delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + FellowsPlurality, +); + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// - DOT with the parent Relay Chain and sibling parachains. +pub type TrustedTeleporters = ConcreteAssetFromSystem; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -190,8 +229,7 @@ impl xcm_executor::Config for XcmConfig { // BridgeHub does not recognize a reserve location for any asset. Users must teleport DOT // where allowed (e.g. with the Relay Chain). type IsReserve = (); - /// Only allow teleportation of DOT. - type IsTeleporter = ConcreteNativeAssetFrom; + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< @@ -209,7 +247,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = (); + type FeeManager = XcmFeesToAccount; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -225,7 +263,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, )>; diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index f36b68a646..dd0182ac0c 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -16,73 +16,71 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive" smallvec = "1.11.0" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-alliance = { default-features = false, version = "22.0.0" } -pallet-aura = { default-features = false, version = "22.0.0" } -pallet-authorship = { default-features = false, version = "23.0.0" } -pallet-balances = { default-features = false, version = "23.0.0" } -pallet-collective = { default-features = false, version = "23.0.0" } -pallet-multisig = { default-features = false, version = "23.0.0" } -pallet-preimage = { default-features = false , version = "23.0.0" } -pallet-proxy = { default-features = false, version = "23.0.0" } -pallet-scheduler = { default-features = false , version = "24.0.0" } -pallet-session = { default-features = false, version = "23.0.0" } -pallet-timestamp = { default-features = false, version = "22.0.0" } -pallet-transaction-payment = { default-features = false, version = "23.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "23.0.0" } -pallet-utility = { default-features = false, version = "23.0.0" } -pallet-referenda = { default-features = false, version = "23.0.0" } -pallet-ranked-collective = { default-features = false, version = "23.0.0" } -pallet-core-fellowship = { default-features = false, version = "7.0.0" } -pallet-salary = { default-features = false, version = "8.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-arithmetic = { default-features = false , version = "18.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-consensus-aura = { default-features = false, version = "0.27.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-alliance = { default-features = false, version = "24.0.0" } +pallet-aura = { default-features = false, version = "24.0.0" } +pallet-authorship = { default-features = false, version = "25.0.0" } +pallet-balances = { default-features = false, version = "25.0.0" } +pallet-collective = { default-features = false, version = "25.0.0" } +pallet-multisig = { default-features = false, version = "25.0.0" } +pallet-preimage = { default-features = false , version = "25.0.0" } +pallet-proxy = { default-features = false, version = "25.0.0" } +pallet-scheduler = { default-features = false , version = "26.0.0" } +pallet-session = { default-features = false, version = "25.0.0" } +pallet-timestamp = { default-features = false, version = "24.0.0" } +pallet-transaction-payment = { default-features = false, version = "25.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } +pallet-utility = { default-features = false, version = "25.0.0" } +pallet-referenda = { default-features = false, version = "25.0.0" } +pallet-ranked-collective = { default-features = false, version = "25.0.0" } +pallet-core-fellowship = { default-features = false, version = "9.0.0" } +pallet-salary = { default-features = false, version = "10.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-arithmetic = { default-features = false , version = "20.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-consensus-aura = { default-features = false, version = "0.29.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "2.0.0" } -polkadot-core-primitives = { default-features = false, version = "2.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "1.0.0" } -polkadot-runtime-common = { default-features = false, version = "2.0.0" } +pallet-xcm = { default-features = false, version = "4.0.0" } +polkadot-core-primitives = { default-features = false, version = "4.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } +polkadot-runtime-common = { default-features = false, version = "4.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.2.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.2.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "4.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -cumulus-primitives-utility = { default-features = false , version = "0.2.0" } -pallet-collator-selection = { default-features = false , version = "4.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +cumulus-primitives-utility = { default-features = false , version = "0.4.0" } +pallet-collator-selection = { default-features = false , version = "6.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "12.0.0" } - -[dev-dependencies] -sp-io = { default-features = false, version = "25.0.0" } +substrate-wasm-builder = { optional = true , version = "14.0.0" } [features] default = [ "std" ] @@ -198,8 +196,8 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", - "sp-io/std", "sp-offchain/std", "sp-runtime/std", "sp-session/std", diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/migration.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/migration.rs deleted file mode 100644 index 95449868df..0000000000 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/migration.rs +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -//! Migrations. - -use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade, weights::Weight}; -use log; - -/// Initial import of the Kusama Technical Fellowship. -pub(crate) mod import_kusama_fellowship { - use super::*; - use frame_support::{parameter_types, traits::RankedMembers}; - use pallet_ranked_collective::{Config, MemberCount, Pallet as RankedCollective, Rank}; - #[cfg(feature = "try-runtime")] - use sp_std::vec::Vec; - - const TARGET: &str = "runtime::migration::import_fellowship"; - - parameter_types! { - // The Fellowship addresses from Kusama state. - pub const FellowshipAddresses: [(Rank, [u8; 32]); 47] = [ - (6, hex_literal::hex!("f0673d30606ee26672707e4fd2bc8b58d3becb7aba2d5f60add64abb5fea4710"),), - (6, hex_literal::hex!("3c235e80e35082b668682531b9b062fda39a46edb94f884d9122d86885fd5f1b"),), - (6, hex_literal::hex!("7628a5be63c4d3c8dbb96c2904b1a9682e02831a1af836c7efc808020b92fa63"),), - (5, hex_literal::hex!("9c84f75e0b1b92f6b003bde6212a8b2c9b776f3720f942b33fed8709f103a268"),), - (5, hex_literal::hex!("bc64065524532ed9e805fb0d39a5c0199216b52871168e5e4d0ab612f8797d61"),), - (5, hex_literal::hex!("2e1884c53071526483b14004e894415f02b55fc2e2aef8e1df8ccf7ce5bd5570"),), - (5, hex_literal::hex!("5c5062779d44ea2ab0469e155b8cf3e004fce71b3b3d38263cd9fa9478f12f28"),), - (4, hex_literal::hex!("4adf51a47b72795366d52285e329229c836ea7bbfe139dbe8fa0700c4f86fc56"),), - (4, hex_literal::hex!("1c90e3dabd3fd0f6bc648045018f78fcee8fe24122c22d8d2a14e9905073d10f"),), - (4, hex_literal::hex!("8e851ed992228f2268ee8c614fe6075d3800060ae14098e0309413a0a81c4470"),), - (3, hex_literal::hex!("720d807d46b941703ffe0278e8b173dc6738c5af8af812ceffc90c69390bbf1f"),), - (3, hex_literal::hex!("c4965f7fe7be8174717a24ffddf684986d122c7e293ddf875cdf9700a07b6812"),), - (3, hex_literal::hex!("beae5bcad1a8c156291b7ddf46b38b0c61a6aaacebd57b21c75627bfe7f9ab71"),), - (3, hex_literal::hex!("ccd87fa65729f7bdaa8305581a7a499aa24c118e83f5714152c0e22617c6fc63"),), - (3, hex_literal::hex!("e0f0f94962fc0a8c1a0f0527dc8e592c67939c46c903b6016cc0a8515da0044d"),), - (3, hex_literal::hex!("984e16482c99cfad1436111e321a86d87d0fac203bf64538f888e45d793b5413"),), - (3, hex_literal::hex!("44a3efb5bfa9023d4ef27b7d31d76f531b4d7772b1679b7fb32b6263ac39100e"),), - (2, hex_literal::hex!("2eba9a39dbfdd5f3cba964355d45e27319f0271023c0353d97dc6df2401b0e3d"),), - (2, hex_literal::hex!("ba3e9b87792bcfcc237fa8181185b8883c77f3e24f45e4a92ab31d07a4703520"),), - (2, hex_literal::hex!("9e6eb74b0a6b39de36fb58d1fab20bc2b3fea96023ce5a47941c20480d99f92e"),), - (2, hex_literal::hex!("ee3d9d8c48ee88dce78fd7bafe3ce2052900eb465085b9324d4f5da26b145f2b"),), - (2, hex_literal::hex!("d8290537d6e31fe1ff165eaa62b63f6f3556dcc720b0d3a6d7eab96275617304"),), - (2, hex_literal::hex!("5a090c88f0438b46b451026597cee760a7bac9d396c9c7b529b68fb78aec5f43"),), - (2, hex_literal::hex!("18d30040a8245c5ff17afc9a8169d7d0771fe7ab4135a64a022c254117340720"),), - (1, hex_literal::hex!("b4f7f03bebc56ebe96bc52ea5ed3159d45a0ce3a8d7f082983c33ef133274747"),), - (1, hex_literal::hex!("caafae0aaa6333fcf4dc193146945fe8e4da74aa6c16d481eef0ca35b8279d73"),), - (1, hex_literal::hex!("a66e0f4e1a121cc83fddf3096e8ec8c9e9c85989f276e39e951fb0e4a5398763"),), - (1, hex_literal::hex!("f65f3cade8f68e8f34c6266b0d37e58a754059ca96816e964f98e17c79505073"),), - (1, hex_literal::hex!("8c232c91ef2a9983ba65c4b75bb86fcbae4d909900ea8aa06c3644ca1161db48"),), - (1, hex_literal::hex!("78e4813814891bd48bc745b79254a978833d41fbe0f387df93cd87eae2468926"),), - (1, hex_literal::hex!("d44824ac8d1edecca67639ca74d208bd2044a10e67c9677e288080191e3fec13"),), - (1, hex_literal::hex!("585e982d74da4f4290d20a73800cfd705cf59e1f5880aaee5506b5eaaf544f49"),), - (1, hex_literal::hex!("d851f44a6f0d0d2f3439a51f2f75f66f4ea1a8e6c33c32f9af75fc188afb7546"),), - (1, hex_literal::hex!("dca89b135d1a6aee0a498610a70eeaed056727c8a4d220da245842e540a54a74"),), - (1, hex_literal::hex!("aa91fc0201f26b713a018669bcd269babf25368eee2493323b1ce0190a178a27"),), - (1, hex_literal::hex!("dc20836f2e4b88c1858d1e3f918e7358043b4a8abcd2874e74d91d26c52eca2a"),), - (1, hex_literal::hex!("145d6c503d0cf97f4c7725ca773741bd02e1760bfb52e021af5a9f2de283012c"),), - (1, hex_literal::hex!("307183930b2264c5165f4a210a99520c5f1672b0413d57769fabc19e6866fb25"),), - (1, hex_literal::hex!("6201961514cf5ad87f1c4dd0c392ee28231f805f77975147bf2c33bd671b9822"),), - (1, hex_literal::hex!("c6f57237cd4abfbeed99171495fc784e45a9d5d2814d435de40de00991a73c06"),), - (1, hex_literal::hex!("c1df5c7e8ca56037450c58734326ebe34aec8f7d1928322a12164856365fea73"),), - (1, hex_literal::hex!("12c039004da5e1e846aae808277098c719cef1f4985aed00161a42ac4f0e002f"),), - (1, hex_literal::hex!("7460ac178015d2a7c289bb68ef9fdaac071596ab4425c276a0040aaac7055566"),), - (1, hex_literal::hex!("eec4bd650a277342ebba0954ac786df2623bd6a9d6d3e69b484482336c549f79"),), - (1, hex_literal::hex!("e287c7494655d636a846f5c3347ad2cb3c462a8d46e0832be70fcc0ab54ee62d"),), - (1, hex_literal::hex!("82bf733f44a840f0a5c1935a002d4e541d81298fad6d1da8124073485983860e"),), - (1, hex_literal::hex!("d5b89078eed9b9dfec5c7d8413bac0b720bad3bd4078c4d8c894325713192502"),), - ]; - } - - /// Implements `OnRuntimeUpgrade` trait. - pub struct Migration(PhantomData<(T, I)>); - - impl, I: 'static> OnRuntimeUpgrade for Migration - where - ::AccountId: From<[u8; 32]>, - { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let onchain_version = RankedCollective::::on_chain_storage_version(); - ensure!(onchain_version == 0, "the storage version must be 0."); - let member_count = MemberCount::::get(0); - ensure!(member_count == 0, "the collective must be uninitialized."); - - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - let current_version = RankedCollective::::current_storage_version(); - let onchain_version = RankedCollective::::on_chain_storage_version(); - let mut weight = T::DbWeight::get().reads(1); - log::info!( - target: TARGET, - "running migration with current storage version {:?} / onchain {:?}.", - current_version, - onchain_version - ); - if onchain_version != 0 { - log::warn!( - target: TARGET, - "unsupported storage version, skipping import_fellowship migration." - ); - return weight - } - let member_count = MemberCount::::get(0); - weight.saturating_accrue(T::DbWeight::get().reads(1)); - if member_count != 0 { - log::warn!( - target: TARGET, - "the collective already initialized, skipping import_fellowship migration." - ); - return weight - } - - for (rank, account_id32) in FellowshipAddresses::get() { - let who: T::AccountId = account_id32.into(); - let _ = as RankedMembers>::induct(&who); - for _ in 0..rank { - let _ = as RankedMembers>::promote(&who); - // 1 write to `IdToIndex` and `IndexToId` per member on each rank. - weight.saturating_accrue(T::DbWeight::get().writes(2)); - } - // 1 write to `IdToIndex` and `IndexToId` per member on each rank. - weight.saturating_accrue(T::DbWeight::get().writes(2)); - // 1 read and 1 write to `Members` and `MemberCount` per member. - weight.saturating_accrue(T::DbWeight::get().reads_writes(2, 2)); - } - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - ensure!(MemberCount::::get(0) == 47, "invalid members count at rank 0."); - ensure!(MemberCount::::get(1) == 47, "invalid members count at rank 1."); - ensure!(MemberCount::::get(2) == 24, "invalid members count at rank 2."); - ensure!(MemberCount::::get(3) == 17, "invalid members count at rank 3."); - ensure!(MemberCount::::get(4) == 10, "invalid members count at rank 4."); - ensure!(MemberCount::::get(5) == 7, "invalid members count at rank 5."); - ensure!(MemberCount::::get(6) == 3, "invalid members count at rank 6."); - ensure!(MemberCount::::get(7) == 0, "invalid members count at rank 7."); - Ok(()) - } - } -} - -#[cfg(test)] -pub mod tests { - use super::import_kusama_fellowship::FellowshipAddresses; - use crate::{fellowship::FellowshipCollectiveInstance as Fellowship, Runtime, System}; - use frame_support::traits::OnRuntimeUpgrade; - use pallet_ranked_collective::Rank; - use parachains_common::AccountId; - use sp_core::crypto::Ss58Codec; - use sp_runtime::{AccountId32, BuildStorage}; - - #[test] - fn check_fellowship_addresses() { - let fellowship_addresses = FellowshipAddresses::get(); - let kusama_fellowship_ss58: [(Rank, _); 47] = [ - (6, "16SDAKg9N6kKAbhgDyxBXdHEwpwHUHs2CNEiLNGeZV55qHna"), /* proof https://kusama.subscan.io/extrinsic/16832707-4 */ - (6, "12MrP337azmkTdfCUKe5XLnSQrbgEKqqfZ4PQC7CZTJKAWR3"), /* proof https://kusama.subscan.io/extrinsic/16967809-2 */ - (6, "FFFF3gBSSDFSvK2HBq4qgLH75DHqXWPHeCnR1BSksAMacBs"), - (5, "G7YVCdxZb8JLpAm9WMnJdNuojNT84AzU62zmvx5P1FMNtg2"), - (5, "15G1iXDLgFyfnJ51FKq1ts44TduMyUtekvzQi9my4hgYt2hs"), /* proof https://kusama.subscan.io/extrinsic/16917610-2 */ - (5, "Dcm1BqR4N7nHuV43TXdET7pNibt1Nzm42FggPHpxKRven53"), - (5, "1363HWTPzDrzAQ6ChFiMU6mP4b6jmQid2ae55JQcKtZnpLGv"), /* proof https://kusama.subscan.io/extrinsic/16961180-2 */ - (4, "EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo"), - (4, "1eTPAR2TuqLyidmPT9rMmuycHVm9s9czu78sePqg2KHMDrE"), /* proof https://kusama.subscan.io/extrinsic/16921712-3 */ - (4, "14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP"), /* proof https://kusama.subscan.io/extrinsic/16917519-2 */ - (3, "13aYUFHB3umoPoxBEAHSv451iR3RpsNi3t5yBZjX2trCtTp6"), /* proof https://kusama.subscan.io/extrinsic/16917832-3 */ - (3, "H25aCspunTUqAt4D1gC776vKZ8FX3MvQJ3Jde6qDXPQaFxk"), - (3, "GtLQoW4ZqcjExMPq6qB22bYc6NaX1yMzRuGWpSRiHqnzRb9"), - (3, "15db5ksZgmhWE9U8MDq4wLKUdFivLVBybztWV8nmaJvv3NU1"), /* proof https://kusama.subscan.io/extrinsic/16876631-2 */ - (3, "HfFpz4QUxfbocHudf8UU7cMgHqkHpf855Me5X846PZAsAYE"), - (3, "14ShUZUYUR35RBZW6uVVt1zXDxmSQddkeDdXf1JkMA6P721N"), /* proof https://kusama.subscan.io/extrinsic/16918890-8 */ - (3, "12YzxR5TvGzfMVZNnhAJ5Hwi5zExpRWMKv2MuMwZTrddvgoi"), /* proof https://kusama.subscan.io/extrinsic/16924324-3 */ - (2, "Ddb9puChKMHq4gM6o47E551wAmaNeu6kHngX1jzNNqAw782"), - (2, "15DCWHQknBjc5YPFoVj8Pn2KoqrqYywJJ95BYNYJ4Fj3NLqz"), /* proof https://kusama.subscan.io/extrinsic/16834952-2 */ - (2, "14ajTQdrtCA8wZmC4PgD8Y1B2Gy8L4Z3oi2fodxq9FehcFrM"), /* proof https://kusama.subscan.io/extrinsic/16944257-2 */ - (2, "HxhDbS3grLurk1dhDgPiuDaRowHY1xHCU8Vu8on3fdg85tx"), - (2, "HTk3eccL7WBkiyxz1gBcqQRghsJigoDMD7mnQaz1UAbMpQV"), - (2, "EcNWrSPSDcVBRymwr26kk4JVFg92PdoU5Xwp87W2FgFSt9c"), - (2, "D8sM6vKjWaeKy2zCPYWGkLLbWdUtWQrXBTQqr4dSYnVQo21"), - (1, "GfbnnEgRU94n9ed4RFZ6Z9dBAWs5obykigJSwXKU9hsT2uU"), - (1, "HA5NtttvyZsxo4wGxGoJJSMaWtdEFZAuGUMFHVWD7fgenPv"), - (1, "14mDeKZ7qp9hqBjjDg51c8BFrf9o69om8piSSRwj2fT5Yb1i"), /* proof https://kusama.subscan.io/extrinsic/16919020-4 */ - (1, "16a357f5Sxab3V2ne4emGQvqJaCLeYpTMx3TCjnQhmJQ71DX"), /* proof https://kusama.subscan.io/extrinsic/16836396-5 */ - (1, "14Ak9rrF6RKHHoLLRUYMnzcvvi1t8E1yAMa7tcmiwUfaqzYK"), /* proof https://kusama.subscan.io/extrinsic/16921990-3 */ - (1, "FJq9JpA9P7EXbmfsN9YiewJaDbQyL6vQyksGtJvzfbn6zf8"), - (1, "15oLanodWWweiZJSoDTEBtrX7oGfq6e8ct5y5E6fVRDPhUgj"), /* proof https://kusama.subscan.io/extrinsic/16876423-7 */ - (1, "EaBqDJJNsZmYdQ4xn1vomPJVNh7fjA6UztZeEjn7ZzdeT7V"), - (1, "HTxCvXKVvUZ7PQq175kCRRLu7XkGfTfErrdNXr1ZuuwVZWv"), - (1, "HZe91A6a1xqbKaw6ofx3GFepJjhVXHrwHEwn6YUDDFphpX9"), - (1, "GRy2P3kBEzSHCbmDJfquku1cyUyhZaAqojRcNE4A4U3MnLd"), - (1, "HYwiBo7Mcv7uUDg4MUoKm2fxzv4dMLAtmmNfzHV8qcQJpAE"), - (1, "1ThiBx5DDxFhoD9GY6tz5Fp4Y7Xn1xfLmDddcoFQghDvvjg"), /* proof https://kusama.subscan.io/extrinsic/16918130-2 */ - (1, "DfqY6XQUSETTszBQ1juocTcG9iiDoXhvq1CoVadBSUqTGJS"), - (1, "EnpgVWGGQVrFdSB2qeXRVdtccV6U5ZscNELBoERbkFD8Wi6"), - (1, "H5BuqCmucJhUUuvjAzPazeVwVCtUSXVQdc5Dnx2q5zD7rVn"), - (1, "GxX7S1pTDdeaGUjpEPPF2we6tgHDhbatFG25pVmVFtGHLH6"), - (1, "CzuUtvKhZNZBjyAXeYviaRXwrLhVrsupJ9PrWmdq7BJTjGR"), - (1, "FCunn2Rx8JqfT5g6noUKKazph4jLDba5rUee7o3ZmJ362Ju"), - (1, "HyPMjWRHCpJS7x2SZ2R6M2XG5ZiCiZag4U4r7gBHRsE5mTc"), - (1, "1682A5hxfiS1Kn1jrUnMYv14T9EuEnsgnBbujGfYbeEbSK3w"), /* proof https://kusama.subscan.io/extrinsic/16919077-2 */ - (1, "13xS6fK6MHjApLnjdX7TJYw1niZmiXasSN91bNtiXQjgEtNx"), /* proof https://kusama.subscan.io/extrinsic/16918212-7 */ - (1, "15qE2YAQCs5Y962RHE7RzNjQxU6Pei21nhkkSM9Sojq1hHps"), /* https://kusama.subscan.io/extrinsic/17352973-2 */ - ]; - - for (index, val) in kusama_fellowship_ss58.iter().enumerate() { - let account: AccountId32 = ::from_string(val.1).unwrap(); - let account32: [u8; 32] = account.clone().into(); - assert_eq!( - fellowship_addresses[index].0, kusama_fellowship_ss58[index].0, - "ranks must be equal." - ); - assert_eq!(fellowship_addresses[index].1, account32, "accounts must be equal."); - } - } - - #[test] - fn test_fellowship_import() { - use super::import_kusama_fellowship::Migration; - use pallet_ranked_collective::{IdToIndex, IndexToId, MemberCount, MemberRecord, Members}; - - let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext.execute_with(|| { - assert_eq!(MemberCount::::get(0), 0); - Migration::::on_runtime_upgrade(); - assert_eq!(MemberCount::::get(0), 47); - assert_eq!(MemberCount::::get(6), 3); - assert_eq!(MemberCount::::get(7), 0); - for (rank, account_id32) in FellowshipAddresses::get() { - let who = ::AccountId::from(account_id32); - assert!(IdToIndex::::get(0, &who).is_some()); - assert!(IdToIndex::::get(rank + 1, &who).is_none()); - let index = IdToIndex::::get(rank, &who).unwrap(); - assert_eq!(IndexToId::::get(rank, index).unwrap(), who); - assert_eq!( - Members::::get(&who).unwrap(), - MemberRecord::new(rank) - ); - } - }); - } -} diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index b97e44dda1..f8abba46e2 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -16,7 +16,6 @@ //! The Polkadot Technical Fellowship. -pub(crate) mod migration; mod origins; mod tracks; use crate::{ diff --git a/system-parachains/collectives/collectives-polkadot/src/impls.rs b/system-parachains/collectives/collectives-polkadot/src/impls.rs index c970d82cfe..fb2feb63ec 100644 --- a/system-parachains/collectives/collectives-polkadot/src/impls.rs +++ b/system-parachains/collectives/collectives-polkadot/src/impls.rs @@ -24,7 +24,7 @@ use pallet_alliance::{ProposalIndex, ProposalProvider}; use parachains_common::impls::NegativeImbalance; use sp_runtime::DispatchError; use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*}; -use xcm::latest::{Fungibility, Junction, Parent}; +use xcm::latest::{Fungibility, Junction, Parent, WeightLimit}; type AccountIdOf = ::AccountId; @@ -63,7 +63,7 @@ where >::resolve_creating(&pallet_acc, amount); - let result = >::teleport_assets( + let result = >::limited_teleport_assets( <::RuntimeOrigin>::signed(pallet_acc.into()), Box::new(Parent.into()), Box::new( @@ -73,6 +73,7 @@ where ), Box::new((Parent, imbalance).into()), 0, + WeightLimit::Unlimited, ); if let Err(err) = result { @@ -184,7 +185,7 @@ pub mod benchmarks { impl> EnsureSuccessful for OpenHrmpChannel { fn ensure_successful() { if let ChannelStatus::Closed = ParachainSystem::get_channel_status(I::get().into()) { - ParachainSystem::open_outbound_hrmp_channel_for_benchmarks(I::get().into()) + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(I::get().into()) } } } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index e79a5bb15b..c3d12985ef 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -63,8 +63,12 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter}, + traits::{ + fungible::HoldConsideration, ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, + EitherOfDiverse, InstanceFilter, LinearStoragePrice, + }, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -89,7 +93,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use xcm::latest::BodyId; +use xcm::prelude::*; use xcm_executor::XcmExecutor; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -105,7 +109,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 5, @@ -205,8 +209,9 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; + type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<0>; } @@ -378,6 +383,28 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} +parameter_types! { + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(xcm_config::DotLocation::get()); + /// The base fee for the message delivery fees. + pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); +} + +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; + +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; @@ -387,7 +414,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EitherOfDiverse, Fellows>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -542,6 +569,8 @@ impl pallet_scheduler::Config for Runtime { parameter_types! { pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { @@ -549,8 +578,12 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -586,7 +619,7 @@ construct_runtime!( Utility: pallet_utility::{Pallet, Call, Event} = 40, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 42, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 43, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 43, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 44, // The main stage. @@ -863,6 +896,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs index 71e91699fd..0e50acf71b 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_preimage.rs @@ -210,4 +210,25 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Preimage::StatusFor` (r:1024 w:1024) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1024) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `193 + n * (91 ±0)` + // Estimated: `3593 + n * (2566 ±0)` + // Minimum execution time: 2_452_000 picoseconds. + Weight::from_parts(2_641_000, 3593) + // Standard Error: 19_797 + .saturating_add(Weight::from_parts(15_620_946, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2566).saturating_mul(n.into())) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index b4db73e3ab..c609b491d1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -15,17 +15,24 @@ use super::{ AccountId, AllPalletsWithSystem, Balances, Fellows, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Everything, Nothing}, + traits::{ConstU32, Contains, Equals, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; +use parachains_common::{ + impls::ToStakingPot, + xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + TREASURY_PALLET_ID, +}; use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; +use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -34,7 +41,7 @@ use xcm_builder::{ OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, + UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -46,6 +53,8 @@ parameter_types! { X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); + pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -215,8 +224,12 @@ pub type Barrier = TrailingSetTopicAsId< // If the message is one that immediately attemps to pay for execution, then // allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its pluralities (i.e. governance bodies) get free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its pluralities (i.e. governance bodies) and relay treasury get + // free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + Equals, + )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), @@ -227,6 +240,28 @@ pub type Barrier = TrailingSetTopicAsId< >, >; +match_types! { + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 1, + interior: X1(Parachain( + system_parachain::ASSET_HUB_ID | + system_parachain::BRIDGE_HUB_ID + )), + } + }; +} + +/// Locations that will not be charged fees in the executor, +/// either execution or delivery. +/// We only waive fees for system functions, which these locations represent. +pub type WaivedLocations = + (RelayOrOtherSystemParachains, Equals); + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// - DOT with the parent Relay Chain and sibling parachains. +pub type TrustedTeleporters = ConcreteAssetFromSystem; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -236,8 +271,7 @@ impl xcm_executor::Config for XcmConfig { // Collectives does not recognize a reserve location for any asset. Users must teleport DOT // where allowed (e.g. with the Relay Chain). type IsReserve = (); - /// Only allow teleportation of DOT. - type IsTeleporter = ConcreteNativeAssetFrom; + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; @@ -251,7 +285,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = (); + type FeeManager = XcmFeesToAccount; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -267,7 +301,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, )>; diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 9bf6646ea6..f86a9159d1 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -13,41 +13,42 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-executive = { default-features = false, version = "23.0.0" } -frame-support = { default-features = false, version = "23.0.0" } -frame-system = { default-features = false, version = "23.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "21.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.29.0" } -pallet-glutton = { default-features = false, optional = true, version = "9.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "23.0.0" } -sp-api = { default-features = false, version = "21.0.0" } -sp-block-builder = { default-features = false, version = "21.0.0" } -sp-core = { default-features = false, version = "23.0.0" } -sp-inherents = { default-features = false, version = "21.0.0" } -sp-offchain = { default-features = false, version = "21.0.0" } -sp-runtime = { default-features = false, version = "26.0.0" } -sp-session = { default-features = false, version = "22.0.0" } -sp-std = { default-features = false, version = "10.0.0" } -sp-storage = { default-features = false, version = "15.0.0" } -sp-transaction-pool = { default-features = false, version = "21.0.0" } -sp-version = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-executive = { default-features = false, version = "25.0.0" } +frame-support = { default-features = false, version = "25.0.0" } +frame-system = { default-features = false, version = "25.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } +pallet-glutton = { default-features = false, optional = true, version = "11.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "25.0.0" } +sp-api = { default-features = false, version = "23.0.0" } +sp-block-builder = { default-features = false, version = "23.0.0" } +sp-core = { default-features = false, version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.4.0" } +sp-inherents = { default-features = false, version = "23.0.0" } +sp-offchain = { default-features = false, version = "23.0.0" } +sp-runtime = { default-features = false, version = "28.0.0" } +sp-session = { default-features = false, version = "24.0.0" } +sp-std = { default-features = false, version = "12.0.0" } +sp-storage = { default-features = false, version = "17.0.0" } +sp-transaction-pool = { default-features = false, version = "23.0.0" } +sp-version = { default-features = false, version = "26.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "2.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "2.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "2.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.2.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.2.0" } -cumulus-primitives-core = { default-features = false , version = "0.2.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.2.0" } -parachains-common = { default-features = false , version = "2.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } +cumulus-primitives-core = { default-features = false , version = "0.4.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } +parachains-common = { default-features = false , version = "4.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "12.0.0" } +substrate-wasm-builder = { version = "14.0.0" } [features] default = [ "std" ] @@ -59,6 +60,7 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-glutton/runtime-benchmarks", "pallet-sudo?/runtime-benchmarks", + "parachains-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -83,6 +85,7 @@ std = [ "sp-api/std", "sp-block-builder/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-offchain/std", "sp-runtime/std", diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index dde8f747d4..050bf21f88 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -63,6 +63,7 @@ use sp_version::RuntimeVersion; pub use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{Everything, IsInVec, Randomness}, weights::{ @@ -87,7 +88,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 10000, + spec_version: 1_000_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -347,12 +348,22 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> (