diff --git a/.github/commands-readme.md b/.github/commands-readme.md
index bf0e9e5ed20bb3085e6bbe3e59079372121167b1..793524e056f8e113b0803405f2d5a238a7c7b285 100644
--- a/.github/commands-readme.md
+++ b/.github/commands-readme.md
@@ -10,6 +10,7 @@ The current available command actions are:
- [Command FMT](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-fmt.yml)
- [Command Update UI](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-update-ui.yml)
+- [Command Sync](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-sync.yml)
- [Command Bench](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench.yml)
- [Command Bench All](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench-all.yml)
- [Command Bench Overhead](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench-overhead.yml)
@@ -24,12 +25,36 @@ Each command will have the same two required values, but it could have more.
GitHub's official documentation: [Manually running a workflow](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow)
+#### Running from CLI
+
+You can use [`gh cli`](https://cli.github.com/) to run the commands too. Refers to the [`gh workflow run`](https://cli.github.com/manual/gh_workflow_run) section from the documentation for more information.
+
### Number of the Pull Request
The number of the pull request. Required so the action can fetch the correct branch and comment if it fails.
## Action configurations
+### FMT
+
+For FMT you only need the PR number.
+
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-fmt.yml -f pr=1000
+```
+
+### Update UI
+
+For Update UI you only need the PR number.
+
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-update-ui.yml -f pr=1000
+```
+
### Bench
Runs `benchmark pallet` or `benchmark overhead` against your PR and commits back updated weights.
@@ -135,6 +160,12 @@ Posible combinations based on the `benchmark` dropdown.
- Requires `Runtime Dir` to be `testing`
- Requires `Target Directory` to be `cumulus`
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-bench.yml -f pr=1000 -f benchmark=polkadot-pallet -f subcommand=pallet -f runtime=rococo -f pallet=pallet_name -f target_dir=polkadot
+```
+
### Bench-all
This is a wrapper to run `bench` for all pallets.
@@ -173,6 +204,12 @@ Posible combinations based on the `benchmark` dropdown.
- `people-westend`
- Requires `Target Directory` to be `cumulus`
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-bench-all.yml -f pr=1000 -f benchmark=pallet -f pallet=pallet_name -f target_dir=polkadot -f runtime=rococo
+```
+
### Bench-overhead
Run benchmarks overhead and commit back results to PR.
@@ -192,6 +229,35 @@ Posible combinations based on the `benchmark` dropdown.
- `asset-hub-westend`
- Requires `Target directory` to be `cumulus`
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-bench-overheard.yml -f pr=1000 -f benchmark=substrate -f runtime=rococo -f target_dir=substrate
+```
+
+### Sync
+
+Run sync and commit back results to PR.
+
+Posible combinations based on the `benchmark` dropdown.
+
+- `chain`
+ - Requires one of the following:
+ - `rococo`
+ - `westend`
+- `sync-type`
+ - Requires one of the following:
+ - `warp`
+ - `full`
+ - `fast`
+ - `fast-unsafe`
+
+You can use the following [`gh cli`](https://cli.github.com/) inside the repo:
+
+```bash
+gh workflow run command-sync.yml -f pr=1000 -f chain=rococo -f sync-type=full
+```
+
## How to modify an action
If you want to modify an action and test it, you can do by simply pushing your changes and then selecting your branch in the `Use worflow from` option.
diff --git a/.github/env b/.github/env
index 162ce8af7c0ddbc1534b7d1ffb09cff4be012fc7..2e4d5b48100dfb3e976270efd155843e907687a8 100644
--- a/.github/env
+++ b/.github/env
@@ -1 +1 @@
-IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
\ No newline at end of file
+IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v202407161507"
diff --git a/.github/scripts/common/lib.sh b/.github/scripts/common/lib.sh
index f844e962c41def7625fa3d45ae3cbf81ecb57147..33ef2d3e7eda4d6b4b5b7eacc2e3ed2b1a24c29f 100755
--- a/.github/scripts/common/lib.sh
+++ b/.github/scripts/common/lib.sh
@@ -444,3 +444,16 @@ get_latest_release_tag() {
latest_release_tag=$(curl -s -H "$TOKEN" $api_base/paritytech/polkadot-sdk/releases/latest | jq -r '.tag_name')
printf $latest_release_tag
}
+
+function get_polkadot_node_version_from_code() {
+ # list all the files with node version
+ git grep -e "\(NODE_VERSION[^=]*= \)\".*\"" |
+ # fetch only the one we need
+ grep "primitives/src/lib.rs:" |
+ # Print only the version
+ awk '{ print $7 }' |
+ # Remove the quotes
+ sed 's/"//g' |
+ # Remove the semicolon
+ sed 's/;//g'
+}
diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml
index 3bc95305f7467ebbede90526eadb156b89b1e7f9..b77135805409d1fb869b9a061e681b582924e4b7 100644
--- a/.github/workflows/check-licenses.yml
+++ b/.github/workflows/check-licenses.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- - uses: actions/setup-node@v4.0.1
+ - uses: actions/setup-node@v4.0.3
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
diff --git a/.github/workflows/checks-quick.yml b/.github/workflows/checks-quick.yml
index 1fcec5c80fd49a337fe84af6c3799ff20a081aaa..678bfb6f2058b98162c9a907efe48f0e770a4f38 100644
--- a/.github/workflows/checks-quick.yml
+++ b/.github/workflows/checks-quick.yml
@@ -109,7 +109,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Node.js
- uses: actions/setup-node@v4.0.1
+ uses: actions/setup-node@v4.0.3
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
diff --git a/.github/workflows/command-bench-all.yml b/.github/workflows/command-bench-all.yml
index f1d1589bea29d2ab38b6a80bb0a1f60c88f4a632..4128f86fb7c82f76e658fd39fad3365395a244e2 100644
--- a/.github/workflows/command-bench-all.yml
+++ b/.github/workflows/command-bench-all.yml
@@ -63,9 +63,12 @@ jobs:
run: cat .github/env >> $GITHUB_OUTPUT
cmd-bench-all:
needs: [set-image]
- runs-on: arc-runners-polkadot-sdk-benchmark
+ runs-on: arc-runners-polkadot-sdk-weights
container:
image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Download repo
uses: actions/checkout@v4
diff --git a/.github/workflows/command-bench-overhead.yml b/.github/workflows/command-bench-overhead.yml
index 16cbcefcf26974f169d0cd5a1f946af766f18a21..fec8d37bb9ef80505c9569da08071ccee7275067 100644
--- a/.github/workflows/command-bench-overhead.yml
+++ b/.github/workflows/command-bench-overhead.yml
@@ -45,6 +45,9 @@ jobs:
runs-on: arc-runners-polkadot-sdk-benchmark
container:
image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Download repo
uses: actions/checkout@v4
diff --git a/.github/workflows/command-bench.yml b/.github/workflows/command-bench.yml
index b23b06d1b3c043113c2f226b5e1cd32bf5f4b022..ac879f443755c65948c51f592dacc39ceb8f5c25 100644
--- a/.github/workflows/command-bench.yml
+++ b/.github/workflows/command-bench.yml
@@ -91,6 +91,9 @@ jobs:
runs-on: arc-runners-polkadot-sdk-benchmark
container:
image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Download repo
uses: actions/checkout@v4
diff --git a/.github/workflows/command-fmt.yml b/.github/workflows/command-fmt.yml
index c949d0768d7a7d2560dbc154a18082600b8132b5..fc37a17ac549b06e6850ea8a209ec4b27db8fb3f 100644
--- a/.github/workflows/command-fmt.yml
+++ b/.github/workflows/command-fmt.yml
@@ -23,6 +23,9 @@ jobs:
timeout-minutes: 20
container:
image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Download repo
uses: actions/checkout@v4
@@ -34,6 +37,13 @@ jobs:
GH_TOKEN: ${{ github.token }}
- name: Run FMT
run: |
+ cargo --version
+ rustc --version
+ cargo +nightly --version
+ rustc +nightly --version
+
+ cargo +nightly fmt
+
# format toml.
# since paritytech/ci-unified:bullseye-1.73.0-2023-11-01-v20231204 includes taplo-cli
taplo format --config .config/taplo.toml
diff --git a/.github/workflows/command-inform.yml b/.github/workflows/command-inform.yml
index 1c7323c998dfee3ba822f4bcb655c57a958fd80f..2825f4a604605fea8465ce0646d664c9ef5d38f5 100644
--- a/.github/workflows/command-inform.yml
+++ b/.github/workflows/command-inform.yml
@@ -7,9 +7,15 @@ on:
jobs:
comment:
runs-on: ubuntu-latest
+ if: github.event.issue.pull_request && startsWith(github.event.comment.body, 'bot ')
steps:
- name: Inform that the new command exist
- if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, 'bot ') }}
- run: gh pr comment ${{ github.event.issue.number }} --body 'We are migrating this bot to be a GitHub Action Please, see the documentation on how to use it '
- env:
- GH_TOKEN: ${{ github.token }}
+ uses: actions/github-script@v7
+ with:
+ script: |
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: 'We are migrating the command bot to be a GitHub Action Please, see the documentation on how to use it '
+ })
diff --git a/.github/workflows/command-sync.yml b/.github/workflows/command-sync.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c610f4066a873e3fe7304bebd2f4b866fe837a91
--- /dev/null
+++ b/.github/workflows/command-sync.yml
@@ -0,0 +1,71 @@
+name: Command Sync
+
+on:
+ workflow_dispatch:
+ inputs:
+ pr:
+ description: Number of the Pull Request
+ required: true
+ chain:
+ description: Chain
+ type: choice
+ required: true
+ options:
+ - westend
+ - rococo
+ sync-type:
+ description: Sync type
+ type: choice
+ required: true
+ options:
+ - warp
+ - full
+ - fast
+ - fast-unsafe
+
+jobs:
+ set-image:
+ runs-on: ubuntu-latest
+ outputs:
+ IMAGE: ${{ steps.set_image.outputs.IMAGE }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: set_image
+ run: cat .github/env >> $GITHUB_OUTPUT
+ cmd-sync:
+ needs: [set-image]
+ runs-on: arc-runners-polkadot-sdk-warpsync
+ container:
+ image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: Download repo
+ uses: actions/checkout@v4
+ - name: Install gh cli
+ id: gh
+ uses: ./.github/actions/set-up-gh
+ with:
+ pr-number: ${{ inputs.pr }}
+ GH_TOKEN: ${{ github.token }}
+ - name: Run sync
+ run: |
+ "./scripts/sync.sh" --chain "${{ inputs.chain }}" --type "${{ inputs.sync-type }}"
+ - name: Report failure
+ if: ${{ failure() }}
+ run: gh pr comment ${{ inputs.pr }} --body "
Command failed ❌ Run by @${{ github.actor }} for ${{ github.workflow }}
failed. See logs here ."
+ env:
+ RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ GH_TOKEN: ${{ github.token }}
+ - run: git pull --rebase
+ - uses: stefanzweifel/git-auto-commit-action@v5
+ with:
+ commit_message: cmd-action - ${{ github.workflow }}
+ branch: ${{ steps.gh.outputs.branch }}
+ - name: Report succeed
+ run: gh pr comment ${{ inputs.pr }} --body "Action completed 🎉🎉 Run by @${{ github.actor }} for ${{ github.workflow }}
completed 🎉. See logs here ."
+ env:
+ RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ GH_TOKEN: ${{ github.token }}
diff --git a/.github/workflows/command-update-ui.yml b/.github/workflows/command-update-ui.yml
index b6b0420e786899134a5693ca6992391a17d1d98f..860177adc8790c28f7cd5873f4f8e0adf24a044f 100644
--- a/.github/workflows/command-update-ui.yml
+++ b/.github/workflows/command-update-ui.yml
@@ -26,6 +26,9 @@ jobs:
timeout-minutes: 90
container:
image: ${{ needs.set-image.outputs.IMAGE }}
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Download repo
uses: actions/checkout@v4
diff --git a/.github/workflows/misc-sync-templates.yml b/.github/workflows/misc-sync-templates.yml
index d8027014863936ffd6c6a217f282dfa45bc2edd7..835a3116d446c3429a7249bc4822ab0a8faff443 100644
--- a/.github/workflows/misc-sync-templates.yml
+++ b/.github/workflows/misc-sync-templates.yml
@@ -90,7 +90,12 @@ jobs:
"runtime",
]
resolver = "2"
+
+ [workspace.dependencies]
EOF
+
+ echo "$(toml get -r ./runtime/Cargo.toml 'package.name') = { path = \"./runtime\", default-features = false }" >> Cargo.toml
+ echo "$(toml get -r ./pallets/template/Cargo.toml 'package.name') = { path = \"./pallets/template\", default-features = false }" >> Cargo.toml
shell: bash
working-directory: polkadot-sdk/templates/${{ matrix.template }}/
- name: Update workspace configuration
@@ -116,9 +121,12 @@ jobs:
- name: Copy over the new changes
run: |
cp -r polkadot-sdk/templates/${{ matrix.template }}/* "${{ env.template-path }}/"
+
+ - name: Run psvm on monorepo workspace dependencies
+ run: psvm -o -v ${{ github.event.inputs.crate_release_version }} -p ./Cargo.toml
+ working-directory: polkadot-sdk/
- name: Copy over required workspace dependencies
run: |
- echo -e "\n[workspace.dependencies]" >> Cargo.toml
set +e
# If a workspace dependency is required..
while cargo tree --depth 1 --prefix none --no-dedupe 2>&1 | grep 'was not found in `workspace.dependencies`'; do
diff --git a/.github/workflows/release-10_rc-automation.yml b/.github/workflows/release-10_rc-automation.yml
index 7231a8b75886d04ce18bb89fcef99029e3ab14c6..f5c5de8d0da97546d2adfbcdfabd4805d96e8a70 100644
--- a/.github/workflows/release-10_rc-automation.yml
+++ b/.github/workflows/release-10_rc-automation.yml
@@ -1,13 +1,18 @@
name: Release - RC automation
on:
- push:
- branches:
- # Catches release-polkadot-v1.2.3, release-v1.2.3-rc1, etc
- - release-v[0-9]+.[0-9]+.[0-9]+*
- - release-cumulus-v[0-9]+*
- - release-polkadot-v[0-9]+*
+ # TODO: Activate it and delete old branches patterns, when the release process from stable is setteled
+ #push:
+ # branches:
+ # # Catches release-polkadot-v1.2.3, release-v1.2.3-rc1, etc
+ # - release-v[0-9]+.[0-9]+.[0-9]+*
+ # - release-cumulus-v[0-9]+*
+ # - release-polkadot-v[0-9]+*
+ # - stable
workflow_dispatch:
+ inputs:
+ version:
+ description: Current release/rc version in format vX.X.X
jobs:
tag_rc:
@@ -25,28 +30,19 @@ jobs:
with:
fetch-depth: 0
- - name: Get release product
- id: get_rel_product
- shell: bash
- run: |
- current_branch=$(git branch --show-current)
- echo "Current branch: $current_branch"
- if [[ "$current_branch" =~ "release-polkadot" ]]; then
- echo "product=polkadot" >> $GITHUB_OUTPUT
- elif [[ "$current_branch" =~ "release-cumulus" ]]; then
- echo "product=polkadot-parachain" >> $GITHUB_OUTPUT
- fi
-
-
- - name: Compute next rc tag for polkadot
- if: ${{ steps.get_rel_product.outputs.product == 'polkadot' }}
- id: compute_tag_polkadot
+ - name: Compute next rc tag
+ # if: ${{ steps.get_rel_product.outputs.product == 'polkadot' }}
+ id: compute_tag
shell: bash
run: |
. ./.github/scripts/common/lib.sh
# Get last rc tag if exists, else set it to {version}-rc1
- version=$(get_version_from_ghref ${GITHUB_REF})
+ if [[ -z "${{ inputs.version }}" ]]; then
+ version=v$(get_polkadot_node_version_from_code)
+ else
+ version=$(filter_version_from_input ${{ inputs.version }})
+ fi
echo "$version"
echo "version=$version" >> $GITHUB_OUTPUT
@@ -61,28 +57,6 @@ jobs:
echo "first_rc=true" >> $GITHUB_OUTPUT
fi
- - name: Compute next rc tag for polkadot-parachain
- if: ${{ steps.get_rel_product.outputs.product == 'polkadot-parachain' }}
- id: compute_tag_cumulus
- shell: bash
- run: |
- . ./.github/scripts/common/lib.sh
-
- # Get last rc tag if exists, else set it to polkadot-parachains-{version}-rc1
- version=$(get_version_from_ghref ${GITHUB_REF})
- echo "$version"
- echo "version=$version" >> $GITHUB_OUTPUT
-
- last_rc=$(get_latest_rc_tag $version polkadot-parachain)
- if [ -n "$last_rc" ]; then
- suffix=$(increment_rc_tag $last_rc)
- echo "new_tag=polkadot-parachains-$version-rc$suffix" >> $GITHUB_OUTPUT
- echo "first_rc=false" >> $GITHUB_OUTPUT
- else
- echo "new_tag=polkadot-parachain-$version-rc1" >> $GITHUB_OUTPUT
- echo "first_rc=true" >> $GITHUB_OUTPUT
- fi
-
- name: Apply new tag
uses: tvdias/github-tagger@ed7350546e3e503b5e942dffd65bc8751a95e49d # v0.0.2
with:
@@ -90,17 +64,7 @@ jobs:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
# RELEASE_BRANCH_TOKEN requires public_repo OAuth scope
repo-token: "${{ secrets.RELEASE_BRANCH_TOKEN }}"
- tag: ${{ steps.compute_tag_polkadot.outputs.new_tag || steps.compute_tag_cumulus.outputs.new_tag }}
-
- # - id: create-issue
- # uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
- # # Only create the issue if it's the first release candidate
- # if: steps.compute_tag.outputs.first_rc == 'true'
- # env:
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # VERSION: ${{ steps.compute_tag.outputs.version }}
- # with:
- # filename: .github/ISSUE_TEMPLATE/release.md
+ tag: ${{ steps.compute_tag.outputs.new_tag }}
- name: Send Matrix message to ${{ matrix.channel.name }}
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
@@ -110,4 +74,4 @@ jobs:
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
server: m.parity.io
message: |
- Release process for polkadot ${{ steps.compute_tag_polkadot.outputs.new_tag || steps.compute_tag_cumulus.outputs.new_tag }} has been started.
+ Release process for polkadot ${{ steps.compute_tag.outputs.new_tag }} has been started.
diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml
index 4679f58578f7906b75e4a3d6d623ebc1d55df40d..723883eaf64cc4bc620ea306b8205aff4f1dc28b 100644
--- a/.github/workflows/release-50_publish-docker.yml
+++ b/.github/workflows/release-50_publish-docker.yml
@@ -179,6 +179,7 @@ jobs:
release=$( echo $VERSION | cut -f1 -d- )
echo "tag=latest" >> $GITHUB_OUTPUT
echo "release=${release}" >> $GITHUB_OUTPUT
+ echo "stable=stable" >> $GITHUB_OUTPUT
- name: Build Injected Container image for polkadot rc or chain-spec-builder
if: ${{ env.BINARY == 'polkadot' || env.BINARY == 'chain-spec-builder' }}
@@ -294,6 +295,7 @@ jobs:
# TODO: The owner should be used below but buildx does not resolve the VARs
# TODO: It would be good to get rid of this GHA that we don't really need.
tags: |
+ parity/polkadot:stable
parity/polkadot:latest
parity/polkadot:${{ needs.fetch-latest-debian-package-version.outputs.polkadot_container_tag }}
build-args: |
diff --git a/.github/workflows/release-srtool.yml b/.github/workflows/release-srtool.yml
index 69a4bdbdda9ae87a188a23bceb9185d813424a98..e98269fecab0085f1fd6f32acb3aea9b98a5f235 100644
--- a/.github/workflows/release-srtool.yml
+++ b/.github/workflows/release-srtool.yml
@@ -5,11 +5,6 @@ env:
TOML_CLI_VERSION: 0.2.4
on:
- push:
- branches:
- - release-v[0-9]+.[0-9]+.[0-9]+*
- - release-cumulus-v[0-9]+*
- - release-polkadot-v[0-9]+*
workflow_call:
inputs:
excluded_runtimes:
diff --git a/.gitignore b/.gitignore
index 2f1631fb4b9d14496021907cca96b4cdf4902eb8..e3e382af6195ed4692672285a14e1cf5f1600a85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
*.orig
*.rej
*.swp
+*.wasm
**/._*
**/.criterion/
**/*.rs.bk
diff --git a/Cargo.lock b/Cargo.lock
index 41915bf0feb17710eb7a90acbd2179c9f301de6d..ac007fdf9c30f1fbb040bd5a7e9190862dd32f62 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -158,7 +158,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
"syn-solidity",
"tiny-keccak",
@@ -262,9 +262,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.81"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
+checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "approx"
@@ -285,7 +285,7 @@ dependencies = [
"itertools 0.10.5",
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -484,7 +484,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44"
dependencies = [
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -494,7 +494,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348"
dependencies = [
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -506,7 +506,7 @@ checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20"
dependencies = [
"num-bigint",
"num-traits",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -519,7 +519,7 @@ dependencies = [
"num-bigint",
"num-traits",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -621,7 +621,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -725,7 +725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
"synstructure 0.12.6",
]
@@ -737,7 +737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
"synstructure 0.13.1",
]
@@ -749,7 +749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -760,15 +760,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
[[package]]
name = "assert_cmd"
-version = "2.0.12"
+version = "2.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6"
+checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8"
dependencies = [
"anstyle",
"bstr",
@@ -896,7 +896,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -1026,7 +1025,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -1062,7 +1060,6 @@ dependencies = [
"parity-scale-codec",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-parachain-info",
"staging-xcm",
"staging-xcm-builder",
@@ -1085,7 +1082,6 @@ dependencies = [
"scale-info",
"sp-api",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -1098,7 +1094,7 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5"
dependencies = [
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -1210,7 +1206,7 @@ checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
"event-listener 5.2.0",
"event-listener-strategy",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -1264,7 +1260,7 @@ dependencies = [
"log",
"memchr",
"once_cell",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"pin-utils",
"slab",
"wasm-bindgen-futures",
@@ -1278,7 +1274,7 @@ checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"
dependencies = [
"async-stream-impl",
"futures-core",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -1288,7 +1284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -1305,7 +1301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -1319,7 +1315,7 @@ dependencies = [
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -1364,7 +1360,7 @@ checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89"
dependencies = [
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -1512,7 +1508,7 @@ dependencies = [
"peeking_take_while",
"prettyplease 0.2.12",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"regex",
"rustc-hash",
"shlex",
@@ -2036,7 +2032,6 @@ dependencies = [
"snowbridge-core",
"sp-core",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
]
@@ -2216,7 +2211,6 @@ dependencies = [
"sp-io",
"sp-keyring",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"staging-xcm",
"staging-xcm-builder",
@@ -2359,7 +2353,6 @@ dependencies = [
"bp-xcm-bridge-hub-router",
"frame-support",
"frame-system",
- "hash-db",
"log",
"pallet-balances",
"pallet-bridge-grandpa",
@@ -2370,8 +2363,6 @@ dependencies = [
"pallet-utility",
"parity-scale-codec",
"scale-info",
- "sp-api",
- "sp-core",
"sp-io",
"sp-runtime",
"sp-std 14.0.0",
@@ -2619,7 +2610,6 @@ dependencies = [
"sp-genesis-builder",
"sp-keyring",
"sp-runtime",
- "sp-std 14.0.0",
"staging-chain-spec-builder",
"substrate-wasm-builder",
]
@@ -2765,12 +2755,12 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.3"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813"
+checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
dependencies = [
"clap_builder",
- "clap_derive 4.5.3",
+ "clap_derive 4.5.8",
]
[[package]]
@@ -2784,9 +2774,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.2"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
+checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
dependencies = [
"anstream",
"anstyle",
@@ -2801,7 +2791,7 @@ version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
]
[[package]]
@@ -2813,19 +2803,19 @@ dependencies = [
"heck 0.4.1",
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
[[package]]
name = "clap_derive"
-version = "4.5.3"
+version = "4.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f"
+checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085"
dependencies = [
"heck 0.5.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -2969,7 +2959,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -3013,7 +3002,7 @@ checksum = "d51beaa537d73d2d1ff34ee70bc095f170420ab2ec5d687ecd3ec2b0d092514b"
dependencies = [
"nom",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -3226,7 +3215,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -3270,6 +3258,36 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "coretime-rococo-emulated-chain"
+version = "0.0.0"
+dependencies = [
+ "coretime-rococo-runtime",
+ "cumulus-primitives-core",
+ "emulated-integration-tests-common",
+ "frame-support",
+ "parachains-common",
+ "sp-core",
+ "testnet-parachains-constants",
+]
+
+[[package]]
+name = "coretime-rococo-integration-tests"
+version = "0.1.0"
+dependencies = [
+ "emulated-integration-tests-common",
+ "frame-support",
+ "pallet-balances",
+ "pallet-identity",
+ "pallet-message-queue",
+ "polkadot-runtime-common",
+ "rococo-runtime-constants",
+ "rococo-system-emulated-network",
+ "sp-runtime",
+ "staging-xcm",
+ "staging-xcm-executor",
+]
+
[[package]]
name = "coretime-rococo-runtime"
version = "0.1.0"
@@ -3324,7 +3342,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -3337,6 +3354,36 @@ dependencies = [
"xcm-runtime-apis",
]
+[[package]]
+name = "coretime-westend-emulated-chain"
+version = "0.0.0"
+dependencies = [
+ "coretime-westend-runtime",
+ "cumulus-primitives-core",
+ "emulated-integration-tests-common",
+ "frame-support",
+ "parachains-common",
+ "sp-core",
+ "testnet-parachains-constants",
+]
+
+[[package]]
+name = "coretime-westend-integration-tests"
+version = "0.1.0"
+dependencies = [
+ "emulated-integration-tests-common",
+ "frame-support",
+ "pallet-balances",
+ "pallet-identity",
+ "pallet-message-queue",
+ "polkadot-runtime-common",
+ "sp-runtime",
+ "staging-xcm",
+ "staging-xcm-executor",
+ "westend-runtime-constants",
+ "westend-system-emulated-network",
+]
+
[[package]]
name = "coretime-westend-runtime"
version = "0.1.0"
@@ -3389,7 +3436,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -3571,7 +3617,7 @@ dependencies = [
"anes",
"cast",
"ciborium",
- "clap 4.5.3",
+ "clap 4.5.9",
"criterion-plot",
"futures",
"is-terminal",
@@ -3705,7 +3751,7 @@ dependencies = [
name = "cumulus-client-cli"
version = "0.7.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"parity-scale-codec",
"sc-chain-spec",
"sc-cli",
@@ -3913,7 +3959,6 @@ dependencies = [
"sp-inherents",
"sp-runtime",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-trie",
"tracing",
@@ -4005,7 +4050,6 @@ dependencies = [
"sp-application-crypto",
"sp-consensus-aura",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -4022,7 +4066,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"staging-xcm",
]
@@ -4082,7 +4125,7 @@ version = "0.6.0"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4096,7 +4139,6 @@ dependencies = [
"pallet-session",
"parity-scale-codec",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -4111,7 +4153,6 @@ dependencies = [
"polkadot-primitives",
"scale-info",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -4125,7 +4166,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
]
@@ -4150,7 +4190,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -4167,10 +4206,27 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
]
+[[package]]
+name = "cumulus-pov-validator"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "clap 4.5.9",
+ "parity-scale-codec",
+ "polkadot-node-primitives",
+ "polkadot-parachain-primitives",
+ "polkadot-primitives",
+ "sc-executor",
+ "sp-core",
+ "sp-io",
+ "sp-maybe-compressed-blob",
+ "tracing",
+ "tracing-subscriber 0.3.18",
+]
+
[[package]]
name = "cumulus-primitives-aura"
version = "0.7.0"
@@ -4181,7 +4237,6 @@ dependencies = [
"sp-api",
"sp-consensus-aura",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -4195,7 +4250,6 @@ dependencies = [
"scale-info",
"sp-api",
"sp-runtime",
- "sp-std 14.0.0",
"sp-trie",
"staging-xcm",
]
@@ -4212,7 +4266,6 @@ dependencies = [
"sp-inherents",
"sp-runtime",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-trie",
]
@@ -4243,7 +4296,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-trie",
]
@@ -4255,7 +4307,6 @@ dependencies = [
"futures",
"parity-scale-codec",
"sp-inherents",
- "sp-std 14.0.0",
"sp-timestamp",
]
@@ -4272,7 +4323,6 @@ dependencies = [
"polkadot-runtime-parachains",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -4442,7 +4492,6 @@ dependencies = [
"polkadot-primitives",
"sp-runtime",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-trie",
]
@@ -4481,7 +4530,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-version",
"staging-parachain-info",
@@ -4493,7 +4541,7 @@ name = "cumulus-test-service"
version = "0.1.0"
dependencies = [
"async-trait",
- "clap 4.5.3",
+ "clap 4.5.9",
"criterion",
"cumulus-client-cli",
"cumulus-client-collator",
@@ -4622,7 +4670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4661,7 +4709,7 @@ dependencies = [
"codespan-reporting",
"once_cell",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"scratch",
"syn 2.0.61",
]
@@ -4679,7 +4727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4782,7 +4830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -4793,7 +4841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4804,7 +4852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4816,7 +4864,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [
"convert_case",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"rustc_version 0.4.0",
"syn 1.0.109",
]
@@ -4912,7 +4960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -4972,7 +5020,7 @@ dependencies = [
"derive-syn-parse",
"once_cell",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"regex",
"syn 2.0.61",
"termcolor",
@@ -5021,7 +5069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -5167,7 +5215,7 @@ checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -5179,7 +5227,7 @@ checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -5199,18 +5247,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
[[package]]
name = "enumn"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b"
+checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -5382,7 +5430,7 @@ checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91"
dependencies = [
"concurrent-queue",
"parking",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -5392,7 +5440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
dependencies = [
"event-listener 5.2.0",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -5406,14 +5454,16 @@ dependencies = [
[[package]]
name = "expander"
-version = "2.0.0"
+version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7"
+checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2"
dependencies = [
"blake2 0.10.6",
+ "file-guard",
"fs-err",
+ "prettyplease 0.2.12",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -5485,7 +5535,7 @@ dependencies = [
"indexmap 2.2.3",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -5544,6 +5594,16 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
+[[package]]
+name = "file-guard"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
[[package]]
name = "file-per-thread-logger"
version = "0.1.6"
@@ -5677,9 +5737,9 @@ dependencies = [
[[package]]
name = "form_urlencoded"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
"percent-encoding",
]
@@ -5732,7 +5792,6 @@ dependencies = [
"sp-keystore",
"sp-runtime",
"sp-runtime-interface 24.0.0",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"static_assertions",
]
@@ -5744,7 +5803,7 @@ dependencies = [
"Inflector",
"array-bytes",
"chrono",
- "clap 4.5.3",
+ "clap 4.5.9",
"comfy-table",
"frame-benchmarking",
"frame-support",
@@ -5797,7 +5856,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -5809,7 +5867,7 @@ dependencies = [
"parity-scale-codec",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"scale-info",
"sp-arithmetic",
"syn 2.0.61",
@@ -5831,14 +5889,13 @@ dependencies = [
"sp-io",
"sp-npos-elections",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
name = "frame-election-solution-type-fuzzer"
version = "2.0.0-alpha.5"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"frame-election-provider-solution-type",
"frame-election-provider-support",
"frame-support",
@@ -5869,7 +5926,6 @@ dependencies = [
"sp-inherents",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"sp-version",
]
@@ -5911,7 +5967,7 @@ dependencies = [
name = "frame-omni-bencher"
version = "0.1.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"cumulus-primitives-proof-size-hostfunction",
"env_logger 0.11.3",
"frame-benchmarking-cli",
@@ -6001,7 +6057,7 @@ dependencies = [
"macro_magic",
"proc-macro-warning 1.0.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"regex",
"sp-crypto-hashing",
"syn 2.0.61",
@@ -6014,7 +6070,7 @@ dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -6023,7 +6079,7 @@ name = "frame-support-procedural-tools-derive"
version = "11.0.0"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -6049,7 +6105,6 @@ dependencies = [
"sp-metadata-ir",
"sp-runtime",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-version",
"static_assertions",
"trybuild",
@@ -6124,7 +6179,6 @@ dependencies = [
"sp-externalities 0.25.0",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-version",
]
@@ -6145,7 +6199,6 @@ dependencies = [
"parity-scale-codec",
"sp-api",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -6256,7 +6309,7 @@ dependencies = [
"futures-io",
"memchr",
"parking",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"waker-fn",
]
@@ -6267,7 +6320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
dependencies = [
"futures-core",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -6277,7 +6330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -6322,7 +6375,7 @@ dependencies = [
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"pin-utils",
"slab",
]
@@ -6483,7 +6536,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -6781,7 +6833,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
"bytes",
"http 0.2.9",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -6804,7 +6856,7 @@ dependencies = [
"futures-util",
"http 1.1.0",
"http-body 1.0.0",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
]
[[package]]
@@ -6841,7 +6893,7 @@ dependencies = [
"httparse",
"httpdate",
"itoa",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"socket2 0.5.7",
"tokio",
"tower-service",
@@ -6864,7 +6916,7 @@ dependencies = [
"httparse",
"httpdate",
"itoa",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"smallvec",
"tokio",
"want",
@@ -6916,7 +6968,7 @@ dependencies = [
"http 1.1.0",
"http-body 1.0.0",
"hyper 1.3.1",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"socket2 0.5.7",
"tokio",
"tower",
@@ -6968,6 +7020,16 @@ dependencies = [
"unicode-normalization",
]
+[[package]]
+name = "idna"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
[[package]]
name = "if-addrs"
version = "0.10.2"
@@ -7061,7 +7123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -7081,7 +7143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
]
[[package]]
@@ -7425,7 +7487,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -7622,9 +7684,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libc"
-version = "0.2.153"
+version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libflate"
@@ -8013,7 +8075,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro-warning 0.4.2",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8085,9 +8147,9 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3facf0691bab65f571bc97c6c65ffa836248ca631d631b7691ac91deb7fceb5f"
+checksum = "004ee9c4a4631435169aee6aad2f62e3984dc031c43b6d29731e8e82a016c538"
dependencies = [
"either",
"futures",
@@ -8096,9 +8158,10 @@ dependencies = [
"libp2p-identity",
"log",
"parking_lot 0.12.3",
- "quicksink",
+ "pin-project-lite",
"rw-stream-sink",
- "soketto 0.7.1",
+ "soketto 0.8.0",
+ "thiserror",
"url",
"webpki-roots 0.25.2",
]
@@ -8339,9 +8402,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.21"
+version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
dependencies = [
"serde",
"value-bag",
@@ -8426,7 +8489,7 @@ checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d"
dependencies = [
"macro_magic_core",
"macro_magic_macros",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8440,7 +8503,7 @@ dependencies = [
"derive-syn-parse",
"macro_magic_core_macros",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8451,7 +8514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8462,7 +8525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869"
dependencies = [
"macro_magic_core",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8605,7 +8668,6 @@ dependencies = [
"async-std",
"async-trait",
"bp-messages",
- "env_logger 0.11.3",
"finality-relay",
"futures",
"hex",
@@ -8656,7 +8718,7 @@ dependencies = [
name = "minimal-template-node"
version = "0.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"docify",
"futures",
"futures-timer",
@@ -8827,7 +8889,7 @@ checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb"
dependencies = [
"cfg-if",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -8839,7 +8901,7 @@ checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2"
dependencies = [
"cfg-if",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -8951,7 +9013,7 @@ dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
"synstructure 0.12.6",
]
@@ -8999,7 +9061,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -9149,7 +9211,7 @@ name = "node-bench"
version = "0.9.0-dev"
dependencies = [
"array-bytes",
- "clap 4.5.3",
+ "clap 4.5.9",
"derive_more",
"fs_extra",
"futures",
@@ -9228,7 +9290,7 @@ dependencies = [
name = "node-runtime-generate-bags"
version = "3.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"generate-bags",
"kitchensink-runtime",
]
@@ -9237,7 +9299,7 @@ dependencies = [
name = "node-template-release"
version = "3.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"flate2",
"fs_extra",
"glob",
@@ -9386,7 +9448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -9553,7 +9615,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -9593,9 +9655,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "orchestra"
-version = "0.3.6"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92829eef0328a3d1cd22a02c0e51deb92a5362df3e7d21a4e9bdc38934694e66"
+checksum = "41f6bbacc8c189a3f2e45e0fd0436e5d97f194db888e721bdbc3973e7dbed4c2"
dependencies = [
"async-trait",
"dyn-clonable",
@@ -9610,9 +9672,9 @@ dependencies = [
[[package]]
name = "orchestra-proc-macro"
-version = "0.3.6"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355"
+checksum = "f7b1d40dd8f367db3c65bec8d3dd47d4a604ee8874480738f93191bddab4e0e0"
dependencies = [
"expander",
"indexmap 2.2.3",
@@ -9620,7 +9682,7 @@ dependencies = [
"petgraph",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -9669,7 +9731,6 @@ dependencies = [
"sp-crypto-hashing",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9690,7 +9751,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9711,7 +9771,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9729,7 +9788,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
]
@@ -9746,7 +9804,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9767,7 +9824,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
]
@@ -9818,7 +9874,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9836,7 +9891,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9853,7 +9907,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9868,7 +9921,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9896,7 +9948,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -9916,7 +9967,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
]
@@ -9964,7 +10014,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -9992,7 +10041,6 @@ dependencies = [
"sp-session",
"sp-staking",
"sp-state-machine",
- "sp-std 14.0.0",
]
[[package]]
@@ -10017,7 +10065,6 @@ dependencies = [
"sp-runtime",
"sp-staking",
"sp-state-machine",
- "sp-std 14.0.0",
]
[[package]]
@@ -10035,7 +10082,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10069,7 +10115,6 @@ dependencies = [
"bp-header-chain",
"bp-runtime",
"bp-test-utils",
- "finality-grandpa",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10081,13 +10126,13 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-std 14.0.0",
- "sp-trie",
]
[[package]]
name = "pallet-bridge-messages"
version = "0.7.0"
dependencies = [
+ "bp-header-chain",
"bp-messages",
"bp-runtime",
"bp-test-utils",
@@ -10095,13 +10140,15 @@ dependencies = [
"frame-support",
"frame-system",
"log",
- "num-traits",
"pallet-balances",
+ "pallet-bridge-grandpa",
"parity-scale-codec",
"scale-info",
+ "sp-core",
"sp-io",
"sp-runtime",
"sp-std 14.0.0",
+ "sp-trie",
]
[[package]]
@@ -10124,7 +10171,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-std 14.0.0",
- "sp-trie",
]
[[package]]
@@ -10165,7 +10211,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
]
@@ -10185,7 +10230,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10209,7 +10253,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
]
@@ -10226,7 +10269,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10241,7 +10283,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10334,7 +10375,6 @@ dependencies = [
"sp-io",
"sp-keystore",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"staging-xcm",
"staging-xcm-builder",
@@ -10347,7 +10387,7 @@ name = "pallet-contracts-proc-macro"
version = "18.0.0"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -10378,7 +10418,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10396,7 +10435,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10410,7 +10448,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10431,7 +10468,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"substrate-test-utils",
]
@@ -10453,7 +10489,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10469,7 +10504,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10519,7 +10553,6 @@ dependencies = [
"sp-io",
"sp-npos-elections",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"strum 0.26.2",
]
@@ -10534,7 +10567,6 @@ dependencies = [
"parity-scale-codec",
"sp-npos-elections",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10553,7 +10585,6 @@ dependencies = [
"sp-npos-elections",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"substrate-test-utils",
]
@@ -10572,7 +10603,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10598,7 +10628,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10629,7 +10658,6 @@ dependencies = [
"sp-io",
"sp-keystore",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10648,7 +10676,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-version",
]
@@ -10664,7 +10691,6 @@ dependencies = [
"scale-info",
"sp-core",
"sp-io",
- "sp-std 14.0.0",
]
[[package]]
@@ -10680,7 +10706,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10718,7 +10743,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"substrate-test-utils",
]
@@ -10739,7 +10763,6 @@ dependencies = [
"sp-inherents",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10769,7 +10792,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -10788,7 +10810,6 @@ dependencies = [
"sp-io",
"sp-keystore",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10808,7 +10829,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -10825,7 +10845,6 @@ dependencies = [
"sp-io",
"sp-keyring",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10840,7 +10859,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10857,7 +10875,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10873,7 +10890,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10895,7 +10911,6 @@ dependencies = [
"sp-crypto-hashing",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"sp-weights",
]
@@ -10919,7 +10934,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"sp-version",
]
@@ -10949,7 +10963,6 @@ dependencies = [
"sp-io",
"sp-mixnet",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10969,7 +10982,6 @@ dependencies = [
"sp-io",
"sp-mmr-primitives",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -10985,7 +10997,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11023,7 +11034,6 @@ dependencies = [
"sp-io",
"sp-keystore",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11033,7 +11043,6 @@ dependencies = [
"pallet-nfts",
"parity-scale-codec",
"sp-api",
- "sp-std 14.0.0",
]
[[package]]
@@ -11050,7 +11059,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11065,7 +11073,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11082,7 +11089,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
]
@@ -11108,7 +11114,6 @@ dependencies = [
"sp-runtime",
"sp-runtime-interface 24.0.0",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -11133,7 +11138,6 @@ dependencies = [
"pallet-nomination-pools",
"parity-scale-codec",
"sp-api",
- "sp-std 14.0.0",
]
[[package]]
@@ -11200,7 +11204,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -11227,7 +11230,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -11244,7 +11246,6 @@ dependencies = [
"sp-io",
"sp-metadata-ir",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11270,7 +11271,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11290,7 +11290,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11307,7 +11306,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11324,7 +11322,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11342,7 +11339,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11358,7 +11354,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11380,7 +11375,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11396,7 +11390,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11431,7 +11424,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11451,7 +11443,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11469,7 +11460,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11488,7 +11478,6 @@ dependencies = [
"sp-crypto-hashing",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11506,7 +11495,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-weights",
"substrate-test-utils",
]
@@ -11523,7 +11511,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11543,7 +11530,6 @@ dependencies = [
"sp-session",
"sp-staking",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-trie",
]
@@ -11567,7 +11553,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
]
[[package]]
@@ -11579,7 +11564,6 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11600,7 +11584,6 @@ dependencies = [
"sp-crypto-hashing",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11628,7 +11611,6 @@ dependencies = [
"sp-npos-elections",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"substrate-test-utils",
]
@@ -11639,7 +11621,7 @@ version = "11.0.0"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"sp-runtime",
"syn 2.0.61",
]
@@ -11678,7 +11660,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"substrate-state-trie-migration-rpc",
"thousands",
@@ -11701,7 +11682,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-statement-store",
- "sp-std 14.0.0",
]
[[package]]
@@ -11717,7 +11697,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11749,7 +11728,6 @@ dependencies = [
"sp-inherents",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-timestamp",
]
@@ -11770,7 +11748,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
]
@@ -11788,7 +11765,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11834,7 +11810,6 @@ dependencies = [
"sp-inherents",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-transaction-storage-proof",
]
@@ -11855,7 +11830,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11874,7 +11848,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11910,7 +11883,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11927,7 +11899,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11945,7 +11916,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -11967,7 +11937,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -11991,7 +11960,6 @@ dependencies = [
"scale-info",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"staging-xcm",
"staging-xcm-builder",
@@ -12046,7 +12014,7 @@ dependencies = [
name = "parachain-template-node"
version = "0.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"color-print",
"cumulus-client-cli",
"cumulus-client-collator",
@@ -12152,7 +12120,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-version",
"staging-parachain-info",
@@ -12185,7 +12152,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"staging-parachain-info",
"staging-xcm",
"staging-xcm-executor",
@@ -12230,7 +12196,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"staging-parachain-info",
"staging-xcm",
@@ -12300,7 +12265,7 @@ checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -12412,9 +12377,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pbkdf2"
@@ -12504,7 +12469,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -12602,7 +12566,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -12700,7 +12663,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -12716,9 +12678,9 @@ dependencies = [
[[package]]
name = "percent-encoding"
-version = "2.3.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pest"
@@ -12749,7 +12711,7 @@ dependencies = [
"pest",
"pest_meta",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -12790,21 +12752,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
[[package]]
name = "pin-project-lite"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.12"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05"
+checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]]
name = "pin-utils"
@@ -13018,7 +12974,7 @@ name = "polkadot-cli"
version = "7.0.0"
dependencies = [
"cfg-if",
- "clap 4.5.3",
+ "clap 4.5.9",
"frame-benchmarking-cli",
"futures",
"log",
@@ -13081,7 +13037,6 @@ dependencies = [
"scale-info",
"sp-core",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -13877,7 +13832,7 @@ dependencies = [
"async-trait",
"bridge-hub-rococo-runtime",
"bridge-hub-westend-runtime",
- "clap 4.5.3",
+ "clap 4.5.9",
"collectives-westend-runtime",
"color-print",
"contracts-rococo-runtime",
@@ -13894,6 +13849,7 @@ dependencies = [
"cumulus-primitives-aura",
"cumulus-primitives-core",
"cumulus-relay-chain-interface",
+ "docify",
"frame-benchmarking",
"frame-benchmarking-cli",
"frame-support",
@@ -13976,7 +13932,6 @@ dependencies = [
"serde",
"sp-core",
"sp-runtime",
- "sp-std 14.0.0",
"sp-weights",
]
@@ -14003,7 +13958,6 @@ dependencies = [
"sp-keystore",
"sp-runtime",
"sp-staking",
- "sp-std 14.0.0",
]
[[package]]
@@ -14101,7 +14055,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -14116,7 +14069,6 @@ dependencies = [
"frame-benchmarking",
"parity-scale-codec",
"polkadot-primitives",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
]
@@ -14142,6 +14094,7 @@ dependencies = [
"pallet-balances",
"pallet-broker",
"pallet-message-queue",
+ "pallet-mmr",
"pallet-session",
"pallet-staking",
"pallet-timestamp",
@@ -14677,7 +14630,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -14864,7 +14816,7 @@ dependencies = [
"async-trait",
"bincode",
"bitvec",
- "clap 4.5.3",
+ "clap 4.5.9",
"clap-num",
"color-eyre",
"colored",
@@ -14962,7 +14914,7 @@ version = "1.0.0"
dependencies = [
"assert_matches",
"async-trait",
- "clap 4.5.3",
+ "clap 4.5.9",
"color-eyre",
"futures",
"futures-timer",
@@ -15037,7 +14989,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-trie",
"sp-version",
@@ -15105,7 +15056,7 @@ dependencies = [
name = "polkadot-voter-bags"
version = "7.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"generate-bags",
"sp-io",
"westend-runtime",
@@ -15159,7 +15110,7 @@ checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c"
dependencies = [
"polkavm-common",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -15206,7 +15157,7 @@ dependencies = [
"concurrent-queue",
"libc",
"log",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"windows-sys 0.48.0",
]
@@ -15218,7 +15169,7 @@ checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14"
dependencies = [
"cfg-if",
"concurrent-queue",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"rustix 0.38.21",
"tracing",
"windows-sys 0.52.0",
@@ -15418,7 +15369,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
"version_check",
]
@@ -15430,7 +15381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"version_check",
]
@@ -15447,7 +15398,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -15458,7 +15409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -15539,7 +15490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -15647,7 +15598,7 @@ dependencies = [
"anyhow",
"itertools 0.10.5",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -15660,7 +15611,7 @@ dependencies = [
"anyhow",
"itertools 0.11.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -15787,17 +15738,6 @@ dependencies = [
"rand",
]
-[[package]]
-name = "quicksink"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"
-dependencies = [
- "futures-core",
- "futures-sink",
- "pin-project-lite 0.1.12",
-]
-
[[package]]
name = "quinn"
version = "0.9.4"
@@ -15805,7 +15745,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e"
dependencies = [
"bytes",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"quinn-proto 0.9.6",
"quinn-udp 0.3.2",
"rustc-hash",
@@ -15824,7 +15764,7 @@ checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75"
dependencies = [
"bytes",
"futures-io",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"quinn-proto 0.10.6",
"quinn-udp 0.4.1",
"rustc-hash",
@@ -15906,9 +15846,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.35"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
dependencies = [
"proc-macro2 1.0.82",
]
@@ -16110,7 +16050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -16207,13 +16147,10 @@ dependencies = [
"bp-runtime",
"finality-relay",
"frame-support",
- "frame-system",
"futures",
"jsonrpsee",
"log",
"num-traits",
- "pallet-balances",
- "pallet-bridge-messages",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-utility",
@@ -16268,7 +16205,7 @@ dependencies = [
name = "remote-ext-tests-bags-list"
version = "1.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"frame-system",
"log",
"pallet-bags-list-remote-tests",
@@ -16301,7 +16238,7 @@ dependencies = [
"mime",
"once_cell",
"percent-encoding",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"rustls 0.21.7",
"rustls-pemfile 1.0.3",
"serde",
@@ -16466,7 +16403,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-version",
"staging-parachain-info",
@@ -16568,7 +16504,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-tracing 16.0.0",
"sp-transaction-pool",
@@ -16605,6 +16540,7 @@ version = "0.0.0"
dependencies = [
"asset-hub-rococo-emulated-chain",
"bridge-hub-rococo-emulated-chain",
+ "coretime-rococo-emulated-chain",
"emulated-integration-tests-common",
"penpal-emulated-chain",
"people-rococo-emulated-chain",
@@ -16663,7 +16599,7 @@ dependencies = [
"cfg-if",
"glob",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"regex",
"relative-path",
"rustc_version 0.4.0",
@@ -17118,7 +17054,7 @@ name = "sc-chain-spec"
version = "28.0.0"
dependencies = [
"array-bytes",
- "clap 4.5.3",
+ "clap 4.5.9",
"docify",
"log",
"memmap2 0.9.3",
@@ -17151,7 +17087,7 @@ version = "11.0.0"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -17161,7 +17097,7 @@ version = "0.36.0"
dependencies = [
"array-bytes",
"chrono",
- "clap 4.5.3",
+ "clap 4.5.9",
"fdlimit",
"futures",
"futures-timer",
@@ -18207,7 +18143,6 @@ dependencies = [
"sp-io",
"sp-runtime",
"sp-runtime-interface 24.0.0",
- "sp-std 14.0.0",
"substrate-wasm-builder",
]
@@ -18346,7 +18281,7 @@ dependencies = [
name = "sc-storage-monitor"
version = "0.16.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"fs4",
"log",
"sp-core",
@@ -18448,7 +18383,7 @@ version = "11.0.0"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -18562,7 +18497,7 @@ checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62"
dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -18600,7 +18535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"serde_derive_internals",
"syn 1.0.109",
]
@@ -18797,7 +18732,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-version",
"staging-parachain-info",
@@ -18869,9 +18803,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5"
[[package]]
name = "serde"
-version = "1.0.197"
+version = "1.0.204"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
+checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
dependencies = [
"serde_derive",
]
@@ -18896,12 +18830,12 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.197"
+version = "1.0.204"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
+checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -18912,7 +18846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -18927,9 +18861,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.114"
+version = "1.0.120"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
+checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
dependencies = [
"indexmap 2.2.3",
"itoa",
@@ -18960,9 +18894,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
-version = "0.9.33"
+version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9"
+checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
"indexmap 2.2.3",
"itoa",
@@ -19002,7 +18936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -19121,7 +19055,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-transaction-pool",
"sp-version",
"staging-parachain-info",
@@ -19228,7 +19161,6 @@ dependencies = [
"parity-scale-codec",
"paste",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -19771,7 +19703,7 @@ dependencies = [
name = "solochain-template-node"
version = "0.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"frame-benchmarking-cli",
"frame-system",
"futures",
@@ -19837,7 +19769,6 @@ dependencies = [
"sp-offchain",
"sp-runtime",
"sp-session",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-transaction-pool",
"sp-version",
@@ -19860,7 +19791,6 @@ dependencies = [
"sp-runtime",
"sp-runtime-interface 24.0.0",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-test-primitives",
"sp-trie",
"sp-version",
@@ -19877,7 +19807,7 @@ dependencies = [
"expander",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -19913,7 +19843,6 @@ dependencies = [
"serde",
"sp-core",
"sp-io",
- "sp-std 14.0.0",
]
[[package]]
@@ -19941,7 +19870,6 @@ dependencies = [
"scale-info",
"serde",
"sp-crypto-hashing",
- "sp-std 14.0.0",
"static_assertions",
]
@@ -19999,7 +19927,6 @@ name = "sp-blockchain"
version = "28.0.0"
dependencies = [
"futures",
- "log",
"parity-scale-codec",
"parking_lot 0.12.3",
"schnellru",
@@ -20010,6 +19937,7 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"thiserror",
+ "tracing",
]
[[package]]
@@ -20262,7 +20190,7 @@ dependencies = [
name = "sp-crypto-hashing-proc-macro"
version = "0.1.0"
dependencies = [
- "quote 1.0.35",
+ "quote 1.0.36",
"sp-crypto-hashing",
"syn 2.0.61",
]
@@ -20281,7 +20209,7 @@ version = "8.0.0"
source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -20290,7 +20218,7 @@ name = "sp-debug-derive"
version = "14.0.0"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -20357,7 +20285,6 @@ dependencies = [
"sp-keystore",
"sp-runtime-interface 24.0.0",
"sp-state-machine",
- "sp-std 14.0.0",
"sp-tracing 16.0.0",
"sp-trie",
"tracing",
@@ -20447,7 +20374,7 @@ dependencies = [
name = "sp-npos-elections-fuzzer"
version = "2.0.0-alpha.5"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"honggfuzz",
"rand",
"sp-npos-elections",
@@ -20563,7 +20490,7 @@ dependencies = [
"Inflector",
"proc-macro-crate 1.3.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -20575,7 +20502,7 @@ dependencies = [
"expander",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -20603,7 +20530,6 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime-interface 24.0.0",
- "sp-std 14.0.0",
"substrate-wasm-builder",
]
@@ -20837,7 +20763,7 @@ version = "13.0.0"
dependencies = [
"parity-scale-codec",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"sp-version",
"syn 2.0.61",
]
@@ -20922,7 +20848,7 @@ dependencies = [
"Inflector",
"num-format",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"serde",
"serde_json",
"unicode-xid 0.2.4",
@@ -20947,7 +20873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -20961,7 +20887,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
name = "staging-chain-spec-builder"
version = "1.6.1"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"log",
"sc-chain-spec",
"serde_json",
@@ -20974,7 +20900,7 @@ version = "3.0.0-dev"
dependencies = [
"array-bytes",
"assert_cmd",
- "clap 4.5.3",
+ "clap 4.5.9",
"clap_complete",
"criterion",
"futures",
@@ -20988,6 +20914,7 @@ dependencies = [
"parity-scale-codec",
"platforms",
"polkadot-sdk",
+ "pretty_assertions",
"rand",
"regex",
"sc-service-test",
@@ -21008,7 +20935,7 @@ dependencies = [
name = "staging-node-inspect"
version = "0.12.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"parity-scale-codec",
"sc-cli",
"sc-client-api",
@@ -21031,7 +20958,6 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
@@ -21055,6 +20981,7 @@ dependencies = [
"schemars",
"serde",
"sp-io",
+ "sp-runtime",
"sp-weights",
"xcm-procedural",
]
@@ -21083,7 +21010,6 @@ dependencies = [
"sp-arithmetic",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-weights",
"staging-xcm",
"staging-xcm-executor",
@@ -21097,16 +21023,15 @@ dependencies = [
"frame-benchmarking",
"frame-support",
"impl-trait-for-tuples",
- "log",
"parity-scale-codec",
"scale-info",
"sp-arithmetic",
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
"sp-weights",
"staging-xcm",
+ "tracing",
]
[[package]]
@@ -21139,7 +21064,7 @@ dependencies = [
"cfg_aliases",
"memchr",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -21212,7 +21137,7 @@ dependencies = [
"heck 0.3.3",
"proc-macro-error",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -21248,7 +21173,7 @@ checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"rustversion",
"syn 1.0.109",
]
@@ -21261,7 +21186,7 @@ checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"rustversion",
"syn 2.0.61",
]
@@ -21274,7 +21199,7 @@ checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"rustversion",
"syn 2.0.61",
]
@@ -21283,7 +21208,7 @@ dependencies = [
name = "subkey"
version = "9.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"sc-cli",
]
@@ -21388,9 +21313,7 @@ dependencies = [
"bp-polkadot-core",
"bp-relayers",
"bp-runtime",
- "bridge-runtime-common",
"equivocation-detector",
- "finality-grandpa",
"finality-relay",
"frame-support",
"frame-system",
@@ -21410,9 +21333,11 @@ dependencies = [
"rbtag",
"relay-substrate-client",
"relay-utils",
+ "scale-info",
"sp-consensus-grandpa",
"sp-core",
"sp-runtime",
+ "sp-trie",
"structopt",
"strum 0.26.2",
"thiserror",
@@ -21723,7 +21648,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"unicode-ident",
]
@@ -21734,7 +21659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"unicode-ident",
]
@@ -21746,7 +21671,7 @@ checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047"
dependencies = [
"paste",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -21757,7 +21682,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
"unicode-xid 0.2.4",
]
@@ -21769,7 +21694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -21888,7 +21813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -21900,7 +21825,6 @@ dependencies = [
"parity-scale-codec",
"polkadot-parachain-primitives",
"sp-io",
- "sp-std 14.0.0",
"substrate-wasm-builder",
"tiny-keccak",
]
@@ -21909,7 +21833,7 @@ dependencies = [
name = "test-parachain-adder-collator"
version = "1.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"futures",
"futures-timer",
"log",
@@ -21948,7 +21872,6 @@ dependencies = [
"parity-scale-codec",
"polkadot-parachain-primitives",
"sp-io",
- "sp-std 14.0.0",
"substrate-wasm-builder",
"tiny-keccak",
]
@@ -21957,7 +21880,7 @@ dependencies = [
name = "test-parachain-undying-collator"
version = "1.0.0"
dependencies = [
- "clap 4.5.3",
+ "clap 4.5.9",
"futures",
"futures-timer",
"log",
@@ -22054,7 +21977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 1.0.109",
]
@@ -22065,7 +21988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -22214,7 +22137,7 @@ dependencies = [
"mio",
"num_cpus",
"parking_lot 0.12.3",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"signal-hook-registry",
"socket2 0.5.7",
"tokio-macros",
@@ -22228,7 +22151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -22271,7 +22194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
dependencies = [
"futures-core",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"tokio",
"tokio-util",
]
@@ -22314,7 +22237,7 @@ dependencies = [
"futures-core",
"futures-io",
"futures-sink",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"tokio",
]
@@ -22381,7 +22304,7 @@ dependencies = [
"futures-core",
"futures-util",
"pin-project",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"tokio",
"tower-layer",
"tower-service",
@@ -22399,7 +22322,7 @@ dependencies = [
"http 1.1.0",
"http-body 1.0.0",
"http-body-util",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"tower-layer",
"tower-service",
]
@@ -22423,7 +22346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
"log",
- "pin-project-lite 0.2.12",
+ "pin-project-lite",
"tracing-attributes",
"tracing-core",
]
@@ -22435,7 +22358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -22477,7 +22400,7 @@ dependencies = [
"expander",
"proc-macro-crate 3.1.0",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -22867,12 +22790,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.4.0"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
+checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [
"form_urlencoded",
- "idna 0.4.0",
+ "idna 0.5.0",
"percent-encoding",
]
@@ -23026,9 +22949,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.87"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
dependencies = [
"cfg-if",
"serde",
@@ -23038,15 +22961,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.87"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
"wasm-bindgen-shared",
]
@@ -23065,22 +22988,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.87"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
dependencies = [
- "quote 1.0.35",
+ "quote 1.0.36",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.87"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
@@ -23088,9 +23011,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.87"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
[[package]]
name = "wasm-bindgen-test"
@@ -23113,7 +23036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecb993dd8c836930ed130e020e77d9b2e65dd0fbab1b67c790b0f5d80b11a575"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
]
[[package]]
@@ -23647,7 +23570,6 @@ dependencies = [
"sp-runtime",
"sp-session",
"sp-staking",
- "sp-std 14.0.0",
"sp-storage 19.0.0",
"sp-tracing 16.0.0",
"sp-transaction-pool",
@@ -23684,6 +23606,7 @@ dependencies = [
"asset-hub-westend-emulated-chain",
"bridge-hub-westend-emulated-chain",
"collectives-westend-emulated-chain",
+ "coretime-westend-emulated-chain",
"emulated-integration-tests-common",
"penpal-emulated-chain",
"people-westend-emulated-chain",
@@ -24179,7 +24102,7 @@ version = "7.0.0"
dependencies = [
"Inflector",
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"staging-xcm",
"syn 2.0.61",
"trybuild",
@@ -24202,7 +24125,6 @@ dependencies = [
"scale-info",
"sp-api",
"sp-io",
- "sp-std 14.0.0",
"sp-weights",
"staging-xcm",
"staging-xcm-builder",
@@ -24346,7 +24268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
@@ -24366,7 +24288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2 1.0.82",
- "quote 1.0.35",
+ "quote 1.0.36",
"syn 2.0.61",
]
diff --git a/Cargo.toml b/Cargo.toml
index 5c2677fffeb225888a1ac8af392c287634cf59e6..3886014dc2b439b2594e360ceb6d844b779ebd82 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -61,6 +61,7 @@ members = [
"bridges/snowbridge/primitives/router",
"bridges/snowbridge/runtime/runtime-common",
"bridges/snowbridge/runtime/test-common",
+ "cumulus/bin/pov-validator",
"cumulus/client/cli",
"cumulus/client/collator",
"cumulus/client/consensus/aura",
@@ -90,6 +91,8 @@ members = [
"cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo",
"cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend",
"cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend",
+ "cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo",
+ "cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend",
"cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo",
"cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend",
"cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal",
@@ -104,6 +107,8 @@ members = [
"cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo",
"cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend",
"cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend",
+ "cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo",
+ "cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend",
"cumulus/parachains/integration-tests/emulated/tests/people/people-rococo",
"cumulus/parachains/integration-tests/emulated/tests/people/people-westend",
"cumulus/parachains/pallets/collective-content",
@@ -589,7 +594,7 @@ ark-ed-on-bls12-381-bandersnatch-ext = { version = "0.4.1", default-features = f
ark-scale = { version = "0.0.12", default-features = false }
array-bytes = { version = "6.2.2", default-features = false }
arrayvec = { version = "0.7.4" }
-assert_cmd = { version = "2.0.10" }
+assert_cmd = { version = "2.0.14" }
assert_matches = { version = "1.5.0" }
asset-hub-rococo-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo" }
asset-hub-rococo-runtime = { path = "cumulus/parachains/runtimes/assets/asset-hub-rococo", default-features = false }
@@ -654,7 +659,7 @@ chain-spec-builder = { path = "substrate/bin/utils/chain-spec-builder", default-
chain-spec-guide-runtime = { path = "docs/sdk/src/reference_docs/chain_spec_runtime" }
chrono = { version = "0.4.31" }
cid = { version = "0.9.0" }
-clap = { version = "4.5.3" }
+clap = { version = "4.5.9" }
clap-num = { version = "1.0.2" }
clap_complete = { version = "4.0.2" }
coarsetime = { version = "0.1.22" }
@@ -667,7 +672,9 @@ colored = { version = "2.0.4" }
comfy-table = { version = "7.1.0", default-features = false }
console = { version = "0.15.8" }
contracts-rococo-runtime = { path = "cumulus/parachains/runtimes/contracts/contracts-rococo" }
+coretime-rococo-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo" }
coretime-rococo-runtime = { path = "cumulus/parachains/runtimes/coretime/coretime-rococo" }
+coretime-westend-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend" }
coretime-westend-runtime = { path = "cumulus/parachains/runtimes/coretime/coretime-westend" }
cpu-time = { version = "1.0.0" }
criterion = { version = "0.5.1", default-features = false }
@@ -720,7 +727,7 @@ ed25519-zebra = { version = "4.0.3", default-features = false }
either = { version = "1.8.1", default-features = false }
emulated-integration-tests-common = { path = "cumulus/parachains/integration-tests/emulated/common", default-features = false }
enumflags2 = { version = "0.7.7" }
-enumn = { version = "0.1.12" }
+enumn = { version = "0.1.13" }
env_logger = { version = "0.11.3" }
environmental = { version = "1.1.4", default-features = false }
equivocation-detector = { path = "bridges/relays/equivocation" }
@@ -808,7 +815,7 @@ kvdb-rocksdb = { version = "0.19.0" }
kvdb-shared-tests = { version = "0.11.0" }
landlock = { version = "0.3.0" }
lazy_static = { version = "1.4.0" }
-libc = { version = "0.2.153" }
+libc = { version = "0.2.155" }
libfuzzer-sys = { version = "0.4" }
libp2p = { version = "0.52.4" }
libp2p-identity = { version = "0.2.3" }
@@ -818,7 +825,7 @@ linked_hash_set = { version = "0.1.4" }
linregress = { version = "0.5.1" }
lite-json = { version = "0.2.0", default-features = false }
litep2p = { version = "0.6.2" }
-log = { version = "0.4.21", default-features = false }
+log = { version = "0.4.22", default-features = false }
macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
memmap2 = { version = "0.9.3" }
@@ -855,7 +862,7 @@ num-rational = { version = "0.4.1" }
num-traits = { version = "0.2.17", default-features = false }
num_cpus = { version = "1.13.1" }
once_cell = { version = "1.19.0" }
-orchestra = { version = "0.3.5", default-features = false }
+orchestra = { version = "0.4.0", default-features = false }
pallet-alliance = { path = "substrate/frame/alliance", default-features = false }
pallet-asset-conversion = { path = "substrate/frame/asset-conversion", default-features = false }
pallet-asset-conversion-ops = { path = "substrate/frame/asset-conversion/ops", default-features = false }
@@ -986,7 +993,7 @@ parity-util-mem = { version = "0.12.0" }
parity-wasm = { version = "0.45.0" }
parking_lot = { version = "0.12.1", default-features = false }
partial_sort = { version = "0.2.0" }
-paste = { version = "1.0.14", default-features = false }
+paste = { version = "1.0.15", default-features = false }
pbkdf2 = { version = "0.12.2", default-features = false }
penpal-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal" }
penpal-runtime = { path = "cumulus/parachains/runtimes/testing/penpal" }
@@ -1069,7 +1076,7 @@ pyroscope = { version = "0.5.7" }
pyroscope_pprofrs = { version = "0.2.7" }
quick_cache = { version = "0.3" }
quickcheck = { version = "1.0.3", default-features = false }
-quote = { version = "1.0.33" }
+quote = { version = "1.0.36" }
rand = { version = "0.8.5", default-features = false }
rand_chacha = { version = "0.3.1", default-features = false }
rand_core = { version = "0.6.2" }
@@ -1164,10 +1171,10 @@ secp256k1 = { version = "0.28.0", default-features = false }
secrecy = { version = "0.8.0", default-features = false }
seedling-runtime = { path = "cumulus/parachains/runtimes/starters/seedling" }
separator = { version = "0.4.1" }
-serde = { version = "1.0.197", default-features = false }
+serde = { version = "1.0.204", default-features = false }
serde-big-array = { version = "0.3.2" }
serde_derive = { version = "1.0.117" }
-serde_json = { version = "1.0.114", default-features = false }
+serde_json = { version = "1.0.120", default-features = false }
serde_yaml = { version = "0.9" }
serial_test = { version = "2.0.0" }
sha1 = { version = "0.10.6" }
diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml
index d69a064aab81a41c946b073f232ebb8c778b9609..36f27b6aa0358fcb8027bbfe6e571bc1a50962e6 100644
--- a/bridges/bin/runtime-common/Cargo.toml
+++ b/bridges/bin/runtime-common/Cargo.toml
@@ -12,14 +12,12 @@ workspace = true
[dependencies]
codec = { features = ["derive"], workspace = true }
-hash-db = { workspace = true }
log = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
static_assertions = { optional = true, workspace = true, default-features = true }
tuplex = { workspace = true }
# Bridge dependencies
-
bp-header-chain = { workspace = true }
bp-messages = { workspace = true }
bp-parachains = { workspace = true }
@@ -34,25 +32,23 @@ pallet-bridge-parachains = { workspace = true }
pallet-bridge-relayers = { workspace = true }
# Substrate dependencies
-
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-utility = { workspace = true }
-sp-api = { workspace = true }
-sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
-sp-trie = { workspace = true }
+sp-trie = { optional = true, workspace = true }
# Polkadot dependencies
xcm = { workspace = true }
xcm-builder = { workspace = true }
[dev-dependencies]
-bp-test-utils = { workspace = true, default-features = true }
-pallet-balances = { workspace = true, default-features = true }
+bp-test-utils = { workspace = true }
+pallet-balances = { workspace = true }
+pallet-bridge-messages = { features = ["std", "test-helpers"], workspace = true }
[features]
default = ["std"]
@@ -63,13 +59,14 @@ std = [
"bp-polkadot-core/std",
"bp-relayers/std",
"bp-runtime/std",
+ "bp-test-utils/std",
"bp-xcm-bridge-hub-router/std",
"bp-xcm-bridge-hub/std",
"codec/std",
"frame-support/std",
"frame-system/std",
- "hash-db/std",
"log/std",
+ "pallet-balances/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-parachains/std",
@@ -77,8 +74,6 @@ std = [
"pallet-transaction-payment/std",
"pallet-utility/std",
"scale-info/std",
- "sp-api/std",
- "sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
@@ -88,15 +83,22 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
+ "bp-runtime/test-helpers",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bridge-grandpa/runtime-benchmarks",
"pallet-bridge-messages/runtime-benchmarks",
+ "pallet-bridge-messages/test-helpers",
"pallet-bridge-parachains/runtime-benchmarks",
"pallet-bridge-relayers/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "sp-trie",
"xcm-builder/runtime-benchmarks",
]
integrity-test = ["static_assertions"]
+test-helpers = [
+ "bp-runtime/test-helpers",
+ "sp-trie",
+]
diff --git a/bridges/bin/runtime-common/src/extensions/priority_calculator.rs b/bridges/bin/runtime-common/src/extensions/priority_calculator.rs
index 92810290f95e77a7fdc04cafaa1e6ab290e1661a..9f559dc13b64d3912f0d1679c21fa682034bdb8e 100644
--- a/bridges/bin/runtime-common/src/extensions/priority_calculator.rs
+++ b/bridges/bin/runtime-common/src/extensions/priority_calculator.rs
@@ -319,6 +319,7 @@ mod integrity_tests {
pub mod per_message {
use super::*;
+ use bp_messages::ChainWithMessages;
use pallet_bridge_messages::WeightInfoExt;
/// Ensures that the value of `PriorityBoostPerMessage` matches the value of
@@ -339,7 +340,7 @@ mod integrity_tests {
BalanceOf: Send + Sync + FixedPointOperand,
{
let maximal_messages_in_delivery_transaction =
- Runtime::MaxUnconfirmedMessagesAtInboundLane::get();
+ Runtime::BridgedChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
super::ensure_priority_boost_is_sane::>(
"PriorityBoostPerMessage",
maximal_messages_in_delivery_transaction,
diff --git a/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs b/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs
index 5aa7f1c095d540a4ee5050aeb7d694c98b744683..6ba3506377d0e602bf9ee706b13c248efd6afaca 100644
--- a/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs
+++ b/bridges/bin/runtime-common/src/extensions/refund_relayer_extension.rs
@@ -22,9 +22,9 @@
use crate::messages_call_ext::{
CallHelper as MessagesCallHelper, CallInfo as MessagesCallInfo, MessagesCallSubType,
};
-use bp_messages::{LaneId, MessageNonce};
+use bp_messages::{ChainWithMessages, LaneId, MessageNonce};
use bp_relayers::{ExplicitOrAccountParams, RewardsAccountOwner, RewardsAccountParams};
-use bp_runtime::{Parachain, RangeInclusiveExt, StaticStrProvider};
+use bp_runtime::{Chain, Parachain, RangeInclusiveExt, StaticStrProvider};
use codec::{Codec, Decode, Encode};
use frame_support::{
dispatch::{CallableCallFor, DispatchInfo, PostDispatchInfo},
@@ -293,7 +293,7 @@ pub trait RefundSignedExtension:
::Id::get(),
::Instance,
- >>::BridgedChainId::get(),
+ >>::BridgedChain::ID,
if call_info.is_receive_messages_proof_call() {
RewardsAccountOwner::ThisChain
} else {
@@ -406,8 +406,7 @@ pub trait RefundSignedExtension:
// a quick check to avoid invalid high-priority transactions
let max_unconfirmed_messages_in_confirmation_tx = ::Instance,
- >>::MaxUnconfirmedMessagesAtInboundLane::get(
- );
+ >>::BridgedChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
if bundled_messages > max_unconfirmed_messages_in_confirmation_tx {
return None
}
@@ -935,9 +934,6 @@ where
pub(crate) mod tests {
use super::*;
use crate::{
- messages::{
- source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
- },
messages_call_ext::{
BaseMessagesProofInfo, ReceiveMessagesDeliveryProofInfo, ReceiveMessagesProofInfo,
UnrewardedRelayerOccupation,
@@ -946,8 +942,10 @@ pub(crate) mod tests {
};
use bp_header_chain::StoredHeaderDataBuilder;
use bp_messages::{
- DeliveredMessages, InboundLaneData, MessageNonce, MessagesOperatingMode, OutboundLaneData,
- UnrewardedRelayer, UnrewardedRelayersState,
+ source_chain::FromBridgedChainMessagesDeliveryProof,
+ target_chain::FromBridgedChainMessagesProof, DeliveredMessages, InboundLaneData,
+ MessageNonce, MessagesOperatingMode, OutboundLaneData, UnrewardedRelayer,
+ UnrewardedRelayersState,
};
use bp_parachains::{BestParaHeadHash, ParaInfo};
use bp_polkadot_core::parachains::{ParaHeadsProof, ParaId};
@@ -1123,7 +1121,7 @@ pub(crate) mod tests {
ParaId(BridgedUnderlyingParachain::PARACHAIN_ID),
[parachain_head_at_relay_header_number as u8; 32].into(),
)],
- parachain_heads_proof: ParaHeadsProof { storage_proof: vec![] },
+ parachain_heads_proof: ParaHeadsProof { storage_proof: Default::default() },
})
}
@@ -1136,7 +1134,7 @@ pub(crate) mod tests {
ParaId(BridgedUnderlyingParachain::PARACHAIN_ID),
[parachain_head_at_relay_header_number as u8; 32].into(),
)],
- parachain_heads_proof: ParaHeadsProof { storage_proof: vec![] },
+ parachain_heads_proof: ParaHeadsProof { storage_proof: Default::default() },
is_free_execution_expected: false,
})
}
@@ -1144,9 +1142,9 @@ pub(crate) mod tests {
fn message_delivery_call(best_message: MessageNonce) -> RuntimeCall {
RuntimeCall::BridgeMessages(MessagesCall::receive_messages_proof {
relayer_id_at_bridged_chain: relayer_account_at_bridged_chain(),
- proof: FromBridgedChainMessagesProof {
+ proof: Box::new(FromBridgedChainMessagesProof {
bridged_header_hash: Default::default(),
- storage_proof: vec![],
+ storage_proof: Default::default(),
lane: TestLaneId::get(),
nonces_start: pallet_bridge_messages::InboundLanes::::get(
TEST_LANE_ID,
@@ -1154,7 +1152,7 @@ pub(crate) mod tests {
.last_delivered_nonce() +
1,
nonces_end: best_message,
- },
+ }),
messages_count: 1,
dispatch_weight: Weight::zero(),
})
@@ -1164,7 +1162,7 @@ pub(crate) mod tests {
RuntimeCall::BridgeMessages(MessagesCall::receive_messages_delivery_proof {
proof: FromBridgedChainMessagesDeliveryProof {
bridged_header_hash: Default::default(),
- storage_proof: vec![],
+ storage_proof: Default::default(),
lane: TestLaneId::get(),
},
relayers_state: UnrewardedRelayersState {
@@ -1327,8 +1325,10 @@ pub(crate) mod tests {
best_stored_nonce: 100,
},
unrewarded_relayers: UnrewardedRelayerOccupation {
- free_relayer_slots: MaxUnrewardedRelayerEntriesAtInboundLane::get(),
- free_message_slots: MaxUnconfirmedMessagesAtInboundLane::get(),
+ free_relayer_slots:
+ BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
+ free_message_slots:
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
},
}),
),
@@ -1397,8 +1397,10 @@ pub(crate) mod tests {
best_stored_nonce: 100,
},
unrewarded_relayers: UnrewardedRelayerOccupation {
- free_relayer_slots: MaxUnrewardedRelayerEntriesAtInboundLane::get(),
- free_message_slots: MaxUnconfirmedMessagesAtInboundLane::get(),
+ free_relayer_slots:
+ BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
+ free_message_slots:
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
},
}),
),
@@ -1459,8 +1461,10 @@ pub(crate) mod tests {
best_stored_nonce: 100,
},
unrewarded_relayers: UnrewardedRelayerOccupation {
- free_relayer_slots: MaxUnrewardedRelayerEntriesAtInboundLane::get(),
- free_message_slots: MaxUnconfirmedMessagesAtInboundLane::get(),
+ free_relayer_slots:
+ BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
+ free_message_slots:
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
},
}),
),
@@ -1499,8 +1503,10 @@ pub(crate) mod tests {
best_stored_nonce: 100,
},
unrewarded_relayers: UnrewardedRelayerOccupation {
- free_relayer_slots: MaxUnrewardedRelayerEntriesAtInboundLane::get(),
- free_message_slots: MaxUnconfirmedMessagesAtInboundLane::get(),
+ free_relayer_slots:
+ BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
+ free_message_slots:
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
},
},
)),
@@ -1735,14 +1741,16 @@ pub(crate) mod tests {
let fns = [run_validate, run_grandpa_validate, run_messages_validate];
for f in fns {
- let priority_of_max_messages_delivery =
- f(message_delivery_call(100 + MaxUnconfirmedMessagesAtInboundLane::get()))
- .unwrap()
- .priority;
- let priority_of_more_than_max_messages_delivery =
- f(message_delivery_call(100 + MaxUnconfirmedMessagesAtInboundLane::get() + 1))
- .unwrap()
- .priority;
+ let priority_of_max_messages_delivery = f(message_delivery_call(
+ 100 + BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
+ ))
+ .unwrap()
+ .priority;
+ let priority_of_more_than_max_messages_delivery = f(message_delivery_call(
+ 100 + BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX + 1,
+ ))
+ .unwrap()
+ .priority;
assert!(
priority_of_max_messages_delivery > priority_of_more_than_max_messages_delivery,
@@ -2103,7 +2111,7 @@ pub(crate) mod tests {
[1u8; 32].into(),
),
],
- parachain_heads_proof: ParaHeadsProof { storage_proof: vec![] },
+ parachain_heads_proof: ParaHeadsProof { storage_proof: Default::default() },
}),
message_delivery_call(200),
],
@@ -2865,7 +2873,8 @@ pub(crate) mod tests {
#[test]
fn does_not_panic_on_boosting_priority_of_empty_message_delivery_transaction() {
run_test(|| {
- let best_delivered_message = MaxUnconfirmedMessagesAtInboundLane::get();
+ let best_delivered_message =
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
initialize_environment(100, 100, best_delivered_message);
// register relayer so it gets priority boost
diff --git a/bridges/bin/runtime-common/src/integrity.rs b/bridges/bin/runtime-common/src/integrity.rs
index d3827a14dd6cc24e088a8d05d26aba9d769eb213..f661db8a22057ecf6c8b217336e5a98660344cb2 100644
--- a/bridges/bin/runtime-common/src/integrity.rs
+++ b/bridges/bin/runtime-common/src/integrity.rs
@@ -19,10 +19,9 @@
//! Most of the tests in this module assume that the bridge is using standard (see `crate::messages`
//! module for details) configuration.
-use crate::{messages, messages::MessageBridge};
-
-use bp_messages::{InboundLaneData, MessageNonce};
-use bp_runtime::{Chain, ChainId};
+use bp_header_chain::ChainWithGrandpa;
+use bp_messages::{ChainWithMessages, InboundLaneData, MessageNonce};
+use bp_runtime::Chain;
use codec::Encode;
use frame_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
use frame_system::limits;
@@ -50,23 +49,6 @@ macro_rules! assert_chain_types(
}
);
-/// Macro that ensures that the bridge GRANDPA pallet is configured properly to bridge with given
-/// chain.
-#[macro_export]
-macro_rules! assert_bridge_grandpa_pallet_types(
- ( runtime: $r:path, with_bridged_chain_grandpa_instance: $i:path, bridged_chain: $bridged:path ) => {
- {
- // if one of asserts fail, then either bridge isn't configured properly (or alternatively - non-standard
- // configuration is used), or something has broke existing configuration (meaning that all bridged chains
- // and relays will stop functioning)
- use pallet_bridge_grandpa::Config as GrandpaConfig;
- use static_assertions::assert_type_eq_all;
-
- assert_type_eq_all!(<$r as GrandpaConfig<$i>>::BridgedChain, $bridged);
- }
- }
-);
-
/// Macro that ensures that the bridge messages pallet is configured properly to bridge using given
/// configuration.
#[macro_export]
@@ -74,32 +56,30 @@ macro_rules! assert_bridge_messages_pallet_types(
(
runtime: $r:path,
with_bridged_chain_messages_instance: $i:path,
- bridge: $bridge:path
+ this_chain: $this:path,
+ bridged_chain: $bridged:path,
) => {
{
// if one of asserts fail, then either bridge isn't configured properly (or alternatively - non-standard
// configuration is used), or something has broke existing configuration (meaning that all bridged chains
// and relays will stop functioning)
- use $crate::messages::{
- source::{FromThisChainMessagePayload, TargetHeaderChainAdapter},
- target::{FromBridgedChainMessagePayload, SourceHeaderChainAdapter},
- AccountIdOf, BalanceOf, BridgedChain, ThisChain,
- };
+ use $crate::messages_xcm_extension::XcmAsPlainPayload;
+ use bp_messages::ChainWithMessages;
+ use bp_runtime::Chain;
use pallet_bridge_messages::Config as MessagesConfig;
use static_assertions::assert_type_eq_all;
- assert_type_eq_all!(<$r as MessagesConfig<$i>>::OutboundPayload, FromThisChainMessagePayload);
+ assert_type_eq_all!(<$r as MessagesConfig<$i>>::ThisChain, $this);
+ assert_type_eq_all!(<$r as MessagesConfig<$i>>::BridgedChain, $bridged);
- assert_type_eq_all!(<$r as MessagesConfig<$i>>::InboundRelayer, AccountIdOf>);
-
- assert_type_eq_all!(<$r as MessagesConfig<$i>>::TargetHeaderChain, TargetHeaderChainAdapter<$bridge>);
- assert_type_eq_all!(<$r as MessagesConfig<$i>>::SourceHeaderChain, SourceHeaderChainAdapter<$bridge>);
+ assert_type_eq_all!(<$r as MessagesConfig<$i>>::OutboundPayload, XcmAsPlainPayload);
+ assert_type_eq_all!(<$r as MessagesConfig<$i>>::InboundPayload, XcmAsPlainPayload);
}
}
);
/// Macro that combines four other macro calls - `assert_chain_types`, `assert_bridge_types`,
-/// `assert_bridge_grandpa_pallet_types` and `assert_bridge_messages_pallet_types`. It may be used
+/// and `assert_bridge_messages_pallet_types`. It may be used
/// at the chain that is implementing complete standard messages bridge (i.e. with bridge GRANDPA
/// and messages pallets deployed).
#[macro_export]
@@ -108,20 +88,15 @@ macro_rules! assert_complete_bridge_types(
runtime: $r:path,
with_bridged_chain_grandpa_instance: $gi:path,
with_bridged_chain_messages_instance: $mi:path,
- bridge: $bridge:path,
this_chain: $this:path,
bridged_chain: $bridged:path,
) => {
$crate::assert_chain_types!(runtime: $r, this_chain: $this);
- $crate::assert_bridge_grandpa_pallet_types!(
- runtime: $r,
- with_bridged_chain_grandpa_instance: $gi,
- bridged_chain: $bridged
- );
$crate::assert_bridge_messages_pallet_types!(
runtime: $r,
with_bridged_chain_messages_instance: $mi,
- bridge: $bridge
+ this_chain: $this,
+ bridged_chain: $bridged,
);
}
);
@@ -184,20 +159,8 @@ where
);
}
-/// Parameters for asserting messages pallet constants.
-#[derive(Debug)]
-pub struct AssertBridgeMessagesPalletConstants {
- /// Maximal number of unrewarded relayer entries in a confirmation transaction at the bridged
- /// chain.
- pub max_unrewarded_relayers_in_bridged_confirmation_tx: MessageNonce,
- /// Maximal number of unconfirmed messages in a confirmation transaction at the bridged chain.
- pub max_unconfirmed_messages_in_bridged_confirmation_tx: MessageNonce,
- /// Identifier of the bridged chain.
- pub bridged_chain_id: ChainId,
-}
-
/// Test that the constants, used in messages pallet configuration are valid.
-pub fn assert_bridge_messages_pallet_constants(params: AssertBridgeMessagesPalletConstants)
+pub fn assert_bridge_messages_pallet_constants()
where
R: pallet_bridge_messages::Config,
MI: 'static,
@@ -207,27 +170,22 @@ where
"ActiveOutboundLanes ({:?}) must not be empty",
R::ActiveOutboundLanes::get(),
);
+
assert!(
- R::MaxUnrewardedRelayerEntriesAtInboundLane::get() <= params.max_unrewarded_relayers_in_bridged_confirmation_tx,
- "MaxUnrewardedRelayerEntriesAtInboundLane ({}) must be <= than the hardcoded value for bridged chain: {}",
- R::MaxUnrewardedRelayerEntriesAtInboundLane::get(),
- params.max_unrewarded_relayers_in_bridged_confirmation_tx,
- );
- assert!(
- R::MaxUnconfirmedMessagesAtInboundLane::get() <= params.max_unconfirmed_messages_in_bridged_confirmation_tx,
- "MaxUnrewardedRelayerEntriesAtInboundLane ({}) must be <= than the hardcoded value for bridged chain: {}",
- R::MaxUnconfirmedMessagesAtInboundLane::get(),
- params.max_unconfirmed_messages_in_bridged_confirmation_tx,
+ pallet_bridge_messages::BridgedChainOf::::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX
+ <= pallet_bridge_messages::BridgedChainOf::::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
+ "MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX ({}) of {:?} is larger than \
+ its MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX ({}). This makes \
+ no sense",
+ pallet_bridge_messages::BridgedChainOf::::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
+ pallet_bridge_messages::BridgedChainOf::::ID,
+ pallet_bridge_messages::BridgedChainOf::::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
);
- assert_eq!(R::BridgedChainId::get(), params.bridged_chain_id);
}
/// Parameters for asserting bridge pallet names.
#[derive(Debug)]
pub struct AssertBridgePalletNames<'a> {
- /// Name of the messages pallet, deployed at the bridged chain and used to bridge with this
- /// chain.
- pub with_this_chain_messages_pallet_name: &'a str,
/// Name of the GRANDPA pallet, deployed at this chain and used to bridge with the bridged
/// chain.
pub with_bridged_chain_grandpa_pallet_name: &'a str,
@@ -238,18 +196,22 @@ pub struct AssertBridgePalletNames<'a> {
/// Tests that bridge pallet names used in `construct_runtime!()` macro call are matching constants
/// from chain primitives crates.
-pub fn assert_bridge_pallet_names(params: AssertBridgePalletNames)
+fn assert_bridge_pallet_names(params: AssertBridgePalletNames)
where
- B: MessageBridge,
R: pallet_bridge_grandpa::Config + pallet_bridge_messages::Config,
GI: 'static,
MI: 'static,
{
- assert_eq!(B::BRIDGED_MESSAGES_PALLET_NAME, params.with_this_chain_messages_pallet_name);
+ // check that the bridge GRANDPA pallet has required name
assert_eq!(
pallet_bridge_grandpa::PalletOwner::::storage_value_final_key().to_vec(),
- bp_runtime::storage_value_key(params.with_bridged_chain_grandpa_pallet_name, "PalletOwner",).0,
+ bp_runtime::storage_value_key(
+ params.with_bridged_chain_grandpa_pallet_name,
+ "PalletOwner",
+ ).0,
);
+
+ // check that the bridge messages pallet has required name
assert_eq!(
pallet_bridge_messages::PalletOwner::::storage_value_final_key().to_vec(),
bp_runtime::storage_value_key(
@@ -262,35 +224,58 @@ where
/// Parameters for asserting complete standard messages bridge.
#[derive(Debug)]
-pub struct AssertCompleteBridgeConstants<'a> {
+pub struct AssertCompleteBridgeConstants {
/// Parameters to assert this chain constants.
pub this_chain_constants: AssertChainConstants,
- /// Parameters to assert messages pallet constants.
- pub messages_pallet_constants: AssertBridgeMessagesPalletConstants,
- /// Parameters to assert pallet names constants.
- pub pallet_names: AssertBridgePalletNames<'a>,
}
-/// All bridge-related constants tests for the complete standard messages bridge (i.e. with bridge
-/// GRANDPA and messages pallets deployed).
-pub fn assert_complete_bridge_constants(params: AssertCompleteBridgeConstants)
-where
+/// All bridge-related constants tests for the complete standard relay-chain messages bridge
+/// (i.e. with bridge GRANDPA and messages pallets deployed).
+pub fn assert_complete_with_relay_chain_bridge_constants(
+ params: AssertCompleteBridgeConstants,
+) where
+ R: frame_system::Config
+ + pallet_bridge_grandpa::Config
+ + pallet_bridge_messages::Config,
+ GI: 'static,
+ MI: 'static,
+{
+ assert_chain_constants::(params.this_chain_constants);
+ assert_bridge_grandpa_pallet_constants::();
+ assert_bridge_messages_pallet_constants::();
+ assert_bridge_pallet_names::(AssertBridgePalletNames {
+ with_bridged_chain_grandpa_pallet_name:
+ >::BridgedChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
+ with_bridged_chain_messages_pallet_name:
+ >::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
+ });
+}
+
+/// All bridge-related constants tests for the complete standard parachain messages bridge
+/// (i.e. with bridge GRANDPA, parachains and messages pallets deployed).
+pub fn assert_complete_with_parachain_bridge_constants(
+ params: AssertCompleteBridgeConstants,
+) where
R: frame_system::Config
+ pallet_bridge_grandpa::Config
+ pallet_bridge_messages::Config,
GI: 'static,
MI: 'static,
- B: MessageBridge,
+ RelayChain: ChainWithGrandpa,
{
assert_chain_constants::(params.this_chain_constants);
assert_bridge_grandpa_pallet_constants::();
- assert_bridge_messages_pallet_constants::(params.messages_pallet_constants);
- assert_bridge_pallet_names::(params.pallet_names);
+ assert_bridge_messages_pallet_constants::();
+ assert_bridge_pallet_names::(AssertBridgePalletNames {
+ with_bridged_chain_grandpa_pallet_name: RelayChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
+ with_bridged_chain_messages_pallet_name:
+ >::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
+ });
}
/// Check that the message lane weights are correct.
pub fn check_message_lane_weights<
- C: Chain,
+ C: ChainWithMessages,
T: frame_system::Config + pallet_bridge_messages::Config,
MessagesPalletInstance: 'static,
>(
@@ -308,14 +293,20 @@ pub fn check_message_lane_weights<
// check basic weight assumptions
pallet_bridge_messages::ensure_weights_are_correct::>();
+ // check that the maximal message dispatch weight is below hardcoded limit
+ pallet_bridge_messages::ensure_maximal_message_dispatch::>(
+ C::maximal_incoming_message_size(),
+ C::maximal_incoming_message_dispatch_weight(),
+ );
+
// check that weights allow us to receive messages
- let max_incoming_message_proof_size = bridged_chain_extra_storage_proof_size
- .saturating_add(messages::target::maximal_incoming_message_size(C::max_extrinsic_size()));
+ let max_incoming_message_proof_size =
+ bridged_chain_extra_storage_proof_size.saturating_add(C::maximal_incoming_message_size());
pallet_bridge_messages::ensure_able_to_receive_message::>(
C::max_extrinsic_size(),
C::max_extrinsic_weight(),
max_incoming_message_proof_size,
- messages::target::maximal_incoming_message_dispatch_weight(C::max_extrinsic_weight()),
+ C::maximal_incoming_message_dispatch_weight(),
);
// check that weights allow us to receive delivery confirmations
diff --git a/bridges/bin/runtime-common/src/lib.rs b/bridges/bin/runtime-common/src/lib.rs
index 5679acd6006ccb8540f940f0f90363f902d643f7..b65bb6041d5610ce2bdfb63f923f3f24b21dcd7f 100644
--- a/bridges/bin/runtime-common/src/lib.rs
+++ b/bridges/bin/runtime-common/src/lib.rs
@@ -20,11 +20,10 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub mod extensions;
-pub mod messages;
+
pub mod messages_api;
pub mod messages_benchmarking;
pub mod messages_call_ext;
-pub mod messages_generation;
pub mod messages_xcm_extension;
pub mod parachains_benchmarking;
diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs
deleted file mode 100644
index 03801d5279d0a8453542336d8089f5c887a3d005..0000000000000000000000000000000000000000
--- a/bridges/bin/runtime-common/src/messages.rs
+++ /dev/null
@@ -1,704 +0,0 @@
-// Copyright (C) Parity Technologies (UK) Ltd.
-// This file is part of Parity Bridges Common.
-
-// Parity Bridges Common 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.
-
-// Parity Bridges Common 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 Parity Bridges Common. If not, see .
-
-//! Types that allow runtime to act as a source/target endpoint of message lanes.
-//!
-//! Messages are assumed to be encoded `Call`s of the target chain. Call-dispatch
-//! pallet is used to dispatch incoming messages. Message identified by a tuple
-//! of to elements - message lane id and message nonce.
-
-pub use bp_runtime::{RangeInclusiveExt, UnderlyingChainOf, UnderlyingChainProvider};
-
-use bp_header_chain::HeaderChain;
-use bp_messages::{
- source_chain::TargetHeaderChain,
- target_chain::{ProvedLaneMessages, ProvedMessages, SourceHeaderChain},
- InboundLaneData, LaneId, Message, MessageKey, MessageNonce, MessagePayload, OutboundLaneData,
- VerificationError,
-};
-use bp_runtime::{Chain, RawStorageProof, Size, StorageProofChecker};
-use codec::{Decode, Encode};
-use frame_support::{traits::Get, weights::Weight};
-use hash_db::Hasher;
-use scale_info::TypeInfo;
-use sp_runtime::RuntimeDebug;
-use sp_std::{marker::PhantomData, vec::Vec};
-
-/// Bidirectional message bridge.
-pub trait MessageBridge {
- /// Name of the paired messages pallet instance at the Bridged chain.
- ///
- /// Should be the name that is used in the `construct_runtime!()` macro.
- const BRIDGED_MESSAGES_PALLET_NAME: &'static str;
-
- /// This chain in context of message bridge.
- type ThisChain: ThisChainWithMessages;
- /// Bridged chain in context of message bridge.
- type BridgedChain: BridgedChainWithMessages;
- /// Bridged header chain.
- type BridgedHeaderChain: HeaderChain>;
-}
-
-/// This chain that has `pallet-bridge-messages` module.
-pub trait ThisChainWithMessages: UnderlyingChainProvider {
- /// Call origin on the chain.
- type RuntimeOrigin;
-}
-
-/// Bridged chain that has `pallet-bridge-messages` module.
-pub trait BridgedChainWithMessages: UnderlyingChainProvider {}
-
-/// This chain in context of message bridge.
-pub type ThisChain = ::ThisChain;
-/// Bridged chain in context of message bridge.
-pub type BridgedChain = ::BridgedChain;
-/// Hash used on the chain.
-pub type HashOf = bp_runtime::HashOf<::Chain>;
-/// Hasher used on the chain.
-pub type HasherOf = bp_runtime::HasherOf>;
-/// Account id used on the chain.
-pub type AccountIdOf = bp_runtime::AccountIdOf>;
-/// Type of balances that is used on the chain.
-pub type BalanceOf = bp_runtime::BalanceOf>;
-
-/// Sub-module that is declaring types required for processing This -> Bridged chain messages.
-pub mod source {
- use super::*;
-
- /// Message payload for This -> Bridged chain messages.
- pub type FromThisChainMessagePayload = crate::messages_xcm_extension::XcmAsPlainPayload;
-
- /// Maximal size of outbound message payload.
- pub struct FromThisChainMaximalOutboundPayloadSize(PhantomData);
-
- impl Get for FromThisChainMaximalOutboundPayloadSize {
- fn get() -> u32 {
- maximal_message_size::()
- }
- }
-
- /// Messages delivery proof from bridged chain:
- ///
- /// - hash of finalized header;
- /// - storage proof of inbound lane state;
- /// - lane id.
- #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)]
- pub struct FromBridgedChainMessagesDeliveryProof {
- /// Hash of the bridge header the proof is for.
- pub bridged_header_hash: BridgedHeaderHash,
- /// Storage trie proof generated for [`Self::bridged_header_hash`].
- pub storage_proof: RawStorageProof,
- /// Lane id of which messages were delivered and the proof is for.
- pub lane: LaneId,
- }
-
- impl Size for FromBridgedChainMessagesDeliveryProof {
- fn size(&self) -> u32 {
- u32::try_from(
- self.storage_proof
- .iter()
- .fold(0usize, |sum, node| sum.saturating_add(node.len())),
- )
- .unwrap_or(u32::MAX)
- }
- }
-
- /// 'Parsed' message delivery proof - inbound lane id and its state.
- pub type ParsedMessagesDeliveryProofFromBridgedChain =
- (LaneId, InboundLaneData>>);
-
- /// Return maximal message size of This -> Bridged chain message.
- pub fn maximal_message_size() -> u32 {
- super::target::maximal_incoming_message_size(
- UnderlyingChainOf::>::max_extrinsic_size(),
- )
- }
-
- /// `TargetHeaderChain` implementation that is using default types and perform default checks.
- pub struct TargetHeaderChainAdapter(PhantomData);
-
- impl TargetHeaderChain>>
- for TargetHeaderChainAdapter
- {
- type MessagesDeliveryProof = FromBridgedChainMessagesDeliveryProof>>;
-
- fn verify_message(payload: &FromThisChainMessagePayload) -> Result<(), VerificationError> {
- verify_chain_message::(payload)
- }
-
- fn verify_messages_delivery_proof(
- proof: Self::MessagesDeliveryProof,
- ) -> Result<(LaneId, InboundLaneData>>), VerificationError> {
- verify_messages_delivery_proof::(proof)
- }
- }
-
- /// Do basic Bridged-chain specific verification of This -> Bridged chain message.
- ///
- /// Ok result from this function means that the delivery transaction with this message
- /// may be 'mined' by the target chain.
- pub fn verify_chain_message(
- payload: &FromThisChainMessagePayload,
- ) -> Result<(), VerificationError> {
- // IMPORTANT: any error that is returned here is fatal for the bridge, because
- // this code is executed at the bridge hub and message sender actually lives
- // at some sibling parachain. So we are failing **after** the message has been
- // sent and we can't report it back to sender (unless error report mechanism is
- // embedded into message and its dispatcher).
-
- // apart from maximal message size check (see below), we should also check the message
- // dispatch weight here. But we assume that the bridged chain will just push the message
- // to some queue (XCMP, UMP, DMP), so the weight is constant and fits the block.
-
- // The maximal size of extrinsic at Substrate-based chain depends on the
- // `frame_system::Config::MaximumBlockLength` and
- // `frame_system::Config::AvailableBlockRatio` constants. This check is here to be sure that
- // the lane won't stuck because message is too large to fit into delivery transaction.
- //
- // **IMPORTANT NOTE**: the delivery transaction contains storage proof of the message, not
- // the message itself. The proof is always larger than the message. But unless chain state
- // is enormously large, it should be several dozens/hundreds of bytes. The delivery
- // transaction also contains signatures and signed extensions. Because of this, we reserve
- // 1/3 of the the maximal extrinsic size for this data.
- if payload.len() > maximal_message_size::() as usize {
- return Err(VerificationError::MessageTooLarge)
- }
-
- Ok(())
- }
-
- /// Verify proof of This -> Bridged chain messages delivery.
- ///
- /// This function is used when Bridged chain is directly using GRANDPA finality. For Bridged
- /// parachains, please use the `verify_messages_delivery_proof_from_parachain`.
- pub fn verify_messages_delivery_proof(
- proof: FromBridgedChainMessagesDeliveryProof>>,
- ) -> Result, VerificationError> {
- let FromBridgedChainMessagesDeliveryProof { bridged_header_hash, storage_proof, lane } =
- proof;
- let mut storage =
- B::BridgedHeaderChain::storage_proof_checker(bridged_header_hash, storage_proof)
- .map_err(VerificationError::HeaderChain)?;
- // Messages delivery proof is just proof of single storage key read => any error
- // is fatal.
- let storage_inbound_lane_data_key = bp_messages::storage_keys::inbound_lane_data_key(
- B::BRIDGED_MESSAGES_PALLET_NAME,
- &lane,
- );
- let inbound_lane_data = storage
- .read_and_decode_mandatory_value(storage_inbound_lane_data_key.0.as_ref())
- .map_err(VerificationError::InboundLaneStorage)?;
-
- // check that the storage proof doesn't have any untouched trie nodes
- storage.ensure_no_unused_nodes().map_err(VerificationError::StorageProof)?;
-
- Ok((lane, inbound_lane_data))
- }
-}
-
-/// Sub-module that is declaring types required for processing Bridged -> This chain messages.
-pub mod target {
- use super::*;
-
- /// Decoded Bridged -> This message payload.
- pub type FromBridgedChainMessagePayload = crate::messages_xcm_extension::XcmAsPlainPayload;
-
- /// Messages proof from bridged chain:
- ///
- /// - hash of finalized header;
- /// - storage proof of messages and (optionally) outbound lane state;
- /// - lane id;
- /// - nonces (inclusive range) of messages which are included in this proof.
- #[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug, TypeInfo)]
- pub struct FromBridgedChainMessagesProof {
- /// Hash of the finalized bridged header the proof is for.
- pub bridged_header_hash: BridgedHeaderHash,
- /// A storage trie proof of messages being delivered.
- pub storage_proof: RawStorageProof,
- /// Messages in this proof are sent over this lane.
- pub lane: LaneId,
- /// Nonce of the first message being delivered.
- pub nonces_start: MessageNonce,
- /// Nonce of the last message being delivered.
- pub nonces_end: MessageNonce,
- }
-
- impl Size for FromBridgedChainMessagesProof {
- fn size(&self) -> u32 {
- u32::try_from(
- self.storage_proof
- .iter()
- .fold(0usize, |sum, node| sum.saturating_add(node.len())),
- )
- .unwrap_or(u32::MAX)
- }
- }
-
- /// Return maximal dispatch weight of the message we're able to receive.
- pub fn maximal_incoming_message_dispatch_weight(maximal_extrinsic_weight: Weight) -> Weight {
- maximal_extrinsic_weight / 2
- }
-
- /// Return maximal message size given maximal extrinsic size.
- pub fn maximal_incoming_message_size(maximal_extrinsic_size: u32) -> u32 {
- maximal_extrinsic_size / 3 * 2
- }
-
- /// `SourceHeaderChain` implementation that is using default types and perform default checks.
- pub struct SourceHeaderChainAdapter(PhantomData);
-
- impl SourceHeaderChain for SourceHeaderChainAdapter {
- type MessagesProof = FromBridgedChainMessagesProof>>;
-
- fn verify_messages_proof(
- proof: Self::MessagesProof,
- messages_count: u32,
- ) -> Result, VerificationError> {
- verify_messages_proof::(proof, messages_count)
- }
- }
-
- /// Verify proof of Bridged -> This chain messages.
- ///
- /// This function is used when Bridged chain is directly using GRANDPA finality. For Bridged
- /// parachains, please use the `verify_messages_proof_from_parachain`.
- ///
- /// The `messages_count` argument verification (sane limits) is supposed to be made
- /// outside of this function. This function only verifies that the proof declares exactly
- /// `messages_count` messages.
- pub fn verify_messages_proof(
- proof: FromBridgedChainMessagesProof>>,
- messages_count: u32,
- ) -> Result, VerificationError> {
- let FromBridgedChainMessagesProof {
- bridged_header_hash,
- storage_proof,
- lane,
- nonces_start,
- nonces_end,
- } = proof;
- let storage =
- B::BridgedHeaderChain::storage_proof_checker(bridged_header_hash, storage_proof)
- .map_err(VerificationError::HeaderChain)?;
- let mut parser = StorageProofCheckerAdapter::<_, B> { storage, _dummy: Default::default() };
- let nonces_range = nonces_start..=nonces_end;
-
- // receiving proofs where end < begin is ok (if proof includes outbound lane state)
- let messages_in_the_proof = nonces_range.checked_len().unwrap_or(0);
- if messages_in_the_proof != MessageNonce::from(messages_count) {
- return Err(VerificationError::MessagesCountMismatch)
- }
-
- // Read messages first. All messages that are claimed to be in the proof must
- // be in the proof. So any error in `read_value`, or even missing value is fatal.
- //
- // Mind that we allow proofs with no messages if outbound lane state is proved.
- let mut messages = Vec::with_capacity(messages_in_the_proof as _);
- for nonce in nonces_range {
- let message_key = MessageKey { lane_id: lane, nonce };
- let message_payload = parser.read_and_decode_message_payload(&message_key)?;
- messages.push(Message { key: message_key, payload: message_payload });
- }
-
- // Now let's check if proof contains outbound lane state proof. It is optional, so
- // we simply ignore `read_value` errors and missing value.
- let proved_lane_messages = ProvedLaneMessages {
- lane_state: parser.read_and_decode_outbound_lane_data(&lane)?,
- messages,
- };
-
- // Now we may actually check if the proof is empty or not.
- if proved_lane_messages.lane_state.is_none() && proved_lane_messages.messages.is_empty() {
- return Err(VerificationError::EmptyMessageProof)
- }
-
- // check that the storage proof doesn't have any untouched trie nodes
- parser
- .storage
- .ensure_no_unused_nodes()
- .map_err(VerificationError::StorageProof)?;
-
- // We only support single lane messages in this generated_schema
- let mut proved_messages = ProvedMessages::new();
- proved_messages.insert(lane, proved_lane_messages);
-
- Ok(proved_messages)
- }
-
- struct StorageProofCheckerAdapter {
- storage: StorageProofChecker,
- _dummy: sp_std::marker::PhantomData,
- }
-
- impl StorageProofCheckerAdapter {
- fn read_and_decode_outbound_lane_data(
- &mut self,
- lane_id: &LaneId,
- ) -> Result, VerificationError> {
- let storage_outbound_lane_data_key = bp_messages::storage_keys::outbound_lane_data_key(
- B::BRIDGED_MESSAGES_PALLET_NAME,
- lane_id,
- );
-
- self.storage
- .read_and_decode_opt_value(storage_outbound_lane_data_key.0.as_ref())
- .map_err(VerificationError::OutboundLaneStorage)
- }
-
- fn read_and_decode_message_payload(
- &mut self,
- message_key: &MessageKey,
- ) -> Result {
- let storage_message_key = bp_messages::storage_keys::message_key(
- B::BRIDGED_MESSAGES_PALLET_NAME,
- &message_key.lane_id,
- message_key.nonce,
- );
- self.storage
- .read_and_decode_mandatory_value(storage_message_key.0.as_ref())
- .map_err(VerificationError::MessageStorage)
- }
- }
-}
-
-/// The `BridgeMessagesCall` used by a chain.
-pub type BridgeMessagesCallOf = bp_messages::BridgeMessagesCall<
- bp_runtime::AccountIdOf,
- target::FromBridgedChainMessagesProof>,
- source::FromBridgedChainMessagesDeliveryProof>,
->;
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::{
- messages_generation::{
- encode_all_messages, encode_lane_data, prepare_messages_storage_proof,
- },
- mock::*,
- };
- use bp_header_chain::{HeaderChainError, StoredHeaderDataBuilder};
- use bp_runtime::{HeaderId, StorageProofError};
- use codec::Encode;
- use sp_core::H256;
- use sp_runtime::traits::Header as _;
- use sp_trie::accessed_nodes_tracker::Error as AccessedNodesTrackerError;
-
- #[test]
- fn verify_chain_message_rejects_message_with_too_large_declared_weight() {
- assert!(source::verify_chain_message::(&vec![
- 42;
- BRIDGED_CHAIN_MAX_EXTRINSIC_WEIGHT -
- 1
- ])
- .is_err());
- }
-
- #[test]
- fn verify_chain_message_rejects_message_too_large_message() {
- assert!(source::verify_chain_message::(&vec![
- 0;
- source::maximal_message_size::()
- as usize + 1
- ],)
- .is_err());
- }
-
- #[test]
- fn verify_chain_message_accepts_maximal_message() {
- assert_eq!(
- source::verify_chain_message::(&vec![
- 0;
- source::maximal_message_size::()
- as _
- ],),
- Ok(()),
- );
- }
-
- fn using_messages_proof(
- nonces_end: MessageNonce,
- outbound_lane_data: Option,
- encode_message: impl Fn(MessageNonce, &MessagePayload) -> Option>,
- encode_outbound_lane_data: impl Fn(&OutboundLaneData) -> Vec,
- test: impl Fn(target::FromBridgedChainMessagesProof) -> R,
- ) -> R {
- let (state_root, storage_proof) = prepare_messages_storage_proof::(
- TEST_LANE_ID,
- 1..=nonces_end,
- outbound_lane_data,
- bp_runtime::StorageProofSize::Minimal(0),
- vec![42],
- encode_message,
- encode_outbound_lane_data,
- );
-
- sp_io::TestExternalities::new(Default::default()).execute_with(move || {
- let bridged_header = BridgedChainHeader::new(
- 0,
- Default::default(),
- state_root,
- Default::default(),
- Default::default(),
- );
- let bridged_header_hash = bridged_header.hash();
-
- pallet_bridge_grandpa::BestFinalized::::put(HeaderId(
- 0,
- bridged_header_hash,
- ));
- pallet_bridge_grandpa::ImportedHeaders::::insert(
- bridged_header_hash,
- bridged_header.build(),
- );
- test(target::FromBridgedChainMessagesProof {
- bridged_header_hash,
- storage_proof,
- lane: TEST_LANE_ID,
- nonces_start: 1,
- nonces_end,
- })
- })
- }
-
- #[test]
- fn messages_proof_is_rejected_if_declared_less_than_actual_number_of_messages() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| {
- target::verify_messages_proof::(proof, 5)
- }),
- Err(VerificationError::MessagesCountMismatch),
- );
- }
-
- #[test]
- fn messages_proof_is_rejected_if_declared_more_than_actual_number_of_messages() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| {
- target::verify_messages_proof::(proof, 15)
- }),
- Err(VerificationError::MessagesCountMismatch),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_header_is_missing_from_the_chain() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| {
- let bridged_header_hash =
- pallet_bridge_grandpa::BestFinalized::::get().unwrap().1;
- pallet_bridge_grandpa::ImportedHeaders::::remove(bridged_header_hash);
- target::verify_messages_proof::(proof, 10)
- }),
- Err(VerificationError::HeaderChain(HeaderChainError::UnknownHeader)),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_header_state_root_mismatches() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| {
- let bridged_header_hash =
- pallet_bridge_grandpa::BestFinalized::::get().unwrap().1;
- pallet_bridge_grandpa::ImportedHeaders::::insert(
- bridged_header_hash,
- BridgedChainHeader::new(
- 0,
- Default::default(),
- Default::default(),
- Default::default(),
- Default::default(),
- )
- .build(),
- );
- target::verify_messages_proof::(proof, 10)
- }),
- Err(VerificationError::HeaderChain(HeaderChainError::StorageProof(
- StorageProofError::StorageRootMismatch
- ))),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_it_has_duplicate_trie_nodes() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |mut proof| {
- let node = proof.storage_proof.pop().unwrap();
- proof.storage_proof.push(node.clone());
- proof.storage_proof.push(node);
- target::verify_messages_proof::(proof, 10)
- },),
- Err(VerificationError::HeaderChain(HeaderChainError::StorageProof(
- StorageProofError::StorageProof(sp_trie::StorageProofError::DuplicateNodes.into())
- ))),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_it_has_unused_trie_nodes() {
- assert_eq!(
- using_messages_proof(10, None, encode_all_messages, encode_lane_data, |mut proof| {
- proof.storage_proof.push(vec![42]);
- target::verify_messages_proof::(proof, 10)
- },),
- Err(VerificationError::StorageProof(StorageProofError::AccessedNodesTracker(
- AccessedNodesTrackerError::UnusedNodes.into()
- ))),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_required_message_is_missing() {
- matches!(
- using_messages_proof(
- 10,
- None,
- |n, m| if n != 5 { Some(m.encode()) } else { None },
- encode_lane_data,
- |proof| target::verify_messages_proof::(proof, 10)
- ),
- Err(VerificationError::MessageStorage(StorageProofError::StorageValueEmpty)),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_message_decode_fails() {
- matches!(
- using_messages_proof(
- 10,
- None,
- |n, m| {
- let mut m = m.encode();
- if n == 5 {
- m = vec![42]
- }
- Some(m)
- },
- encode_lane_data,
- |proof| target::verify_messages_proof::(proof, 10),
- ),
- Err(VerificationError::MessageStorage(StorageProofError::StorageValueDecodeFailed(_))),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_outbound_lane_state_decode_fails() {
- matches!(
- using_messages_proof(
- 10,
- Some(OutboundLaneData {
- oldest_unpruned_nonce: 1,
- latest_received_nonce: 1,
- latest_generated_nonce: 1,
- }),
- encode_all_messages,
- |d| {
- let mut d = d.encode();
- d.truncate(1);
- d
- },
- |proof| target::verify_messages_proof::(proof, 10),
- ),
- Err(VerificationError::OutboundLaneStorage(
- StorageProofError::StorageValueDecodeFailed(_)
- )),
- );
- }
-
- #[test]
- fn message_proof_is_rejected_if_it_is_empty() {
- assert_eq!(
- using_messages_proof(0, None, encode_all_messages, encode_lane_data, |proof| {
- target::verify_messages_proof::(proof, 0)
- },),
- Err(VerificationError::EmptyMessageProof),
- );
- }
-
- #[test]
- fn non_empty_message_proof_without_messages_is_accepted() {
- assert_eq!(
- using_messages_proof(
- 0,
- Some(OutboundLaneData {
- oldest_unpruned_nonce: 1,
- latest_received_nonce: 1,
- latest_generated_nonce: 1,
- }),
- encode_all_messages,
- encode_lane_data,
- |proof| target::verify_messages_proof::(proof, 0),
- ),
- Ok(vec![(
- TEST_LANE_ID,
- ProvedLaneMessages {
- lane_state: Some(OutboundLaneData {
- oldest_unpruned_nonce: 1,
- latest_received_nonce: 1,
- latest_generated_nonce: 1,
- }),
- messages: Vec::new(),
- },
- )]
- .into_iter()
- .collect()),
- );
- }
-
- #[test]
- fn non_empty_message_proof_is_accepted() {
- assert_eq!(
- using_messages_proof(
- 1,
- Some(OutboundLaneData {
- oldest_unpruned_nonce: 1,
- latest_received_nonce: 1,
- latest_generated_nonce: 1,
- }),
- encode_all_messages,
- encode_lane_data,
- |proof| target::verify_messages_proof::(proof, 1),
- ),
- Ok(vec![(
- TEST_LANE_ID,
- ProvedLaneMessages {
- lane_state: Some(OutboundLaneData {
- oldest_unpruned_nonce: 1,
- latest_received_nonce: 1,
- latest_generated_nonce: 1,
- }),
- messages: vec![Message {
- key: MessageKey { lane_id: TEST_LANE_ID, nonce: 1 },
- payload: vec![42],
- }],
- },
- )]
- .into_iter()
- .collect()),
- );
- }
-
- #[test]
- fn verify_messages_proof_does_not_panic_if_messages_count_mismatches() {
- assert_eq!(
- using_messages_proof(1, None, encode_all_messages, encode_lane_data, |mut proof| {
- proof.nonces_end = u64::MAX;
- target::verify_messages_proof::(proof, u32::MAX)
- },),
- Err(VerificationError::MessagesCountMismatch),
- );
- }
-}
diff --git a/bridges/bin/runtime-common/src/messages_benchmarking.rs b/bridges/bin/runtime-common/src/messages_benchmarking.rs
index 74494f7908045fac601b4c3f64a456ad12dacd6f..1880e65547fe6d5e0af71e6ec7c6e0e214f20866 100644
--- a/bridges/bin/runtime-common/src/messages_benchmarking.rs
+++ b/bridges/bin/runtime-common/src/messages_benchmarking.rs
@@ -19,23 +19,22 @@
#![cfg(feature = "runtime-benchmarks")]
-use crate::{
- messages::{
- source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
- AccountIdOf, BridgedChain, HashOf, MessageBridge, ThisChain,
- },
+use bp_messages::{
+ source_chain::FromBridgedChainMessagesDeliveryProof,
+ target_chain::FromBridgedChainMessagesProof, MessagePayload,
+};
+use bp_polkadot_core::parachains::ParaHash;
+use bp_runtime::{AccountIdOf, Chain, HashOf, Parachain};
+use codec::Encode;
+use frame_support::weights::Weight;
+use pallet_bridge_messages::{
+ benchmarking::{MessageDeliveryProofParams, MessageProofParams},
messages_generation::{
encode_all_messages, encode_lane_data, prepare_message_delivery_storage_proof,
prepare_messages_storage_proof,
},
+ BridgedChainOf, ThisChainOf,
};
-
-use bp_messages::MessagePayload;
-use bp_polkadot_core::parachains::ParaHash;
-use bp_runtime::{Chain, Parachain, StorageProofSize, UnderlyingChainOf};
-use codec::Encode;
-use frame_support::weights::Weight;
-use pallet_bridge_messages::benchmarking::{MessageDeliveryProofParams, MessageProofParams};
use sp_runtime::traits::{Header, Zero};
use sp_std::prelude::*;
use xcm::latest::prelude::*;
@@ -45,11 +44,7 @@ fn prepare_inbound_message(
params: &MessageProofParams,
successful_dispatch_message_generator: impl Fn(usize) -> MessagePayload,
) -> MessagePayload {
- // we only care about **this** message size when message proof needs to be `Minimal`
- let expected_size = match params.size {
- StorageProofSize::Minimal(size) => size as usize,
- _ => 0,
- };
+ let expected_size = params.proof_params.db_size.unwrap_or(0) as usize;
// if we don't need a correct message, then we may just return some random blob
if !params.is_successful_dispatch_expected {
@@ -75,25 +70,32 @@ fn prepare_inbound_message(
/// This method is intended to be used when benchmarking pallet, linked to the chain that
/// uses GRANDPA finality. For parachains, please use the `prepare_message_proof_from_parachain`
/// function.
-pub fn prepare_message_proof_from_grandpa_chain(
+pub fn prepare_message_proof_from_grandpa_chain(
params: MessageProofParams,
message_generator: impl Fn(usize) -> MessagePayload,
-) -> (FromBridgedChainMessagesProof>>, Weight)
+) -> (FromBridgedChainMessagesProof>>, Weight)
where
- R: pallet_bridge_grandpa::Config>>,
+ R: pallet_bridge_grandpa::Config>
+ + pallet_bridge_messages::Config<
+ MI,
+ BridgedHeaderChain = pallet_bridge_grandpa::Pallet,
+ >,
FI: 'static,
- B: MessageBridge,
+ MI: 'static,
{
// prepare storage proof
- let (state_root, storage_proof) = prepare_messages_storage_proof::(
- params.lane,
- params.message_nonces.clone(),
- params.outbound_lane_data.clone(),
- params.size,
- prepare_inbound_message(¶ms, message_generator),
- encode_all_messages,
- encode_lane_data,
- );
+ let (state_root, storage_proof) =
+ prepare_messages_storage_proof::, ThisChainOf>(
+ params.lane,
+ params.message_nonces.clone(),
+ params.outbound_lane_data.clone(),
+ params.proof_params,
+ |_| prepare_inbound_message(¶ms, &message_generator),
+ encode_all_messages,
+ encode_lane_data,
+ false,
+ false,
+ );
// update runtime storage
let (_, bridged_header_hash) = insert_header_to_grandpa_pallet::(state_root);
@@ -118,30 +120,33 @@ where
/// This method is intended to be used when benchmarking pallet, linked to the chain that
/// uses parachain finality. For GRANDPA chains, please use the
/// `prepare_message_proof_from_grandpa_chain` function.
-pub fn prepare_message_proof_from_parachain(
+pub fn prepare_message_proof_from_parachain(
params: MessageProofParams,
message_generator: impl Fn(usize) -> MessagePayload,
-) -> (FromBridgedChainMessagesProof>>, Weight)
+) -> (FromBridgedChainMessagesProof>>, Weight)
where
- R: pallet_bridge_parachains::Config,
+ R: pallet_bridge_parachains::Config + pallet_bridge_messages::Config,
PI: 'static,
- B: MessageBridge,
- UnderlyingChainOf>: Chain + Parachain,
+ MI: 'static,
+ BridgedChainOf: Chain + Parachain,
{
// prepare storage proof
- let (state_root, storage_proof) = prepare_messages_storage_proof::(
- params.lane,
- params.message_nonces.clone(),
- params.outbound_lane_data.clone(),
- params.size,
- prepare_inbound_message(¶ms, message_generator),
- encode_all_messages,
- encode_lane_data,
- );
+ let (state_root, storage_proof) =
+ prepare_messages_storage_proof::, ThisChainOf>(
+ params.lane,
+ params.message_nonces.clone(),
+ params.outbound_lane_data.clone(),
+ params.proof_params,
+ |_| prepare_inbound_message(¶ms, &message_generator),
+ encode_all_messages,
+ encode_lane_data,
+ false,
+ false,
+ );
// update runtime storage
let (_, bridged_header_hash) =
- insert_header_to_parachains_pallet::>>(state_root);
+ insert_header_to_parachains_pallet::>(state_root);
(
FromBridgedChainMessagesProof {
@@ -160,21 +165,24 @@ where
/// This method is intended to be used when benchmarking pallet, linked to the chain that
/// uses GRANDPA finality. For parachains, please use the
/// `prepare_message_delivery_proof_from_parachain` function.
-pub fn prepare_message_delivery_proof_from_grandpa_chain(
- params: MessageDeliveryProofParams>>,
-) -> FromBridgedChainMessagesDeliveryProof>>
+pub fn prepare_message_delivery_proof_from_grandpa_chain(
+ params: MessageDeliveryProofParams>>,
+) -> FromBridgedChainMessagesDeliveryProof>>
where
- R: pallet_bridge_grandpa::Config>>,
+ R: pallet_bridge_grandpa::Config>
+ + pallet_bridge_messages::Config<
+ MI,
+ BridgedHeaderChain = pallet_bridge_grandpa::Pallet,
+ >,
FI: 'static,
- B: MessageBridge,
+ MI: 'static,
{
// prepare storage proof
let lane = params.lane;
- let (state_root, storage_proof) = prepare_message_delivery_storage_proof::(
- params.lane,
- params.inbound_lane_data,
- params.size,
- );
+ let (state_root, storage_proof) = prepare_message_delivery_storage_proof::<
+ BridgedChainOf,
+ ThisChainOf,
+ >(params.lane, params.inbound_lane_data, params.proof_params);
// update runtime storage
let (_, bridged_header_hash) = insert_header_to_grandpa_pallet::(state_root);
@@ -191,26 +199,25 @@ where
/// This method is intended to be used when benchmarking pallet, linked to the chain that
/// uses parachain finality. For GRANDPA chains, please use the
/// `prepare_message_delivery_proof_from_grandpa_chain` function.
-pub fn prepare_message_delivery_proof_from_parachain(
- params: MessageDeliveryProofParams>>,
-) -> FromBridgedChainMessagesDeliveryProof>>
+pub fn prepare_message_delivery_proof_from_parachain(
+ params: MessageDeliveryProofParams>>,
+) -> FromBridgedChainMessagesDeliveryProof>>
where
- R: pallet_bridge_parachains::Config,
+ R: pallet_bridge_parachains::Config + pallet_bridge_messages::Config,
PI: 'static,
- B: MessageBridge,
- UnderlyingChainOf>: Chain + Parachain,
+ MI: 'static,
+ BridgedChainOf: Chain + Parachain,
{
// prepare storage proof
let lane = params.lane;
- let (state_root, storage_proof) = prepare_message_delivery_storage_proof::(
- params.lane,
- params.inbound_lane_data,
- params.size,
- );
+ let (state_root, storage_proof) = prepare_message_delivery_storage_proof::<
+ BridgedChainOf,
+ ThisChainOf,
+ >(params.lane, params.inbound_lane_data, params.proof_params);
// update runtime storage
let (_, bridged_header_hash) =
- insert_header_to_parachains_pallet::>>(state_root);
+ insert_header_to_parachains_pallet::>(state_root);
FromBridgedChainMessagesDeliveryProof {
bridged_header_hash: bridged_header_hash.into(),
diff --git a/bridges/bin/runtime-common/src/messages_call_ext.rs b/bridges/bin/runtime-common/src/messages_call_ext.rs
index fb07f7b6dd69110918af23b227708e226bede625..a9ee1969ae0ca462f36098f03b4454e1399af129 100644
--- a/bridges/bin/runtime-common/src/messages_call_ext.rs
+++ b/bridges/bin/runtime-common/src/messages_call_ext.rs
@@ -14,19 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
-//! Signed extension for the `pallet-bridge-messages` that is able to reject obsolete
-//! (and some other invalid) transactions.
+//! Helpers for easier manipulation of call processing with signed extensions.
-use crate::messages::{
- source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
+use bp_messages::{
+ target_chain::MessageDispatch, ChainWithMessages, InboundLaneData, LaneId, MessageNonce,
};
-use bp_messages::{target_chain::MessageDispatch, InboundLaneData, LaneId, MessageNonce};
-use bp_runtime::OwnedBridgeModule;
-use frame_support::{
- dispatch::CallableCallFor,
- traits::{Get, IsSubType},
-};
-use pallet_bridge_messages::{Config, Pallet};
+use bp_runtime::{AccountIdOf, OwnedBridgeModule};
+use frame_support::{dispatch::CallableCallFor, traits::IsSubType};
+use pallet_bridge_messages::{BridgedChainOf, Config, Pallet};
use sp_runtime::{transaction_validity::TransactionValidity, RuntimeDebug};
use sp_std::ops::RangeInclusive;
@@ -213,18 +208,8 @@ pub trait MessagesCallSubType, I: 'static>:
}
impl<
- BridgedHeaderHash,
- SourceHeaderChain: bp_messages::target_chain::SourceHeaderChain<
- MessagesProof = FromBridgedChainMessagesProof,
- >,
- TargetHeaderChain: bp_messages::source_chain::TargetHeaderChain<
- >::OutboundPayload,
- ::AccountId,
- MessagesDeliveryProof = FromBridgedChainMessagesDeliveryProof,
- >,
Call: IsSubType, T>>,
- T: frame_system::Config
- + Config,
+ T: frame_system::Config + Config,
I: 'static,
> MessagesCallSubType for T::RuntimeCall
{
@@ -340,16 +325,17 @@ impl<
/// Returns occupation state of unrewarded relayers vector.
fn unrewarded_relayers_occupation, I: 'static>(
- inbound_lane_data: &InboundLaneData,
+ inbound_lane_data: &InboundLaneData>>,
) -> UnrewardedRelayerOccupation {
UnrewardedRelayerOccupation {
- free_relayer_slots: T::MaxUnrewardedRelayerEntriesAtInboundLane::get()
+ free_relayer_slots: T::BridgedChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX
.saturating_sub(inbound_lane_data.relayers.len() as MessageNonce),
free_message_slots: {
let unconfirmed_messages = inbound_lane_data
.last_delivered_nonce()
.saturating_sub(inbound_lane_data.last_confirmed_nonce);
- T::MaxUnconfirmedMessagesAtInboundLane::get().saturating_sub(unconfirmed_messages)
+ T::BridgedChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX
+ .saturating_sub(unconfirmed_messages)
},
}
}
@@ -358,22 +344,20 @@ fn unrewarded_relayers_occupation, I: 'static>(
mod tests {
use super::*;
use crate::{
- messages::{
- source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
- },
messages_call_ext::MessagesCallSubType,
- mock::{
- DummyMessageDispatch, MaxUnconfirmedMessagesAtInboundLane,
- MaxUnrewardedRelayerEntriesAtInboundLane, TestRuntime, ThisChainRuntimeCall,
- },
+ mock::{BridgedUnderlyingChain, DummyMessageDispatch, TestRuntime, ThisChainRuntimeCall},
+ };
+ use bp_messages::{
+ source_chain::FromBridgedChainMessagesDeliveryProof,
+ target_chain::FromBridgedChainMessagesProof, DeliveredMessages, UnrewardedRelayer,
+ UnrewardedRelayersState,
};
- use bp_messages::{DeliveredMessages, UnrewardedRelayer, UnrewardedRelayersState};
use sp_std::ops::RangeInclusive;
fn fill_unrewarded_relayers() {
let mut inbound_lane_state =
pallet_bridge_messages::InboundLanes::::get(LaneId([0, 0, 0, 0]));
- for n in 0..MaxUnrewardedRelayerEntriesAtInboundLane::get() {
+ for n in 0..BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX {
inbound_lane_state.relayers.push_back(UnrewardedRelayer {
relayer: Default::default(),
messages: DeliveredMessages { begin: n + 1, end: n + 1 },
@@ -392,7 +376,7 @@ mod tests {
relayer: Default::default(),
messages: DeliveredMessages {
begin: 1,
- end: MaxUnconfirmedMessagesAtInboundLane::get(),
+ end: BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
},
});
pallet_bridge_messages::InboundLanes::::insert(
@@ -418,13 +402,13 @@ mod tests {
messages_count: nonces_end.checked_sub(nonces_start).map(|x| x + 1).unwrap_or(0)
as u32,
dispatch_weight: frame_support::weights::Weight::zero(),
- proof: FromBridgedChainMessagesProof {
+ proof: Box::new(FromBridgedChainMessagesProof {
bridged_header_hash: Default::default(),
- storage_proof: vec![],
+ storage_proof: Default::default(),
lane: LaneId([0, 0, 0, 0]),
nonces_start,
nonces_end,
- },
+ }),
},
)
.check_obsolete_call()
@@ -508,8 +492,8 @@ mod tests {
sp_io::TestExternalities::new(Default::default()).execute_with(|| {
fill_unrewarded_messages();
assert!(validate_message_delivery(
- MaxUnconfirmedMessagesAtInboundLane::get(),
- MaxUnconfirmedMessagesAtInboundLane::get() - 1
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX - 1
));
});
}
@@ -540,7 +524,7 @@ mod tests {
pallet_bridge_messages::Call::::receive_messages_delivery_proof {
proof: FromBridgedChainMessagesDeliveryProof {
bridged_header_hash: Default::default(),
- storage_proof: Vec::new(),
+ storage_proof: Default::default(),
lane: LaneId([0, 0, 0, 0]),
},
relayers_state: UnrewardedRelayersState {
@@ -608,7 +592,7 @@ mod tests {
free_message_slots: if is_empty {
0
} else {
- MaxUnconfirmedMessagesAtInboundLane::get()
+ BridgedUnderlyingChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX
},
},
},
diff --git a/bridges/bin/runtime-common/src/mock.rs b/bridges/bin/runtime-common/src/mock.rs
index f49474667896049cfd6aff4bf4a4b0d9d6e73c95..2f248a7162a6cbdcc09d2980a922b1a065127e40 100644
--- a/bridges/bin/runtime-common/src/mock.rs
+++ b/bridges/bin/runtime-common/src/mock.rs
@@ -18,26 +18,16 @@
#![cfg(test)]
-use crate::messages::{
- source::{
- FromThisChainMaximalOutboundPayloadSize, FromThisChainMessagePayload,
- TargetHeaderChainAdapter,
- },
- target::{FromBridgedChainMessagePayload, SourceHeaderChainAdapter},
- BridgedChainWithMessages, HashOf, MessageBridge, ThisChainWithMessages,
-};
+use crate::messages_xcm_extension::XcmAsPlainPayload;
-use bp_header_chain::{ChainWithGrandpa, HeaderChain};
+use bp_header_chain::ChainWithGrandpa;
use bp_messages::{
target_chain::{DispatchMessage, MessageDispatch},
- LaneId, MessageNonce,
+ ChainWithMessages, LaneId, MessageNonce,
};
use bp_parachains::SingleParaStoredHeaderDataBuilder;
use bp_relayers::PayRewardFromAccount;
-use bp_runtime::{
- messages::MessageDispatchResult, Chain, ChainId, Parachain, UnderlyingChainProvider,
-};
-use codec::{Decode, Encode};
+use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Parachain};
use frame_support::{
derive_impl, parameter_types,
weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight},
@@ -46,7 +36,7 @@ use pallet_transaction_payment::Multiplier;
use sp_runtime::{
testing::H256,
traits::{BlakeTwo256, ConstU32, ConstU64, ConstU8},
- FixedPointNumber, Perquintill,
+ FixedPointNumber, Perquintill, StateVersion,
};
/// Account identifier at `ThisChain`.
@@ -61,8 +51,6 @@ pub type ThisChainHash = H256;
pub type ThisChainHasher = BlakeTwo256;
/// Runtime call at `ThisChain`.
pub type ThisChainRuntimeCall = RuntimeCall;
-/// Runtime call origin at `ThisChain`.
-pub type ThisChainCallOrigin = RuntimeOrigin;
/// Header of `ThisChain`.
pub type ThisChainHeader = sp_runtime::generic::Header;
/// Block of `ThisChain`.
@@ -100,8 +88,6 @@ pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
pub const TEST_LANE_ID: LaneId = LaneId([0, 0, 0, 0]);
/// Bridged chain id used in tests.
pub const TEST_BRIDGED_CHAIN_ID: ChainId = *b"brdg";
-/// Maximal extrinsic weight at the `BridgedChain`.
-pub const BRIDGED_CHAIN_MAX_EXTRINSIC_WEIGHT: usize = 2048;
/// Maximal extrinsic size at the `BridgedChain`.
pub const BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE: u32 = 1024;
@@ -126,7 +112,6 @@ crate::generate_bridge_reject_obsolete_headers_and_messages! {
parameter_types! {
pub const ActiveOutboundLanes: &'static [LaneId] = &[TEST_LANE_ID];
- pub const BridgedChainId: ChainId = TEST_BRIDGED_CHAIN_ID;
pub const BridgedParasPalletName: &'static str = "Paras";
pub const ExistentialDeposit: ThisChainBalance = 500;
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 };
@@ -136,8 +121,6 @@ parameter_types! {
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(3, 100_000);
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000u128);
pub MaximumMultiplier: Multiplier = sp_runtime::traits::Bounded::max_value();
- pub const MaxUnrewardedRelayerEntriesAtInboundLane: MessageNonce = 16;
- pub const MaxUnconfirmedMessagesAtInboundLane: MessageNonce = 1_000;
pub const ReserveId: [u8; 8] = *b"brdgrlrs";
}
@@ -203,17 +186,12 @@ impl pallet_bridge_messages::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_bridge_messages::weights::BridgeWeight;
type ActiveOutboundLanes = ActiveOutboundLanes;
- type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
- type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane;
- type MaximalOutboundPayloadSize = FromThisChainMaximalOutboundPayloadSize;
- type OutboundPayload = FromThisChainMessagePayload;
+ type OutboundPayload = XcmAsPlainPayload;
- type InboundPayload = FromBridgedChainMessagePayload;
- type InboundRelayer = BridgedChainAccountId;
+ type InboundPayload = Vec;
type DeliveryPayments = ();
- type TargetHeaderChain = TargetHeaderChainAdapter;
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
TestRuntime,
(),
@@ -221,9 +199,11 @@ impl pallet_bridge_messages::Config for TestRuntime {
>;
type OnMessagesDelivered = ();
- type SourceHeaderChain = SourceHeaderChainAdapter;
type MessageDispatch = DummyMessageDispatch;
- type BridgedChainId = BridgedChainId;
+
+ type ThisChain = ThisUnderlyingChain;
+ type BridgedChain = BridgedUnderlyingChain;
+ type BridgedHeaderChain = BridgeGrandpa;
}
impl pallet_bridge_relayers::Config for TestRuntime {
@@ -262,55 +242,6 @@ impl MessageDispatch for DummyMessageDispatch {
}
}
-/// Bridge that is deployed on `ThisChain` and allows sending/receiving messages to/from
-/// `BridgedChain`.
-#[derive(Debug, PartialEq, Eq)]
-pub struct OnThisChainBridge;
-
-impl MessageBridge for OnThisChainBridge {
- const BRIDGED_MESSAGES_PALLET_NAME: &'static str = "";
-
- type ThisChain = ThisChain;
- type BridgedChain = BridgedChain;
- type BridgedHeaderChain = pallet_bridge_grandpa::GrandpaChainHeaders;
-}
-
-/// Bridge that is deployed on `BridgedChain` and allows sending/receiving messages to/from
-/// `ThisChain`.
-#[derive(Debug, PartialEq, Eq)]
-pub struct OnBridgedChainBridge;
-
-impl MessageBridge for OnBridgedChainBridge {
- const BRIDGED_MESSAGES_PALLET_NAME: &'static str = "";
-
- type ThisChain = BridgedChain;
- type BridgedChain = ThisChain;
- type BridgedHeaderChain = ThisHeaderChain;
-}
-
-/// Dummy implementation of `HeaderChain` for `ThisChain` at the `BridgedChain`.
-pub struct ThisHeaderChain;
-
-impl HeaderChain for ThisHeaderChain {
- fn finalized_header_state_root(_hash: HashOf) -> Option> {
- unreachable!()
- }
-}
-
-/// Call origin at `BridgedChain`.
-#[derive(Clone, Debug)]
-pub struct BridgedChainOrigin;
-
-impl From
- for Result, BridgedChainOrigin>
-{
- fn from(
- _origin: BridgedChainOrigin,
- ) -> Result, BridgedChainOrigin> {
- unreachable!()
- }
-}
-
/// Underlying chain of `ThisChain`.
pub struct ThisUnderlyingChain;
@@ -326,6 +257,8 @@ impl Chain for ThisUnderlyingChain {
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE
}
@@ -335,29 +268,20 @@ impl Chain for ThisUnderlyingChain {
}
}
-/// The chain where we are in tests.
-pub struct ThisChain;
-
-impl UnderlyingChainProvider for ThisChain {
- type Chain = ThisUnderlyingChain;
-}
+impl ChainWithMessages for ThisUnderlyingChain {
+ const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = "";
-impl ThisChainWithMessages for ThisChain {
- type RuntimeOrigin = ThisChainCallOrigin;
+ const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 16;
+ const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1000;
}
-impl BridgedChainWithMessages for ThisChain {}
-
/// Underlying chain of `BridgedChain`.
pub struct BridgedUnderlyingChain;
/// Some parachain under `BridgedChain` consensus.
pub struct BridgedUnderlyingParachain;
-/// Runtime call of the `BridgedChain`.
-#[derive(Decode, Encode)]
-pub struct BridgedChainCall;
impl Chain for BridgedUnderlyingChain {
- const ID: ChainId = *b"buch";
+ const ID: ChainId = TEST_BRIDGED_CHAIN_ID;
type BlockNumber = BridgedChainBlockNumber;
type Hash = BridgedChainHash;
@@ -368,6 +292,8 @@ impl Chain for BridgedUnderlyingChain {
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE
}
@@ -384,6 +310,12 @@ impl ChainWithGrandpa for BridgedUnderlyingChain {
const AVERAGE_HEADER_SIZE: u32 = 64;
}
+impl ChainWithMessages for BridgedUnderlyingChain {
+ const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = "";
+ const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 16;
+ const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1000;
+}
+
impl Chain for BridgedUnderlyingParachain {
const ID: ChainId = *b"bupc";
@@ -396,6 +328,8 @@ impl Chain for BridgedUnderlyingParachain {
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE
}
@@ -409,19 +343,6 @@ impl Parachain for BridgedUnderlyingParachain {
const MAX_HEADER_SIZE: u32 = 1_024;
}
-/// The other, bridged chain, used in tests.
-pub struct BridgedChain;
-
-impl UnderlyingChainProvider for BridgedChain {
- type Chain = BridgedUnderlyingChain;
-}
-
-impl ThisChainWithMessages for BridgedChain {
- type RuntimeOrigin = BridgedChainOrigin;
-}
-
-impl BridgedChainWithMessages for BridgedChain {}
-
/// Run test within test externalities.
pub fn run_test(test: impl FnOnce()) {
sp_io::TestExternalities::new(Default::default()).execute_with(test)
diff --git a/bridges/bin/runtime-common/src/parachains_benchmarking.rs b/bridges/bin/runtime-common/src/parachains_benchmarking.rs
index b3050b9ac0f3ccec617399d3eb91647dcab7eb3d..bcbd779b44dea5fbef7781335cfa1d359ab8c1f1 100644
--- a/bridges/bin/runtime-common/src/parachains_benchmarking.rs
+++ b/bridges/bin/runtime-common/src/parachains_benchmarking.rs
@@ -18,14 +18,11 @@
#![cfg(feature = "runtime-benchmarks")]
-use crate::{
- messages_benchmarking::insert_header_to_grandpa_pallet,
- messages_generation::grow_trie_leaf_value,
-};
+use crate::messages_benchmarking::insert_header_to_grandpa_pallet;
use bp_parachains::parachain_head_storage_key_at_source;
use bp_polkadot_core::parachains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
-use bp_runtime::{record_all_trie_keys, StorageProofSize};
+use bp_runtime::{grow_storage_value, record_all_trie_keys, Chain, UnverifiedStorageProofParams};
use codec::Encode;
use frame_support::traits::Get;
use pallet_bridge_parachains::{RelayBlockHash, RelayBlockHasher, RelayBlockNumber};
@@ -39,14 +36,14 @@ use sp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut};
pub fn prepare_parachain_heads_proof(
parachains: &[ParaId],
parachain_head_size: u32,
- size: StorageProofSize,
+ proof_params: UnverifiedStorageProofParams,
) -> (RelayBlockNumber, RelayBlockHash, ParaHeadsProof, Vec<(ParaId, ParaHash)>)
where
R: pallet_bridge_parachains::Config
+ pallet_bridge_grandpa::Config,
PI: 'static,
>::BridgedChain:
- bp_runtime::Chain,
+ Chain,
{
let parachain_head = ParaHead(vec![0u8; parachain_head_size as usize]);
@@ -64,7 +61,7 @@ where
let storage_key =
parachain_head_storage_key_at_source(R::ParasPalletName::get(), *parachain);
let leaf_data = if i == 0 {
- grow_trie_leaf_value(parachain_head.encode(), size)
+ grow_storage_value(parachain_head.encode(), &proof_params)
} else {
parachain_head.encode()
};
diff --git a/bridges/chains/chain-bridge-hub-kusama/src/lib.rs b/bridges/chains/chain-bridge-hub-kusama/src/lib.rs
index ef3ef4ab7b7a9bc111218e3c53091ac232f34721..c990e8a12f367cafbd35b0693b323a6ec5fb5e96 100644
--- a/bridges/chains/chain-bridge-hub-kusama/src/lib.rs
+++ b/bridges/chains/chain-bridge-hub-kusama/src/lib.rs
@@ -29,7 +29,7 @@ use frame_support::{
dispatch::DispatchClass,
sp_runtime::{MultiAddress, MultiSigner},
};
-use sp_runtime::RuntimeDebug;
+use sp_runtime::{RuntimeDebug, StateVersion};
/// BridgeHubKusama parachain.
#[derive(RuntimeDebug)]
@@ -48,6 +48,8 @@ impl Chain for BridgeHubKusama {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
diff --git a/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs b/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs
index 9db71af928e5df01170cf4ab8bf5f20cd72f7610..7379b8863b1de5c1a1482db90077e958f0a33366 100644
--- a/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs
+++ b/bridges/chains/chain-bridge-hub-polkadot/src/lib.rs
@@ -26,7 +26,7 @@ use bp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain,
};
use frame_support::dispatch::DispatchClass;
-use sp_runtime::RuntimeDebug;
+use sp_runtime::{RuntimeDebug, StateVersion};
/// BridgeHubPolkadot parachain.
#[derive(RuntimeDebug)]
@@ -45,6 +45,8 @@ impl Chain for BridgeHubPolkadot {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
diff --git a/bridges/chains/chain-bridge-hub-rococo/src/lib.rs b/bridges/chains/chain-bridge-hub-rococo/src/lib.rs
index d7097f01c5316a58851f400a86b98eda3d7e8bcc..73af997b9950ef640040e44cbba0b93b6a7a56a3 100644
--- a/bridges/chains/chain-bridge-hub-rococo/src/lib.rs
+++ b/bridges/chains/chain-bridge-hub-rococo/src/lib.rs
@@ -25,8 +25,10 @@ use bp_messages::*;
use bp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain,
};
-use frame_support::dispatch::DispatchClass;
-use sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug};
+use frame_support::{
+ dispatch::DispatchClass,
+ sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
+};
/// BridgeHubRococo parachain.
#[derive(RuntimeDebug)]
@@ -45,6 +47,8 @@ impl Chain for BridgeHubRococo {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
@@ -103,10 +107,10 @@ frame_support::parameter_types! {
pub const BridgeHubRococoBaseXcmFeeInRocs: u128 = 59_034_266;
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single inbound message.
- /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`)
+ /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`)
pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 314_037_860;
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single outbound message confirmation.
- /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`)
+ /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`)
pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 57_414_813;
}
diff --git a/bridges/chains/chain-bridge-hub-westend/src/lib.rs b/bridges/chains/chain-bridge-hub-westend/src/lib.rs
index 800f290d7bfa41cec4139e80a7dc9ea8962a6da5..17ff2c858a1d3eeae329cb972d95adc32952ede4 100644
--- a/bridges/chains/chain-bridge-hub-westend/src/lib.rs
+++ b/bridges/chains/chain-bridge-hub-westend/src/lib.rs
@@ -25,7 +25,7 @@ use bp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain,
};
use frame_support::dispatch::DispatchClass;
-use sp_runtime::RuntimeDebug;
+use sp_runtime::{RuntimeDebug, StateVersion};
/// BridgeHubWestend parachain.
#[derive(RuntimeDebug)]
@@ -44,6 +44,8 @@ impl Chain for BridgeHubWestend {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
diff --git a/bridges/chains/chain-kusama/src/lib.rs b/bridges/chains/chain-kusama/src/lib.rs
index fd7172c5869d468ff534e54f9ef6278cf86a88ed..dcd0b23abbbefa2dfba741d6934b5d5510c93017 100644
--- a/bridges/chains/chain-kusama/src/lib.rs
+++ b/bridges/chains/chain-kusama/src/lib.rs
@@ -23,7 +23,7 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
-use frame_support::weights::Weight;
+use frame_support::{sp_runtime::StateVersion, weights::Weight};
/// Kusama Chain
pub struct Kusama;
@@ -41,6 +41,8 @@ impl Chain for Kusama {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V0;
+
fn max_extrinsic_size() -> u32 {
max_extrinsic_size()
}
diff --git a/bridges/chains/chain-polkadot-bulletin/src/lib.rs b/bridges/chains/chain-polkadot-bulletin/src/lib.rs
index f3d300567f2b4f92cec272e0929a3c53d718c823..88980a9575016bd5c5e1428329454e8131a2075d 100644
--- a/bridges/chains/chain-polkadot-bulletin/src/lib.rs
+++ b/bridges/chains/chain-polkadot-bulletin/src/lib.rs
@@ -37,7 +37,9 @@ use frame_support::{
};
use frame_system::limits;
use scale_info::TypeInfo;
-use sp_runtime::{traits::DispatchInfoOf, transaction_validity::TransactionValidityError, Perbill};
+use sp_runtime::{
+ traits::DispatchInfoOf, transaction_validity::TransactionValidityError, Perbill, StateVersion,
+};
// This chain reuses most of Polkadot primitives.
pub use bp_polkadot_core::{
@@ -192,6 +194,8 @@ impl Chain for PolkadotBulletin {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
diff --git a/bridges/chains/chain-polkadot/src/lib.rs b/bridges/chains/chain-polkadot/src/lib.rs
index a8cac0467d574e9355a8fe9ba2e7c2378019349d..f4b262d40735d7470a4d7e289f24bc1d4556d039 100644
--- a/bridges/chains/chain-polkadot/src/lib.rs
+++ b/bridges/chains/chain-polkadot/src/lib.rs
@@ -25,7 +25,7 @@ use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{
decl_bridge_finality_runtime_apis, extensions::PrevalidateAttests, Chain, ChainId,
};
-use frame_support::weights::Weight;
+use frame_support::{sp_runtime::StateVersion, weights::Weight};
/// Polkadot Chain
pub struct Polkadot;
@@ -43,6 +43,8 @@ impl Chain for Polkadot {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V0;
+
fn max_extrinsic_size() -> u32 {
max_extrinsic_size()
}
diff --git a/bridges/chains/chain-rococo/src/lib.rs b/bridges/chains/chain-rococo/src/lib.rs
index b290fe71c829d08130556a2b061c0d63f0787d4c..bfcafdf41ea2e629c9a58f2545016b2e776375b8 100644
--- a/bridges/chains/chain-rococo/src/lib.rs
+++ b/bridges/chains/chain-rococo/src/lib.rs
@@ -23,7 +23,7 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
-use frame_support::weights::Weight;
+use frame_support::{sp_runtime::StateVersion, weights::Weight};
/// Rococo Chain
pub struct Rococo;
@@ -41,6 +41,8 @@ impl Chain for Rococo {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
max_extrinsic_size()
}
diff --git a/bridges/chains/chain-westend/src/lib.rs b/bridges/chains/chain-westend/src/lib.rs
index ef451f7de0a9640bc1a278e1c712bbb099193ceb..2a247e03e59d666d3c5dd54d74e3a4f852a60bd3 100644
--- a/bridges/chains/chain-westend/src/lib.rs
+++ b/bridges/chains/chain-westend/src/lib.rs
@@ -23,7 +23,7 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
-use frame_support::weights::Weight;
+use frame_support::{sp_runtime::StateVersion, weights::Weight};
/// Westend Chain
pub struct Westend;
@@ -41,6 +41,8 @@ impl Chain for Westend {
type Nonce = Nonce;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
max_extrinsic_size()
}
diff --git a/bridges/modules/beefy/src/mock.rs b/bridges/modules/beefy/src/mock.rs
index 53efd57c29a0dfc870e43be4fec7bcdf817a3282..3b751ddf066c9562cd8fc0f054b1b103306479dd 100644
--- a/bridges/modules/beefy/src/mock.rs
+++ b/bridges/modules/beefy/src/mock.rs
@@ -29,6 +29,7 @@ use sp_core::{sr25519::Signature, Pair};
use sp_runtime::{
testing::{Header, H256},
traits::{BlakeTwo256, Hash},
+ StateVersion,
};
pub use sp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Pair as BeefyPair};
@@ -93,6 +94,8 @@ impl Chain for TestBridgedChain {
type Nonce = u64;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
unreachable!()
}
diff --git a/bridges/modules/grandpa/Cargo.toml b/bridges/modules/grandpa/Cargo.toml
index 307c7ddaaffd963e89f7b2faa7a487ce5db0dcca..6d1419ae5b030733ad9fb38a6a459ab7ce34f99f 100644
--- a/bridges/modules/grandpa/Cargo.toml
+++ b/bridges/modules/grandpa/Cargo.toml
@@ -14,7 +14,6 @@ workspace = true
[dependencies]
codec = { workspace = true }
-finality-grandpa = { workspace = true }
log = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
@@ -30,13 +29,13 @@ frame-system = { workspace = true }
sp-consensus-grandpa = { features = ["serde"], workspace = true }
sp-runtime = { features = ["serde"], workspace = true }
sp-std = { workspace = true }
-sp-trie = { workspace = true }
# Optional Benchmarking Dependencies
bp-test-utils = { optional = true, workspace = true }
frame-benchmarking = { optional = true, workspace = true }
[dev-dependencies]
+bp-runtime = { features = ["test-helpers"], workspace = true }
sp-core = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
@@ -47,7 +46,6 @@ std = [
"bp-runtime/std",
"bp-test-utils/std",
"codec/std",
- "finality-grandpa/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
@@ -56,7 +54,6 @@ std = [
"sp-consensus-grandpa/std",
"sp-runtime/std",
"sp-std/std",
- "sp-trie/std",
]
runtime-benchmarks = [
"bp-test-utils",
diff --git a/bridges/modules/grandpa/src/lib.rs b/bridges/modules/grandpa/src/lib.rs
index 3b77f676870e1a28b8367f1b14d24c9ca83ece4a..c62951b74656b052d4858dec2af1393e41553029 100644
--- a/bridges/modules/grandpa/src/lib.rs
+++ b/bridges/modules/grandpa/src/lib.rs
@@ -1443,11 +1443,14 @@ mod tests {
}
#[test]
- fn parse_finalized_storage_proof_rejects_proof_on_unknown_header() {
+ fn verify_storage_proof_rejects_unknown_header() {
run_test(|| {
assert_noop!(
- Pallet::::storage_proof_checker(Default::default(), vec![],)
- .map(|_| ()),
+ Pallet::::verify_storage_proof(
+ Default::default(),
+ Default::default(),
+ )
+ .map(|_| ()),
bp_header_chain::HeaderChainError::UnknownHeader,
);
});
@@ -1465,9 +1468,7 @@ mod tests {
>::put(HeaderId(2, hash));
>::insert(hash, header.build());
- assert_ok!(
- Pallet::::storage_proof_checker(hash, storage_proof).map(|_| ())
- );
+ assert_ok!(Pallet::::verify_storage_proof(hash, storage_proof).map(|_| ()));
});
}
diff --git a/bridges/modules/grandpa/src/mock.rs b/bridges/modules/grandpa/src/mock.rs
index 27df9d9c78f540d0d73f74c6a86ba19af30d4b6b..71af6182e057cca3d06b98ee6fe94283b93ab77d 100644
--- a/bridges/modules/grandpa/src/mock.rs
+++ b/bridges/modules/grandpa/src/mock.rs
@@ -20,7 +20,8 @@
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{Chain, ChainId};
use frame_support::{
- construct_runtime, derive_impl, parameter_types, traits::Hooks, weights::Weight,
+ construct_runtime, derive_impl, parameter_types, sp_runtime::StateVersion, traits::Hooks,
+ weights::Weight,
};
use sp_core::sr25519::Signature;
@@ -78,6 +79,8 @@ impl Chain for TestBridgedChain {
type Nonce = u64;
type Signature = Signature;
+ const STATE_VERSION: StateVersion = StateVersion::V1;
+
fn max_extrinsic_size() -> u32 {
unreachable!()
}
diff --git a/bridges/modules/messages/Cargo.toml b/bridges/modules/messages/Cargo.toml
index 573d0ba47668cfd5513def1a2465be10002c676f..33f524030d264e4ed292f8f67273e838e15fc3a9 100644
--- a/bridges/modules/messages/Cargo.toml
+++ b/bridges/modules/messages/Cargo.toml
@@ -13,52 +13,67 @@ workspace = true
[dependencies]
codec = { workspace = true }
log = { workspace = true }
-num-traits = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
# Bridge dependencies
-
+bp-header-chain = { workspace = true }
bp-messages = { workspace = true }
bp-runtime = { workspace = true }
# Substrate Dependencies
-
frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
+sp-trie = { optional = true, workspace = true }
[dev-dependencies]
-bp-test-utils = { workspace = true, default-features = true }
-pallet-balances = { workspace = true, default-features = true }
-sp-io = { workspace = true, default-features = true }
+bp-runtime = { features = ["test-helpers"], workspace = true }
+bp-test-utils = { workspace = true }
+pallet-balances = { workspace = true }
+pallet-bridge-grandpa = { workspace = true }
+sp-io = { workspace = true }
+sp-core = { workspace = true }
[features]
default = ["std"]
std = [
+ "bp-header-chain/std",
"bp-messages/std",
"bp-runtime/std",
+ "bp-test-utils/std",
"codec/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"log/std",
- "num-traits/std",
+ "pallet-balances/std",
+ "pallet-bridge-grandpa/std",
"scale-info/std",
+ "sp-core/std",
+ "sp-io/std",
"sp-runtime/std",
"sp-std/std",
+ "sp-trie/std",
]
runtime-benchmarks = [
+ "bp-runtime/test-helpers",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
+ "pallet-bridge-grandpa/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
+ "pallet-bridge-grandpa/try-runtime",
"sp-runtime/try-runtime",
]
+test-helpers = [
+ "bp-runtime/test-helpers",
+ "sp-trie",
+]
diff --git a/bridges/modules/messages/README.md b/bridges/modules/messages/README.md
index c06b96b857dea1cdf7fdaed81e70d66aff116064..80fd92eb0e5a7d975ba45619838007a12f5f5553 100644
--- a/bridges/modules/messages/README.md
+++ b/bridges/modules/messages/README.md
@@ -104,17 +104,22 @@ the message. When a message is delivered to the target chain, the `MessagesDeliv
`receive_messages_delivery_proof()` transaction. The `MessagesDelivered` contains the message lane identifier and
inclusive range of delivered message nonces.
-The pallet provides no means to get the result of message dispatch at the target chain. If that is required, it must be
-done outside of the pallet. For example, XCM messages, when dispatched, have special instructions to send some data back
-to the sender. Other dispatchers may use similar mechanism for that.
-### How to plug-in Messages Module to Send Messages to the Bridged Chain?
-
-The `pallet_bridge_messages::Config` trait has 3 main associated types that are used to work with outbound messages. The
-`pallet_bridge_messages::Config::TargetHeaderChain` defines how we see the bridged chain as the target for our outbound
-messages. It must be able to check that the bridged chain may accept our message - like that the message has size below
-maximal possible transaction size of the chain and so on. And when the relayer sends us a confirmation transaction, this
-implementation must be able to parse and verify the proof of messages delivery. Normally, you would reuse the same
-(configurable) type on all chains that are sending messages to the same bridged chain.
+The pallet provides no means to get the result of message dispatch at the target chain. If that is
+required, it must be done outside of the pallet. For example, XCM messages, when dispatched, have
+special instructions to send some data back to the sender. Other dispatchers may use similar
+mechanism for that.
+
+### How to plug-in Messages Module to Send and Receive Messages from the Bridged Chain?
+
+The `pallet_bridge_messages::Config` trait has 2 main associated types that are used to work with
+inbound messages. The `pallet_bridge_messages::BridgedChain` defines basic primitives of the bridged
+chain. The `pallet_bridge_messages::BridgedHeaderChain` defines the way we access the bridged chain
+headers in our runtime. You may use `pallet_bridge_grandpa` if you're bridging with chain that uses
+GRANDPA finality or `pallet_bridge_parachains::ParachainHeaders` if you're bridging with parachain.
+
+The `pallet_bridge_messages::Config::MessageDispatch` defines a way on how to dispatch delivered
+messages. Apart from actually dispatching the message, the implementation must return the correct
+dispatch weight of the message before dispatch is called.
The last type is the `pallet_bridge_messages::Config::DeliveryConfirmationPayments`. When confirmation
transaction is received, we call the `pay_reward()` method, passing the range of delivered messages.
@@ -129,18 +134,6 @@ You should be looking at the `bp_messages::source_chain::ForbidOutboundMessages`
[`bp_messages::source_chain`](../../primitives/messages/src/source_chain.rs). It implements all required traits and will
simply reject all transactions, related to outbound messages.
-### How to plug-in Messages Module to Receive Messages from the Bridged Chain?
-
-The `pallet_bridge_messages::Config` trait has 2 main associated types that are used to work with inbound messages. The
-`pallet_bridge_messages::Config::SourceHeaderChain` defines how we see the bridged chain as the source of our inbound
-messages. When relayer sends us a delivery transaction, this implementation must be able to parse and verify the proof
-of messages wrapped in this transaction. Normally, you would reuse the same (configurable) type on all chains that are
-sending messages to the same bridged chain.
-
-The `pallet_bridge_messages::Config::MessageDispatch` defines a way on how to dispatch delivered messages. Apart from
-actually dispatching the message, the implementation must return the correct dispatch weight of the message before
-dispatch is called.
-
### I have a Messages Module in my Runtime, but I Want to Reject all Inbound Messages. What shall I do?
You should be looking at the `bp_messages::target_chain::ForbidInboundMessages` structure from the
@@ -150,36 +143,42 @@ and will simply reject all transactions, related to inbound messages.
### What about other Constants in the Messages Module Configuration Trait?
Two settings that are used to check messages in the `send_message()` function. The
-`pallet_bridge_messages::Config::ActiveOutboundLanes` is an array of all message lanes, that may be used to send
-messages. All messages sent using other lanes are rejected. All messages that have size above
-`pallet_bridge_messages::Config::MaximalOutboundPayloadSize` will also be rejected.
-
-To be able to reward the relayer for delivering messages, we store a map of message nonces range => identifier of the
-relayer that has delivered this range at the target chain runtime storage. If a relayer delivers multiple consequent
-ranges, they're merged into single entry. So there may be more than one entry for the same relayer. Eventually, this
-whole map must be delivered back to the source chain to confirm delivery and pay rewards. So to make sure we are able to
-craft this confirmation transaction, we need to: (1) keep the size of this map below a certain limit and (2) make sure
-that the weight of processing this map is below a certain limit. Both size and processing weight mostly depend on the
-number of entries. The number of entries is limited with the
-`pallet_bridge_messages::ConfigMaxUnrewardedRelayerEntriesAtInboundLane` parameter. Processing weight also depends on
-the total number of messages that are being confirmed, because every confirmed message needs to be read. So there's
-another `pallet_bridge_messages::Config::MaxUnconfirmedMessagesAtInboundLane` parameter for that.
-
-When choosing values for these parameters, you must also keep in mind that if proof in your scheme is based on finality
-of headers (and it is the most obvious option for Substrate-based chains with finality notion), then choosing too small
-values for these parameters may cause significant delays in message delivery. That's because there are too many actors
-involved in this scheme: 1) authorities that are finalizing headers of the target chain need to finalize header with
-non-empty map; 2) the headers relayer then needs to submit this header and its finality proof to the source chain; 3)
-the messages relayer must then send confirmation transaction (storage proof of this map) to the source chain; 4) when
-the confirmation transaction will be mined at some header, source chain authorities must finalize this header; 5) the
-headers relay then needs to submit this header and its finality proof to the target chain; 6) only now the messages
-relayer may submit new messages from the source to target chain and prune the entry from the map.
-
-Delivery transaction requires the relayer to provide both number of entries and total number of messages in the map.
-This means that the module never charges an extra cost for delivering a map - the relayer would need to pay exactly for
-the number of entries+messages it has delivered. So the best guess for values of these parameters would be the pair that
-would occupy `N` percent of the maximal transaction size and weight of the source chain. The `N` should be large enough
-to process large maps, at the same time keeping reserve for future source chain upgrades.
+`pallet_bridge_messages::Config::ActiveOutboundLanes` is an array of all message lanes, that
+may be used to send messages. All messages sent using other lanes are rejected. All messages that have
+size above `pallet_bridge_messages::Config::MaximalOutboundPayloadSize` will also be rejected.
+
+To be able to reward the relayer for delivering messages, we store a map of message nonces range =>
+identifier of the relayer that has delivered this range at the target chain runtime storage. If a
+relayer delivers multiple consequent ranges, they're merged into single entry. So there may be more
+than one entry for the same relayer. Eventually, this whole map must be delivered back to the source
+chain to confirm delivery and pay rewards. So to make sure we are able to craft this confirmation
+transaction, we need to: (1) keep the size of this map below a certain limit and (2) make sure that
+the weight of processing this map is below a certain limit. Both size and processing weight mostly
+depend on the number of entries. The number of entries is limited with the
+`pallet_bridge_messages::Config::BridgedChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX` parameter.
+Processing weight also depends on the total number of messages that are being confirmed, because every
+confirmed message needs to be read. So there's another
+`pallet_bridge_messages::Config::BridgedChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX` parameter
+for that.
+
+When choosing values for these parameters, you must also keep in mind that if proof in your scheme
+is based on finality of headers (and it is the most obvious option for Substrate-based chains with
+finality notion), then choosing too small values for these parameters may cause significant delays
+in message delivery. That's because there are too many actors involved in this scheme: 1) authorities
+that are finalizing headers of the target chain need to finalize header with non-empty map; 2) the
+headers relayer then needs to submit this header and its finality proof to the source chain; 3) the
+messages relayer must then send confirmation transaction (storage proof of this map) to the source
+chain; 4) when the confirmation transaction will be mined at some header, source chain authorities
+must finalize this header; 5) the headers relay then needs to submit this header and its finality
+proof to the target chain; 6) only now the messages relayer may submit new messages from the source
+to target chain and prune the entry from the map.
+
+Delivery transaction requires the relayer to provide both number of entries and total number of
+messages in the map. This means that the module never charges an extra cost for delivering a map -
+the relayer would need to pay exactly for the number of entries+messages it has delivered. So the
+best guess for values of these parameters would be the pair that would occupy `N` percent of the
+maximal transaction size and weight of the source chain. The `N` should be large enough to process
+large maps, at the same time keeping reserve for future source chain upgrades.
## Non-Essential Functionality
diff --git a/bridges/modules/messages/src/benchmarking.rs b/bridges/modules/messages/src/benchmarking.rs
index 4f13c4409672b3e76d36fd7d3dd2fab5c7e2ec1b..d38aaf32dc94bd157de0d3e910b729a7970c1684 100644
--- a/bridges/modules/messages/src/benchmarking.rs
+++ b/bridges/modules/messages/src/benchmarking.rs
@@ -16,19 +16,22 @@
//! Messages pallet benchmarking.
+#![cfg(feature = "runtime-benchmarks")]
+
use crate::{
inbound_lane::InboundLaneStorage, outbound_lane, weights_ext::EXPECTED_DEFAULT_MESSAGE_LENGTH,
- Call, OutboundLanes, RuntimeInboundLaneStorage,
+ BridgedChainOf, Call, OutboundLanes, RuntimeInboundLaneStorage,
};
use bp_messages::{
- source_chain::TargetHeaderChain, target_chain::SourceHeaderChain, DeliveredMessages,
+ source_chain::FromBridgedChainMessagesDeliveryProof,
+ target_chain::FromBridgedChainMessagesProof, ChainWithMessages, DeliveredMessages,
InboundLaneData, LaneId, MessageNonce, OutboundLaneData, UnrewardedRelayer,
UnrewardedRelayersState,
};
-use bp_runtime::StorageProofSize;
+use bp_runtime::{AccountIdOf, HashOf, UnverifiedStorageProofParams};
use codec::Decode;
-use frame_benchmarking::{account, benchmarks_instance_pallet};
+use frame_benchmarking::{account, v2::*};
use frame_support::weights::Weight;
use frame_system::RawOrigin;
use sp_runtime::{traits::TrailingZeroInput, BoundedVec};
@@ -54,7 +57,7 @@ pub struct MessageProofParams {
/// return `true` from the `is_message_successfully_dispatched`.
pub is_successful_dispatch_expected: bool,
/// Proof size requirements.
- pub size: StorageProofSize,
+ pub proof_params: UnverifiedStorageProofParams,
}
/// Benchmark-specific message delivery proof parameters.
@@ -65,7 +68,7 @@ pub struct MessageDeliveryProofParams {
/// The proof needs to include this inbound lane data.
pub inbound_lane_data: InboundLaneData,
/// Proof size requirements.
- pub size: StorageProofSize,
+ pub proof_params: UnverifiedStorageProofParams,
}
/// Trait that must be implemented by runtime.
@@ -80,8 +83,8 @@ pub trait Config: crate::Config {
/// Return id of relayer account at the bridged chain.
///
/// By default, zero account is returned.
- fn bridged_relayer_id() -> Self::InboundRelayer {
- Self::InboundRelayer::decode(&mut TrailingZeroInput::zeroes()).unwrap()
+ fn bridged_relayer_id() -> AccountIdOf> {
+ Decode::decode(&mut TrailingZeroInput::zeroes()).unwrap()
}
/// Create given account and give it enough balance for test purposes. Used to create
@@ -94,11 +97,11 @@ pub trait Config: crate::Config {
/// Prepare messages proof to receive by the module.
fn prepare_message_proof(
params: MessageProofParams,
- ) -> (::MessagesProof, Weight);
+ ) -> (FromBridgedChainMessagesProof>>, Weight);
/// Prepare messages delivery proof to receive by the module.
fn prepare_message_delivery_proof(
params: MessageDeliveryProofParams,
- ) -> >::MessagesDeliveryProof;
+ ) -> FromBridgedChainMessagesDeliveryProof>>;
/// Returns true if message has been successfully dispatched or not.
fn is_message_successfully_dispatched(_nonce: MessageNonce) -> bool {
@@ -109,174 +112,227 @@ pub trait Config: crate::Config