diff --git a/.github/workflows/honggfuzz.yml b/.github/workflows/honggfuzz.yml index a8c629f8363e..27fa0d9967f3 100644 --- a/.github/workflows/honggfuzz.yml +++ b/.github/workflows/honggfuzz.yml @@ -54,7 +54,7 @@ jobs: - name: Cache Seed id: cache-seed-round-trip - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: erasure-coding/fuzzer/hfuzz_workspace key: ${{ runner.os }}-erasure-coding @@ -100,7 +100,7 @@ jobs: - name: Cache Seed id: cache-seed-reconstruct - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: erasure-coding/fuzzer/hfuzz_workspace key: ${{ runner.os }}-erasure-coding diff --git a/.github/workflows/pr-custom-review.yml b/.github/workflows/pr-custom-review.yml index 6cb16d931d6f..8e40c9ee7298 100644 --- a/.github/workflows/pr-custom-review.yml +++ b/.github/workflows/pr-custom-review.yml @@ -37,6 +37,6 @@ jobs: if: github.event.pull_request.draft == true run: exit 1 - name: pr-custom-review - uses: paritytech/pr-custom-review@v2 + uses: paritytech/pr-custom-review@action-v3 with: - token: ${{ secrets.PRCR_TOKEN }} + checks-reviews-api: http://pcr.parity-prod.parity.io/api/v1/check_reviews diff --git a/.github/workflows/release-01_branch-check.yml b/.github/workflows/release-01_branch-check.yml new file mode 100644 index 000000000000..8748c1a10a12 --- /dev/null +++ b/.github/workflows/release-01_branch-check.yml @@ -0,0 +1,20 @@ +name: Release - Branch check +on: + push: + branches: + - release-v[0-9]+.[0-9]+.[0-9]+ + + workflow_dispatch: + +jobs: + tag_rc: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Run check + shell: bash + run: ./scripts/ci/github/check-rel-br diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-10_candidate.yml similarity index 98% rename from .github/workflows/release-candidate.yml rename to .github/workflows/release-10_candidate.yml index 321c066794e3..a57ba7da590f 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-10_candidate.yml @@ -1,4 +1,4 @@ -name: Release-candidate automation +name: Release - RC automation on: push: branches: diff --git a/.github/workflows/extrinsic-ordering-check-from-bin.yml b/.github/workflows/release-20_extrinsic-ordering-check-from-bin.yml similarity index 96% rename from .github/workflows/extrinsic-ordering-check-from-bin.yml rename to .github/workflows/release-20_extrinsic-ordering-check-from-bin.yml index 778e125a1c6b..0613ed04d35a 100644 --- a/.github/workflows/extrinsic-ordering-check-from-bin.yml +++ b/.github/workflows/release-20_extrinsic-ordering-check-from-bin.yml @@ -1,6 +1,6 @@ # This workflow performs the Extrinsic Ordering Check on demand using a binary -name: Extrinsic Ordering Check from Binary +name: Release - Extrinsic Ordering Check on: workflow_dispatch: inputs: @@ -74,7 +74,7 @@ jobs: run: pkill polkadot - name: Save output as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.CHAIN }} path: | diff --git a/.github/workflows/publish-draft-release.yml b/.github/workflows/release-30_publish-draft-release.yml similarity index 95% rename from .github/workflows/publish-draft-release.yml rename to .github/workflows/release-30_publish-draft-release.yml index f1050bc7f78e..c0e9ce6a4f9a 100644 --- a/.github/workflows/publish-draft-release.yml +++ b/.github/workflows/release-30_publish-draft-release.yml @@ -1,4 +1,4 @@ -name: Publish draft release +name: Release - Publish draft on: push: @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@v3 - name: Cache target dir - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "${{ github.workspace }}/runtime/${{ matrix.runtime }}/target" key: srtool-target-${{ matrix.runtime }}-${{ github.sha }} @@ -51,13 +51,13 @@ jobs: echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}_srtool_output.json - name: Upload ${{ matrix.runtime }} srtool json - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.runtime }}-srtool-json path: ${{ matrix.runtime }}_srtool_output.json - name: Upload ${{ matrix.runtime }} runtime - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.runtime }}-runtime path: | @@ -82,7 +82,7 @@ jobs: ruby-version: 3.0.0 - name: Download srtool json output - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 - name: Prepare tooling run: | @@ -122,7 +122,7 @@ jobs: ls -al context.json - name: Archive artifact context.json - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: release-notes-context path: | @@ -152,7 +152,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/publish-docker-release.yml b/.github/workflows/release-50_publish-docker-release.yml similarity index 82% rename from .github/workflows/publish-docker-release.yml rename to .github/workflows/release-50_publish-docker-release.yml index b4873d8eb8db..86bc38252741 100644 --- a/.github/workflows/publish-docker-release.yml +++ b/.github/workflows/release-50_publish-docker-release.yml @@ -1,4 +1,4 @@ -name: Publish Docker image for new releases +name: Release - Publish Docker image for new releases on: release: @@ -12,22 +12,22 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 # v1.7 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - name: Login to Dockerhub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: true file: scripts/ci/dockerfiles/polkadot_injected_release.Dockerfile diff --git a/.github/workflows/publish-docker-manual.yml b/.github/workflows/release-51_publish-docker-manual.yml similarity index 84% rename from .github/workflows/publish-docker-manual.yml rename to .github/workflows/release-51_publish-docker-manual.yml index d073145e0f8b..6386d8676769 100644 --- a/.github/workflows/publish-docker-manual.yml +++ b/.github/workflows/release-51_publish-docker-manual.yml @@ -1,4 +1,4 @@ -name: Publish Docker image (manual dispatch) +name: Release - Publish Docker image (manual dispatch) on: workflow_dispatch: @@ -19,22 +19,22 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 # v1.7 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - name: Login to Dockerhub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: true file: scripts/ci/dockerfiles/polkadot_injected_release.Dockerfile diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-99_bot.yml similarity index 95% rename from .github/workflows/release-bot.yml rename to .github/workflows/release-99_bot.yml index dd3a9ca8ac43..e063a707ebec 100644 --- a/.github/workflows/release-bot.yml +++ b/.github/workflows/release-99_bot.yml @@ -1,4 +1,4 @@ -name: Send new release notification to matrix channels +name: Release - Send new release notification to matrix channels on: release: types: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8bb412728e53..8042f279e63e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,12 +106,22 @@ default: - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs +.deploy-testnet-refs: &deploy-testnet-refs + rules: + - if: $CI_PIPELINE_SOURCE == "pipeline" + when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $CI_COMMIT_REF_NAME == "master" + .publish-refs: &publish-refs rules: - if: $CI_PIPELINE_SOURCE == "pipeline" when: never - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $CI_PIPELINE_SOURCE == "web" && + $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME == "master" + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 .build-push-image: &build-push-image <<: *kubernetes-env @@ -266,6 +276,22 @@ build-malus: - echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - cp -r ./scripts/* ./artifacts +build-staking-miner: + stage: stage1 + <<: *collect-artifacts + <<: *docker-env + <<: *compiler-info + <<: *common-refs + script: + - time cargo build --locked --release --package staking-miner + # pack artifacts + - mkdir -p ./artifacts + - mv ./target/release/staking-miner ./artifacts/. + - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION + - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG + - echo "staking-miner = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" + - cp -r ./scripts/* ./artifacts + #### stage: stage2 .check-dependent-project: &check-dependent-project @@ -424,6 +450,23 @@ publish-malus-image: # this artifact is used in zombienet-tests job dotenv: ./artifacts/malus.env +publish-staking-miner-image: + stage: stage2 + <<: *build-push-image + <<: *publish-refs + variables: + <<: *image-variables + # scripts/ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile + DOCKERFILE: ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile + IMAGE_NAME: docker.io/paritytech/staking-miner + GIT_STRATEGY: none + DOCKER_USER: ${Docker_Hub_User_Parity} + DOCKER_PASS: ${Docker_Hub_Pass_Parity} + needs: + - job: build-staking-miner + artifacts: true + + publish-s3-release: &publish-s3 stage: stage3 needs: @@ -586,7 +629,7 @@ deploy-parity-testnet: needs: - job: test-deterministic-wasm artifacts: false - <<: *publish-refs + <<: *deploy-testnet-refs variables: POLKADOT_CI_COMMIT_NAME: "${CI_COMMIT_REF_NAME}" POLKADOT_CI_COMMIT_REF: "${CI_COMMIT_SHORT_SHA}" @@ -682,6 +725,35 @@ zombienet-tests-parachains-disputes: tags: - zombienet-polkadot-integration-test +zombienet-test-parachains-upgrade-smoke-test: + stage: stage3 + image: "${ZOMBIENET_IMAGE}" + <<: *kubernetes-env + <<: *zombienet-refs + needs: + - job: publish-polkadot-debug-image + - job: publish-malus-image + - job: publish-test-collators-image + variables: + GH_DIR: 'https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/smoke' + before_script: + - echo "ZombieNet Tests Config" + - echo "docker.io/parity/polkadot:latest" + - echo "docker.io/parity/polkadot-collator:latest" + - echo "${ZOMBIENET_IMAGE}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/parity/polkadot:latest" # Use polkadot latest image + - export COL_IMAGE="docker.io/parity/polkadot-collator:latest" # Use cumulus lastest image + script: + - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0002-parachains-upgrade-smoke-test.feature" + allow_failure: true + retry: 2 + tags: + - zombienet-polkadot-integration-test + zombienet-tests-malus-dispute-valid: stage: stage3 image: "${ZOMBIENET_IMAGE}" diff --git a/Cargo.lock b/Cargo.lock index 53d7911958ef..a51ee4e6ce59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,7 +33,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -68,7 +68,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.7", "once_cell", "version_check", ] @@ -99,24 +99,24 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.51" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "approx" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ "num-traits", ] [[package]] name = "arbitrary" -version = "1.0.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c76ecefdceada737ea728f4f9a84bd2e1ef29f1ba555e560940fe279954de" +checksum = "25e0a02cf12f1b1f48b14cb7f8217b876d09992b39c816ffb3b1ba64dd979a87" [[package]] name = "arrayref" @@ -208,14 +208,14 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.0.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" +checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940" dependencies = [ "async-channel", "async-executor", "async-io", - "async-mutex", + "async-lock", "blocking", "futures-lite", "num_cpus", @@ -224,9 +224,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" dependencies = [ "concurrent-queue", "futures-lite", @@ -243,27 +243,18 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" dependencies = [ "event-listener", ] [[package]] name = "async-process" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" +checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" dependencies = [ "async-io", "blocking", @@ -278,9 +269,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", "async-channel", @@ -297,9 +288,8 @@ dependencies = [ "kv-log-macro", "log", "memchr", - "num_cpus", "once_cell", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", "wasm-bindgen-futures", @@ -322,15 +312,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.0.3" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -347,16 +337,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", -] - -[[package]] -name = "atomic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" -dependencies = [ - "autocfg", + "pin-project-lite 0.2.9", ] [[package]] @@ -378,30 +359,30 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.28.4", "rustc-demangle", ] [[package]] name = "base-x" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" [[package]] name = "base16ct" @@ -423,9 +404,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "beef" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed554bd50246729a1ec158d08aa3235d1b69d94ad120ebe187e28894787e736" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" dependencies = [ "serde", ] @@ -433,16 +414,16 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "beefy-primitives", "fnv", - "futures 0.3.21", + "futures", "futures-timer", "hex", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", "sc-finality-grandpa", @@ -467,15 +448,15 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "beefy-gadget", "beefy-primitives", - "futures 0.3.21", + "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-rpc", "sc-utils", "serde", @@ -487,14 +468,14 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-application-crypto", @@ -505,9 +486,9 @@ dependencies = [ [[package]] name = "bimap" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07" +checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" [[package]] name = "bincode" @@ -569,9 +550,9 @@ dependencies = [ [[package]] name = "blake2" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94ba84325db59637ffc528bbe8c7f86c02c57cff5c0e2b9b00f9a851f42f309" +checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" dependencies = [ "digest 0.10.3", ] @@ -641,16 +622,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ "block-padding 0.2.1", - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] name = "block-buffer" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d36a02058e76b040de25a4464ba1c80935655595b661505c8b39b664828b95" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -670,9 +651,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" +checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" dependencies = [ "async-channel", "async-task", @@ -695,14 +676,13 @@ dependencies = [ name = "bp-header-chain" version = "0.1.0" dependencies = [ - "assert_matches", "bp-runtime", "bp-test-utils", "finality-grandpa", "frame-support", "hex", "hex-literal", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -717,7 +697,7 @@ version = "0.1.0" dependencies = [ "bp-runtime", "frame-support", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-std", ] @@ -733,7 +713,7 @@ dependencies = [ "hex", "hex-literal", "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -749,7 +729,7 @@ dependencies = [ "frame-support", "frame-system", "hex", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-core", @@ -766,7 +746,7 @@ dependencies = [ "bp-polkadot-core", "bp-runtime", "frame-support", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "smallvec", "sp-api", "sp-runtime", @@ -782,7 +762,7 @@ dependencies = [ "hash-db", "hex-literal", "num-traits", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -799,7 +779,7 @@ dependencies = [ "bp-header-chain", "ed25519-dalek", "finality-grandpa", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-application-crypto", "sp-finality-grandpa", "sp-runtime", @@ -814,7 +794,7 @@ dependencies = [ "bp-polkadot-core", "bp-rococo", "bp-runtime", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", "sp-runtime", "sp-std", @@ -836,7 +816,7 @@ dependencies = [ "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-core", @@ -876,15 +856,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-slice-cast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" [[package]] name = "byte-tools" @@ -917,15 +897,15 @@ dependencies = [ [[package]] name = "cache-padded" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "camino" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -947,16 +927,16 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.4", + "semver 1.0.10", "serde", "serde_json", ] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -1028,9 +1008,9 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52cffa791ce5cf490ac3b2d6df970dc04f931b04e727be3c3e220e17164dfc4" +checksum = "fc949bff6704880faf064c42a4854032ab07bfcf3a4fcb82a57470acededb69c" dependencies = [ "core2", "multibase", @@ -1045,7 +1025,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -1059,27 +1039,27 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.3.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" +checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" dependencies = [ "glob", "libc", - "libloading 0.7.2", + "libloading 0.7.3", ] [[package]] name = "clap" -version = "3.1.18" +version = "3.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "9f1fe12880bae935d142c8702d500c63a4e8634b6c3c57ad72bf978fc7b6249a" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap", @@ -1087,9 +1067,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.18" +version = "3.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "ed6db9e867166a43a53f7199b5e4d1f522a1e5bd626654be263c999ce59df39a" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -1100,13 +1080,22 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "87eba3c8c7f42ef17f6c659fc7416d0f4758cd3e58861ee63c5fa4a4dde649e4" dependencies = [ "os_str_bytes", ] +[[package]] +name = "cmake" +version = "0.1.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +dependencies = [ + "cc", +] + [[package]] name = "coarsetime" version = "0.1.22" @@ -1172,9 +1161,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -1197,18 +1186,18 @@ dependencies = [ [[package]] name = "cpp_demangle" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931ab2a3e6330a07900b8e7ca4e106cdcbb93f2b9a52df55e54ee53d8305b55d" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] @@ -1304,18 +1293,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1334,14 +1323,15 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" dependencies = [ + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "lazy_static", "memoffset", + "once_cell", "scopeguard", ] @@ -1357,12 +1347,12 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" dependencies = [ "cfg-if 1.0.0", - "lazy_static", + "once_cell", ] [[package]] @@ -1377,7 +1367,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "rand_core 0.6.3", "subtle", "zeroize", @@ -1389,7 +1379,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "typenum", ] @@ -1399,7 +1389,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -1409,24 +1399,15 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - [[package]] name = "ctor" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", "syn", @@ -1519,9 +1500,9 @@ dependencies = [ [[package]] name = "debugid" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91cf5a8c2f2097e2a32627123508635d47ce10563d999ec1a95addf08b502ba" +checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730" dependencies = [ "uuid", ] @@ -1586,7 +1567,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -1595,7 +1576,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "block-buffer 0.10.0", + "block-buffer 0.10.2", "crypto-common", "subtle", ] @@ -1621,9 +1602,9 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", @@ -1643,9 +1624,9 @@ dependencies = [ [[package]] name = "dissimilar" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ad93652f40969dead8d4bf897a41e9462095152eb21c56e5830537e41179dd" +checksum = "8c97b9233581d84b8e1e689cdd3a47b6f69770084fc246e86a7f78b0d9c1d4a5" [[package]] name = "dlmalloc" @@ -1663,7 +1644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" dependencies = [ "byteorder", - "quick-error 1.2.3", + "quick-error", ] [[package]] @@ -1707,9 +1688,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "140206b78fb2bc3edbcfc9b5ccbd0b30699cfe8d348b8b31b330e47df5291a5a" [[package]] name = "ecdsa" @@ -1725,9 +1706,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.3.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e1069e39f1454367eb2de793ed062fac4c35c2934b76a81d90dd9abcd28816" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ "signature", ] @@ -1742,7 +1723,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] @@ -1762,7 +1743,7 @@ dependencies = [ "crypto-bigint", "der", "ff", - "generic-array 0.14.4", + "generic-array 0.14.5", "group", "rand_core 0.6.3", "sec1", @@ -1772,9 +1753,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.30" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if 1.0.0", ] @@ -1822,19 +1803,6 @@ dependencies = [ "syn", ] -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.9.0" @@ -1842,7 +1810,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", - "humantime 2.1.0", + "humantime", "log", "regex", "termcolor", @@ -1856,9 +1824,9 @@ checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] name = "erased-serde" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" +checksum = "81d013529d5574a60caeda29e179e695125448e5de52e3874f7b4c1d7360e18e" dependencies = [ "serde", ] @@ -1886,9 +1854,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" [[package]] name = "exit-future" @@ -1896,7 +1864,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.21", + "futures", ] [[package]] @@ -1926,9 +1894,9 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221239d1d5ea86bf5d6f91c9d6bc3646ffe471b08ff9b0f91c44f115ac969d2b" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" dependencies = [ "indenter", "once_cell", @@ -1948,9 +1916,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" dependencies = [ "instant", ] @@ -2007,9 +1975,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" dependencies = [ "rand_core 0.6.3", "subtle", @@ -2017,27 +1985,39 @@ dependencies = [ [[package]] name = "file-per-thread-logger" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126" +checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f" dependencies = [ - "env_logger 0.7.1", + "env_logger", "log", ] +[[package]] +name = "filetime" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "winapi", +] + [[package]] name = "finality-grandpa" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9def033d8505edf199f6a5d07aa7e6d2d6185b164293b77f0efd108f4f3e11d" +checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" dependencies = [ "either", - "futures 0.3.21", + "futures", "futures-timer", "log", "num-traits", - "parity-scale-codec 3.1.2", - "parking_lot 0.11.2", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "scale-info", ] @@ -2067,19 +2047,17 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398ea4fabe40b9b0d885340a2a991a44c8a645624075ad966d21f88688e2b69e" +checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "libz-sys", "miniz_oxide", ] @@ -2108,9 +2086,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", ] [[package]] @@ -2126,13 +2104,13 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "linregress", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "paste", "scale-info", "serde", @@ -2148,7 +2126,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "Inflector", "chrono", @@ -2157,6 +2135,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "gethostname", "handlebars", "hash-db", "hex", @@ -2166,7 +2145,7 @@ dependencies = [ "linked-hash-map", "log", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", @@ -2198,7 +2177,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2209,12 +2188,12 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-arithmetic", "sp-npos-elections", @@ -2225,11 +2204,11 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -2245,7 +2224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", ] @@ -2253,7 +2232,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "bitflags", "frame-metadata", @@ -2262,7 +2241,7 @@ dependencies = [ "k256", "log", "once_cell", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "paste", "scale-info", "serde", @@ -2283,7 +2262,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2295,7 +2274,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2307,7 +2286,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro2", "quote", @@ -2317,12 +2296,12 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-support-test-pallet", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "pretty_assertions", "rustversion", "scale-info", @@ -2340,22 +2319,22 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -2368,12 +2347,12 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-runtime", @@ -2383,16 +2362,16 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", ] [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "sp-api", @@ -2402,9 +2381,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ebd3504ad6116843b8375ad70df74e7bfe83cac77a1f3fe73200c844d43bfe0" +checksum = "5bd79fa345a495d3ae89fb7165fec01c0e72f41821d642dda363a1e97975652e" [[package]] name = "fs-swap" @@ -2446,12 +2425,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.21" @@ -2512,7 +2485,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "waker-fn", ] @@ -2534,8 +2507,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" dependencies = [ "futures-io", - "rustls 0.20.2", - "webpki 0.22.0", + "rustls", + "webpki", ] [[package]] @@ -2569,7 +2542,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -2577,7 +2550,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "chrono", "frame-election-provider-support", @@ -2600,14 +2573,24 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -2623,13 +2606,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -2655,9 +2638,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c" +checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" dependencies = [ "bitflags", "libc", @@ -2674,9 +2657,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "globset" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" +checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" dependencies = [ "aho-corasick", "bstr", @@ -2687,15 +2670,14 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" dependencies = [ "futures-channel", "futures-core", "js-sys", "wasm-bindgen", - "web-sys", ] [[package]] @@ -2711,9 +2693,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" +checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ "bytes", "fnv", @@ -2724,22 +2706,22 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.6.9", + "tokio-util", "tracing", ] [[package]] name = "handlebars" -version = "4.2.2" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d6a30320f094710245150395bc763ad23128d6a1ebbad7594dc4164b62c56b" +checksum = "b66d0c1b6e3abfd1e72818798925e16e02ed77e1b47f6c25a95a23b377ee4299" dependencies = [ "log", "pest", "pest_derive", - "quick-error 2.0.1", "serde", "serde_json", + "thiserror", ] [[package]] @@ -2768,9 +2750,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" dependencies = [ "ahash", ] @@ -2844,7 +2826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "hmac 0.8.1", ] @@ -2872,31 +2854,31 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.8", + "itoa 1.0.2", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] name = "httparse" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" @@ -2904,15 +2886,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] - [[package]] name = "humantime" version = "2.1.0" @@ -2921,9 +2894,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes", "futures-channel", @@ -2934,8 +2907,8 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", - "pin-project-lite 0.2.7", + "itoa 1.0.2", + "pin-project-lite 0.2.9", "socket2", "tokio", "tower-service", @@ -2945,19 +2918,17 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ - "ct-logs", - "futures-util", + "http", "hyper", "log", - "rustls 0.19.1", - "rustls-native-certs 0.5.0", + "rustls", + "rustls-native-certs", "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", + "tokio-rustls", ] [[package]] @@ -2996,14 +2967,14 @@ dependencies = [ [[package]] name = "if-watch" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8f4a3c3d4c89351ca83e120c1c00b27df945d38e05695668c9d4b4f7bc52f3" +checksum = "774d59367a3d26965d21ac70a86fcb697d83405d1c4312d1d8a6855296af0cf7" dependencies = [ "async-io", "core-foundation", "fnv", - "futures 0.3.21", + "futures", "if-addrs", "ipnet", "log", @@ -3018,7 +2989,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", ] [[package]] @@ -3049,12 +3020,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown 0.12.1", "serde", ] @@ -3069,9 +3040,9 @@ dependencies = [ [[package]] name = "integer-encoding" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c11140ffea82edce8dcd74137ce9324ec24b3cf0175fc9d7e29164da9915b8" +checksum = "0e85a1509a128c855368e135cffcde7eac17d8e1083f41e2b98c58bc1a5074be" [[package]] name = "integer-sqrt" @@ -3108,9 +3079,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itertools" @@ -3129,9 +3100,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "jobserver" @@ -3144,18 +3115,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f2ab5a60e558e74ea93bcf5164ebc47939a7fff8938fa9b5233bbc63e16061" +checksum = "11e017217fcd18da0a25296d3693153dd19c8a6aadab330b3595285d075385d1" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-server", @@ -3168,30 +3139,30 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d682f4a55081a2be3e639280c640523070e4aeb8ee2fd8dd9168fdae57a9db" +checksum = "ce395539a14d3ad4ec1256fde105abd36a2da25d578a291cabe98f45adfdb111" dependencies = [ "futures-util", "http", "jsonrpsee-core", "jsonrpsee-types", "pin-project 1.0.10", - "rustls-native-certs 0.6.1", + "rustls-native-certs", "soketto", "thiserror", "tokio", - "tokio-rustls 0.23.2", - "tokio-util 0.7.1", + "tokio-rustls", + "tokio-util", "tracing", "webpki-roots", ] [[package]] name = "jsonrpsee-core" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e27462b21279edf9a6a91f46ffbe125e9cdc58b901d2e08bf59b31a47d7d0ab" +checksum = "16efcd4477de857d4a2195a45769b2fe9ebb54f3ef5a4221d3b014a4fe33ec0b" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3201,9 +3172,11 @@ dependencies = [ "futures-channel", "futures-timer", "futures-util", + "globset", "hyper", "jsonrpsee-types", - "parking_lot 0.12.0", + "lazy_static", + "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", "serde", @@ -3212,32 +3185,31 @@ dependencies = [ "thiserror", "tokio", "tracing", + "unicase", ] [[package]] name = "jsonrpsee-http-server" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7178f16eabd7154c094e24d295b9ee355ec1e5f24c328759c56255ff7bbd4548" +checksum = "bdd69efeb3ce2cba767f126872f4eeb4624038a29098e75d77608b2b4345ad03" dependencies = [ "futures-channel", "futures-util", - "globset", "hyper", "jsonrpsee-core", "jsonrpsee-types", - "lazy_static", + "serde", "serde_json", "tokio", "tracing", - "unicase", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8d7f449cab3b747f12c3efc27f5cad537f3b597c6a3838b0fac628f4bf730a" +checksum = "874cf3f6a027cebf36cae767feca9aa2e8a8f799880e49eb5540819fcbd8eada" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3247,9 +3219,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd11763134104122ddeb0f97e4bbe393058017dfb077db63fbf44b4dd0dd86e" +checksum = "3bcf76cd316f5d3ad48138085af1f45e2c58c98e02f0779783dbb034d43f7c86" dependencies = [ "anyhow", "beef", @@ -3261,9 +3233,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f15180afb3761c7a3a32c0a8b680788176dcfdfe725b24c1758c90b1d1595b" +checksum = "ee043cb5dd0d51d3eb93432e998d5bae797691a7b10ec4a325e036bcdb48c48a" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3272,9 +3244,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-server" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb6c21556c551582b56e4e8e6e6249b0bbdb69bb7fa39efe9b9a6b54af9f206" +checksum = "2bd2e4d266774a671f8def3794255b28eddd09b18d76e0b913fa439f34588c0a" dependencies = [ "futures-channel", "futures-util", @@ -3283,7 +3255,8 @@ dependencies = [ "serde_json", "soketto", "tokio", - "tokio-util 0.7.1", + "tokio-stream", + "tokio-util", "tracing", ] @@ -3301,13 +3274,13 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "kusama-runtime" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "bitvec 1.0.0", @@ -3341,7 +3314,6 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-multisig", - "pallet-nicks", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", "pallet-offences", @@ -3364,7 +3336,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-benchmarks", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -3404,7 +3376,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "polkadot-primitives", @@ -3440,7 +3412,7 @@ checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] @@ -3455,7 +3427,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "regex", "rocksdb", "smallvec", @@ -3484,15 +3456,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.121" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libgit2-sys" -version = "0.13.2+1.4.2" +version = "0.13.4+1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b" +checksum = "d0fa6563431ede25f5cc7f6d803c6afbc1c5d3ad3d4925d12c882bf2b526f5d1" dependencies = [ "cc", "libc", @@ -3512,9 +3484,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", "winapi", @@ -3522,25 +3494,24 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" +checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" [[package]] name = "libp2p" -version = "0.44.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475ce2ac4a9727e53a519f6ee05b38abfcba8f0d39c4d24f103d184e36fd5b0f" +checksum = "41726ee8f662563fafba2d2d484b14037cc8ecb8c953fbfc8439d4ce3a0a9029" dependencies = [ - "atomic", "bytes", - "futures 0.3.21", + "futures", "futures-timer", - "getrandom 0.2.3", + "getrandom 0.2.7", "instant", "lazy_static", "libp2p-autonat", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-deflate", "libp2p-dns", "libp2p-floodsub", @@ -3565,7 +3536,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "smallvec", @@ -3573,20 +3544,20 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13b690e65046af6a09c0b27bd9508fa1cab0efce889de74b0b643b9d2a98f9a" +checksum = "1d45945fd2f96c4b133c23d5c28a8b7fc8d7138e6dd8d5a8cd492dd384f888e3" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-request-response", "libp2p-swarm", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", ] @@ -3601,22 +3572,56 @@ dependencies = [ "ed25519-dalek", "either", "fnv", - "futures 0.3.21", + "futures", "futures-timer", "instant", "lazy_static", - "libsecp256k1", "log", "multiaddr", "multihash", "multistream-select", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "prost 0.9.0", - "prost-build", + "prost-build 0.9.0", + "rand 0.8.5", + "ring", + "rw-stream-sink 0.2.1", + "sha2 0.10.2", + "smallvec", + "thiserror", + "unsigned-varint", + "void", + "zeroize", +] + +[[package]] +name = "libp2p-core" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d46fca305dee6757022e2f5a4f6c023315084d0ed7441c3ab244e76666d979" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "lazy_static", + "libsecp256k1", + "log", + "multiaddr", + "multihash", + "multistream-select", + "parking_lot 0.12.1", + "pin-project 1.0.10", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "ring", - "rw-stream-sink", + "rw-stream-sink 0.3.0", "sha2 0.10.2", "smallvec", "thiserror", @@ -3627,67 +3632,68 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1d37f042f748e224f04785d0e987ae09a2aa518d6401d82d412dad83e360ed" +checksum = "86adefc55ea4ed8201149f052fb441210727481dff1fb0b8318460206a79f5fb" dependencies = [ "flate2", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.33.0", ] [[package]] name = "libp2p-dns" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066e33e854e10b5c93fc650458bf2179c7e0d143db260b0963e44a94859817f1" +checksum = "fbb462ec3a51fab457b4b44ac295e8b0a4b04dc175127e615cf996b1f0f1a268" dependencies = [ "async-std-resolver", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.33.0", "log", + "parking_lot 0.12.1", "smallvec", "trust-dns-resolver", ] [[package]] name = "libp2p-floodsub" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d3ea6ebe7a7a85df2bc86678b93f24b015fae5fe3b3acc4c400e795a55d2d" +checksum = "a505d0c6f851cbf2919535150198e530825def8bd3757477f13dc3a57f46cbcc" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.33.0", "libp2p-swarm", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "smallvec", ] [[package]] name = "libp2p-gossipsub" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90c989a7c0969c2ab63e898da9bc735e3be53fb4f376e9c045ce516bcc9f928" +checksum = "43e064ba4d7832e01c738626c6b274ae100baba05f5ffcc7b265c2a3ed398108" dependencies = [ "asynchronous-codec", "base64", "byteorder", "bytes", "fnv", - "futures 0.3.21", + "futures", "hex_fmt", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", "prometheus-client", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "regex", "sha2 0.10.2", @@ -3698,40 +3704,44 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.35.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ef5a5b57904c7c33d6713ef918d239dc6b7553458f3475d87f8a18e9c651c8" +checksum = "b84b53490442d086db1fa5375670c9666e79143dccadef3f7c74a4346899a984" dependencies = [ - "futures 0.3.21", + "asynchronous-codec", + "futures", "futures-timer", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", - "lru 0.7.5", - "prost 0.9.0", - "prost-build", + "lru 0.7.7", + "prost 0.10.4", + "prost-build 0.10.4", + "prost-codec", "smallvec", + "thiserror", + "void", ] [[package]] name = "libp2p-kad" -version = "0.36.0" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "564e6bd64d177446399ed835b9451a8825b07929d6daa6a94e6405592974725e" +checksum = "5f6b5d4de90fcd35feb65ea6223fd78f3b747a64ca4b65e0813fbe66a27d56aa" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.2", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "sha2 0.10.2", "smallvec", @@ -3743,17 +3753,17 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611ae873c8e280ccfab0d57c7a13cac5644f364529e233114ff07863946058b0" +checksum = "4783f8cf00c7b6c1ff0f1870b4fcf50b042b45533d2e13b6fb464caf447a6951" dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.21", + "futures", "if-watch", "lazy_static", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", "rand 0.8.5", @@ -3764,11 +3774,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985be799bb3796e0c136c768208c3c06604a38430571906a13dcfeda225a3b9d" +checksum = "564a7e5284d7d9b3140fdfc3cb6567bc32555e86a21de5604c2ec85da05cf384" dependencies = [ - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", @@ -3780,17 +3790,17 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442eb0c9fff0bf22a34f015724b4143ce01877e079ed0963c722d94c07c72160" +checksum = "5ff9c893f2367631a711301d703c47432af898c9bb8253bea0e2c051a13f7640" dependencies = [ "asynchronous-codec", "bytes", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.33.0", "log", "nohash-hasher", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "unsigned-varint", @@ -3798,18 +3808,18 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd7e0c94051cda67123be68cf6b65211ba3dde7277be9068412de3e7ffd63ef" +checksum = "cf2cee1dad1c83325bbd182a8e94555778699cec8a9da00086efb7522c4c15ad" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.21", + "futures", "lazy_static", - "libp2p-core", + "libp2p-core 0.33.0", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "sha2 0.10.2", "snow", @@ -3820,14 +3830,14 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf57a3c2e821331dda9fe612d4654d676ab6e33d18d9434a18cced72630df6ad" +checksum = "d41516c82fe8dd148ec925eead0c5ec08a0628f7913597e93e126e4dfb4e0787" dependencies = [ - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", "rand 0.7.3", @@ -3836,17 +3846,17 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962c0fb0e7212fb96a69b87f2d09bcefd317935239bdc79cda900e7a8897a3fe" +checksum = "db007e737adc5d28b2e03223b0210164928ad742591127130796a72aa8eaf54f" dependencies = [ "asynchronous-codec", "bytes", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.33.0", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "unsigned-varint", "void", ] @@ -3857,7 +3867,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" dependencies = [ - "futures 0.3.21", + "futures", "log", "pin-project 1.0.10", "rand 0.7.3", @@ -3867,46 +3877,46 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa754cb7bccef51ebc3c458c6bbcef89d83b578a9925438389be841527d408f" +checksum = "624ead3406f64437a0d4567c31bd128a9a0b8226d5f16c074038f5d0fc32f650" dependencies = [ "asynchronous-codec", "bytes", "either", - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", "pin-project 1.0.10", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", + "prost-codec", "rand 0.8.5", "smallvec", "static_assertions", "thiserror", - "unsigned-varint", "void", ] [[package]] name = "libp2p-rendezvous" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd0baab894c5b84da510b915d53264d566c3c35889f09931fe9edbd2a773bee" +checksum = "c59967ea2db2c7560f641aa58ac05982d42131863fcd3dd6dcf0dd1daf81c60c" dependencies = [ "asynchronous-codec", "bimap", - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", - "prost 0.9.0", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "sha2 0.10.2", "thiserror", @@ -3916,15 +3926,15 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6a6fc6c9ad95661f46989473b34bd2993d14a4de497ff3b2668a910d4b869" +checksum = "b02e0acb725e5a757d77c96b95298fd73a7394fe82ba7b8bbeea510719cbe441" dependencies = [ "async-trait", "bytes", - "futures 0.3.21", + "futures", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "libp2p-swarm", "log", "rand 0.7.3", @@ -3934,16 +3944,16 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.35.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0c69ad9e8f7c5fc50ad5ad9c7c8b57f33716532a2b623197f69f93e374d14c" +checksum = "8f4bb21c5abadbf00360c734f16bf87f1712ed4f23cd46148f625d2ddb867346" dependencies = [ "either", "fnv", - "futures 0.3.21", + "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.33.0", "log", "pin-project 1.0.10", "rand 0.7.3", @@ -3954,9 +3964,9 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf2fe8c80b43561355f4d51875273b5b6dfbac37952e8f64b1270769305c9d7" +checksum = "4f693c8c68213034d472cbb93a379c63f4f307d97c06f1c41e4985de481687a5" dependencies = [ "quote", "syn", @@ -3964,17 +3974,17 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193447aa729c85aac2376828df76d171c1a589c9e6b58fcc7f9d9a020734122c" +checksum = "4f4933e38ef21b50698aefc87799c24f2a365c9d3f6cf50471f3f6a0bc410892" dependencies = [ "async-io", - "futures 0.3.21", + "futures", "futures-timer", "if-watch", "ipnet", "libc", - "libp2p-core", + "libp2p-core 0.33.0", "log", "socket2", ] @@ -3986,20 +3996,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24bdab114f7f2701757d6541266e1131b429bbae382008f207f2114ee4222dcb" dependencies = [ "async-std", - "futures 0.3.21", - "libp2p-core", + "futures", + "libp2p-core 0.32.1", "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6ea0f84a967ef59a16083f222c18115ae2e91db69809dce275df62e101b279" +checksum = "f066f2b8b1a1d64793f05da2256e6842ecd0293d6735ca2e9bda89831a1bdc06" dependencies = [ - "futures 0.3.21", + "futures", "js-sys", - "libp2p-core", + "libp2p-core 0.33.0", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -4007,17 +4017,18 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c932834c3754501c368d1bf3d0fb458487a642b90fc25df082a3a2f3d3b32e37" +checksum = "39d398fbb29f432c4128fabdaac2ed155c3bcaf1b9bd40eeeb10a471eefacbf5" dependencies = [ "either", - "futures 0.3.21", + "futures", "futures-rustls", - "libp2p-core", + "libp2p-core 0.33.0", "log", + "parking_lot 0.12.1", "quicksink", - "rw-stream-sink", + "rw-stream-sink 0.3.0", "soketto", "url", "webpki-roots", @@ -4025,13 +4036,13 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be902ebd89193cd020e89e89107726a38cfc0d16d18f613f4a37d046e92c7517" +checksum = "8fe653639ad74877c759720febb0cbcbf4caa221adde4eed2d3126ce5c6f381f" dependencies = [ - "futures 0.3.21", - "libp2p-core", - "parking_lot 0.12.0", + "futures", + "libp2p-core 0.33.0", + "parking_lot 0.12.1", "thiserror", "yamux", ] @@ -4066,7 +4077,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand 0.8.5", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "typenum", ] @@ -4101,9 +4112,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "libc", @@ -4144,10 +4155,11 @@ checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" [[package]] name = "lock_api" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg", "scopeguard", ] @@ -4173,9 +4185,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" +checksum = "c84e6fe5655adc6ce00787cf7dcaf8dc4f998a0565d23eafc207a8b08ca3349a" dependencies = [ "hashbrown 0.11.2", ] @@ -4191,9 +4203,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.23.2" +version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +checksum = "4edcb94251b1c375c459e5abe9fb0168c1c826c3370172684844f8f3f8d1a885" dependencies = [ "libc", "lz4-sys", @@ -4201,9 +4213,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +checksum = "d7be8908e2ed6f31c02db8a9fa962f03e36c53fbfde437363eae3306b85d7e17" dependencies = [ "cc", "libc", @@ -4265,9 +4277,18 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memfd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +dependencies = [ + "libc", +] [[package]] name = "memmap" @@ -4290,18 +4311,18 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "d5172b50c23043ff43dd53e51392f36519d9b35a8f3a410d30ece5d1aedd58ae" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -4313,7 +4334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" dependencies = [ "hash-db", - "hashbrown 0.12.0", + "hashbrown 0.12.1", "parity-util-mem", ] @@ -4344,31 +4365,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "metered-channel" -version = "0.9.22" -dependencies = [ - "assert_matches", - "coarsetime", - "crossbeam-queue", - "derive_more", - "env_logger 0.9.0", - "futures 0.3.21", - "futures-timer", - "log", - "nanorand", - "thiserror", - "tracing", - "tracing-gum", -] - [[package]] name = "mick-jaeger" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.21", + "futures", "rand 0.8.5", "thrift", ] @@ -4387,35 +4390,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", - "autocfg", ] [[package]] name = "mio" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "windows-sys", ] [[package]] @@ -4466,7 +4457,7 @@ dependencies = [ "digest 0.10.3", "multihash-derive", "sha2 0.10.2", - "sha3 0.10.0", + "sha3 0.10.1", "unsigned-varint", ] @@ -4497,7 +4488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" dependencies = [ "bytes", - "futures 0.3.21", + "futures", "log", "pin-project 1.0.10", "smallvec", @@ -4550,9 +4541,9 @@ checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", @@ -4611,7 +4602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef8785b8141e8432aa45fceb922a7e876d7da3fad37fa7e7ec702ace3aa0826b" dependencies = [ "bytes", - "futures 0.3.21", + "futures", "log", "netlink-packet-core", "netlink-sys", @@ -4626,7 +4617,7 @@ checksum = "3e4c9f9547a08241bee7b6558b9b98e1f290d187de8b7cfca2bbb4937bcaa8f8" dependencies = [ "async-io", "bytes", - "futures 0.3.21", + "futures", "libc", "log", ] @@ -4683,22 +4674,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", "minimal-lexical", - "version_check", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", ] [[package]] @@ -4714,9 +4695,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] @@ -4733,9 +4714,9 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -4766,9 +4747,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", "libm", @@ -4776,9 +4757,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -4795,11 +4776,20 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.28.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "opaque-debug" @@ -4815,29 +4805,41 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -4846,6 +4848,40 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "orchestra" +version = "0.0.1" +dependencies = [ + "async-trait", + "dyn-clonable", + "futures", + "futures-timer", + "orchestra-proc-macro", + "pin-project 1.0.10", + "prioritized-metered-channel", + "rustversion", + "thiserror", + "tracing", + "trybuild", +] + +[[package]] +name = "orchestra-proc-macro" +version = "0.0.1" +dependencies = [ + "assert_matches", + "expander 0.0.6", + "itertools", + "orchestra", + "petgraph", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", + "thiserror", + "tracing", +] + [[package]] name = "ordered-float" version = "1.1.1" @@ -4857,15 +4893,15 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ "winapi", ] @@ -4881,19 +4917,19 @@ dependencies = [ [[package]] name = "owo-colors" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" +checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -4902,12 +4938,12 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-authority-discovery", @@ -4918,12 +4954,12 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-authorship", "sp-runtime", @@ -4933,7 +4969,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", @@ -4942,7 +4978,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "pallet-timestamp", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -4957,7 +4993,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4965,7 +5001,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -4977,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4996,13 +5032,13 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -5011,13 +5047,13 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "beefy-primitives", "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5027,7 +5063,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5038,7 +5074,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5050,14 +5086,14 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5074,7 +5110,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5095,7 +5131,7 @@ dependencies = [ "frame-system", "log", "num-traits", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5120,7 +5156,7 @@ dependencies = [ "log", "num-traits", "pallet-balances", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5132,7 +5168,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5140,7 +5176,7 @@ dependencies = [ "log", "pallet-bounties", "pallet-treasury", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5151,13 +5187,13 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5168,12 +5204,12 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -5184,14 +5220,14 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "rand 0.7.3", "scale-info", "sp-arithmetic", @@ -5207,12 +5243,12 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-npos-elections", "sp-runtime", ] @@ -5220,13 +5256,13 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5238,12 +5274,12 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-arithmetic", "sp-runtime", @@ -5253,7 +5289,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5261,7 +5297,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-core", @@ -5276,13 +5312,13 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5292,14 +5328,14 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-authorship", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-core", @@ -5312,12 +5348,12 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5329,13 +5365,13 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5346,13 +5382,13 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5364,10 +5400,10 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "serde", "sp-api", "sp-blockchain", @@ -5379,26 +5415,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-nicks" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5408,14 +5430,15 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", + "sp-io", "sp-runtime", "sp-staking", "sp-std", @@ -5424,7 +5447,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5433,7 +5456,7 @@ dependencies = [ "pallet-bags-list", "pallet-nomination-pools", "pallet-staking", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-staking", @@ -5443,13 +5466,13 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5460,7 +5483,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5473,7 +5496,7 @@ dependencies = [ "pallet-offences", "pallet-session", "pallet-staking", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-staking", @@ -5483,12 +5506,12 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5499,12 +5522,12 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5514,12 +5537,12 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5529,13 +5552,13 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5545,14 +5568,14 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5566,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5582,11 +5605,11 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "rand_chacha 0.2.2", "scale-info", "sp-runtime", @@ -5596,7 +5619,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5605,7 +5628,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "rand_chacha 0.2.2", "scale-info", "serde", @@ -5619,7 +5642,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5630,7 +5653,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", "sp-arithmetic", @@ -5639,11 +5662,11 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -5653,13 +5676,13 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-inherents", "sp-io", @@ -5671,14 +5694,14 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5690,14 +5713,13 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", - "smallvec", "sp-core", "sp-io", "sp-runtime", @@ -5707,11 +5729,11 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", "sp-blockchain", "sp-core", @@ -5722,10 +5744,10 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", "sp-runtime", ] @@ -5733,14 +5755,14 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5750,12 +5772,12 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5766,13 +5788,13 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -5780,13 +5802,13 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-runtime-parachains", "scale-info", @@ -5802,7 +5824,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-benchmarking", "frame-support", @@ -5811,7 +5833,7 @@ dependencies = [ "pallet-assets", "pallet-balances", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-common", "scale-info", @@ -5827,9 +5849,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a7901b85874402471e131de3332dde0e51f38432c69a3853627c8e25433048" +checksum = "966eb23bd3a09758b8dac09f82b9d417c00f14e5d46171bf04cffdd9cb2e1eb1" dependencies = [ "blake2-rfc", "crc32fast", @@ -5859,9 +5881,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.1.2" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" +checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" dependencies = [ "arrayvec 0.7.2", "bitvec 1.0.0", @@ -5873,9 +5895,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" +checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5896,10 +5918,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.0", + "hashbrown 0.12.1", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "smallvec", "tikv-jemalloc-ctl", @@ -5952,12 +5974,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.1", + "parking_lot_core 0.9.3", ] [[package]] @@ -5976,9 +5998,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", @@ -6068,9 +6090,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", "indexmap", @@ -6124,9 +6146,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -6136,9 +6158,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.22" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "platforms" @@ -6148,7 +6170,7 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_cmd", "color-eyre", @@ -6163,11 +6185,11 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", - "env_logger 0.9.0", - "futures 0.3.21", + "env_logger", + "futures", "log", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -6186,12 +6208,12 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "bitvec 1.0.0", - "env_logger 0.9.0", - "futures 0.3.21", + "env_logger", + "futures", "log", "maplit", "polkadot-node-network-protocol", @@ -6210,15 +6232,15 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "derive_more", "fatality", - "futures 0.3.21", + "futures", "futures-timer", - "lru 0.7.5", - "parity-scale-codec 3.1.2", + "lru 0.7.7", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -6239,16 +6261,16 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", - "env_logger 0.9.0", + "env_logger", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "log", - "lru 0.7.5", - "parity-scale-codec 3.1.2", + "lru 0.7.7", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -6268,11 +6290,11 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.22" +version = "0.9.25" dependencies = [ "clap", "frame-benchmarking-cli", - "futures 0.3.21", + "futures", "log", "polkadot-client", "polkadot-node-core-pvf", @@ -6293,7 +6315,7 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6335,16 +6357,16 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.22" +version = "0.9.25" dependencies = [ "always-assert", "assert_matches", - "env_logger 0.9.0", + "env_logger", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6363,9 +6385,9 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "scale-info", "sp-core", @@ -6375,17 +6397,17 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", "derive_more", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "lazy_static", - "lru 0.7.5", - "parity-scale-codec 3.1.2", + "lru 0.7.7", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -6406,9 +6428,9 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", @@ -6419,11 +6441,11 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "lazy_static", "polkadot-node-network-protocol", @@ -6446,16 +6468,16 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.22" +version = "0.9.25" dependencies = [ "always-assert", "assert_matches", "async-trait", "bytes", - "futures 0.3.21", + "futures", "futures-timer", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6472,10 +6494,10 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", - "parity-scale-codec 3.1.2", + "futures", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6491,19 +6513,19 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "bitvec 1.0.0", "derive_more", - "futures 0.3.21", + "futures", "futures-timer", "kvdb", "kvdb-memorydb", - "lru 0.7.5", + "lru 0.7.7", "merlin", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6529,18 +6551,18 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "bitvec 1.0.0", - "env_logger 0.9.0", - "futures 0.3.21", + "env_logger", + "futures", "futures-timer", "kvdb", "kvdb-memorydb", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6557,12 +6579,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "bitvec 1.0.0", "fatality", - "futures 0.3.21", + "futures", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6583,9 +6605,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", + "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", @@ -6599,12 +6621,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.21", - "parity-scale-codec 3.1.2", + "futures", + "parity-scale-codec 3.1.5", "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6621,11 +6643,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", + "futures", "maplit", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6640,15 +6662,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", - "futures 0.3.21", + "futures", "futures-timer", "kvdb", "kvdb-memorydb", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6661,16 +6683,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "kvdb", "kvdb-memorydb", - "lru 0.7.5", - "parity-scale-codec 3.1.2", + "lru 0.7.7", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6687,10 +6709,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.22" +version = "0.9.25" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "polkadot-node-subsystem", "polkadot-primitives", @@ -6708,7 +6730,7 @@ dependencies = [ "assert_matches", "bitvec 1.0.0", "fatality", - "futures 0.3.21", + "futures", "parity-scale-codec 2.3.1", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6721,11 +6743,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.22" +version = "0.9.25" dependencies = [ "bitvec 1.0.0", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6742,16 +6764,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.22" +version = "0.9.25" dependencies = [ "always-assert", "assert_matches", "async-process", "async-std", - "futures 0.3.21", + "futures", "futures-timer", "hex-literal", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "pin-project 1.0.10", "polkadot-core-primitives", "polkadot-node-subsystem-util", @@ -6775,9 +6797,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", + "futures", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6798,9 +6820,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", + "futures", "memory-lru", "parity-util-mem", "polkadot-node-primitives", @@ -6819,14 +6841,14 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.22" +version = "0.9.25" dependencies = [ "async-std", "lazy_static", "log", "mick-jaeger", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -6836,19 +6858,19 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_cmd", "bs58", - "futures 0.3.21", + "futures", "futures-timer", "hyper", "log", - "metered-channel", "nix 0.24.1", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-test-service", + "prioritized-metered-channel", "prometheus-parse", "sc-cli", "sc-client-api", @@ -6864,13 +6886,13 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.22" +version = "0.9.25" dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.21", - "parity-scale-codec 3.1.2", + "futures", + "parity-scale-codec 3.1.5", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", @@ -6878,18 +6900,18 @@ dependencies = [ "rand_chacha 0.3.1", "sc-authority-discovery", "sc-network", - "strum 0.24.0", + "strum 0.24.1", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.22" +version = "0.9.25" dependencies = [ "bounded-vec", - "futures 0.3.21", - "parity-scale-codec 3.1.2", + "futures", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-parachain", "polkadot-primitives", @@ -6907,7 +6929,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.22" +version = "0.9.25" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -6916,11 +6938,11 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.22" +version = "0.9.25" dependencies = [ "async-trait", - "futures 0.3.21", - "parking_lot 0.12.0", + "futures", + "parking_lot 0.12.1", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", @@ -6934,14 +6956,14 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.22" +version = "0.9.25" dependencies = [ "derive_more", - "futures 0.3.21", + "futures", + "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-overseer-gen", "polkadot-primitives", "polkadot-statement-table", "sc-network", @@ -6952,23 +6974,22 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", "derive_more", - "env_logger 0.9.0", + "env_logger", "fatality", - "futures 0.3.21", + "futures", "itertools", "kvdb", "kvdb-shared-tests", "lazy_static", "log", - "lru 0.7.5", - "metered-channel", + "lru 0.7.7", "parity-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "parking_lot 0.11.2", "pin-project 1.0.10", @@ -6981,6 +7002,7 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", + "prioritized-metered-channel", "rand 0.8.5", "sp-application-crypto", "sp-core", @@ -6992,70 +7014,36 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "femme", - "futures 0.3.21", + "futures", "futures-timer", - "lru 0.7.5", - "metered-channel", + "lru 0.7.7", + "orchestra", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-overseer-gen", "polkadot-primitives", "polkadot-primitives-test-helpers", + "prioritized-metered-channel", "sc-client-api", "sp-api", "sp-core", "tracing-gum", ] -[[package]] -name = "polkadot-overseer-gen" -version = "0.9.22" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "metered-channel", - "pin-project 1.0.10", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-overseer-gen-proc-macro", - "rustversion", - "thiserror", - "tracing-gum", - "trybuild", -] - -[[package]] -name = "polkadot-overseer-gen-proc-macro" -version = "0.9.22" -dependencies = [ - "assert_matches", - "expander 0.0.6", - "petgraph", - "polkadot-overseer-gen", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", - "thiserror", - "tracing-gum", -] - [[package]] name = "polkadot-parachain" -version = "0.9.22" +version = "0.9.25" dependencies = [ "derive_more", "frame-support", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "polkadot-core-primitives", "scale-info", @@ -7067,9 +7055,9 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "env_logger 0.9.0", + "env_logger", "kusama-runtime", "log", "polkadot-erasure-coding", @@ -7081,12 +7069,12 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.22" +version = "0.9.25" dependencies = [ "bitvec 1.0.0", "frame-system", "hex-literal", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", @@ -7110,7 +7098,7 @@ dependencies = [ [[package]] name = "polkadot-primitives-test-helpers" -version = "0.9.22" +version = "0.9.25" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -7121,7 +7109,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7152,7 +7140,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "bitvec 1.0.0", @@ -7184,7 +7172,6 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-multisig", - "pallet-nicks", "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", @@ -7202,7 +7189,7 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", @@ -7243,7 +7230,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "bitvec 1.0.0", @@ -7268,7 +7255,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-parachains", @@ -7295,7 +7282,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "polkadot-primitives", @@ -7306,10 +7293,10 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.22" +version = "0.9.25" dependencies = [ "bs58", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sp-std", "sp-tracing", @@ -7317,7 +7304,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "bitflags", @@ -7327,7 +7314,7 @@ dependencies = [ "frame-support", "frame-support-test", "frame-system", - "futures 0.3.21", + "futures", "hex-literal", "log", "pallet-authority-discovery", @@ -7338,7 +7325,7 @@ dependencies = [ "pallet-staking", "pallet-timestamp", "pallet-vesting", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", @@ -7368,22 +7355,22 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", "beefy-gadget", "beefy-primitives", - "env_logger 0.9.0", + "env_logger", "frame-system-rpc-runtime-api", - "futures 0.3.21", + "futures", "hex-literal", "kusama-runtime", "kusama-runtime-constants", "kvdb", "kvdb-rocksdb", "log", - "lru 0.7.5", + "lru 0.7.7", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -7478,15 +7465,15 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.22" +version = "0.9.25" dependencies = [ "arrayvec 0.5.2", "assert_matches", "fatality", - "futures 0.3.21", + "futures", "futures-timer", "indexmap", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7509,19 +7496,19 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sp-core", ] [[package]] name = "polkadot-test-client" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "futures 0.3.21", - "parity-scale-codec 3.1.2", + "futures", + "parity-scale-codec 3.1.5", "polkadot-node-subsystem", "polkadot-primitives", "polkadot-test-runtime", @@ -7544,13 +7531,13 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "async-trait", "clap", "color-eyre", - "futures 0.3.21", + "futures", "futures-timer", "parity-util-mem", "polkadot-cli", @@ -7572,7 +7559,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "bitvec 1.0.0", @@ -7589,7 +7576,6 @@ dependencies = [ "pallet-balances", "pallet-grandpa", "pallet-indices", - "pallet-nicks", "pallet-offences", "pallet-session", "pallet-staking", @@ -7600,7 +7586,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-vesting", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", @@ -7638,12 +7624,11 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-benchmarking", "frame-system", - "futures 0.1.31", - "futures 0.3.21", + "futures", "hex", "pallet-balances", "pallet-staking", @@ -7693,7 +7678,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "0.9.22" +version = "0.9.25" dependencies = [ "clap", "generate-bags", @@ -7761,15 +7746,15 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "predicates" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e5a7689e456ab905c22c2b48225bb921aba7c8dfa58440d68ba13f6222a715" +checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" dependencies = [ "difflib", "itertools", @@ -7778,15 +7763,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" +checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" [[package]] name = "predicates-tree" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" +checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" dependencies = [ "predicates-core", "termtree", @@ -7817,6 +7802,23 @@ dependencies = [ "uint", ] +[[package]] +name = "prioritized-metered-channel" +version = "0.2.0" +dependencies = [ + "assert_matches", + "coarsetime", + "crossbeam-queue", + "derive_more", + "env_logger", + "futures", + "futures-timer", + "log", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "1.1.3" @@ -7853,35 +7855,35 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f64969ffd5dd8f39bd57a68ac53c163a095ed9d0fb707146da1b27025a3504" +checksum = "cface98dfa6d645ea4c789839f176e4b072265d085bfcc48eaa8d137f58d3c39" dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", "memchr", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "thiserror", ] [[package]] name = "prometheus-client" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a896938cc6018c64f279888b8c7559d3725210d5db9a3a1ee6bc7188d51d34" +checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" dependencies = [ "dtoa", - "itoa 1.0.1", + "itoa 1.0.2", "owning_ref", "prometheus-client-derive-text-encode", ] @@ -7899,11 +7901,12 @@ dependencies = [ [[package]] name = "prometheus-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c996f3caea1c51aa034c0d2dfd8447a12c555f4567b02677ef8a865ac4cce712" +checksum = "ef7a8ed15bcffc55fe0328931ef20d393bb89ad704756a37bd20cffb4804f306" dependencies = [ "chrono", + "itertools", "lazy_static", "regex", ] @@ -7920,9 +7923,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" dependencies = [ "bytes", "prost-derive 0.10.1", @@ -7942,12 +7945,47 @@ dependencies = [ "multimap", "petgraph", "prost 0.9.0", - "prost-types", + "prost-types 0.9.0", + "regex", + "tempfile", + "which", +] + +[[package]] +name = "prost-build" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" +dependencies = [ + "bytes", + "cfg-if 1.0.0", + "cmake", + "heck 0.4.0", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.10.4", + "prost-types 0.10.1", "regex", "tempfile", "which", ] +[[package]] +name = "prost-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" +dependencies = [ + "asynchronous-codec", + "bytes", + "prost 0.10.4", + "thiserror", + "unsigned-varint", +] + [[package]] name = "prost-derive" version = "0.9.0" @@ -7984,11 +8022,21 @@ dependencies = [ "prost 0.9.0", ] +[[package]] +name = "prost-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +dependencies = [ + "bytes", + "prost 0.10.4", +] + [[package]] name = "psm" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd136ff4382c4753fc061cb9e4712ab2af263376b95bbd5bd8cd50c020b78e69" +checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" dependencies = [ "cc", ] @@ -8012,12 +8060,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quicksink" version = "0.1.2" @@ -8031,9 +8073,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -8110,14 +8152,14 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.7", ] [[package]] name = "rand_distr" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964d548f8e7d12e102ef183a0de7e98180c9f8729f555897a857b96e48122d2f" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", "rand 0.8.5", @@ -8158,9 +8200,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -8170,34 +8212,34 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.7", "redox_syscall", + "thiserror", ] [[package]] @@ -8215,18 +8257,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "685d58625b6c2b83e4cc88a27c4bf65adb7b6b16dbdc413e515c9405b47432ab" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "a043824e29c94169374ac5183ac0ed43f5724dc4556b19568007486bd840fa1f" dependencies = [ "proc-macro2", "quote", @@ -8246,9 +8288,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -8266,9 +8308,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "region" @@ -8284,7 +8326,7 @@ dependencies = [ [[package]] name = "remote-ext-tests-bags-list" -version = "0.9.22" +version = "0.9.25" dependencies = [ "clap", "frame-system", @@ -8304,12 +8346,12 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "env_logger 0.9.0", + "env_logger", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "serde", "serde_json", "sp-core", @@ -8329,9 +8371,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64", "bytes", @@ -8350,12 +8392,13 @@ dependencies = [ "mime", "native-tls", "percent-encoding", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -8370,14 +8413,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ "hostname", - "quick-error 1.2.3", + "quick-error", ] [[package]] name = "retain_mut" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448296241d034b96c11173591deaa1302f2c17b56092106c1f92c1bc0183a8c9" +checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" [[package]] name = "rfc6979" @@ -8417,7 +8460,7 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -8460,7 +8503,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", @@ -8493,7 +8536,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "polkadot-primitives", @@ -8519,7 +8562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f54290e54521dac3de4149d83ddf9f62a359b3cc93bcb494a794a41e6f4744b" dependencies = [ "async-global-executor", - "futures 0.3.21", + "futures", "log", "netlink-packet-route", "netlink-proto", @@ -8551,14 +8594,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver 1.0.10", ] [[package]] name = "rustix" -version = "0.33.5" +version = "0.33.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03627528abcc4a365554d32a9f3bbf67f7694c102cfeda792dc86a2d6057cc85" +checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" dependencies = [ "bitflags", "errno", @@ -8570,46 +8613,21 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - -[[package]] -name = "rustls" -version = "0.20.2" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -8619,18 +8637,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" dependencies = [ "base64", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "a0a5f7c728f5d284929a1cccb5bc19884422bfe6ef4d6c409da2c41838983fcf" [[package]] name = "rw-stream-sink" @@ -8638,16 +8656,27 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.21", + "futures", "pin-project 0.4.29", "static_assertions", ] +[[package]] +name = "rw-stream-sink" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +dependencies = [ + "futures", + "pin-project 1.0.10", + "static_assertions", +] + [[package]] name = "ryu" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "salsa20" @@ -8670,7 +8699,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", "sp-core", @@ -8681,17 +8710,17 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "ip_network", "libp2p", "log", - "parity-scale-codec 3.1.2", - "prost 0.10.3", - "prost-build", + "parity-scale-codec 3.1.5", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "sc-client-api", "sc-network", @@ -8708,12 +8737,12 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -8731,9 +8760,9 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sp-api", "sp-block-builder", @@ -8747,11 +8776,11 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "impl-trait-for-tuples", - "memmap2 0.5.0", - "parity-scale-codec 3.1.2", + "memmap2 0.5.4", + "parity-scale-codec 3.1.5", "sc-chain-spec-derive", "sc-network", "sc-telemetry", @@ -8764,7 +8793,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8775,17 +8804,17 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "chrono", "clap", "fdlimit", - "futures 0.3.21", + "futures", "hex", "libp2p", "log", "names", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "rand 0.7.3", "regex", "rpassword", @@ -8814,14 +8843,14 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "fnv", - "futures 0.3.21", + "futures", "hash-db", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -8842,7 +8871,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "hash-db", "kvdb", @@ -8851,8 +8880,8 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -8867,14 +8896,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sc-utils", "serde", @@ -8891,18 +8920,18 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.21", + "futures", "log", "merlin", "num-bigint", "num-rational 0.2.4", "num-traits", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -8934,9 +8963,9 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -8956,10 +8985,10 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "fork-tree", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -8969,13 +8998,13 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -8994,7 +9023,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "sc-client-api", "sp-authorship", @@ -9005,12 +9034,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "lazy_static", - "lru 0.7.5", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "lru 0.7.7", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -9032,10 +9061,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", @@ -9049,10 +9078,10 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9064,12 +9093,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "cfg-if 1.0.0", "libc", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-wasm 0.42.2", "sc-allocator", "sc-executor-common", @@ -9082,19 +9111,19 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ahash", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.21", + "futures", "futures-timer", "hex", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -9122,13 +9151,13 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "finality-grandpa", - "futures 0.3.21", + "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-finality-grandpa", "sc-rpc", @@ -9143,10 +9172,10 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ansi_term", - "futures 0.3.21", + "futures", "futures-timer", "log", "parity-util-mem", @@ -9160,11 +9189,11 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "hex", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "serde_json", "sp-application-crypto", "sp-core", @@ -9175,7 +9204,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "asynchronous-codec", @@ -9185,7 +9214,7 @@ dependencies = [ "either", "fnv", "fork-tree", - "futures 0.3.21", + "futures", "futures-timer", "hex", "ip_network", @@ -9193,12 +9222,12 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru 0.7.5", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "lru 0.7.7", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "pin-project 1.0.10", - "prost 0.10.3", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "sc-block-builder", "sc-client-api", @@ -9227,12 +9256,12 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "libp2p", - "parity-scale-codec 3.1.2", - "prost-build", + "parity-scale-codec 3.1.5", + "prost-build 0.10.4", "sc-peerset", "smallvec", ] @@ -9240,14 +9269,14 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ahash", - "futures 0.3.21", + "futures", "futures-timer", "libp2p", "log", - "lru 0.7.5", + "lru 0.7.7", "sc-network", "sp-runtime", "substrate-prometheus-endpoint", @@ -9257,14 +9286,14 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "libp2p", "log", - "parity-scale-codec 3.1.2", - "prost 0.10.3", - "prost-build", + "parity-scale-codec 3.1.5", + "prost 0.10.4", + "prost-build 0.10.4", "sc-client-api", "sc-network-common", "sc-peerset", @@ -9277,18 +9306,18 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "bitflags", "either", "fork-tree", - "futures 0.3.21", + "futures", "libp2p", "log", - "lru 0.7.5", - "parity-scale-codec 3.1.2", - "prost 0.10.3", - "prost-build", + "lru 0.7.7", + "parity-scale-codec 3.1.5", + "prost 0.10.4", + "prost-build 0.10.4", "sc-client-api", "sc-consensus", "sc-network-common", @@ -9306,19 +9335,19 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "bytes", "fnv", - "futures 0.3.21", + "futures", "futures-timer", "hex", "hyper", "hyper-rustls", "num_cpus", "once_cell", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "rand 0.7.3", "sc-client-api", "sc-network", @@ -9334,9 +9363,9 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "libp2p", "log", "sc-utils", @@ -9347,7 +9376,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9356,14 +9385,14 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "hash-db", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -9386,13 +9415,13 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -9409,9 +9438,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "jsonrpsee", "log", "serde_json", @@ -9422,19 +9451,19 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.21", + "futures", "futures-timer", "hash-db", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "sc-block-builder", @@ -9487,13 +9516,13 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sp-core", ] @@ -9501,10 +9530,10 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -9520,9 +9549,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "libc", "log", "rand 0.7.3", @@ -9539,13 +9568,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "chrono", - "futures 0.3.21", + "futures", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project 1.0.10", "rand 0.7.3", "serde", @@ -9557,7 +9586,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ansi_term", "atty", @@ -9566,7 +9595,7 @@ dependencies = [ "libc", "log", "once_cell", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", @@ -9588,7 +9617,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9599,15 +9628,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "futures-timer", "linked-hash-map", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -9626,9 +9655,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "log", "serde", "sp-blockchain", @@ -9639,35 +9668,35 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "prometheus", ] [[package]] name = "scale-info" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8980cafbe98a7ee7a9cc16b32ebce542c77883f512d83fbf2ddc8f6a85ea74c9" +checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" dependencies = [ "bitvec 1.0.0", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info-derive", "serde", ] [[package]] name = "scale-info-derive" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4260c630e8a8a33429d1688eff2f163f24c65a4e1b1578ef6b565061336e4b6f" +checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9677,12 +9706,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -9709,16 +9738,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -9736,7 +9755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ "der", - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", "zeroize", ] @@ -9770,9 +9789,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -9783,9 +9802,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -9802,9 +9821,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.4" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" dependencies = [ "serde", ] @@ -9856,7 +9875,7 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -9877,7 +9896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -9932,9 +9951,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", @@ -9968,9 +9987,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f935e31cf406e8c0e96c2815a5516181b7004ae8c5f296293221e9b1e356bd" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" dependencies = [ "digest 0.10.3", "keccak", @@ -9993,9 +10012,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c98891d737e271a2954825ef19e46bd16bdb98e2746f2eec4f7a4ef7946efd1" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" dependencies = [ "libc", "signal-hook-registry", @@ -10034,16 +10053,16 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "slot-range-helper" -version = "0.9.22" +version = "0.9.25" dependencies = [ "enumn", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "paste", "sp-runtime", "sp-std", @@ -10106,7 +10125,7 @@ dependencies = [ "base64", "bytes", "flate2", - "futures 0.3.21", + "futures", "httparse", "log", "rand 0.8.5", @@ -10116,11 +10135,11 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "hash-db", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api-proc-macro", "sp-core", "sp-runtime", @@ -10133,7 +10152,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "blake2", "proc-macro-crate", @@ -10145,9 +10164,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -10158,11 +10177,11 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-debug-derive", @@ -10173,9 +10192,9 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-application-crypto", @@ -10186,10 +10205,10 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-inherents", "sp-runtime", "sp-std", @@ -10198,9 +10217,9 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", "sp-inherents", "sp-runtime", @@ -10210,13 +10229,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "log", - "lru 0.7.5", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "lru 0.7.7", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "sp-api", "sp-consensus", "sp-database", @@ -10228,13 +10247,13 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-core", "sp-inherents", "sp-runtime", @@ -10247,11 +10266,11 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "merlin", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-api", @@ -10270,9 +10289,9 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -10284,9 +10303,9 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "schnorrkel", "sp-core", @@ -10297,7 +10316,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "base58", "bitflags", @@ -10305,7 +10324,7 @@ dependencies = [ "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.21", + "futures", "hash-db", "hash256-std-hasher", "hex", @@ -10315,9 +10334,9 @@ dependencies = [ "log", "merlin", "num-traits", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", "regex", @@ -10343,13 +10362,13 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "blake2", "byteorder", "digest 0.10.3", "sha2 0.10.2", - "sha3 0.10.0", + "sha3 0.10.1", "sp-std", "twox-hash", ] @@ -10357,7 +10376,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro2", "quote", @@ -10368,16 +10387,16 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "kvdb", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro2", "quote", @@ -10387,10 +10406,10 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-std", "sp-storage", ] @@ -10398,11 +10417,11 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-api", @@ -10416,11 +10435,11 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-core", "sp-runtime", "sp-std", @@ -10430,14 +10449,14 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "hash-db", "libsecp256k1", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -10455,7 +10474,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "lazy_static", "sp-core", @@ -10466,13 +10485,13 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "merlin", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "schnorrkel", "serde", "sp-core", @@ -10483,7 +10502,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "thiserror", "zstd", @@ -10492,10 +10511,10 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "serde", "sp-api", "sp-core", @@ -10507,9 +10526,9 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -10521,7 +10540,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "sp-api", "sp-core", @@ -10531,7 +10550,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "backtrace", "lazy_static", @@ -10541,7 +10560,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "rustc-hash", "serde", @@ -10551,13 +10570,13 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-util-mem", "paste", "rand 0.7.3", @@ -10573,10 +10592,10 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", @@ -10590,7 +10609,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "Inflector", "proc-macro-crate", @@ -10602,10 +10621,10 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-core", "sp-io", "sp-std", @@ -10616,7 +10635,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "serde", "serde_json", @@ -10625,9 +10644,9 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-core", @@ -10639,9 +10658,9 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -10650,13 +10669,13 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "hash-db", "log", "num-traits", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec 3.1.5", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "sp-core", @@ -10672,15 +10691,15 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "ref-cast", "serde", "sp-debug-derive", @@ -10690,7 +10709,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "log", "sp-core", @@ -10703,12 +10722,12 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-api", "sp-inherents", "sp-runtime", @@ -10719,9 +10738,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-std", "tracing", "tracing-core", @@ -10731,7 +10750,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "sp-api", "sp-runtime", @@ -10740,11 +10759,11 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-inherents", @@ -10756,11 +10775,11 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "hash-db", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-std", @@ -10772,10 +10791,10 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "parity-wasm 0.42.2", "scale-info", "serde", @@ -10789,9 +10808,9 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "proc-macro2", "quote", "syn", @@ -10800,11 +10819,11 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-std", "wasmi", "wasmtime", @@ -10818,9 +10837,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.18.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb8b72a924ccfe7882d0e26144c114503760a4d1248bb5cd06c8ab2d55404cc" +checksum = "5d804c8d48aeab838be31570866fce1130d275b563d49af08b4927a0bd561e7c" dependencies = [ "Inflector", "num-format", @@ -10839,7 +10858,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staking-miner" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_cmd", "clap", @@ -10853,7 +10872,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-staking", "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "paste", "polkadot-core-primitives", "polkadot-runtime", @@ -10935,9 +10954,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ "strum_macros 0.24.0", ] @@ -10985,14 +11004,14 @@ dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "platforms", ] @@ -11000,13 +11019,13 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.21", + "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", @@ -11021,7 +11040,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "futures-util", "hyper", @@ -11034,11 +11053,11 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-rpc-api", "scale-info", @@ -11055,12 +11074,12 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "async-trait", - "futures 0.3.21", + "futures", "hex", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-client-db", "sc-consensus", @@ -11081,9 +11100,9 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ - "futures 0.3.21", + "futures", "substrate-test-utils-derive", "tokio", ] @@ -11091,7 +11110,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11102,11 +11121,12 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", + "filetime", "sp-maybe-compressed-blob", "strum 0.23.0", "tempfile", @@ -11132,21 +11152,21 @@ dependencies = [ [[package]] name = "symbolic-common" -version = "8.6.0" +version = "8.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92a52f07eed9afba3d6f883652cde7cd75fcf327dd44e84f210958379158737" +checksum = "f551f902d5642e58039aee6a9021a61037926af96e071816361644983966f540" dependencies = [ "debugid", - "memmap2 0.5.0", + "memmap2 0.5.4", "stable_deref_trait", "uuid", ] [[package]] name = "symbolic-demangle" -version = "8.6.0" +version = "8.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9abc81544d9964975269165bfe5ad198d8b9e2e809c46527323f95588a57693" +checksum = "4564ca7b4e6eb14105aa8bbbce26e080f6b5d9c4373e67167ab31f7b86443750" dependencies = [ "cpp_demangle", "rustc-demangle", @@ -11155,9 +11175,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.95" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", @@ -11205,19 +11225,19 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.5", "redox_syscall", "remove_dir_all", "winapi", @@ -11225,25 +11245,25 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" +checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "test-parachain-adder" -version = "0.9.22" +version = "0.9.25" dependencies = [ "dlmalloc", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "sp-io", "sp-std", @@ -11253,13 +11273,13 @@ dependencies = [ [[package]] name = "test-parachain-adder-collator" -version = "0.9.22" +version = "0.9.25" dependencies = [ "clap", - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-cli", "polkadot-node-core-pvf", "polkadot-node-primitives", @@ -11279,18 +11299,18 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "0.9.22" +version = "0.9.25" dependencies = [ "substrate-wasm-builder", ] [[package]] name = "test-parachain-undying" -version = "0.9.22" +version = "0.9.25" dependencies = [ "dlmalloc", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "sp-io", "sp-std", @@ -11300,13 +11320,13 @@ dependencies = [ [[package]] name = "test-parachain-undying-collator" -version = "0.9.22" +version = "0.9.25" dependencies = [ "clap", - "futures 0.3.21", + "futures", "futures-timer", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-cli", "polkadot-node-core-pvf", "polkadot-node-primitives", @@ -11326,9 +11346,9 @@ dependencies = [ [[package]] name = "test-parachains" -version = "0.9.22" +version = "0.9.25" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-core", "test-parachain-adder", "test-parachain-halt", @@ -11337,7 +11357,7 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "polkadot-primitives", @@ -11422,9 +11442,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.4.2+5.2.1-patched.2" +version = "0.4.3+5.2.1-patched.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5844e429d797c62945a566f8da4e24c7fe3fbd5d6617fd8bf7a0b7dc1ee0f22e" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" dependencies = [ "cc", "fs_extra", @@ -11433,9 +11453,9 @@ dependencies = [ [[package]] name = "tikv-jemallocator" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c14a5a604eb8715bc5785018a37d00739b180bcf609916ddf4393d33d49ccdf" +checksum = "a5b7bcecfafe4998587d636f9ae9d55eb9d0499877b88757767c346875067098" dependencies = [ "libc", "tikv-jemalloc-sys", @@ -11464,7 +11484,7 @@ dependencies = [ "pbkdf2 0.4.0", "rand 0.7.3", "rustc-hash", - "sha2 0.9.8", + "sha2 0.9.9", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -11482,9 +11502,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -11497,9 +11517,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.2" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -11507,8 +11527,8 @@ dependencies = [ "mio", "num_cpus", "once_cell", - "parking_lot 0.12.0", - "pin-project-lite 0.2.7", + "parking_lot 0.12.1", + "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", "tokio-macros", @@ -11517,9 +11537,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ "proc-macro2", "quote", @@ -11538,24 +11558,24 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.19.1", + "rustls", "tokio", - "webpki 0.21.4", + "webpki", ] [[package]] -name = "tokio-rustls" -version = "0.23.2" +name = "tokio-stream" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" +checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" dependencies = [ - "rustls 0.20.2", + "futures-core", + "pin-project-lite 0.2.9", "tokio", - "webpki 0.22.0", ] [[package]] @@ -11572,65 +11592,52 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.2.7", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", @@ -11639,11 +11646,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -11659,7 +11666,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.22" +version = "0.9.25" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -11669,7 +11676,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.22" +version = "0.9.25" dependencies = [ "assert_matches", "expander 0.0.6", @@ -11688,15 +11695,15 @@ dependencies = [ "ahash", "lazy_static", "log", - "lru 0.7.5", + "lru 0.7.7", "tracing-core", ] [[package]] name = "tracing-serde" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ "serde", "tracing-core", @@ -11750,7 +11757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" dependencies = [ "hash-db", - "hashbrown 0.12.0", + "hashbrown 0.12.1", "log", "rustc-hex", "smallvec", @@ -11801,7 +11808,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", @@ -11817,12 +11824,12 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#19b44f087b30e7730cf037518ec921c336fcbb0f" +source = "git+https://github.com/paritytech/substrate?branch=master#656c62fd6cbacc393f61b6749e6699e4f02e9d5e" dependencies = [ "clap", "jsonrpsee", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "remote-externalities", "sc-chain-spec", "sc-cli", @@ -11841,9 +11848,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc92f558afb6d1d7c6f175eb8d615b8ef49c227543e68e19c123d4ee43d8a7d" +checksum = "764b9e244b482a9b81bde596aa37aa6f1347bf8007adab25e59f901b32b4e0a0" dependencies = [ "dissimilar", "glob", @@ -11882,9 +11889,9 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.6.2" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", "digest 0.10.3", @@ -11894,9 +11901,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" @@ -11906,9 +11913,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "uint" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" dependencies = [ "byteorder", "crunchy", @@ -11927,15 +11934,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-normalization" @@ -11948,9 +11955,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" @@ -11960,9 +11967,9 @@ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "universal-hash" @@ -11970,7 +11977,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -12044,9 +12051,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -12110,9 +12117,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" dependencies = [ "cfg-if 1.0.0", "serde", @@ -12122,9 +12129,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" dependencies = [ "bumpalo", "lazy_static", @@ -12137,9 +12144,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -12149,9 +12156,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12159,9 +12166,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ "proc-macro2", "quote", @@ -12172,9 +12179,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" [[package]] name = "wasm-gc-api" @@ -12202,7 +12209,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.21", + "futures", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -12256,7 +12263,7 @@ dependencies = [ "lazy_static", "libc", "log", - "object", + "object 0.27.1", "once_cell", "paste", "psm", @@ -12287,7 +12294,7 @@ dependencies = [ "log", "rustix", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "toml", "winapi", "zstd", @@ -12308,7 +12315,7 @@ dependencies = [ "gimli", "log", "more-asserts", - "object", + "object 0.27.1", "target-lexicon", "thiserror", "wasmparser", @@ -12327,7 +12334,7 @@ dependencies = [ "indexmap", "log", "more-asserts", - "object", + "object 0.27.1", "serde", "target-lexicon", "thiserror", @@ -12348,7 +12355,7 @@ dependencies = [ "cpp_demangle", "gimli", "log", - "object", + "object 0.27.1", "region", "rustc-demangle", "rustix", @@ -12368,7 +12375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5dc31f811760a6c76b2672c404866fd19b75e5fb3b0075a3e377a6846490654" dependencies = [ "lazy_static", - "object", + "object 0.27.1", "rustix", ] @@ -12386,6 +12393,7 @@ dependencies = [ "libc", "log", "mach", + "memfd", "memoffset", "more-asserts", "rand 0.8.5", @@ -12411,24 +12419,14 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -12441,11 +12439,11 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" +checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] @@ -12459,7 +12457,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.22" +version = "0.9.25" dependencies = [ "beefy-primitives", "bitvec 1.0.0", @@ -12489,7 +12487,6 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-multisig", - "pallet-nicks", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", "pallet-offences", @@ -12512,7 +12509,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-benchmarks", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", @@ -12551,7 +12548,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "polkadot-primitives", @@ -12562,9 +12559,9 @@ dependencies = [ [[package]] name = "which" -version = "4.2.2" +version = "4.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" dependencies = [ "either", "lazy_static", @@ -12610,89 +12607,89 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac7fef12f4b59cd0a29339406cc9203ab44e440ddff6b3f5a41455349fa9cf3" +checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" dependencies = [ - "windows_aarch64_msvc 0.29.0", - "windows_i686_gnu 0.29.0", - "windows_i686_msvc 0.29.0", - "windows_x86_64_gnu 0.29.0", - "windows_x86_64_msvc 0.29.0", + "windows_aarch64_msvc 0.34.0", + "windows_i686_gnu 0.34.0", + "windows_i686_msvc 0.34.0", + "windows_x86_64_gnu 0.34.0", + "windows_x86_64_msvc 0.34.0", ] [[package]] name = "windows-sys" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc 0.32.0", - "windows_i686_gnu 0.32.0", - "windows_i686_msvc 0.32.0", - "windows_x86_64_gnu 0.32.0", - "windows_x86_64_msvc 0.32.0", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] name = "windows_aarch64_msvc" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d027175d00b01e0cbeb97d6ab6ebe03b12330a35786cbaca5252b1c4bf5d9b" +checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_i686_gnu" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8793f59f7b8e8b01eda1a652b2697d87b93097198ae85f823b969ca5b89bba58" +checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_msvc" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8602f6c418b67024be2996c512f5f995de3ba417f4c75af68401ab8756796ae4" +checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_x86_64_gnu" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d615f419543e0bd7d2b3323af0d86ff19cbc4f816e6453f36a2c2ce889c354" +checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_msvc" -version = "0.29.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561" +checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.32.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "winreg" @@ -12740,19 +12737,20 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.22" +version = "0.9.25" dependencies = [ "derivative", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "scale-info", + "sp-runtime", "xcm-procedural", ] [[package]] name = "xcm-builder" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "frame-system", @@ -12760,7 +12758,7 @@ dependencies = [ "pallet-balances", "pallet-transaction-payment", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-runtime-parachains", "scale-info", @@ -12775,13 +12773,13 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-benchmarking", "frame-support", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "sp-arithmetic", "sp-core", "sp-io", @@ -12792,11 +12790,11 @@ dependencies = [ [[package]] name = "xcm-executor-integration-tests" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "frame-system", - "futures 0.3.21", + "futures", "pallet-xcm", "polkadot-test-client", "polkadot-test-runtime", @@ -12822,10 +12820,10 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "paste", "polkadot-core-primitives", "polkadot-parachain", @@ -12838,13 +12836,13 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "frame-system", "pallet-balances", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-core-primitives", "polkadot-parachain", "polkadot-runtime-parachains", @@ -12861,14 +12859,14 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "0.9.22" +version = "0.9.25" dependencies = [ "frame-support", "frame-system", "honggfuzz", "pallet-balances", "pallet-xcm", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "polkadot-core-primitives", "polkadot-parachain", "polkadot-runtime-parachains", @@ -12889,10 +12887,10 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c0608f53c1dc0bad505d03a34bbd49fbf2ad7b51eb036123e896365532745a1" dependencies = [ - "futures 0.3.21", + "futures", "log", "nohash-hasher", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.8.5", "static_assertions", ] @@ -12920,11 +12918,11 @@ dependencies = [ [[package]] name = "zombienet-backchannel" -version = "0.9.22" +version = "0.9.25" dependencies = [ "futures-util", "lazy_static", - "parity-scale-codec 3.1.2", + "parity-scale-codec 3.1.5", "reqwest", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 5a5f567fe57d..4a00d79c36e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ path = "src/main.rs" name = "polkadot" description = "Implementation of a `https://polkadot.network` node in Rust based on the Substrate framework." license = "GPL-3.0-only" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" rust-version = "1.57.0" # custom profiles @@ -84,8 +84,8 @@ members = [ "node/network/gossip-support", "node/network/dispute-distribution", "node/overseer", - "node/overseer/overseer-gen", - "node/overseer/overseer-gen/proc-macro", + "node/orchestra", + "node/orchestra/proc-macro", "node/malus", "node/primitives", "node/service", diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index f1e8befdcc1c..4714dab68a46 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -221,6 +221,7 @@ impl pallet_aura::Config for Runtime { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; + type MaxAuthorities = MaxAuthorities; } impl pallet_bridge_dispatch::Config for Runtime { @@ -333,6 +334,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type OperationalFeeMultiplier = OperationalFeeMultiplier; @@ -506,7 +508,7 @@ construct_runtime!( Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, // Consensus support. Session: pallet_session::{Pallet, Call, Storage, Event, Config}, diff --git a/bridges/bin/rialto-parachain/runtime/src/lib.rs b/bridges/bin/rialto-parachain/runtime/src/lib.rs index 4f81927f0f6f..555db03a9c48 100644 --- a/bridges/bin/rialto-parachain/runtime/src/lib.rs +++ b/bridges/bin/rialto-parachain/runtime/src/lib.rs @@ -251,6 +251,7 @@ impl pallet_balances::Config for Runtime { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type OperationalFeeMultiplier = OperationalFeeMultiplier; @@ -457,7 +458,7 @@ construct_runtime!( Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event} = 20, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 317d56d4d9bf..851ee3d51273 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -250,6 +250,7 @@ impl pallet_babe::Config for Runtime { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; + type MaxAuthorities = MaxAuthorities; } impl pallet_bridge_dispatch::Config for Runtime { @@ -363,6 +364,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type OperationalFeeMultiplier = OperationalFeeMultiplier; @@ -485,7 +487,7 @@ construct_runtime!( Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, // Consensus support. AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config}, diff --git a/bridges/bin/rialto/runtime/src/millau_messages.rs b/bridges/bin/rialto/runtime/src/millau_messages.rs index 44348383f1d5..fba6605c3580 100644 --- a/bridges/bin/rialto/runtime/src/millau_messages.rs +++ b/bridges/bin/rialto/runtime/src/millau_messages.rs @@ -343,7 +343,7 @@ mod tests { let bridge = MILLAU_CHAIN_ID; let call: Call = SystemCall::set_heap_pages { pages: 64 }.into(); let dispatch_weight = call.get_dispatch_info().weight; - let dispatch_fee = ::WeightToFee::calc( + let dispatch_fee = ::WeightToFee::weight_to_fee( &dispatch_weight, ); assert!(dispatch_fee > 0); @@ -508,7 +508,7 @@ mod tests { } let dispatch_weight = 500; - let dispatch_fee = ::WeightToFee::calc( + let dispatch_fee = ::WeightToFee::weight_to_fee( &dispatch_weight, ); assert!(dispatch_fee > 0); diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs index b39decbc6f79..a26dce92bce7 100644 --- a/bridges/bin/runtime-common/src/messages.rs +++ b/bridges/bin/runtime-common/src/messages.rs @@ -33,7 +33,7 @@ use bp_runtime::{ use codec::{Decode, DecodeLimit, Encode}; use frame_support::{ traits::{Currency, ExistenceRequirement}, - weights::{Weight, WeightToFeePolynomial}, + weights::{Weight, WeightToFee}, RuntimeDebug, }; use hash_db::Hasher; @@ -598,7 +598,8 @@ pub mod target { message_id, message.data.payload.map_err(drop), |dispatch_origin, dispatch_weight| { - let unadjusted_weight_fee = ThisRuntime::WeightToFee::calc(&dispatch_weight); + let unadjusted_weight_fee = + ThisRuntime::WeightToFee::weight_to_fee(&dispatch_weight); let fee_multiplier = pallet_transaction_payment::Pallet::::next_fee_multiplier(); let adjusted_weight_fee = diff --git a/bridges/modules/dispatch/src/lib.rs b/bridges/modules/dispatch/src/lib.rs index 1e030b733205..1cff6bceeddc 100644 --- a/bridges/modules/dispatch/src/lib.rs +++ b/bridges/modules/dispatch/src/lib.rs @@ -111,30 +111,42 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event, I: 'static = ()> { /// Message has been rejected before reaching dispatch. - MessageRejected(ChainId, BridgeMessageIdOf), + MessageRejected { source_chain: ChainId, id: BridgeMessageIdOf }, /// Message has been rejected by dispatcher because of spec version mismatch. - /// Last two arguments are: expected and passed spec version. - MessageVersionSpecMismatch(ChainId, BridgeMessageIdOf, SpecVersion, SpecVersion), + MessageVersionSpecMismatch { + source_chain: ChainId, + id: BridgeMessageIdOf, + expected_version: SpecVersion, + passed_version: SpecVersion, + }, /// Message has been rejected by dispatcher because of weight mismatch. - /// Last two arguments are: expected and passed call weight. - MessageWeightMismatch(ChainId, BridgeMessageIdOf, Weight, Weight), + MessageWeightMismatch { + source_chain: ChainId, + id: BridgeMessageIdOf, + expected_weight: Weight, + passed_weight: Weight, + }, /// Message signature mismatch. - MessageSignatureMismatch(ChainId, BridgeMessageIdOf), + MessageSignatureMismatch { source_chain: ChainId, id: BridgeMessageIdOf }, /// We have failed to decode Call from the message. - MessageCallDecodeFailed(ChainId, BridgeMessageIdOf), + MessageCallDecodeFailed { source_chain: ChainId, id: BridgeMessageIdOf }, /// The call from the message has been rejected by the call filter. - MessageCallRejected(ChainId, BridgeMessageIdOf), + MessageCallRejected { source_chain: ChainId, id: BridgeMessageIdOf }, /// The origin account has failed to pay fee for dispatching the message. - MessageDispatchPaymentFailed( - ChainId, - BridgeMessageIdOf, - ::AccountId, - Weight, - ), + MessageDispatchPaymentFailed { + source_chain: ChainId, + id: BridgeMessageIdOf, + origin_account: ::AccountId, + weight: Weight, + }, /// Message has been dispatched with given result. - MessageDispatched(ChainId, BridgeMessageIdOf, DispatchResult), + MessageDispatched { + source_chain: ChainId, + id: BridgeMessageIdOf, + result: DispatchResult, + }, /// Phantom member, never used. Needed to handle multiple pallet instances. - _Dummy(PhantomData), + _Dummy { phantom_member: PhantomData }, } } @@ -167,7 +179,7 @@ impl, I: 'static> MessageDispatch source_chain, id, ); - Self::deposit_event(Event::MessageRejected(source_chain, id)); + Self::deposit_event(Event::MessageRejected { source_chain, id }); return MessageDispatchResult { dispatch_result: false, unspent_weight: 0, @@ -192,12 +204,12 @@ impl, I: 'static> MessageDispatch expected_version, message.spec_version, ); - Self::deposit_event(Event::MessageVersionSpecMismatch( + Self::deposit_event(Event::MessageVersionSpecMismatch { source_chain, id, expected_version, - message.spec_version, - )); + passed_version: message.spec_version, + }); return dispatch_result } @@ -211,7 +223,7 @@ impl, I: 'static> MessageDispatch source_chain, id, ); - Self::deposit_event(Event::MessageCallDecodeFailed(source_chain, id)); + Self::deposit_event(Event::MessageCallDecodeFailed { source_chain, id }); return dispatch_result }, }; @@ -244,7 +256,7 @@ impl, I: 'static> MessageDispatch target_account, target_signature, ); - Self::deposit_event(Event::MessageSignatureMismatch(source_chain, id)); + Self::deposit_event(Event::MessageSignatureMismatch { source_chain, id }); return dispatch_result } @@ -269,7 +281,7 @@ impl, I: 'static> MessageDispatch id, call, ); - Self::deposit_event(Event::MessageCallRejected(source_chain, id)); + Self::deposit_event(Event::MessageCallRejected { source_chain, id }); return dispatch_result } @@ -287,12 +299,12 @@ impl, I: 'static> MessageDispatch expected_weight, message.weight, ); - Self::deposit_event(Event::MessageWeightMismatch( + Self::deposit_event(Event::MessageWeightMismatch { source_chain, id, expected_weight, - message.weight, - )); + passed_weight: message.weight, + }); return dispatch_result } @@ -309,12 +321,12 @@ impl, I: 'static> MessageDispatch id, message.weight, ); - Self::deposit_event(Event::MessageDispatchPaymentFailed( + Self::deposit_event(Event::MessageDispatchPaymentFailed { source_chain, id, origin_account, - message.weight, - )); + weight: message.weight, + }); return dispatch_result } dispatch_result.dispatch_fee_paid_during_dispatch = pay_dispatch_fee_at_target_chain; @@ -339,11 +351,11 @@ impl, I: 'static> MessageDispatch result, ); - Self::deposit_event(Event::MessageDispatched( + Self::deposit_event(Event::MessageDispatched { source_chain, id, - result.map(drop).map_err(|e| e.error), - )); + result: result.map(drop).map_err(|e| e.error), + }); dispatch_result } @@ -632,12 +644,12 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageVersionSpecMismatch( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageVersionSpecMismatch { + source_chain: SOURCE_CHAIN_ID, id, - TEST_SPEC_VERSION, - BAD_SPEC_VERSION - ) + expected_version: TEST_SPEC_VERSION, + passed_version: BAD_SPEC_VERSION + } ), topics: vec![], }], @@ -671,12 +683,12 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageWeightMismatch( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageWeightMismatch { + source_chain: SOURCE_CHAIN_ID, id, - call_weight, - 7, - ) + expected_weight: call_weight, + passed_weight: 7, + } ), topics: vec![], }], @@ -712,10 +724,10 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageSignatureMismatch( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageSignatureMismatch { + source_chain: SOURCE_CHAIN_ID, id - ) + } ), topics: vec![], }], @@ -741,10 +753,10 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageRejected( - SOURCE_CHAIN_ID, + event: Event::Dispatch(call_dispatch::Event::::MessageRejected { + source_chain: SOURCE_CHAIN_ID, id - )), + }), topics: vec![], }], ); @@ -778,10 +790,10 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageCallDecodeFailed( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageCallDecodeFailed { + source_chain: SOURCE_CHAIN_ID, id - ) + } ), topics: vec![], }], @@ -816,10 +828,10 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageCallRejected( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageCallRejected { + source_chain: SOURCE_CHAIN_ID, id - ) + } ), topics: vec![], }], @@ -851,15 +863,17 @@ mod tests { vec![EventRecord { phase: Phase::Initialization, event: Event::Dispatch( - call_dispatch::Event::::MessageDispatchPaymentFailed( - SOURCE_CHAIN_ID, + call_dispatch::Event::::MessageDispatchPaymentFailed { + source_chain: SOURCE_CHAIN_ID, id, - AccountIdConverter::convert(derive_account_id::( + origin_account: AccountIdConverter::convert(derive_account_id::< + AccountId, + >( SOURCE_CHAIN_ID, SourceAccount::Root )), - TEST_WEIGHT, - ) + weight: TEST_WEIGHT, + } ), topics: vec![], }], @@ -892,11 +906,13 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageDispatched( - SOURCE_CHAIN_ID, - id, - Ok(()) - )), + event: Event::Dispatch( + call_dispatch::Event::::MessageDispatched { + source_chain: SOURCE_CHAIN_ID, + id, + result: Ok(()) + } + ), topics: vec![], }], ); @@ -926,11 +942,13 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageDispatched( - SOURCE_CHAIN_ID, - id, - Err(sp_runtime::DispatchError::BadOrigin) - )), + event: Event::Dispatch( + call_dispatch::Event::::MessageDispatched { + source_chain: SOURCE_CHAIN_ID, + id, + result: Err(sp_runtime::DispatchError::BadOrigin) + } + ), topics: vec![], }], ); @@ -960,11 +978,13 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageDispatched( - SOURCE_CHAIN_ID, - id, - Ok(()) - )), + event: Event::Dispatch( + call_dispatch::Event::::MessageDispatched { + source_chain: SOURCE_CHAIN_ID, + id, + result: Ok(()) + } + ), topics: vec![], }], ); @@ -994,11 +1014,13 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageDispatched( - SOURCE_CHAIN_ID, - id, - Ok(()) - )), + event: Event::Dispatch( + call_dispatch::Event::::MessageDispatched { + source_chain: SOURCE_CHAIN_ID, + id, + result: Ok(()) + } + ), topics: vec![], }], ); @@ -1028,11 +1050,13 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::Initialization, - event: Event::Dispatch(call_dispatch::Event::::MessageDispatched( - SOURCE_CHAIN_ID, - id, - Ok(()) - )), + event: Event::Dispatch( + call_dispatch::Event::::MessageDispatched { + source_chain: SOURCE_CHAIN_ID, + id, + result: Ok(()) + } + ), topics: vec![], }], ); diff --git a/bridges/modules/grandpa/Cargo.toml b/bridges/modules/grandpa/Cargo.toml index eac80375da12..335a863438a9 100644 --- a/bridges/modules/grandpa/Cargo.toml +++ b/bridges/modules/grandpa/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -finality-grandpa = { version = "0.15.0", default-features = false } +finality-grandpa = { version = "0.16.0", default-features = false } log = { version = "0.4.14", default-features = false } num-traits = { version = "0.2", default-features = false } scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } diff --git a/bridges/modules/messages/src/lib.rs b/bridges/modules/messages/src/lib.rs index 9f5f9d438c41..c13e515cebe0 100644 --- a/bridges/modules/messages/src/lib.rs +++ b/bridges/modules/messages/src/lib.rs @@ -266,7 +266,7 @@ pub mod pallet { ) -> DispatchResult { ensure_owner_or_root::(origin)?; parameter.save(); - Self::deposit_event(Event::ParameterUpdated(parameter)); + Self::deposit_event(Event::ParameterUpdated { parameter }); Ok(()) } @@ -622,7 +622,10 @@ pub mod pallet { // emit 'delivered' event let received_range = confirmed_messages.begin..=confirmed_messages.end; - Self::deposit_event(Event::MessagesDelivered(lane_id, confirmed_messages)); + Self::deposit_event(Event::MessagesDelivered { + lane_id, + messages: confirmed_messages, + }); // if some new messages have been confirmed, reward relayers let relayer_fund_account = @@ -651,11 +654,11 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event, I: 'static = ()> { /// Pallet parameter has been updated. - ParameterUpdated(T::Parameter), + ParameterUpdated { parameter: T::Parameter }, /// Message has been accepted and is waiting to be delivered. - MessageAccepted(LaneId, MessageNonce), + MessageAccepted { lane_id: LaneId, nonce: MessageNonce }, /// Messages in the inclusive range have been delivered to the bridged chain. - MessagesDelivered(LaneId, DeliveredMessages), + MessagesDelivered { lane_id: LaneId, messages: DeliveredMessages }, } #[pallet::error] @@ -916,7 +919,7 @@ fn send_message, I: 'static>( encoded_payload_len, ); - Pallet::::deposit_event(Event::MessageAccepted(lane_id, nonce)); + Pallet::::deposit_event(Event::MessageAccepted { lane_id, nonce }); Ok(SendMessageArtifacts { nonce, weight: actual_weight }) } @@ -1142,7 +1145,10 @@ mod tests { System::::events(), vec![EventRecord { phase: Phase::Initialization, - event: TestEvent::Messages(Event::MessageAccepted(TEST_LANE_ID, message_nonce)), + event: TestEvent::Messages(Event::MessageAccepted { + lane_id: TEST_LANE_ID, + nonce: message_nonce, + }), topics: vec![], }], ); @@ -1185,10 +1191,10 @@ mod tests { System::::events(), vec![EventRecord { phase: Phase::Initialization, - event: TestEvent::Messages(Event::MessagesDelivered( - TEST_LANE_ID, - DeliveredMessages::new(1, true), - )), + event: TestEvent::Messages(Event::MessagesDelivered { + lane_id: TEST_LANE_ID, + messages: DeliveredMessages::new(1, true), + }), topics: vec![], }], ); @@ -1289,7 +1295,7 @@ mod tests { System::::events(), vec![EventRecord { phase: Phase::Initialization, - event: TestEvent::Messages(Event::ParameterUpdated(parameter)), + event: TestEvent::Messages(Event::ParameterUpdated { parameter }), topics: vec![], }], ); @@ -1313,7 +1319,7 @@ mod tests { System::::events(), vec![EventRecord { phase: Phase::Initialization, - event: TestEvent::Messages(Event::ParameterUpdated(parameter)), + event: TestEvent::Messages(Event::ParameterUpdated { parameter }), topics: vec![], }], ); diff --git a/bridges/modules/token-swap/src/lib.rs b/bridges/modules/token-swap/src/lib.rs index e46a4bc2dd03..8a6d48ef7ca7 100644 --- a/bridges/modules/token-swap/src/lib.rs +++ b/bridges/modules/token-swap/src/lib.rs @@ -401,7 +401,10 @@ pub mod pallet { PendingMessages::::insert(sent_message.nonce, swap_hash); // finally - emit the event - Self::deposit_event(Event::SwapStarted(swap_hash, sent_message.nonce)); + Self::deposit_event(Event::SwapStarted { + swap_hash, + message_nonce: sent_message.nonce + }); sp_runtime::TransactionOutcome::Commit(Ok(sent_message.weight)) })?; @@ -448,7 +451,7 @@ pub mod pallet { None => fail!(Error::::SwapIsInactive), } - complete_claim::(swap, swap_hash, origin_account, Event::SwapClaimed(swap_hash)) + complete_claim::(swap, swap_hash, origin_account, Event::SwapClaimed { swap_hash }) } /// Return previously reserved `source_balance_at_this_chain` back to the @@ -483,7 +486,7 @@ pub mod pallet { None => fail!(Error::::SwapIsInactive), } - complete_claim::(swap, swap_hash, origin_account, Event::SwapCanceled(swap_hash)) + complete_claim::(swap, swap_hash, origin_account, Event::SwapCanceled { swap_hash }) } } @@ -491,13 +494,11 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event, I: 'static = ()> { /// Tokens swap has been started and message has been sent to the bridged message. - /// - /// The payload is the swap hash and the transfer message nonce. - SwapStarted(H256, MessageNonce), + SwapStarted { swap_hash: H256, message_nonce: MessageNonce }, /// Token swap has been claimed. - SwapClaimed(H256), + SwapClaimed { swap_hash: H256 }, /// Token swap has been canceled. - SwapCanceled(H256), + SwapCanceled { swap_hash: H256 }, } #[pallet::error] @@ -646,8 +647,8 @@ pub mod pallet { swap, swap_hash, match event { - Event::SwapClaimed(_) => "claimed", - Event::SwapCanceled(_) => "canceled", + Event::SwapClaimed { swap_hash: _ } => "claimed", + Event::SwapCanceled { swap_hash: _ } => "canceled", _ => "", }, ); @@ -870,10 +871,10 @@ mod tests { ); assert!( frame_system::Pallet::::events().iter().any(|e| e.event == - crate::mock::Event::TokenSwap(crate::Event::SwapStarted( + crate::mock::Event::TokenSwap(crate::Event::SwapStarted { swap_hash, - MESSAGE_NONCE, - ))), + message_nonce: MESSAGE_NONCE, + })), "Missing SwapStarted event: {:?}", frame_system::Pallet::::events(), ); @@ -1013,7 +1014,7 @@ mod tests { ); assert!( frame_system::Pallet::::events().iter().any(|e| e.event == - crate::mock::Event::TokenSwap(crate::Event::SwapClaimed(swap_hash,))), + crate::mock::Event::TokenSwap(crate::Event::SwapClaimed { swap_hash })), "Missing SwapClaimed event: {:?}", frame_system::Pallet::::events(), ); @@ -1129,7 +1130,7 @@ mod tests { ); assert!( frame_system::Pallet::::events().iter().any(|e| e.event == - crate::mock::Event::TokenSwap(crate::Event::SwapCanceled(swap_hash,))), + crate::mock::Event::TokenSwap(crate::Event::SwapCanceled { swap_hash })), "Missing SwapCanceled event: {:?}", frame_system::Pallet::::events(), ); diff --git a/bridges/primitives/header-chain/Cargo.toml b/bridges/primitives/header-chain/Cargo.toml index 945d79d57cd9..b5f5d3cc03aa 100644 --- a/bridges/primitives/header-chain/Cargo.toml +++ b/bridges/primitives/header-chain/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -finality-grandpa = { version = "0.15.0", default-features = false } +finality-grandpa = { version = "0.16.0", default-features = false } scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } @@ -25,7 +25,6 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [dev-dependencies] -assert_matches = "1.5" bp-test-utils = { path = "../test-utils" } hex = "0.4" hex-literal = "0.3" diff --git a/bridges/primitives/header-chain/tests/implementation_match.rs b/bridges/primitives/header-chain/tests/implementation_match.rs index 51275bbd645e..0813c26dc3a7 100644 --- a/bridges/primitives/header-chain/tests/implementation_match.rs +++ b/bridges/primitives/header-chain/tests/implementation_match.rs @@ -20,7 +20,6 @@ //! Some of tests in this module may partially duplicate tests from `justification.rs`, //! but their purpose is different. -use assert_matches::assert_matches; use bp_header_chain::justification::{verify_justification, Error, GrandpaJustification}; use bp_test_utils::{ header_id, make_justification_for_header, signed_precommit, test_header, Account, @@ -106,7 +105,7 @@ pub fn make_default_justification(header: &TestHeader) -> GrandpaJustification( @@ -222,21 +236,28 @@ fn same_result_when_authority_equivocates_once_in_a_round() { ), Ok(()), ); - // original implementation returns non-empty GHOST - assert_matches!( - finality_grandpa::validate_commit( - &justification.commit, - &full_voter_set(), - &AncestryChain::new(&justification.votes_ancestries), - ) - .map(|result| result.ghost().cloned()), - Ok(Some(_)) - ); + + // original implementation returns `Ok(validation_result)` + // with `validation_result.is_valid() == true`. + let result = finality_grandpa::validate_commit( + &justification.commit, + &full_voter_set(), + &AncestryChain::new(&justification.votes_ancestries), + ) + .unwrap(); + + assert!(result.is_valid()); } #[test] fn same_result_when_authority_equivocates_twice_in_a_round() { - let mut justification = make_default_justification(&test_header(1)); + let mut justification = make_justification_for_header(JustificationGeneratorParams { + header: test_header(1), + authorities: minimal_accounts_set(), + ancestors: 0, + ..Default::default() + }); + // there's some code in the original implementation that should return an error when // same authority submits more than two different votes in a single round: // https://github.com/paritytech/finality-grandpa/blob/6aeea2d1159d0f418f0b86e70739f2130629ca09/src/lib.rs#L473 @@ -266,16 +287,17 @@ fn same_result_when_authority_equivocates_twice_in_a_round() { ), Ok(()), ); - // original implementation returns non-empty GHOST - assert_matches!( - finality_grandpa::validate_commit( - &justification.commit, - &full_voter_set(), - &AncestryChain::new(&justification.votes_ancestries), - ) - .map(|result| result.ghost().cloned()), - Ok(Some(_)) - ); + + // original implementation returns `Ok(validation_result)` + // with `validation_result.is_valid() == true`. + let result = finality_grandpa::validate_commit( + &justification.commit, + &full_voter_set(), + &AncestryChain::new(&justification.votes_ancestries), + ) + .unwrap(); + + assert!(result.is_valid()); } #[test] @@ -299,14 +321,15 @@ fn same_result_when_there_are_not_enough_cumulative_weight_to_finalize_commit_ta ), Err(Error::TooLowCumulativeWeight), ); - // original implementation returns empty GHOST - assert_matches!( - finality_grandpa::validate_commit( - &justification.commit, - &full_voter_set(), - &AncestryChain::new(&justification.votes_ancestries), - ) - .map(|result| result.ghost().cloned()), - Ok(None) - ); + + // original implementation returns `Ok(validation_result)` + // with `validation_result.is_valid() == false`. + let result = finality_grandpa::validate_commit( + &justification.commit, + &full_voter_set(), + &AncestryChain::new(&justification.votes_ancestries), + ) + .unwrap(); + + assert!(!result.is_valid()); } diff --git a/bridges/primitives/test-utils/Cargo.toml b/bridges/primitives/test-utils/Cargo.toml index 6da5c7c0f4b5..7760f4f8275a 100644 --- a/bridges/primitives/test-utils/Cargo.toml +++ b/bridges/primitives/test-utils/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" bp-header-chain = { path = "../header-chain", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } ed25519-dalek = { version = "1.0", default-features = false, features = ["u64_backend"] } -finality-grandpa = { version = "0.15.0", default-features = false } +finality-grandpa = { version = "0.16.0", default-features = false } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/bridges/relays/bin-substrate/Cargo.toml b/bridges/relays/bin-substrate/Cargo.toml index fb8ff467d047..6d7a62e9834c 100644 --- a/bridges/relays/bin-substrate/Cargo.toml +++ b/bridges/relays/bin-substrate/Cargo.toml @@ -79,4 +79,4 @@ hex-literal = "0.3" pallet-bridge-grandpa = { path = "../../modules/grandpa" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } tempfile = "3.2" -finality-grandpa = { version = "0.15.0" } +finality-grandpa = { version = "0.16.0" } diff --git a/bridges/relays/bin-substrate/src/chains/kusama_headers_to_polkadot.rs b/bridges/relays/bin-substrate/src/chains/kusama_headers_to_polkadot.rs index 0c0ba2272c7e..fbf0ab2ecc06 100644 --- a/bridges/relays/bin-substrate/src/chains/kusama_headers_to_polkadot.rs +++ b/bridges/relays/bin-substrate/src/chains/kusama_headers_to_polkadot.rs @@ -103,7 +103,7 @@ pub(crate) mod tests { // for simplicity - add extra weight for base tx fee + fee that is paid for the tx size + // adjusted fee let single_source_header_submit_tx_weight = single_source_header_submit_call_weight * 3 / 2; - let single_source_header_tx_cost = W::calc(&single_source_header_submit_tx_weight); + let single_source_header_tx_cost = W::weight_to_fee(&single_source_header_submit_tx_weight); single_source_header_tx_cost * B::from(expected_source_headers_per_day) } diff --git a/bridges/relays/lib-substrate-relay/Cargo.toml b/bridges/relays/lib-substrate-relay/Cargo.toml index e2cabf52f449..9ca79b96701a 100644 --- a/bridges/relays/lib-substrate-relay/Cargo.toml +++ b/bridges/relays/lib-substrate-relay/Cargo.toml @@ -20,7 +20,7 @@ log = "0.4.14" bp-header-chain = { path = "../../primitives/header-chain" } bridge-runtime-common = { path = "../../bin/runtime-common" } -finality-grandpa = { version = "0.15.0" } +finality-grandpa = { version = "0.16.0" } finality-relay = { path = "../finality" } relay-utils = { path = "../utils" } messages-relay = { path = "../messages" } diff --git a/bridges/relays/lib-substrate-relay/src/messages_target.rs b/bridges/relays/lib-substrate-relay/src/messages_target.rs index d23c2d1f1924..fbf6368d4e7f 100644 --- a/bridges/relays/lib-substrate-relay/src/messages_target.rs +++ b/bridges/relays/lib-substrate-relay/src/messages_target.rs @@ -493,8 +493,8 @@ fn compute_fee_multiplier( ) -> FixedU128 { let adjusted_weight_fee_difference = larger_adjusted_weight_fee.saturating_sub(smaller_adjusted_weight_fee); - let smaller_tx_unadjusted_weight_fee = WeightToFeeOf::::calc(&smaller_tx_weight); - let larger_tx_unadjusted_weight_fee = WeightToFeeOf::::calc(&larger_tx_weight); + let smaller_tx_unadjusted_weight_fee = WeightToFeeOf::::weight_to_fee(&smaller_tx_weight); + let larger_tx_unadjusted_weight_fee = WeightToFeeOf::::weight_to_fee(&larger_tx_weight); FixedU128::saturating_from_rational( adjusted_weight_fee_difference, larger_tx_unadjusted_weight_fee.saturating_sub(smaller_tx_unadjusted_weight_fee), @@ -507,7 +507,7 @@ fn compute_prepaid_messages_refund( total_prepaid_nonces: MessageNonce, fee_multiplier: FixedU128, ) -> BalanceOf { - fee_multiplier.saturating_mul_int(WeightToFeeOf::::calc( + fee_multiplier.saturating_mul_int(WeightToFeeOf::::weight_to_fee( &C::PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_CHAIN.saturating_mul(total_prepaid_nonces), )) } @@ -554,11 +554,11 @@ mod tests { let smaller_weight = 1_000_000; let smaller_adjusted_weight_fee = - multiplier.saturating_mul_int(WeightToFeeOf::::calc(&smaller_weight)); + multiplier.saturating_mul_int(WeightToFeeOf::::weight_to_fee(&smaller_weight)); let larger_weight = smaller_weight + 200_000; let larger_adjusted_weight_fee = - multiplier.saturating_mul_int(WeightToFeeOf::::calc(&larger_weight)); + multiplier.saturating_mul_int(WeightToFeeOf::::weight_to_fee(&larger_weight)); assert_eq!( compute_fee_multiplier::( diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e78d072b89ab..84adac8a632c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-cli" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Polkadot Relay-chain Client Node" edition = "2021" diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index 735a41e38256..901591d52f46 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-core-primitives" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -8,7 +8,7 @@ edition = "2021" sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = [ "derive" ] } parity-util-mem = { version = "0.11.0", default-features = false, optional = true } diff --git a/doc/testing.md b/doc/testing.md index 363085ab4694..fa7e3915861d 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -190,7 +190,7 @@ impl OverseerGen for BehaveMaleficient { where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, - Spawner: 'static + SpawnNamed + Clone + Unpin, + Spawner: 'static + overseer::gen::Spawner + Clone + Unpin, { let spawner = args.spawner.clone(); let leaves = args.leaves.clone(); diff --git a/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index ee7580ce0f68..9ca5efd63ad6 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-erasure-coding" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/erasure-coding/fuzzer/Cargo.toml b/erasure-coding/fuzzer/Cargo.toml index 9d248cd5cc05..2ee47e6860e7 100644 --- a/erasure-coding/fuzzer/Cargo.toml +++ b/erasure-coding/fuzzer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "erasure_coding_fuzzer" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 4966970b5049..dd0ba214ada7 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-client" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 636e8f0bc8b7..537eefb622d6 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -28,7 +28,7 @@ use sc_executor::NativeElseWasmExecutor; use sp_api::{CallApiAt, Encode, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; -use sp_core::Pair; +use sp_core::{Pair, H256}; use sp_keyring::Sr25519Keyring; use sp_runtime::{ generic::{BlockId, SignedBlock}, @@ -239,23 +239,44 @@ pub trait ClientHandle { fn execute_with(&self, t: T) -> T::Output; } +/// Unwraps a [`Client`] into the concrete client type and +/// provides the concrete runtime as `runtime`. macro_rules! with_client { { $self:ident, $client:ident, - { - $( $code:tt )* - } + // NOTE: Using an expression here is fine since blocks are also expressions. + $code:expr } => { match $self { #[cfg(feature = "polkadot")] - Self::Polkadot($client) => { $( $code )* }, + Self::Polkadot($client) => { + #[allow(unused_imports)] + use polkadot_runtime as runtime; + + $code + }, #[cfg(feature = "westend")] - Self::Westend($client) => { $( $code )* }, + Self::Westend($client) => { + #[allow(unused_imports)] + use westend_runtime as runtime; + + $code + }, #[cfg(feature = "kusama")] - Self::Kusama($client) => { $( $code )* }, + Self::Kusama($client) => { + #[allow(unused_imports)] + use kusama_runtime as runtime; + + $code + }, #[cfg(feature = "rococo")] - Self::Rococo($client) => { $( $code )* }, + Self::Rococo($client) => { + #[allow(unused_imports)] + use rococo_runtime as runtime; + + $code + }, } } } @@ -583,195 +604,259 @@ impl sp_blockchain::HeaderBackend for Client { } } -/// Provides a `SignedPayload` for any runtime. -/// -/// Should only be used for benchmarking as it is not tested for regular usage. -/// -/// The first code block should set up all variables that are needed to create the -/// `SignedPayload`. The second block can make use of the `SignedPayload`. -/// -/// This is not done as a trait function since the return type depends on the runtime. -/// This macro therefore uses the same approach as [`with_client!`]. -macro_rules! with_signed_payload { - { - $self:ident, - { - $extra:ident, - $client:ident, - $raw_payload:ident - }, - { - $( $setup:tt )* - }, - ( - $period:expr, - $current_block:expr, - $nonce:expr, - $tip:expr, - $call:expr, - $genesis:expr - ), - { - $( $usage:tt )* - } - } => { - match $self { - #[cfg(feature = "polkadot")] - Self::Polkadot($client) => { - use polkadot_runtime as runtime; +impl frame_benchmarking_cli::ExtrinsicBuilder for Client { + fn remark(&self, nonce: u32) -> std::result::Result { + with_client! { + self, client, { + use runtime::{Call, SystemCall}; - $( $setup )* - - let $extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(sp_runtime::generic::Era::mortal( - $period, - $current_block, - )), - frame_system::CheckNonce::::from($nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from($tip), - polkadot_runtime_common::claims::PrevalidateAttests::::new(), - ); - - let $raw_payload = runtime::SignedPayload::from_raw( - $call.clone(), - $extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - $genesis.clone(), - $genesis, - (), - (), - (), - (), - ), - ); - - $( $usage )* - }, - #[cfg(feature = "westend")] - Self::Westend($client) => { - use westend_runtime as runtime; + let call = Call::System(SystemCall::remark { remark: vec![] }); + let signer = Sr25519Keyring::Bob.pair(); - $( $setup )* + let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; + let genesis = self.usage_info().chain.best_hash; - signed_payload!($extra, $raw_payload, - ($period, $current_block, $nonce, $tip, $call, $genesis)); + Ok(client.sign_call(call, nonce, 0, period, genesis, signer)) + } + } + } +} - $( $usage )* - }, - #[cfg(feature = "kusama")] - Self::Kusama($client) => { - use kusama_runtime as runtime; +/// Helper trait to implement [`frame_benchmarking_cli::ExtrinsicBuilder`]. +/// +/// Should only be used for benchmarking since it makes strong assumptions +/// about the chain state that these calls will be valid for. +trait BenchmarkCallSigner { + /// Signs a call together with the signed extensions of the specific runtime. + /// + /// Only works if the current block is the genesis block since the + /// `CheckMortality` check is mocked by using the genesis block. + fn sign_call( + &self, + call: Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: Signer, + ) -> OpaqueExtrinsic; +} - $( $setup )* +#[cfg(feature = "polkadot")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: polkadot_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use polkadot_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + polkadot_runtime_common::claims::PrevalidateAttests::::new(), + ); - signed_payload!($extra, $raw_payload, - ($period, $current_block, $nonce, $tip, $call, $genesis)); + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + (), + ), + ); - $( $usage )* - }, - #[cfg(feature = "rococo")] - Self::Rococo($client) => { - use rococo_runtime as runtime; + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} - $( $setup )* +#[cfg(feature = "westend")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: westend_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use westend_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); - signed_payload!($extra, $raw_payload, - ($period, $current_block, $nonce, $tip, $call, $genesis)); + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + ), + ); - $( $usage )* - }, - } + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() } } -/// Generates a `SignedPayload` for the Kusama, Westend and Rococo runtime. -/// -/// Should only be used for benchmarking as it is not tested for regular usage. -#[allow(unused_macros)] -macro_rules! signed_payload { - ( - $extra:ident, $raw_payload:ident, - ( - $period:expr, - $current_block:expr, - $nonce:expr, - $tip:expr, - $call:expr, - $genesis:expr - ) - ) => { - let $extra: runtime::SignedExtra = ( +#[cfg(feature = "kusama")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: kusama_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use kusama_runtime as runtime; + + let extra: runtime::SignedExtra = ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal($period, $current_block), + sp_runtime::generic::Era::mortal(period, current_block), ), - frame_system::CheckNonce::::from($nonce), + frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from($tip), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), ); - let $raw_payload = runtime::SignedPayload::from_raw( - $call.clone(), - $extra.clone(), + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), ( (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - $genesis.clone(), - $genesis, + genesis.clone(), + genesis, (), (), (), ), ); - }; -} -impl frame_benchmarking_cli::ExtrinsicBuilder for Client { - fn remark(&self, nonce: u32) -> std::result::Result { - with_signed_payload! { - self, - {extra, client, raw_payload}, - { - // First the setup code to init all the variables that are needed - // to build the signed extras. - use runtime::{Call, SystemCall}; + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} - let call = Call::System(SystemCall::remark { remark: vec![] }); - let bob = Sr25519Keyring::Bob.pair(); +#[cfg(feature = "rococo")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: rococo_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use rococo_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); - let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + ), + ); - let current_block = 0; - let tip = 0; - let genesis = client.usage_info().chain.best_hash; - }, - (period, current_block, nonce, tip, call, genesis), - /* The SignedPayload is generated here */ - { - // Use the payload to generate a signature. - let signature = raw_payload.using_encoded(|payload| bob.sign(payload)); - - let ext = runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(bob.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ); - Ok(ext.into()) - } - } + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() } } diff --git a/node/collation-generation/Cargo.toml b/node/collation-generation/Cargo.toml index 11053f0a6461..f817b8b020ec 100644 --- a/node/collation-generation/Cargo.toml +++ b/node/collation-generation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-collation-generation" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/collation-generation/src/lib.rs b/node/collation-generation/src/lib.rs index b68a46335cb3..500b500636ba 100644 --- a/node/collation-generation/src/lib.rs +++ b/node/collation-generation/src/lib.rs @@ -23,8 +23,8 @@ use parity_scale_codec::Encode; use polkadot_node_primitives::{AvailableData, CollationGenerationConfig, PoV}; use polkadot_node_subsystem::{ messages::{CollationGenerationMessage, CollatorProtocolMessage}, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemContext, - SubsystemError, SubsystemResult, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, + SubsystemContext, SubsystemError, SubsystemResult, }; use polkadot_node_subsystem_util::{ request_availability_cores, request_persisted_validation_data, request_validation_code, @@ -103,12 +103,12 @@ impl CollationGenerationSubsystem { // it should hopefully therefore be ok that it's an async function mutably borrowing self. async fn handle_incoming( &mut self, - incoming: SubsystemResult::Message>>, + incoming: SubsystemResult::Message>>, ctx: &mut Context, sender: &mpsc::Sender, ) -> bool { match incoming { - Ok(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + Ok(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated, .. }))) => { @@ -130,8 +130,8 @@ impl CollationGenerationSubsystem { false }, - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => true, - Ok(FromOverseer::Communication { + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => true, + Ok(FromOrchestra::Communication { msg: CollationGenerationMessage::Initialize(config), }) => { if self.config.is_some() { @@ -141,7 +141,7 @@ impl CollationGenerationSubsystem { } false }, - Ok(FromOverseer::Signal(OverseerSignal::BlockFinalized(..))) => false, + Ok(FromOrchestra::Signal(OverseerSignal::BlockFinalized(..))) => false, Err(err) => { gum::error!( target: LOG_TARGET, diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index cbdefe4c1c24..a436f51c6f5e 100644 --- a/node/core/approval-voting/Cargo.toml +++ b/node/core/approval-voting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-approval-voting" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/approval-voting/src/import.rs b/node/core/approval-voting/src/import.rs index 202e44464f0d..d43bf40546ae 100644 --- a/node/core/approval-voting/src/import.rs +++ b/node/core/approval-voting/src/import.rs @@ -560,9 +560,15 @@ pub(crate) async fn handle_new_head( // ancestors. this can only be done after writing the block entry above. if let Some(up_to) = force_approve { gum::debug!(target: LOG_TARGET, ?block_hash, up_to, "Enacting force-approve"); - let approved_hashes = crate::ops::force_approve(db, block_hash, up_to) .map_err(|e| SubsystemError::with_origin("approval-voting", e))?; + gum::debug!( + target: LOG_TARGET, + ?block_hash, + up_to, + "Force-approving {} blocks", + approved_hashes.len() + ); // Notify chain-selection of all approved hashes. for hash in approved_hashes { diff --git a/node/core/approval-voting/src/lib.rs b/node/core/approval-voting/src/lib.rs index c53c04c690a5..5f3a71cb9db9 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -37,7 +37,7 @@ use polkadot_node_subsystem::{ ChainSelectionMessage, DisputeCoordinatorMessage, HighestApprovedAncestorBlock, RuntimeApiMessage, RuntimeApiRequest, }, - overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, + overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, SubsystemSender, }; use polkadot_node_subsystem_util::{ @@ -1093,12 +1093,12 @@ async fn handle_from_overseer( state: &mut State, db: &mut OverlayedBackend<'_, impl Backend>, metrics: &Metrics, - x: FromOverseer, + x: FromOrchestra, last_finalized_height: &mut Option, wakeups: &mut Wakeups, ) -> SubsystemResult> { let actions = match x { - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { let mut actions = Vec::new(); for activated in update.activated { @@ -1152,7 +1152,7 @@ async fn handle_from_overseer( actions }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(block_hash, block_number)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(block_hash, block_number)) => { gum::debug!(target: LOG_TARGET, ?block_hash, ?block_number, "Block finalized"); *last_finalized_height = Some(block_number); @@ -1163,10 +1163,10 @@ async fn handle_from_overseer( Vec::new() }, - FromOverseer::Signal(OverseerSignal::Conclude) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => { vec![Action::Conclude] }, - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Communication { msg } => match msg { ApprovalVotingMessage::CheckAndImportAssignment(a, claimed_core, res) => { let (check_outcome, actions) = check_and_import_assignment(state, db, a, claimed_core)?; diff --git a/node/core/approval-voting/src/ops.rs b/node/core/approval-voting/src/ops.rs index c4c64aeaf4e7..0491009b0740 100644 --- a/node/core/approval-voting/src/ops.rs +++ b/node/core/approval-voting/src/ops.rs @@ -28,6 +28,7 @@ use super::{ approval_db::v1::{OurAssignment, StoredBlockRange}, backend::{Backend, OverlayedBackend}, persisted_entries::{ApprovalEntry, BlockEntry, CandidateEntry}, + LOG_TARGET, }; /// Information about a new candidate necessary to instantiate the requisite @@ -280,20 +281,31 @@ pub fn force_approve( chain_head: Hash, up_to: BlockNumber, ) -> SubsystemResult> { + #[derive(PartialEq, Eq)] enum State { WalkTo, Approving, } - let mut approved_hashes = Vec::new(); let mut cur_hash = chain_head; let mut state = State::WalkTo; + let mut cur_block_number: BlockNumber = 0; // iterate back to the `up_to` block, and then iterate backwards until all blocks // are updated. while let Some(mut entry) = store.load_block_entry(&cur_hash)? { - if entry.block_number() <= up_to { + cur_block_number = entry.block_number(); + if cur_block_number <= up_to { + if state == State::WalkTo { + gum::debug!( + target: LOG_TARGET, + block_hash = ?chain_head, + ?cur_hash, + ?cur_block_number, + "Start forced approval from block", + ); + } state = State::Approving; } @@ -309,6 +321,17 @@ pub fn force_approve( } } + if state == State::WalkTo { + gum::warn!( + target: LOG_TARGET, + ?chain_head, + ?cur_hash, + ?cur_block_number, + ?up_to, + "Missing block in the chain, cannot start force approval" + ); + } + Ok(approved_hashes) } diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index cc488646540b..25dcfcdb4e81 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -514,7 +514,7 @@ fn test_harness>( .unwrap(); } -async fn overseer_send(overseer: &mut VirtualOverseer, msg: FromOverseer) { +async fn overseer_send(overseer: &mut VirtualOverseer, msg: FromOrchestra) { gum::trace!("Sending message:\n{:?}", &msg); overseer .send(msg) @@ -544,7 +544,7 @@ async fn overseer_recv_with_timeout( const TIMEOUT: Duration = Duration::from_millis(2000); async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) { overseer - .send(FromOverseer::Signal(signal)) + .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending signals.", TIMEOUT)); @@ -586,7 +586,7 @@ async fn check_and_import_approval( let (tx, rx) = oneshot::channel(); overseer_send( overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::CheckAndImportApproval( IndirectSignedApprovalVote { block_hash, candidate_index, validator, signature }, tx, @@ -626,7 +626,7 @@ async fn check_and_import_assignment( let (tx, rx) = oneshot::channel(); overseer_send( overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::CheckAndImportAssignment( IndirectAssignmentCert { block_hash, @@ -785,7 +785,7 @@ async fn import_block( overseer_send( overseer, - FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( ActivatedLeaf { hash: *new_head, number, @@ -1078,7 +1078,7 @@ fn blank_subsystem_act_on_bad_block() { overseer_send( &mut virtual_overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::CheckAndImportAssignment( IndirectAssignmentCert { block_hash: bad_block_hash.clone(), @@ -1752,7 +1752,7 @@ fn linear_import_act_on_leaf() { overseer_send( &mut virtual_overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::CheckAndImportAssignment( IndirectAssignmentCert { block_hash: head, @@ -1822,7 +1822,7 @@ fn forkful_import_at_same_height_act_on_leaf() { overseer_send( &mut virtual_overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::CheckAndImportAssignment( IndirectAssignmentCert { block_hash: head, @@ -2219,7 +2219,7 @@ fn approved_ancestor_test( let (tx, rx) = oneshot::channel(); overseer_send( &mut virtual_overseer, - FromOverseer::Communication { + FromOrchestra::Communication { msg: ApprovalVotingMessage::ApprovedAncestor(target, 0, tx), }, ) diff --git a/node/core/av-store/Cargo.toml b/node/core/av-store/Cargo.toml index 621c7fe8bd22..bd77aaac663a 100644 --- a/node/core/av-store/Cargo.toml +++ b/node/core/av-store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-av-store" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/av-store/src/lib.rs b/node/core/av-store/src/lib.rs index 086ce0255cf9..cd1685e32ea8 100644 --- a/node/core/av-store/src/lib.rs +++ b/node/core/av-store/src/lib.rs @@ -36,7 +36,7 @@ use polkadot_node_primitives::{AvailableData, ErasureChunk}; use polkadot_node_subsystem::{ errors::{ChainApiError, RuntimeApiError}, messages::{AvailabilityStoreMessage, ChainApiMessage}, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util as util; use polkadot_primitives::v2::{ @@ -558,8 +558,8 @@ async fn run_iteration( select! { incoming = ctx.recv().fuse() => { match incoming.map_err(|_| Error::ContextChannelClosed)? { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(true), - FromOverseer::Signal(OverseerSignal::ActiveLeaves( + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(true), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate { activated, .. }) ) => { for activated in activated.into_iter() { @@ -567,7 +567,7 @@ async fn run_iteration( process_block_activated(ctx, subsystem, activated.hash).await?; } } - FromOverseer::Signal(OverseerSignal::BlockFinalized(hash, number)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash, number)) => { let _timer = subsystem.metrics.time_process_block_finalized(); subsystem.finalized_number = Some(number); @@ -579,7 +579,7 @@ async fn run_iteration( number, ).await?; } - FromOverseer::Communication { msg } => { + FromOrchestra::Communication { msg } => { let _timer = subsystem.metrics.time_process_message(); process_message(subsystem, msg)?; } diff --git a/node/core/av-store/src/tests.rs b/node/core/av-store/src/tests.rs index 9ef9666d619a..0a855bb88057 100644 --- a/node/core/av-store/src/tests.rs +++ b/node/core/av-store/src/tests.rs @@ -146,7 +146,7 @@ const TIMEOUT: Duration = Duration::from_millis(100); async fn overseer_send(overseer: &mut VirtualOverseer, msg: AvailabilityStoreMessage) { gum::trace!(meg = ?msg, "sending message"); overseer - .send(FromOverseer::Communication { msg }) + .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending messages.", TIMEOUT)); @@ -172,7 +172,7 @@ async fn overseer_recv_with_timeout( async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) { overseer - .send(FromOverseer::Signal(signal)) + .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending signals.", TIMEOUT)); @@ -426,7 +426,7 @@ fn store_block_works() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await; assert_eq!(rx.await.unwrap(), Ok(())); let pov = query_available_data(&mut virtual_overseer, candidate_hash).await.unwrap(); @@ -479,7 +479,7 @@ fn store_pov_and_query_chunk_works() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await; assert_eq!(rx.await.unwrap(), Ok(())); @@ -525,7 +525,7 @@ fn query_all_chunks_works() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await; assert_eq!(rx.await.unwrap(), Ok(())); } @@ -557,7 +557,7 @@ fn query_all_chunks_works() { }; virtual_overseer - .send(FromOverseer::Communication { msg: store_chunk_msg }) + .send(FromOrchestra::Communication { msg: store_chunk_msg }) .await; assert_eq!(rx.await.unwrap(), Ok(())); } @@ -566,7 +566,7 @@ fn query_all_chunks_works() { let (tx, rx) = oneshot::channel(); let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_1, tx); - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; assert_eq!(rx.await.unwrap().len(), n_validators as usize); } @@ -574,7 +574,7 @@ fn query_all_chunks_works() { let (tx, rx) = oneshot::channel(); let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_2, tx); - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; assert_eq!(rx.await.unwrap().len(), 1); } @@ -582,7 +582,7 @@ fn query_all_chunks_works() { let (tx, rx) = oneshot::channel(); let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_3, tx); - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; assert_eq!(rx.await.unwrap().len(), 0); } virtual_overseer @@ -613,7 +613,7 @@ fn stored_but_not_included_data_is_pruned() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await; rx.await.unwrap().unwrap(); @@ -665,7 +665,7 @@ fn stored_data_kept_until_finalized() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await; rx.await.unwrap().unwrap(); @@ -900,7 +900,7 @@ fn forkfullness_works() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; rx.await.unwrap().unwrap(); @@ -912,7 +912,7 @@ fn forkfullness_works() { tx, }; - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; rx.await.unwrap().unwrap(); @@ -1003,7 +1003,7 @@ async fn query_available_data( let (tx, rx) = oneshot::channel(); let query = AvailabilityStoreMessage::QueryAvailableData(candidate_hash, tx); - virtual_overseer.send(FromOverseer::Communication { msg: query }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: query }).await; rx.await.unwrap() } @@ -1016,7 +1016,7 @@ async fn query_chunk( let (tx, rx) = oneshot::channel(); let query = AvailabilityStoreMessage::QueryChunk(candidate_hash, index, tx); - virtual_overseer.send(FromOverseer::Communication { msg: query }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: query }).await; rx.await.unwrap() } diff --git a/node/core/backing/Cargo.toml b/node/core/backing/Cargo.toml index 6a2ca3b9cda3..1fa4f1ae3653 100644 --- a/node/core/backing/Cargo.toml +++ b/node/core/backing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-backing" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index c6c1a76cee61..a189b5955c89 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -41,7 +41,7 @@ use polkadot_node_subsystem::{ CandidateValidationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage, ProvisionableData, ProvisionerMessage, RuntimeApiRequest, StatementDistributionMessage, }, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, PerLeafSpan, SpawnedSubsystem, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem, Stage, SubsystemError, }; use polkadot_node_subsystem_util::{ @@ -201,7 +201,7 @@ async fn run_iteration( } from_overseer = ctx.recv().fuse() => { match from_overseer? { - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => handle_active_leaves_update( + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => handle_active_leaves_update( &mut *ctx, update, jobs, @@ -209,9 +209,9 @@ async fn run_iteration( &background_validation_tx, &metrics, ).await?, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {} - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Communication { msg } => handle_communication(&mut *ctx, jobs, msg).await?, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {} + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Communication { msg } => handle_communication(&mut *ctx, jobs, msg).await?, } } ) diff --git a/node/core/backing/src/tests.rs b/node/core/backing/src/tests.rs index e7fbdf6a4e13..0243c68c7c4c 100644 --- a/node/core/backing/src/tests.rs +++ b/node/core/backing/src/tests.rs @@ -27,7 +27,7 @@ use polkadot_node_subsystem::{ AllMessages, CollatorProtocolMessage, RuntimeApiMessage, RuntimeApiRequest, ValidationFailed, }, - ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, + ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, }; use polkadot_node_subsystem_test_helpers as test_helpers; use polkadot_primitives::v2::{ @@ -169,7 +169,7 @@ fn test_harness>( futures::executor::block_on(future::join( async move { let mut virtual_overseer = test_fut.await; - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }, subsystem, )); @@ -222,7 +222,7 @@ impl TestCandidateBuilder { async fn test_startup(virtual_overseer: &mut VirtualOverseer, test_state: &TestState) { // Start work on some new parent. virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( ActivatedLeaf { hash: test_state.relay_parent, number: 1, @@ -330,7 +330,7 @@ fn backing_second_works() { pov.clone(), ); - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; assert_matches!( virtual_overseer.recv().await, @@ -391,7 +391,7 @@ fn backing_second_works() { ); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -467,7 +467,7 @@ fn backing_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -558,7 +558,7 @@ fn backing_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -569,7 +569,7 @@ fn backing_works() { .await; virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -662,7 +662,7 @@ fn backing_works_while_validation_ongoing() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -709,7 +709,7 @@ fn backing_works_while_validation_ongoing() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -736,7 +736,7 @@ fn backing_works_while_validation_ongoing() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -753,7 +753,7 @@ fn backing_works_while_validation_ongoing() { tx, ); - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; let candidates = rx.await.unwrap(); assert_eq!(1, candidates.len()); @@ -774,7 +774,7 @@ fn backing_works_while_validation_ongoing() { ); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -843,7 +843,7 @@ fn backing_misbehavior_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, seconded_2.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -935,7 +935,7 @@ fn backing_misbehavior_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, valid_2.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1024,7 +1024,7 @@ fn backing_dont_second_invalid() { pov_block_a.clone(), ); - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; assert_matches!( virtual_overseer.recv().await, @@ -1053,7 +1053,7 @@ fn backing_dont_second_invalid() { pov_block_b.clone(), ); - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; assert_matches!( virtual_overseer.recv().await, @@ -1108,7 +1108,7 @@ fn backing_dont_second_invalid() { ); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -1161,7 +1161,7 @@ fn backing_second_after_first_fails_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1208,7 +1208,7 @@ fn backing_second_after_first_fails_works() { pov.clone(), ); - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; let pov_to_second = PoV { block_data: BlockData(vec![3, 2, 1]) }; @@ -1232,7 +1232,7 @@ fn backing_second_after_first_fails_works() { // In order to trigger _some_ actions from subsystem ask it to second another // candidate. The only reason to do so is to make sure that no actions were // triggered on the prev step. - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; assert_matches!( virtual_overseer.recv().await, @@ -1295,7 +1295,7 @@ fn backing_works_after_failed_validation() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1343,7 +1343,7 @@ fn backing_works_after_failed_validation() { tx, ); - virtual_overseer.send(FromOverseer::Communication { msg }).await; + virtual_overseer.send(FromOrchestra::Communication { msg }).await; assert_eq!(rx.await.unwrap().len(), 0); virtual_overseer }); @@ -1383,7 +1383,7 @@ fn backing_doesnt_second_wrong_collator() { pov.clone(), ); - virtual_overseer.send(FromOverseer::Communication { msg: second }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: second }).await; assert_matches!( virtual_overseer.recv().await, @@ -1394,7 +1394,7 @@ fn backing_doesnt_second_wrong_collator() { ); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -1451,11 +1451,11 @@ fn validation_work_ignores_wrong_collator() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, seconding.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; // The statement will be ignored because it has the wrong collator. virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; @@ -1613,7 +1613,7 @@ fn retry_works() { // Send in a `Statement` with a candidate. let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1640,7 +1640,7 @@ fn retry_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1672,7 +1672,7 @@ fn retry_works() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1799,12 +1799,12 @@ fn observes_backing_even_if_not_validator() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1829,7 +1829,7 @@ fn observes_backing_even_if_not_validator() { let statement = CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone()); - virtual_overseer.send(FromOverseer::Communication { msg: statement }).await; + virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await; test_dispute_coordinator_notifications( &mut virtual_overseer, @@ -1840,7 +1840,7 @@ fn observes_backing_even_if_not_validator() { .await; virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::stop_work(test_state.relay_parent), ))) .await; diff --git a/node/core/bitfield-signing/Cargo.toml b/node/core/bitfield-signing/Cargo.toml index 21d47c5c15c2..96c4ddfd1e58 100644 --- a/node/core/bitfield-signing/Cargo.toml +++ b/node/core/bitfield-signing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-bitfield-signing" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/bitfield-signing/src/lib.rs b/node/core/bitfield-signing/src/lib.rs index 3b082de92109..13a3dd28705f 100644 --- a/node/core/bitfield-signing/src/lib.rs +++ b/node/core/bitfield-signing/src/lib.rs @@ -24,22 +24,21 @@ use futures::{ channel::{mpsc, oneshot}, future, lock::Mutex, - prelude::*, - Future, + FutureExt, }; use polkadot_node_subsystem::{ errors::RuntimeApiError, jaeger, messages::{ - AvailabilityStoreMessage, BitfieldDistributionMessage, BitfieldSigningMessage, - RuntimeApiMessage, RuntimeApiRequest, + AvailabilityStoreMessage, BitfieldDistributionMessage, RuntimeApiMessage, RuntimeApiRequest, }, - overseer, ActivatedLeaf, LeafStatus, PerLeafSpan, SubsystemSender, + overseer, ActivatedLeaf, FromOrchestra, LeafStatus, OverseerSignal, PerLeafSpan, + SpawnedSubsystem, SubsystemError, SubsystemResult, SubsystemSender, }; -use polkadot_node_subsystem_util::{self as util, JobSender, JobSubsystem, JobTrait, Validator}; +use polkadot_node_subsystem_util::{self as util, Validator}; use polkadot_primitives::v2::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex}; use sp_keystore::{Error as KeystoreError, SyncCryptoStorePtr}; -use std::{iter::FromIterator, pin::Pin, time::Duration}; +use std::{collections::HashMap, iter::FromIterator, time::Duration}; use wasm_timer::{Delay, Instant}; mod metrics; @@ -49,12 +48,10 @@ use self::metrics::Metrics; mod tests; /// Delay between starting a bitfield signing job and its attempting to create a bitfield. -const JOB_DELAY: Duration = Duration::from_millis(1500); +const SPAWNED_TASK_DELAY: Duration = Duration::from_millis(1500); const LOG_TARGET: &str = "parachain::bitfield-signing"; -/// Each `BitfieldSigningJob` prepares a signed bitfield for a single relay parent. -pub struct BitfieldSigningJob(std::marker::PhantomData); - +// TODO: use `fatality` (https://github.com/paritytech/polkadot/issues/5540). /// Errors we may encounter in the course of executing the `BitfieldSigningSubsystem`. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] @@ -182,114 +179,156 @@ async fn construct_availability_bitfield( Ok(AvailabilityBitfield(core_bits)) } -impl JobTrait for BitfieldSigningJob +/// The bitfield signing subsystem. +pub struct BitfieldSigningSubsystem { + keystore: SyncCryptoStorePtr, + metrics: Metrics, +} + +impl BitfieldSigningSubsystem { + /// Create a new instance of the `BitfieldSigningSubsystem`. + pub fn new(keystore: SyncCryptoStorePtr, metrics: Metrics) -> Self { + Self { keystore, metrics } + } +} + +#[overseer::subsystem(BitfieldSigning, error=SubsystemError, prefix=self::overseer)] +impl BitfieldSigningSubsystem { + fn start(self, ctx: Context) -> SpawnedSubsystem { + let future = async move { + run(ctx, self.keystore, self.metrics) + .await + .map_err(|e| SubsystemError::with_origin("bitfield-signing", e)) + } + .boxed(); + + SpawnedSubsystem { name: "bitfield-signing-subsystem", future } + } +} + +#[overseer::contextbounds(BitfieldSigning, prefix = self::overseer)] +async fn run( + mut ctx: Context, + keystore: SyncCryptoStorePtr, + metrics: Metrics, +) -> SubsystemResult<()> { + // Track spawned jobs per active leaf. + let mut running = HashMap::::new(); + + loop { + match ctx.recv().await? { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { + // Abort jobs for deactivated leaves. + for leaf in &update.deactivated { + if let Some(handle) = running.remove(leaf) { + handle.abort(); + } + } + + for leaf in update.activated { + let sender = ctx.sender().clone(); + let leaf_hash = leaf.hash; + + let (fut, handle) = future::abortable(handle_active_leaves_update( + sender, + leaf, + keystore.clone(), + metrics.clone(), + )); + + running.insert(leaf_hash, handle); + + ctx.spawn("bitfield-signing-job", fut.map(drop).boxed())?; + } + }, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Communication { .. } => {}, + } + } +} + +async fn handle_active_leaves_update( + mut sender: Sender, + leaf: ActivatedLeaf, + keystore: SyncCryptoStorePtr, + metrics: Metrics, +) -> Result<(), Error> where - Sender: overseer::BitfieldSigningSenderTrait + Unpin, + Sender: overseer::BitfieldSigningSenderTrait, { - type ToJob = BitfieldSigningMessage; - type OutgoingMessages = overseer::BitfieldSigningOutgoingMessages; - type Sender = Sender; - type Error = Error; - type RunArgs = SyncCryptoStorePtr; - type Metrics = Metrics; - - const NAME: &'static str = "bitfield-signing-job"; - - /// Run a job for the parent block indicated - fn run( - leaf: ActivatedLeaf, - keystore: Self::RunArgs, - metrics: Self::Metrics, - _receiver: mpsc::Receiver, - mut sender: JobSender, - ) -> Pin> + Send>> { - let metrics = metrics.clone(); - async move { - if let LeafStatus::Stale = leaf.status { - gum::debug!( + if let LeafStatus::Stale = leaf.status { + gum::debug!( + target: LOG_TARGET, + relay_parent = ?leaf.hash, + block_number = ?leaf.number, + "Skip bitfield signing for stale leaf" + ); + return Ok(()) + } + + let span = PerLeafSpan::new(leaf.span, "bitfield-signing"); + let span_delay = span.child("delay"); + let wait_until = Instant::now() + SPAWNED_TASK_DELAY; + + // now do all the work we can before we need to wait for the availability store + // if we're not a validator, we can just succeed effortlessly + let validator = match Validator::new(leaf.hash, keystore.clone(), &mut sender).await { + Ok(validator) => validator, + Err(util::Error::NotAValidator) => return Ok(()), + Err(err) => return Err(Error::Util(err)), + }; + + // wait a bit before doing anything else + Delay::new_at(wait_until).await?; + + // this timer does not appear at the head of the function because we don't want to include + // SPAWNED_TASK_DELAY each time. + let _timer = metrics.time_run(); + + drop(span_delay); + let span_availability = span.child("availability"); + + let bitfield = match construct_availability_bitfield( + leaf.hash, + &span_availability, + validator.index(), + &mut sender, + ) + .await + { + Err(Error::Runtime(runtime_err)) => { + // Don't take down the node on runtime API errors. + gum::warn!(target: LOG_TARGET, err = ?runtime_err, "Encountered a runtime API error"); + return Ok(()) + }, + Err(err) => return Err(err), + Ok(bitfield) => bitfield, + }; + + drop(span_availability); + let span_signing = span.child("signing"); + + let signed_bitfield = + match validator.sign(keystore, bitfield).await.map_err(|e| Error::Keystore(e))? { + Some(b) => b, + None => { + gum::error!( target: LOG_TARGET, - hash = ?leaf.hash, - block_number = ?leaf.number, - "Stale leaf - don't sign bitfields." + "Key was found at construction, but while signing it could not be found.", ); return Ok(()) - } - - let span = PerLeafSpan::new(leaf.span, "bitfield-signing"); - let _span = span.child("delay"); - let wait_until = Instant::now() + JOB_DELAY; - - // now do all the work we can before we need to wait for the availability store - // if we're not a validator, we can just succeed effortlessly - let validator = match Validator::new(leaf.hash, keystore.clone(), &mut sender).await { - Ok(validator) => validator, - Err(util::Error::NotAValidator) => return Ok(()), - Err(err) => return Err(Error::Util(err)), - }; - - // wait a bit before doing anything else - Delay::new_at(wait_until).await?; - - // this timer does not appear at the head of the function because we don't want to include - // JOB_DELAY each time. - let _timer = metrics.time_run(); - - drop(_span); - let span_availability = span.child("availability"); - - let bitfield = match construct_availability_bitfield( - leaf.hash, - &span_availability, - validator.index(), - sender.subsystem_sender(), - ) - .await - { - Err(Error::Runtime(runtime_err)) => { - // Don't take down the node on runtime API errors. - gum::warn!(target: LOG_TARGET, err = ?runtime_err, "Encountered a runtime API error"); - return Ok(()) - }, - Err(err) => return Err(err), - Ok(bitfield) => bitfield, - }; - - drop(span_availability); - let _span = span.child("signing"); - - let signed_bitfield = match validator - .sign(keystore.clone(), bitfield) - .await - .map_err(|e| Error::Keystore(e))? - { - Some(b) => b, - None => { - gum::error!( - target: LOG_TARGET, - "Key was found at construction, but while signing it could not be found.", - ); - return Ok(()) - }, - }; - - metrics.on_bitfield_signed(); - - drop(_span); - let _span = span.child("gossip"); - - sender - .send_message(BitfieldDistributionMessage::DistributeBitfield( - leaf.hash, - signed_bitfield, - )) - .await; - - Ok(()) - } - .boxed() - } -} + }, + }; + + metrics.on_bitfield_signed(); -/// `BitfieldSigningSubsystem` manages a number of bitfield signing jobs. -pub type BitfieldSigningSubsystem = - JobSubsystem, Spawner>; + drop(span_signing); + let _span_gossip = span.child("gossip"); + + sender + .send_message(BitfieldDistributionMessage::DistributeBitfield(leaf.hash, signed_bitfield)) + .await; + + Ok(()) +} diff --git a/node/core/bitfield-signing/src/tests.rs b/node/core/bitfield-signing/src/tests.rs index b2c0c4e174d9..19777c29157f 100644 --- a/node/core/bitfield-signing/src/tests.rs +++ b/node/core/bitfield-signing/src/tests.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::*; -use futures::{executor::block_on, pin_mut}; +use futures::{executor::block_on, pin_mut, StreamExt}; use polkadot_node_subsystem::messages::AllMessages; use polkadot_primitives::v2::{CandidateHash, OccupiedCore}; use test_helpers::dummy_candidate_descriptor; diff --git a/node/core/candidate-validation/Cargo.toml b/node/core/candidate-validation/Cargo.toml index aef14c51c10b..3e5ff2de349e 100644 --- a/node/core/candidate-validation/Cargo.toml +++ b/node/core/candidate-validation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-candidate-validation" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/candidate-validation/src/lib.rs b/node/core/candidate-validation/src/lib.rs index 2fdcc976219b..1f51c1ec7701 100644 --- a/node/core/candidate-validation/src/lib.rs +++ b/node/core/candidate-validation/src/lib.rs @@ -35,7 +35,7 @@ use polkadot_node_subsystem::{ CandidateValidationMessage, PreCheckOutcome, RuntimeApiMessage, RuntimeApiRequest, ValidationFailed, }, - overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, + overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, SubsystemSender, }; use polkadot_parachain::primitives::{ValidationParams, ValidationResult as WasmValidationResult}; @@ -125,10 +125,10 @@ async fn run( loop { match ctx.recv().await? { - FromOverseer::Signal(OverseerSignal::ActiveLeaves(_)) => {}, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}, - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(_)) => {}, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Communication { msg } => match msg { CandidateValidationMessage::ValidateFromChainState( candidate_receipt, pov, diff --git a/node/core/chain-api/Cargo.toml b/node/core/chain-api/Cargo.toml index 4258939ad76b..f5bdf8cb41b2 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-chain-api" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/chain-api/src/lib.rs b/node/core/chain-api/src/lib.rs index 3543183654f0..7205527982c1 100644 --- a/node/core/chain-api/src/lib.rs +++ b/node/core/chain-api/src/lib.rs @@ -38,7 +38,7 @@ use sc_client_api::AuxStore; use sp_blockchain::HeaderBackend; use polkadot_node_subsystem::{ - messages::ChainApiMessage, overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, + messages::ChainApiMessage, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_primitives::v2::{Block, BlockId}; @@ -87,10 +87,10 @@ where { loop { match ctx.recv().await? { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(_)) => {}, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}, - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(_)) => {}, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Communication { msg } => match msg { ChainApiMessage::BlockNumber(hash, response_channel) => { let _timer = subsystem.metrics.time_block_number(); let result = subsystem.client.number(hash).map_err(|e| e.to_string().into()); diff --git a/node/core/chain-api/src/tests.rs b/node/core/chain-api/src/tests.rs index 54bd2c50df14..aa24b3621200 100644 --- a/node/core/chain-api/src/tests.rs +++ b/node/core/chain-api/src/tests.rs @@ -184,7 +184,7 @@ fn request_block_number() { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::BlockNumber(*hash, tx), }) .await; @@ -192,7 +192,7 @@ fn request_block_number() { assert_eq!(rx.await.unwrap().unwrap(), *expected); } - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) @@ -211,7 +211,7 @@ fn request_block_header() { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::BlockHeader(*hash, tx), }) .await; @@ -219,7 +219,7 @@ fn request_block_header() { assert_eq!(rx.await.unwrap().unwrap(), *expected); } - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) @@ -239,7 +239,7 @@ fn request_block_weight() { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::BlockWeight(*hash, tx), }) .await; @@ -247,7 +247,7 @@ fn request_block_weight() { assert_eq!(rx.await.unwrap().unwrap(), *expected); } - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) @@ -265,7 +265,7 @@ fn request_finalized_hash() { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::FinalizedBlockHash(*number, tx), }) .await; @@ -273,7 +273,7 @@ fn request_finalized_hash() { assert_eq!(rx.await.unwrap().unwrap(), *expected); } - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) @@ -287,14 +287,14 @@ fn request_last_finalized_number() { let expected = client.info().finalized_number; sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::FinalizedBlockNumber(tx), }) .await; assert_eq!(rx.await.unwrap().unwrap(), expected); - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) @@ -306,7 +306,7 @@ fn request_ancestors() { async move { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::Ancestors { hash: THREE, k: 4, response_channel: tx }, }) .await; @@ -315,7 +315,7 @@ fn request_ancestors() { // Limit the number of ancestors. let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::Ancestors { hash: TWO, k: 1, response_channel: tx }, }) .await; @@ -324,7 +324,7 @@ fn request_ancestors() { // Ancestor of block #1 is returned. let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::Ancestors { hash: ONE, k: 10, response_channel: tx }, }) .await; @@ -333,7 +333,7 @@ fn request_ancestors() { // No ancestors of genesis block. let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::Ancestors { hash: GENESIS, k: 10, response_channel: tx }, }) .await; @@ -341,7 +341,7 @@ fn request_ancestors() { let (tx, rx) = oneshot::channel(); sender - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainApiMessage::Ancestors { hash: ERROR_PATH, k: 2, @@ -351,7 +351,7 @@ fn request_ancestors() { .await; assert!(rx.await.unwrap().is_err()); - sender.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + sender.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } .boxed() }) diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index 2b56b386587c..c2a3768ddf6c 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-chain-selection" description = "Chain Selection Subsystem" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index 464edf69f13b..a8646d874d8f 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -21,7 +21,7 @@ use polkadot_node_subsystem::{ errors::ChainApiError, messages::{ChainApiMessage, ChainSelectionMessage}, overseer::{self, SubsystemSender}, - FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util::database::Database; use polkadot_primitives::v2::{BlockNumber, ConsensusLog, Hash, Header}; @@ -392,10 +392,10 @@ where msg = ctx.recv().fuse() => { let msg = msg?; match msg { - FromOverseer::Signal(OverseerSignal::Conclude) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => { return Ok(()) } - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { for leaf in update.activated { let write_ops = handle_active_leaf( ctx.sender(), @@ -407,10 +407,10 @@ where backend.write(write_ops)?; } } - FromOverseer::Signal(OverseerSignal::BlockFinalized(h, n)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(h, n)) => { handle_finalized_block(backend, h, n)? } - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Communication { msg } => match msg { ChainSelectionMessage::Approved(hash) => { handle_approved_block(backend, hash)? } diff --git a/node/core/chain-selection/src/tests.rs b/node/core/chain-selection/src/tests.rs index 217a5a74e029..0b8947a200cf 100644 --- a/node/core/chain-selection/src/tests.rs +++ b/node/core/chain-selection/src/tests.rs @@ -585,7 +585,7 @@ async fn assert_leaves_query(virtual_overseer: &mut VirtualOverseer, leaves: Vec let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { msg: ChainSelectionMessage::Leaves(tx) }) + .send(FromOrchestra::Communication { msg: ChainSelectionMessage::Leaves(tx) }) .await; assert_eq!(rx.await.unwrap(), leaves); @@ -598,7 +598,7 @@ async fn assert_finalized_leaves_query( ) { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { msg: ChainSelectionMessage::Leaves(tx) }) + .send(FromOrchestra::Communication { msg: ChainSelectionMessage::Leaves(tx) }) .await; answer_finalized_block_info(virtual_overseer, finalized_number, finalized_hash).await; @@ -612,7 +612,7 @@ async fn best_leaf_containing( ) -> Option { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: ChainSelectionMessage::BestLeafContaining(required, tx), }) .await; @@ -627,7 +627,7 @@ async fn approve_block( ) { let (_, write_rx) = backend.await_next_write(); virtual_overseer - .send(FromOverseer::Communication { msg: ChainSelectionMessage::Approved(approved) }) + .send(FromOrchestra::Communication { msg: ChainSelectionMessage::Approved(approved) }) .await; write_rx.await.unwrap() @@ -1709,7 +1709,9 @@ fn approve_nonexistent_has_no_effect() { let nonexistent = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Communication { msg: ChainSelectionMessage::Approved(nonexistent) }) + .send(FromOrchestra::Communication { + msg: ChainSelectionMessage::Approved(nonexistent), + }) .await; // None are approved. diff --git a/node/core/dispute-coordinator/Cargo.toml b/node/core/dispute-coordinator/Cargo.toml index c67a291acfe2..96f976d2eadc 100644 --- a/node/core/dispute-coordinator/Cargo.toml +++ b/node/core/dispute-coordinator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -10,7 +10,7 @@ gum = { package = "tracing-gum", path = "../../gum" } parity-scale-codec = "3.1.2" kvdb = "0.11.0" thiserror = "1.0.31" -lru = "0.7.5" +lru = "0.7.7" fatality = "0.0.6" polkadot-primitives = { path = "../../../primitives" } diff --git a/node/core/dispute-coordinator/src/backend.rs b/node/core/dispute-coordinator/src/backend.rs index 92e63fba1ad9..9e8252f01176 100644 --- a/node/core/dispute-coordinator/src/backend.rs +++ b/node/core/dispute-coordinator/src/backend.rs @@ -149,13 +149,6 @@ impl<'a, B: 'a + Backend> OverlayedBackend<'a, B> { self.candidate_votes.insert((session, candidate_hash), Some(votes)); } - /// Prepare a deletion of the candidate votes under the indicated candidate. - /// - /// Later calls to this function for the same candidate will override earlier ones. - pub fn delete_candidate_votes(&mut self, session: SessionIndex, candidate_hash: CandidateHash) { - self.candidate_votes.insert((session, candidate_hash), None); - } - /// Transform this backend into a set of write-ops to be written to the inner backend. pub fn into_write_ops(self) -> impl Iterator { let earliest_session_ops = self diff --git a/node/core/dispute-coordinator/src/db/v1.rs b/node/core/dispute-coordinator/src/db/v1.rs index 4810123d4f17..0f0883649b5b 100644 --- a/node/core/dispute-coordinator/src/db/v1.rs +++ b/node/core/dispute-coordinator/src/db/v1.rs @@ -30,22 +30,80 @@ use parity_scale_codec::{Decode, Encode}; use crate::{ backend::{Backend, BackendWriteOp, OverlayedBackend}, error::{FatalError, FatalResult}, + metrics::Metrics, status::DisputeStatus, - DISPUTE_WINDOW, + DISPUTE_WINDOW, LOG_TARGET, }; const RECENT_DISPUTES_KEY: &[u8; 15] = b"recent-disputes"; const EARLIEST_SESSION_KEY: &[u8; 16] = b"earliest-session"; const CANDIDATE_VOTES_SUBKEY: &[u8; 15] = b"candidate-votes"; +/// Until what session have votes been cleaned up already? +const CLEANED_VOTES_WATERMARK_KEY: &[u8; 23] = b"cleaned-votes-watermark"; + +/// Restrict number of cleanup operations. +/// +/// On the first run we are starting at session 0 going up all the way to the current session - +/// this should not be done at once, but rather in smaller batches so nodes won't get stalled by +/// this. +/// +/// 300 is with session duration of 1 hour and 30 parachains around <3_000_000 key purges in the worst +/// case. Which is already quite a lot, at the same time we have around 21_000 sessions on +/// Kusama. This means at 300 purged sessions per session, cleaning everything up will take +/// around 3 days. Depending on how severe disk usage becomes, we might want to bump the batch +/// size, at the cost of risking issues at session boundaries (performance). +#[cfg(test)] +const MAX_CLEAN_BATCH_SIZE: u32 = 10; +#[cfg(not(test))] +const MAX_CLEAN_BATCH_SIZE: u32 = 300; pub struct DbBackend { inner: Arc, config: ColumnConfiguration, + metrics: Metrics, } impl DbBackend { - pub fn new(db: Arc, config: ColumnConfiguration) -> Self { - Self { inner: db, config } + pub fn new(db: Arc, config: ColumnConfiguration, metrics: Metrics) -> Self { + Self { inner: db, config, metrics } + } + + /// Cleanup old votes. + /// + /// Should be called whenever a new earliest session gets written. + fn add_vote_cleanup_tx( + &mut self, + tx: &mut DBTransaction, + earliest_session: SessionIndex, + ) -> FatalResult<()> { + // Cleanup old votes in db: + let watermark = load_cleaned_votes_watermark(&*self.inner, &self.config)?.unwrap_or(0); + let clean_until = if earliest_session.saturating_sub(watermark) > MAX_CLEAN_BATCH_SIZE { + watermark + MAX_CLEAN_BATCH_SIZE + } else { + earliest_session + }; + gum::trace!( + target: LOG_TARGET, + ?watermark, + ?clean_until, + ?earliest_session, + ?MAX_CLEAN_BATCH_SIZE, + "WriteEarliestSession" + ); + + for index in watermark..clean_until { + gum::trace!( + target: LOG_TARGET, + ?index, + encoded = ?candidate_votes_session_prefix(index), + "Cleaning votes for session index" + ); + tx.delete_prefix(self.config.col_data, &candidate_votes_session_prefix(index)); + } + // New watermark: + tx.put_vec(self.config.col_data, CLEANED_VOTES_WATERMARK_KEY, clean_until.encode()); + Ok(()) } } @@ -71,20 +129,32 @@ impl Backend for DbBackend { /// Atomically writes the list of operations, with later operations taking precedence over /// prior. + /// + /// This also takes care of purging old votes (of obsolete sessions). fn write(&mut self, ops: I) -> FatalResult<()> where I: IntoIterator, { let mut tx = DBTransaction::new(); + // Make sure the whole process is timed, including the actual transaction flush: + let mut cleanup_timer = None; for op in ops { match op { BackendWriteOp::WriteEarliestSession(session) => { + cleanup_timer = match cleanup_timer.take() { + None => Some(self.metrics.time_vote_cleanup()), + Some(t) => Some(t), + }; + self.add_vote_cleanup_tx(&mut tx, session)?; + + // Actually write the earliest session. tx.put_vec(self.config.col_data, EARLIEST_SESSION_KEY, session.encode()); }, BackendWriteOp::WriteRecentDisputes(recent_disputes) => { tx.put_vec(self.config.col_data, RECENT_DISPUTES_KEY, recent_disputes.encode()); }, BackendWriteOp::WriteCandidateVotes(session, candidate_hash, votes) => { + gum::trace!(target: LOG_TARGET, ?session, "Writing candidate votes"); tx.put_vec( self.config.col_data, &candidate_votes_key(session, &candidate_hash), @@ -112,6 +182,15 @@ fn candidate_votes_key(session: SessionIndex, candidate_hash: &CandidateHash) -> buf } +fn candidate_votes_session_prefix(session: SessionIndex) -> [u8; 15 + 4] { + let mut buf = [0u8; 15 + 4]; + buf[..15].copy_from_slice(CANDIDATE_VOTES_SUBKEY); + + // big-endian encoding is used to ensure lexicographic ordering. + buf[15..][..4].copy_from_slice(&session.to_be_bytes()); + buf +} + /// Column configuration information for the DB. #[derive(Debug, Clone)] pub struct ColumnConfiguration { @@ -244,9 +323,7 @@ pub(crate) fn note_current_session( if pruned_disputes.len() != 0 { overlay_db.write_recent_disputes(new_recent_disputes); - for ((session, candidate_hash), _) in pruned_disputes { - overlay_db.delete_candidate_votes(session, candidate_hash); - } + // Note: Deleting old candidate votes is handled in `write` based on the earliest session. } } }, @@ -258,18 +335,114 @@ pub(crate) fn note_current_session( Ok(()) } +/// Until what session votes have been cleaned up already. +/// +/// That is the db has already been purged of votes for sessions older than the returned +/// `SessionIndex`. +fn load_cleaned_votes_watermark( + db: &dyn Database, + config: &ColumnConfiguration, +) -> FatalResult> { + load_decode(db, config.col_data, CLEANED_VOTES_WATERMARK_KEY) + .map_err(|e| FatalError::DbReadFailed(e)) +} + #[cfg(test)] mod tests { + use super::*; use ::test_helpers::{dummy_candidate_receipt, dummy_hash}; use polkadot_primitives::v2::{Hash, Id as ParaId}; fn make_db() -> DbBackend { let db = kvdb_memorydb::create(1); - let db = polkadot_node_subsystem_util::database::kvdb_impl::DbAdapter::new(db, &[]); + let db = polkadot_node_subsystem_util::database::kvdb_impl::DbAdapter::new(db, &[0]); let store = Arc::new(db); let config = ColumnConfiguration { col_data: 0 }; - DbBackend::new(store, config) + DbBackend::new(store, config, Metrics::default()) + } + + #[test] + fn max_clean_batch_size_is_honored() { + let mut backend = make_db(); + + let mut overlay_db = OverlayedBackend::new(&backend); + let current_session = MAX_CLEAN_BATCH_SIZE + DISPUTE_WINDOW.get() + 3; + let earliest_session = current_session - DISPUTE_WINDOW.get(); + + overlay_db.write_earliest_session(0); + let candidate_hash = CandidateHash(Hash::repeat_byte(1)); + + for session in 0..current_session + 1 { + overlay_db.write_candidate_votes( + session, + candidate_hash, + CandidateVotes { + candidate_receipt: dummy_candidate_receipt(dummy_hash()), + valid: Vec::new(), + invalid: Vec::new(), + }, + ); + } + assert!(overlay_db.load_candidate_votes(0, &candidate_hash).unwrap().is_some()); + assert!(overlay_db + .load_candidate_votes(MAX_CLEAN_BATCH_SIZE - 1, &candidate_hash) + .unwrap() + .is_some()); + assert!(overlay_db + .load_candidate_votes(MAX_CLEAN_BATCH_SIZE, &candidate_hash) + .unwrap() + .is_some()); + + // Cleanup only works for votes that have been written already - so write. + let write_ops = overlay_db.into_write_ops(); + backend.write(write_ops).unwrap(); + + let mut overlay_db = OverlayedBackend::new(&backend); + + gum::trace!(target: LOG_TARGET, ?current_session, "Noting current session"); + note_current_session(&mut overlay_db, current_session).unwrap(); + + let write_ops = overlay_db.into_write_ops(); + backend.write(write_ops).unwrap(); + + let mut overlay_db = OverlayedBackend::new(&backend); + + assert!(overlay_db + .load_candidate_votes(MAX_CLEAN_BATCH_SIZE - 1, &candidate_hash) + .unwrap() + .is_none()); + // After batch size votes should still be there: + assert!(overlay_db + .load_candidate_votes(MAX_CLEAN_BATCH_SIZE, &candidate_hash) + .unwrap() + .is_some()); + + let current_session = current_session + 1; + let earliest_session = earliest_session + 1; + + note_current_session(&mut overlay_db, current_session).unwrap(); + + let write_ops = overlay_db.into_write_ops(); + backend.write(write_ops).unwrap(); + + let overlay_db = OverlayedBackend::new(&backend); + + // All should be gone now: + assert!(overlay_db + .load_candidate_votes(earliest_session - 1, &candidate_hash) + .unwrap() + .is_none()); + // Earliest session should still be there: + assert!(overlay_db + .load_candidate_votes(earliest_session, &candidate_hash) + .unwrap() + .is_some()); + // Old current session should still be there as well: + assert!(overlay_db + .load_candidate_votes(current_session - 1, &candidate_hash) + .unwrap() + .is_some()); } #[test] @@ -368,57 +541,40 @@ mod tests { let mut backend = make_db(); let mut overlay_db = OverlayedBackend::new(&backend); - overlay_db.delete_candidate_votes(1, CandidateHash(Hash::repeat_byte(1))); overlay_db.write_candidate_votes( 1, CandidateHash(Hash::repeat_byte(1)), CandidateVotes { - candidate_receipt: dummy_candidate_receipt(dummy_hash()), + candidate_receipt: dummy_candidate_receipt(Hash::random()), valid: Vec::new(), invalid: Vec::new(), }, ); - let write_ops = overlay_db.into_write_ops(); - backend.write(write_ops).unwrap(); - - assert_eq!( - backend - .load_candidate_votes(1, &CandidateHash(Hash::repeat_byte(1))) - .unwrap() - .unwrap() - .candidate_receipt - .descriptor - .para_id, - ParaId::from(1), - ); + let receipt = dummy_candidate_receipt(dummy_hash()); - let mut overlay_db = OverlayedBackend::new(&backend); overlay_db.write_candidate_votes( 1, CandidateHash(Hash::repeat_byte(1)), CandidateVotes { - candidate_receipt: { - let mut receipt = dummy_candidate_receipt(dummy_hash()); - receipt.descriptor.para_id = ParaId::from(5_u32); - - receipt - }, + candidate_receipt: receipt.clone(), valid: Vec::new(), invalid: Vec::new(), }, ); - overlay_db.delete_candidate_votes(1, CandidateHash(Hash::repeat_byte(1))); - let write_ops = overlay_db.into_write_ops(); backend.write(write_ops).unwrap(); - assert!(backend - .load_candidate_votes(1, &CandidateHash(Hash::repeat_byte(1))) - .unwrap() - .is_none()); + assert_eq!( + backend + .load_candidate_votes(1, &CandidateHash(Hash::repeat_byte(1))) + .unwrap() + .unwrap() + .candidate_receipt, + receipt, + ); } #[test] @@ -434,6 +590,7 @@ mod tests { let new_earliest_session = 5; let current_session = 5 + DISPUTE_WINDOW.get(); + let super_old_no_dispute = 1; let very_old = 3; let slightly_old = 4; let very_recent = current_session - 1; @@ -457,6 +614,7 @@ mod tests { .collect(), ); + overlay_db.write_candidate_votes(super_old_no_dispute, hash_a, blank_candidate_votes()); overlay_db.write_candidate_votes(very_old, hash_a, blank_candidate_votes()); overlay_db.write_candidate_votes(slightly_old, hash_b, blank_candidate_votes()); @@ -483,6 +641,16 @@ mod tests { .collect(), ); + // Votes are only cleaned up after actual write: + let write_ops = overlay_db.into_write_ops(); + backend.write(write_ops).unwrap(); + + let overlay_db = OverlayedBackend::new(&backend); + + assert!(overlay_db + .load_candidate_votes(super_old_no_dispute, &hash_a) + .unwrap() + .is_none()); assert!(overlay_db.load_candidate_votes(very_old, &hash_a).unwrap().is_none()); assert!(overlay_db.load_candidate_votes(slightly_old, &hash_b).unwrap().is_none()); assert!(overlay_db diff --git a/node/core/dispute-coordinator/src/error.rs b/node/core/dispute-coordinator/src/error.rs index dbef9c29167e..4306413a6ab9 100644 --- a/node/core/dispute-coordinator/src/error.rs +++ b/node/core/dispute-coordinator/src/error.rs @@ -20,7 +20,7 @@ use futures::channel::oneshot; use polkadot_node_subsystem::{errors::ChainApiError, SubsystemError}; use polkadot_node_subsystem_util::{rolling_session_window::SessionsUnavailable, runtime}; -use crate::{participation, LOG_TARGET}; +use crate::{db, participation, LOG_TARGET}; use parity_scale_codec::Error as CodecError; pub type Result = std::result::Result; @@ -53,6 +53,10 @@ pub enum Error { #[error("Writing to database failed: {0}")] DbWriteFailed(std::io::Error), + #[fatal] + #[error("Reading from database failed: {0}")] + DbReadFailed(db::v1::Error), + #[fatal] #[error("Oneshot for receiving block number from chain API got cancelled")] CanceledBlockNumber, diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 00817a136334..2dc67608337b 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -34,7 +34,7 @@ use polkadot_node_subsystem::{ BlockDescription, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, }, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, OverseerSignal, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, }; use polkadot_node_subsystem_util::rolling_session_window::{ RollingSessionWindow, SessionWindowUpdate, SessionsUnavailable, @@ -220,8 +220,8 @@ impl Initialized { default_confirm }, MuxedMessage::Subsystem(msg) => match msg { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { self.process_active_leaves_update( ctx, &mut overlay_db, @@ -231,11 +231,11 @@ impl Initialized { .await?; default_confirm }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(_, n)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, n)) => { self.scraper.process_finalized_block(&n); default_confirm }, - FromOverseer::Communication { msg } => + FromOrchestra::Communication { msg } => self.handle_incoming(ctx, &mut overlay_db, msg, clock.now()).await?, }, }; @@ -740,11 +740,11 @@ impl Initialized { continue } - match statement.statement().clone() { + match statement.statement() { DisputeStatement::Valid(valid_kind) => { let fresh = insert_into_statement_vec( &mut votes.valid, - valid_kind, + *valid_kind, *val_index, statement.validator_signature().clone(), ); @@ -759,7 +759,7 @@ impl Initialized { DisputeStatement::Invalid(invalid_kind) => { let fresh = insert_into_statement_vec( &mut votes.invalid, - invalid_kind, + *invalid_kind, *val_index, statement.validator_signature().clone(), ); @@ -1044,7 +1044,7 @@ impl Initialized { /// Messages to be handled in this subsystem. enum MuxedMessage { /// Messages from other subsystems. - Subsystem(FromOverseer), + Subsystem(FromOrchestra), /// Messages from participation workers. Participation(participation::WorkerMessage), } diff --git a/node/core/dispute-coordinator/src/lib.rs b/node/core/dispute-coordinator/src/lib.rs index 1a7f1540b8b2..d04cbf29ca58 100644 --- a/node/core/dispute-coordinator/src/lib.rs +++ b/node/core/dispute-coordinator/src/lib.rs @@ -32,7 +32,7 @@ use sc_keystore::LocalKeystore; use polkadot_node_primitives::{CandidateVotes, DISPUTE_WINDOW}; use polkadot_node_subsystem::{ - overseer, ActivatedLeaf, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActivatedLeaf, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util::{ database::Database, rolling_session_window::RollingSessionWindow, @@ -127,7 +127,11 @@ impl Config { impl DisputeCoordinatorSubsystem { fn start(self, ctx: Context) -> SpawnedSubsystem { let future = async { - let backend = DbBackend::new(self.store.clone(), self.config.column_config()); + let backend = DbBackend::new( + self.store.clone(), + self.config.column_config(), + self.metrics.clone(), + ); self.run(ctx, backend, Box::new(SystemClock)) .await .map_err(|e| SubsystemError::with_origin("dispute-coordinator", e)) @@ -369,14 +373,14 @@ async fn get_rolling_session_window( async fn wait_for_first_leaf(ctx: &mut Context) -> Result> { loop { match ctx.recv().await? { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(None), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(None), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { if let Some(activated) = update.activated { return Ok(Some(activated)) } }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(_, _)) => {}, - FromOverseer::Communication { msg } => + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, _)) => {}, + FromOrchestra::Communication { msg } => // NOTE: We could technically actually handle a couple of message types, even if // not initialized (e.g. all requests that only query the database). The problem // is, we would deliver potentially outdated information, especially in the event diff --git a/node/core/dispute-coordinator/src/metrics.rs b/node/core/dispute-coordinator/src/metrics.rs index 83810df67a2b..40503428c1c8 100644 --- a/node/core/dispute-coordinator/src/metrics.rs +++ b/node/core/dispute-coordinator/src/metrics.rs @@ -26,6 +26,8 @@ struct MetricsInner { concluded: prometheus::CounterVec, /// Number of participations that have been queued. queued_participations: prometheus::CounterVec, + /// How long vote cleanup batches take. + vote_cleanup_time: prometheus::Histogram, } /// Candidate validation metrics. @@ -74,6 +76,10 @@ impl Metrics { metrics.queued_participations.with_label_values(&["best-effort"]).inc(); } } + + pub(crate) fn time_vote_cleanup(&self) -> Option { + self.0.as_ref().map(|metrics| metrics.vote_cleanup_time.start_timer()) + } } impl metrics::Metrics for Metrics { @@ -116,6 +122,16 @@ impl metrics::Metrics for Metrics { )?, registry, )?, + vote_cleanup_time: prometheus::register( + prometheus::Histogram::with_opts( + prometheus::HistogramOpts::new( + "polkadot_parachain_dispute_coordinator_vote_cleanup", + "Time spent cleaning up old votes per batch.", + ) + .buckets([0.01, 0.1, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0].into()), + )?, + registry, + )?, }; Ok(Metrics(Some(metrics))) } diff --git a/node/core/dispute-coordinator/src/participation/tests.rs b/node/core/dispute-coordinator/src/participation/tests.rs index 37400f365fb1..3ccb652fecc1 100644 --- a/node/core/dispute-coordinator/src/participation/tests.rs +++ b/node/core/dispute-coordinator/src/participation/tests.rs @@ -33,7 +33,7 @@ use polkadot_node_subsystem::{ AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest, ValidationFailed, }, - ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, + ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; use polkadot_node_subsystem_test_helpers::{ make_subsystem_context, TestSubsystemContext, TestSubsystemContextHandle, @@ -45,12 +45,12 @@ use polkadot_primitives::v2::{ type VirtualOverseer = TestSubsystemContextHandle; pub fn make_our_subsystem_context( - spawn: S, + spawner: S, ) -> ( - TestSubsystemContext, + TestSubsystemContext>, TestSubsystemContextHandle, ) { - make_subsystem_context(spawn) + make_subsystem_context(spawner) } #[overseer::contextbounds(DisputeCoordinator, prefix = self::overseer)] diff --git a/node/core/dispute-coordinator/src/scraping/tests.rs b/node/core/dispute-coordinator/src/scraping/tests.rs index ba7767260376..b6b5a1f633bf 100644 --- a/node/core/dispute-coordinator/src/scraping/tests.rs +++ b/node/core/dispute-coordinator/src/scraping/tests.rs @@ -29,7 +29,7 @@ use polkadot_node_subsystem::{ AllMessages, ChainApiMessage, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest, }, - ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, + ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; use polkadot_node_subsystem_test_helpers::{ make_subsystem_context, TestSubsystemContext, TestSubsystemContextHandle, TestSubsystemSender, @@ -59,7 +59,7 @@ async fn overseer_recv(virtual_overseer: &mut VirtualOverseer) -> AllMessages { struct TestState { chain: Vec, scraper: ChainScraper, - ctx: TestSubsystemContext, + ctx: TestSubsystemContext>, } impl TestState { diff --git a/node/core/dispute-coordinator/src/tests.rs b/node/core/dispute-coordinator/src/tests.rs index d74a1e0e46c0..f1dbde642c22 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -37,7 +37,7 @@ use polkadot_node_subsystem::{ ChainApiMessage, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, }, - overseer::FromOverseer, + overseer::FromOrchestra, OverseerSignal, }; use polkadot_node_subsystem_util::TimeoutExt; @@ -225,7 +225,7 @@ impl TestState { gum::debug!(?block_number, "Activating block in activate_leaf_at_session."); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: block_hash, span: Arc::new(jaeger::Span::Disabled), @@ -347,7 +347,7 @@ impl TestState { "Activating block in handle resume sync." ); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: *leaf, number: n as u32, @@ -438,7 +438,8 @@ impl TestState { self.subsystem_keystore.clone(), Metrics::default(), ); - let backend = DbBackend::new(self.db.clone(), self.config.column_config()); + let backend = + DbBackend::new(self.db.clone(), self.config.column_config(), Metrics::default()); let subsystem_task = subsystem.run(ctx, backend, Box::new(self.clock.clone())); let test_task = test(self, ctx_handle); @@ -511,7 +512,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash1, candidate_receipt: candidate_receipt1.clone(), @@ -531,7 +532,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -540,7 +541,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash1)], tx, @@ -555,7 +556,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash2, candidate_receipt: candidate_receipt2.clone(), @@ -572,7 +573,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash2)], tx, @@ -586,7 +587,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { // Result should be invalid, because it should be considered spam. assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::InvalidImport)); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // No more messages expected: assert!(virtual_overseer.try_recv().await.is_none()); @@ -628,7 +629,7 @@ fn dispute_gets_confirmed_via_participation() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash1, candidate_receipt: candidate_receipt1.clone(), @@ -652,7 +653,7 @@ fn dispute_gets_confirmed_via_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -661,7 +662,7 @@ fn dispute_gets_confirmed_via_participation() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash1)], tx, @@ -676,7 +677,7 @@ fn dispute_gets_confirmed_via_participation() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash2, candidate_receipt: candidate_receipt2.clone(), @@ -695,7 +696,7 @@ fn dispute_gets_confirmed_via_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash2)], tx, @@ -711,7 +712,7 @@ fn dispute_gets_confirmed_via_participation() { // Result should be valid, because our node participated, so spam slots are cleared: assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // No more messages expected: assert!(virtual_overseer.try_recv().await.is_none()); @@ -761,7 +762,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash1, candidate_receipt: candidate_receipt1.clone(), @@ -782,7 +783,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -791,7 +792,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash1)], tx, @@ -806,7 +807,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash: candidate_hash2, candidate_receipt: candidate_receipt2.clone(), @@ -825,7 +826,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash2)], tx, @@ -842,7 +843,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { // import, so spam slots are cleared: assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // No more messages expected: assert!(virtual_overseer.try_recv().await.is_none()); @@ -873,7 +874,7 @@ fn backing_statements_import_works_and_no_spam() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -892,7 +893,7 @@ fn backing_statements_import_works_and_no_spam() { // Just backing votes - we should not have any active disputes now. let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -901,7 +902,7 @@ fn backing_statements_import_works_and_no_spam() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -927,7 +928,7 @@ fn backing_statements_import_works_and_no_spam() { // Backing vote import should not have accounted to spam slots, so this should succeed // as well: virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -944,7 +945,7 @@ fn backing_statements_import_works_and_no_spam() { // Result should be valid, because our node participated, so spam slots are cleared: assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // No more messages expected: assert!(virtual_overseer.try_recv().await.is_none()); @@ -980,7 +981,7 @@ fn conflicting_votes_lead_to_dispute_participation() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1004,7 +1005,7 @@ fn conflicting_votes_lead_to_dispute_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1013,7 +1014,7 @@ fn conflicting_votes_lead_to_dispute_participation() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -1027,7 +1028,7 @@ fn conflicting_votes_lead_to_dispute_participation() { } virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1041,7 +1042,7 @@ fn conflicting_votes_lead_to_dispute_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -1054,7 +1055,7 @@ fn conflicting_votes_lead_to_dispute_participation() { assert_eq!(votes.invalid.len(), 2); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // This confirms that the second vote doesn't lead to participation again. assert!(virtual_overseer.try_recv().await.is_none()); @@ -1086,7 +1087,7 @@ fn positive_votes_dont_trigger_participation() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1100,7 +1101,7 @@ fn positive_votes_dont_trigger_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1109,7 +1110,7 @@ fn positive_votes_dont_trigger_participation() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -1123,7 +1124,7 @@ fn positive_votes_dont_trigger_participation() { } virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1137,7 +1138,7 @@ fn positive_votes_dont_trigger_participation() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1146,7 +1147,7 @@ fn positive_votes_dont_trigger_participation() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -1159,7 +1160,7 @@ fn positive_votes_dont_trigger_participation() { assert!(votes.invalid.is_empty()); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // This confirms that no participation request is made. assert!(virtual_overseer.try_recv().await.is_none()); @@ -1191,7 +1192,7 @@ fn wrong_validator_index_is_ignored() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1208,7 +1209,7 @@ fn wrong_validator_index_is_ignored() { { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1217,7 +1218,7 @@ fn wrong_validator_index_is_ignored() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::QueryCandidateVotes( vec![(session, candidate_hash)], tx, @@ -1230,7 +1231,7 @@ fn wrong_validator_index_is_ignored() { assert!(votes.invalid.is_empty()); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; // This confirms that no participation request is made. assert!(virtual_overseer.try_recv().await.is_none()); @@ -1262,7 +1263,7 @@ fn finality_votes_ignore_disputed_candidates() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1291,7 +1292,7 @@ fn finality_votes_ignore_disputed_candidates() { let block_hash_b = Hash::repeat_byte(0x0b); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::DetermineUndisputedChain { base: (10, base_block), block_descriptions: vec![BlockDescription { @@ -1308,7 +1309,7 @@ fn finality_votes_ignore_disputed_candidates() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::DetermineUndisputedChain { base: (10, base_block), block_descriptions: vec![ @@ -1331,7 +1332,7 @@ fn finality_votes_ignore_disputed_candidates() { assert_eq!(rx.await.unwrap(), (11, block_hash_a)); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1364,7 +1365,7 @@ fn supermajority_valid_dispute_may_be_finalized() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1395,7 +1396,7 @@ fn supermajority_valid_dispute_may_be_finalized() { } virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1414,7 +1415,7 @@ fn supermajority_valid_dispute_may_be_finalized() { let block_hash_b = Hash::repeat_byte(0x0b); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::DetermineUndisputedChain { base: (10, base_hash), block_descriptions: vec![BlockDescription { @@ -1431,7 +1432,7 @@ fn supermajority_valid_dispute_may_be_finalized() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::DetermineUndisputedChain { base: (10, base_hash), block_descriptions: vec![ @@ -1454,7 +1455,7 @@ fn supermajority_valid_dispute_may_be_finalized() { assert_eq!(rx.await.unwrap(), (12, block_hash_b)); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1487,7 +1488,7 @@ fn concluded_supermajority_for_non_active_after_time() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1519,7 +1520,7 @@ fn concluded_supermajority_for_non_active_after_time() { } virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1536,7 +1537,7 @@ fn concluded_supermajority_for_non_active_after_time() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1546,7 +1547,7 @@ fn concluded_supermajority_for_non_active_after_time() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::RecentDisputes(tx), }) .await; @@ -1554,7 +1555,7 @@ fn concluded_supermajority_for_non_active_after_time() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1589,7 +1590,7 @@ fn concluded_supermajority_against_non_active_after_time() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1625,7 +1626,7 @@ fn concluded_supermajority_against_non_active_after_time() { } virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1642,7 +1643,7 @@ fn concluded_supermajority_against_non_active_after_time() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1651,7 +1652,7 @@ fn concluded_supermajority_against_non_active_after_time() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::RecentDisputes(tx), }) .await; @@ -1659,7 +1660,7 @@ fn concluded_supermajority_against_non_active_after_time() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert_matches!( virtual_overseer.try_recv().await, None => {} @@ -1693,7 +1694,7 @@ fn resume_dispute_without_local_statement() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1716,7 +1717,7 @@ fn resume_dispute_without_local_statement() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1724,7 +1725,7 @@ fn resume_dispute_without_local_statement() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1766,7 +1767,7 @@ fn resume_dispute_without_local_statement() { .await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1792,7 +1793,7 @@ fn resume_dispute_without_local_statement() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1800,7 +1801,7 @@ fn resume_dispute_without_local_statement() { assert!(rx.await.unwrap().is_empty()); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1835,7 +1836,7 @@ fn resume_dispute_with_local_statement() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1856,7 +1857,7 @@ fn resume_dispute_with_local_statement() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1864,7 +1865,7 @@ fn resume_dispute_with_local_statement() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1879,7 +1880,7 @@ fn resume_dispute_with_local_statement() { // Assert that subsystem is not sending Participation messages because we issued a local statement assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1913,7 +1914,7 @@ fn resume_dispute_without_local_statement_or_local_key() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -1933,7 +1934,7 @@ fn resume_dispute_without_local_statement_or_local_key() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -1941,7 +1942,7 @@ fn resume_dispute_without_local_statement_or_local_key() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert_matches!( virtual_overseer.try_recv().await, None => {} @@ -1959,7 +1960,7 @@ fn resume_dispute_without_local_statement_or_local_key() { // Assert that subsystem is not sending Participation messages because we issued a local statement assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -1995,7 +1996,7 @@ fn resume_dispute_with_local_statement_without_local_key() { let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -2016,7 +2017,7 @@ fn resume_dispute_with_local_statement_without_local_key() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ActiveDisputes(tx), }) .await; @@ -2024,7 +2025,7 @@ fn resume_dispute_with_local_statement_without_local_key() { assert_eq!(rx.await.unwrap().len(), 1); } - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -2043,7 +2044,7 @@ fn resume_dispute_with_local_statement_without_local_key() { // have a key. assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -2079,7 +2080,7 @@ fn issue_local_statement_does_cause_distribution_but_not_duplicate_participation let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -2094,7 +2095,7 @@ fn issue_local_statement_does_cause_distribution_but_not_duplicate_participation // Initiate dispute locally: virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::IssueLocalStatement( session, candidate_hash, @@ -2118,7 +2119,7 @@ fn issue_local_statement_does_cause_distribution_but_not_duplicate_participation // Make sure we won't participate: assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -2140,7 +2141,7 @@ fn negative_issue_local_statement_only_triggers_import() { test_state.activate_leaf_at_session(&mut virtual_overseer, session, 1).await; virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::IssueLocalStatement( session, candidate_hash, @@ -2150,7 +2151,11 @@ fn negative_issue_local_statement_only_triggers_import() { }) .await; - let backend = DbBackend::new(test_state.db.clone(), test_state.config.column_config()); + let backend = DbBackend::new( + test_state.db.clone(), + test_state.config.column_config(), + Metrics::default(), + ); let votes = backend.load_candidate_votes(session, &candidate_hash).unwrap().unwrap(); assert_eq!(votes.invalid.len(), 1); @@ -2162,7 +2167,7 @@ fn negative_issue_local_statement_only_triggers_import() { // Assert that subsystem is not participating. assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -2185,7 +2190,7 @@ fn empty_import_still_writes_candidate_receipt() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -2198,14 +2203,18 @@ fn empty_import_still_writes_candidate_receipt() { rx.await.unwrap(); - let backend = DbBackend::new(test_state.db.clone(), test_state.config.column_config()); + let backend = DbBackend::new( + test_state.db.clone(), + test_state.config.column_config(), + Metrics::default(), + ); let votes = backend.load_candidate_votes(session, &candidate_hash).unwrap().unwrap(); assert_eq!(votes.invalid.len(), 0); assert_eq!(votes.valid.len(), 0); assert_eq!(votes.candidate_receipt, candidate_receipt); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state @@ -2236,7 +2245,7 @@ fn redundant_votes_ignored() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -2251,7 +2260,7 @@ fn redundant_votes_ignored() { let (tx, rx) = oneshot::channel(); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_hash, candidate_receipt: candidate_receipt.clone(), @@ -2264,14 +2273,18 @@ fn redundant_votes_ignored() { rx.await.unwrap(); - let backend = DbBackend::new(test_state.db.clone(), test_state.config.column_config()); + let backend = DbBackend::new( + test_state.db.clone(), + test_state.config.column_config(), + Metrics::default(), + ); let votes = backend.load_candidate_votes(session, &candidate_hash).unwrap().unwrap(); assert_eq!(votes.invalid.len(), 0); assert_eq!(votes.valid.len(), 1); assert_eq!(&votes.valid[0].2, valid_vote.validator_signature()); - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; assert!(virtual_overseer.try_recv().await.is_none()); test_state diff --git a/node/core/parachains-inherent/Cargo.toml b/node/core/parachains-inherent/Cargo.toml index 72c0ff971038..5c95918e26fc 100644 --- a/node/core/parachains-inherent/Cargo.toml +++ b/node/core/parachains-inherent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-parachains-inherent" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/prospective-parachains/src/lib.rs b/node/core/prospective-parachains/src/lib.rs index 0e447aa69b1f..963c99e0a743 100644 --- a/node/core/prospective-parachains/src/lib.rs +++ b/node/core/prospective-parachains/src/lib.rs @@ -36,7 +36,7 @@ use polkadot_node_subsystem::{ ChainApiMessage, FragmentTreeMembership, HypotheticalDepthRequest, ProspectiveParachainsMessage, RuntimeApiMessage, RuntimeApiRequest, }, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util::inclusion_emulator::staging::{Constraints, RelayChainBlockInfo}; use polkadot_primitives::vstaging::{ @@ -117,12 +117,12 @@ async fn run(mut ctx: Context) -> FatalResult<()> { async fn run_iteration(ctx: &mut Context, view: &mut View) -> Result<()> { loop { match ctx.recv().await.map_err(FatalError::SubsystemReceive)? { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { handle_active_leaves_update(&mut *ctx, view, update).await?; }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}, - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Communication { msg } => match msg { ProspectiveParachainsMessage::CandidateSeconded(para, candidate, pvd, tx) => handle_candidate_seconded(&mut *ctx, view, para, candidate, pvd, tx).await?, ProspectiveParachainsMessage::CandidateBacked(para, candidate_hash) => diff --git a/node/core/provisioner/Cargo.toml b/node/core/provisioner/Cargo.toml index 8eb7467c3921..bc25115499bf 100644 --- a/node/core/provisioner/Cargo.toml +++ b/node/core/provisioner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-provisioner" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/provisioner/src/error.rs b/node/core/provisioner/src/error.rs index 7f5807c7c7a3..4589ab02cf31 100644 --- a/node/core/provisioner/src/error.rs +++ b/node/core/provisioner/src/error.rs @@ -15,16 +15,18 @@ // along with Polkadot. If not, see . ///! Error types for provisioner module -use fatality; +use fatality::Nested; use futures::channel::{mpsc, oneshot}; -use polkadot_node_subsystem::errors::{ChainApiError, RuntimeApiError}; +use polkadot_node_subsystem::errors::{ChainApiError, RuntimeApiError, SubsystemError}; use polkadot_node_subsystem_util as util; use polkadot_primitives::v2::Hash; -use thiserror::Error; + +pub type FatalResult = std::result::Result; +pub type Result = std::result::Result; /// Errors in the provisioner. -#[derive(Debug, Error)] #[allow(missing_docs)] +#[fatality::fatality(splitable)] pub enum Error { #[error(transparent)] Util(#[from] util::Error), @@ -63,6 +65,13 @@ pub enum Error { "backed candidate does not correspond to selected candidate; check logic in provisioner" )] BackedCandidateOrderingProblem, + + #[fatal] + #[error("Failed to spawn background task")] + FailedToSpawnBackgroundTask, + + #[error(transparent)] + SubsystemError(#[from] SubsystemError), } /// Used by `get_onchain_disputes` to represent errors related to fetching on-chain disputes from the Runtime @@ -81,3 +90,20 @@ pub enum GetOnchainDisputesError { )] NotSupported(#[source] RuntimeApiError, Hash), } + +pub fn log_error(result: Result<()>) -> std::result::Result<(), FatalError> { + match result.into_nested()? { + Ok(()) => Ok(()), + Err(jfyi) => { + jfyi.log(); + Ok(()) + }, + } +} + +impl JfyiError { + /// Log a `JfyiError`. + pub fn log(self) { + gum::debug!(target: super::LOG_TARGET, error = ?self); + } +} diff --git a/node/core/provisioner/src/lib.rs b/node/core/provisioner/src/lib.rs index afbdf458746e..66602ac60583 100644 --- a/node/core/provisioner/src/lib.rs +++ b/node/core/provisioner/src/lib.rs @@ -21,10 +21,10 @@ use bitvec::vec::BitVec; use futures::{ - channel::{mpsc, oneshot}, - prelude::*, + channel::oneshot, future::BoxFuture, prelude::*, stream::FuturesUnordered, FutureExt, }; use futures_timer::Delay; + use polkadot_node_primitives::CandidateVotes; use polkadot_node_subsystem::{ jaeger, @@ -32,28 +32,23 @@ use polkadot_node_subsystem::{ CandidateBackingMessage, ChainApiMessage, DisputeCoordinatorMessage, ProvisionableData, ProvisionerInherentData, ProvisionerMessage, }, - overseer, ActivatedLeaf, LeafStatus, PerLeafSpan, -}; -use polkadot_node_subsystem_util::{ - request_availability_cores, request_persisted_validation_data, JobSender, JobSubsystem, - JobTrait, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, + PerLeafSpan, SpawnedSubsystem, SubsystemError, }; +use polkadot_node_subsystem_util::{request_availability_cores, request_persisted_validation_data}; use polkadot_primitives::v2::{ BackedCandidate, BlockNumber, CandidateHash, CandidateReceipt, CoreState, DisputeState, DisputeStatement, DisputeStatementSet, Hash, MultiDisputeStatementSet, OccupiedCoreAssumption, SessionIndex, SignedAvailabilityBitfield, ValidatorIndex, }; -use std::{ - collections::{BTreeMap, HashMap, HashSet}, - pin::Pin, -}; +use std::collections::{BTreeMap, HashMap, HashSet}; mod error; mod metrics; mod onchain_disputes; pub use self::metrics::*; -use error::Error; +use error::{Error, FatalResult}; #[cfg(test)] mod tests; @@ -63,197 +58,230 @@ const PRE_PROPOSE_TIMEOUT: std::time::Duration = core::time::Duration::from_mill const LOG_TARGET: &str = "parachain::provisioner"; -enum InherentAfter { - Ready, - Wait(Delay), +/// The provisioner subsystem. +pub struct ProvisionerSubsystem { + metrics: Metrics, } -impl InherentAfter { - fn new_from_now() -> Self { - InherentAfter::Wait(Delay::new(PRE_PROPOSE_TIMEOUT)) - } - - fn is_ready(&self) -> bool { - match *self { - InherentAfter::Ready => true, - InherentAfter::Wait(_) => false, - } - } - - async fn ready(&mut self) { - match *self { - InherentAfter::Ready => { - // Make sure we never end the returned future. - // This is required because the `select!` that calls this future will end in a busy loop. - futures::pending!() - }, - InherentAfter::Wait(ref mut d) => { - d.await; - *self = InherentAfter::Ready; - }, - } +impl ProvisionerSubsystem { + /// Create a new instance of the `ProvisionerSubsystem`. + pub fn new(metrics: Metrics) -> Self { + Self { metrics } } } -/// Provisioner run arguments. -#[derive(Debug, Clone, Copy)] -pub struct ProvisionerConfig; - -/// A per-relay-parent job for the provisioning subsystem. -pub struct ProvisionerJob { +/// A per-relay-parent state for the provisioning subsystem. +pub struct PerRelayParent { leaf: ActivatedLeaf, - receiver: mpsc::Receiver, backed_candidates: Vec, signed_bitfields: Vec, - metrics: Metrics, - inherent_after: InherentAfter, + is_inherent_ready: bool, awaiting_inherent: Vec>, - _phantom: std::marker::PhantomData, + span: PerLeafSpan, } -impl JobTrait for ProvisionerJob -where - Sender: overseer::ProvisionerSenderTrait + std::marker::Unpin, -{ - type ToJob = ProvisionerMessage; - type OutgoingMessages = overseer::ProvisionerOutgoingMessages; - type Sender = Sender; - type Error = Error; - type RunArgs = ProvisionerConfig; - type Metrics = Metrics; +impl PerRelayParent { + fn new(leaf: ActivatedLeaf) -> Self { + let span = PerLeafSpan::new(leaf.span.clone(), "provisioner"); - const NAME: &'static str = "provisioner-job"; + Self { + leaf, + backed_candidates: Vec::new(), + signed_bitfields: Vec::new(), + is_inherent_ready: false, + awaiting_inherent: Vec::new(), + span, + } + } +} - /// Run a job for the parent block indicated - // - // this function is in charge of creating and executing the job's main loop - fn run( - leaf: ActivatedLeaf, - _: Self::RunArgs, - metrics: Self::Metrics, - receiver: mpsc::Receiver, - mut sender: JobSender, - ) -> Pin> + Send>> { - let span = leaf.span.clone(); - async move { - let job = ProvisionerJob::new(leaf, metrics, receiver); - - job.run_loop(sender.subsystem_sender(), PerLeafSpan::new(span, "provisioner")) +type InherentDelays = FuturesUnordered>; + +#[overseer::subsystem(Provisioner, error=SubsystemError, prefix=self::overseer)] +impl ProvisionerSubsystem { + fn start(self, ctx: Context) -> SpawnedSubsystem { + let future = async move { + run(ctx, self.metrics) .await + .map_err(|e| SubsystemError::with_origin("provisioner", e)) } - .boxed() + .boxed(); + + SpawnedSubsystem { name: "provisioner-subsystem", future } } } -impl ProvisionerJob -where - Sender: overseer::ProvisionerSenderTrait, -{ - fn new( - leaf: ActivatedLeaf, - metrics: Metrics, - receiver: mpsc::Receiver, - ) -> Self { - Self { - leaf, - receiver, - backed_candidates: Vec::new(), - signed_bitfields: Vec::new(), - metrics, - inherent_after: InherentAfter::new_from_now(), - awaiting_inherent: Vec::new(), - _phantom: std::marker::PhantomData::::default(), +#[overseer::contextbounds(Provisioner, prefix = self::overseer)] +async fn run(mut ctx: Context, metrics: Metrics) -> FatalResult<()> { + let mut inherent_delays = InherentDelays::new(); + let mut per_relay_parent = HashMap::new(); + + loop { + let result = + run_iteration(&mut ctx, &mut per_relay_parent, &mut inherent_delays, &metrics).await; + + match result { + Ok(()) => break, + err => crate::error::log_error(err)?, } } - async fn run_loop(mut self, sender: &mut Sender, span: PerLeafSpan) -> Result<(), Error> { - loop { - futures::select! { - msg = self.receiver.next() => match msg { - Some(ProvisionerMessage::RequestInherentData(_, return_sender)) => { - let _span = span.child("req-inherent-data"); - let _timer = self.metrics.time_request_inherent_data(); - - if self.inherent_after.is_ready() { - self.send_inherent_data(sender, vec![return_sender]).await; - } else { - self.awaiting_inherent.push(return_sender); - } - } - Some(ProvisionerMessage::ProvisionableData(_, data)) => { - let span = span.child("provisionable-data"); - let _timer = self.metrics.time_provisionable_data(); + Ok(()) +} - self.note_provisionable_data(&span, data); - } - None => break, - }, - _ = self.inherent_after.ready().fuse() => { - let _span = span.child("send-inherent-data"); - let return_senders = std::mem::take(&mut self.awaiting_inherent); +#[overseer::contextbounds(Provisioner, prefix = self::overseer)] +async fn run_iteration( + ctx: &mut Context, + per_relay_parent: &mut HashMap, + inherent_delays: &mut InherentDelays, + metrics: &Metrics, +) -> Result<(), Error> { + loop { + futures::select! { + from_overseer = ctx.recv().fuse() => { + match from_overseer? { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => + handle_active_leaves_update(update, per_relay_parent, inherent_delays), + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Communication { msg } => { + handle_communication(ctx, per_relay_parent, msg, metrics).await?; + }, + } + }, + hash = inherent_delays.select_next_some() => { + if let Some(state) = per_relay_parent.get_mut(&hash) { + state.is_inherent_ready = true; + + let return_senders = std::mem::take(&mut state.awaiting_inherent); if !return_senders.is_empty() { - self.send_inherent_data(sender, return_senders).await; + send_inherent_data_bg(ctx, &state, return_senders, metrics.clone()).await?; } } } } + } +} + +fn handle_active_leaves_update( + update: ActiveLeavesUpdate, + per_relay_parent: &mut HashMap, + inherent_delays: &mut InherentDelays, +) { + for deactivated in &update.deactivated { + per_relay_parent.remove(deactivated); + } - Ok(()) + for leaf in update.activated { + let delay_fut = Delay::new(PRE_PROPOSE_TIMEOUT).map(move |_| leaf.hash).boxed(); + per_relay_parent.insert(leaf.hash, PerRelayParent::new(leaf)); + inherent_delays.push(delay_fut); } +} + +#[overseer::contextbounds(Provisioner, prefix = self::overseer)] +async fn handle_communication( + ctx: &mut Context, + per_relay_parent: &mut HashMap, + message: ProvisionerMessage, + metrics: &Metrics, +) -> Result<(), Error> { + match message { + ProvisionerMessage::RequestInherentData(relay_parent, return_sender) => { + if let Some(state) = per_relay_parent.get_mut(&relay_parent) { + if state.is_inherent_ready { + send_inherent_data_bg(ctx, &state, vec![return_sender], metrics.clone()) + .await?; + } else { + state.awaiting_inherent.push(return_sender); + } + } + }, + ProvisionerMessage::ProvisionableData(relay_parent, data) => { + if let Some(state) = per_relay_parent.get_mut(&relay_parent) { + let span = state.span.child("provisionable-data"); + let _timer = metrics.time_provisionable_data(); + + note_provisionable_data(state, &span, data); + } + }, + } + + Ok(()) +} + +#[overseer::contextbounds(Provisioner, prefix = self::overseer)] +async fn send_inherent_data_bg( + ctx: &mut Context, + per_relay_parent: &PerRelayParent, + return_senders: Vec>, + metrics: Metrics, +) -> Result<(), Error> { + let leaf = per_relay_parent.leaf.clone(); + let signed_bitfields = per_relay_parent.signed_bitfields.clone(); + let backed_candidates = per_relay_parent.backed_candidates.clone(); + let span = per_relay_parent.span.child("req-inherent-data"); + + let mut sender = ctx.sender().clone(); + + let bg = async move { + let _span = span; + let _timer = metrics.time_request_inherent_data(); - async fn send_inherent_data( - &mut self, - sender: &mut Sender, - return_senders: Vec>, - ) { if let Err(err) = send_inherent_data( - &self.leaf, - &self.signed_bitfields, - &self.backed_candidates, + &leaf, + &signed_bitfields, + &backed_candidates, return_senders, - sender, - &self.metrics, + &mut sender, + &metrics, ) .await { gum::warn!(target: LOG_TARGET, err = ?err, "failed to assemble or send inherent data"); - self.metrics.on_inherent_data_request(Err(())); + metrics.on_inherent_data_request(Err(())); } else { - self.metrics.on_inherent_data_request(Ok(())); + metrics.on_inherent_data_request(Ok(())); gum::debug!( target: LOG_TARGET, - signed_bitfield_count = self.signed_bitfields.len(), - backed_candidates_count = self.backed_candidates.len(), - leaf_hash = ?self.leaf.hash, + signed_bitfield_count = signed_bitfields.len(), + backed_candidates_count = backed_candidates.len(), + leaf_hash = ?leaf.hash, "inherent data sent successfully" ); + metrics.observe_inherent_data_bitfields_count(signed_bitfields.len()); } - } + }; - fn note_provisionable_data( - &mut self, - span: &jaeger::Span, - provisionable_data: ProvisionableData, - ) { - match provisionable_data { - ProvisionableData::Bitfield(_, signed_bitfield) => - self.signed_bitfields.push(signed_bitfield), - ProvisionableData::BackedCandidate(backed_candidate) => { - let candidate_hash = backed_candidate.hash(); - gum::trace!( - target: LOG_TARGET, - ?candidate_hash, - para = ?backed_candidate.descriptor().para_id, - "noted backed candidate", - ); - let _span = span - .child("provisionable-backed") - .with_candidate(candidate_hash) - .with_para_id(backed_candidate.descriptor().para_id); - self.backed_candidates.push(backed_candidate) - }, - _ => {}, - } + ctx.spawn("send-inherent-data", bg.boxed()) + .map_err(|_| Error::FailedToSpawnBackgroundTask)?; + + Ok(()) +} + +fn note_provisionable_data( + per_relay_parent: &mut PerRelayParent, + span: &jaeger::Span, + provisionable_data: ProvisionableData, +) { + match provisionable_data { + ProvisionableData::Bitfield(_, signed_bitfield) => + per_relay_parent.signed_bitfields.push(signed_bitfield), + ProvisionableData::BackedCandidate(backed_candidate) => { + let candidate_hash = backed_candidate.hash(); + gum::trace!( + target: LOG_TARGET, + ?candidate_hash, + para = ?backed_candidate.descriptor().para_id, + "noted backed candidate", + ); + let _span = span + .child("provisionable-backed") + .with_candidate(candidate_hash) + .with_para_id(backed_candidate.descriptor().para_id); + per_relay_parent.backed_candidates.push(backed_candidate) + }, + _ => {}, } } @@ -477,13 +505,11 @@ async fn select_candidates( // now get the backed candidates corresponding to these candidate receipts let (tx, rx) = oneshot::channel(); - sender - .send_message(CandidateBackingMessage::GetBackedCandidates( - relay_parent, - selected_candidates.clone(), - tx, - )) - .await; + sender.send_unbounded_message(CandidateBackingMessage::GetBackedCandidates( + relay_parent, + selected_candidates.clone(), + tx, + )); let mut candidates = rx.await.map_err(|err| Error::CanceledBackedCandidates(err))?; // `selected_candidates` is generated in ascending order by core index, and `GetBackedCandidates` @@ -806,6 +832,3 @@ async fn select_disputes( }) .collect()) } - -/// The provisioner subsystem. -pub type ProvisionerSubsystem = JobSubsystem, Spawner>; diff --git a/node/core/provisioner/src/metrics.rs b/node/core/provisioner/src/metrics.rs index bda0a560979d..829293dfed53 100644 --- a/node/core/provisioner/src/metrics.rs +++ b/node/core/provisioner/src/metrics.rs @@ -21,6 +21,7 @@ struct MetricsInner { inherent_data_requests: prometheus::CounterVec, request_inherent_data: prometheus::Histogram, provisionable_data: prometheus::Histogram, + inherent_data_response_bitfields: prometheus::Histogram, /// The following metrics track how many disputes/votes the runtime will have to process. These will count /// all recent statements meaning every dispute from last sessions: 10 min on Rococo, 60 min on Kusama and @@ -63,6 +64,12 @@ impl Metrics { self.0.as_ref().map(|metrics| metrics.provisionable_data.start_timer()) } + pub(crate) fn observe_inherent_data_bitfields_count(&self, bitfields_count: usize) { + self.0.as_ref().map(|metrics| { + metrics.inherent_data_response_bitfields.observe(bitfields_count as f64) + }); + } + pub(crate) fn inc_valid_statements_by(&self, votes: usize) { if let Some(metrics) = &self.0 { metrics @@ -134,6 +141,15 @@ impl metrics::Metrics for Metrics { )?, registry, )?, + inherent_data_response_bitfields: prometheus::register( + prometheus::Histogram::with_opts( + prometheus::HistogramOpts::new( + "polkadot_parachain_provisioner_inherent_data_response_bitfields_sent", + "Number of inherent bitfields sent in response to `ProvisionerMessage::RequestInherentData`.", + ).buckets(vec![0.0, 10.0, 25.0, 50.0, 75.0, 100.0, 150.0, 200.0, 250.0, 300.0]), + )?, + registry, + )?, }; Ok(Metrics(Some(metrics))) } diff --git a/node/core/provisioner/src/tests.rs b/node/core/provisioner/src/tests.rs index f87fbb8ce16a..a58e22d7efc2 100644 --- a/node/core/provisioner/src/tests.rs +++ b/node/core/provisioner/src/tests.rs @@ -197,6 +197,7 @@ mod select_availability_bitfields { mod common { use super::super::*; + use futures::channel::mpsc; use polkadot_node_subsystem::messages::AllMessages; use polkadot_node_subsystem_test_helpers::TestSubsystemSender; @@ -225,6 +226,7 @@ mod select_candidates { scheduled_core, }; use ::test_helpers::{dummy_candidate_descriptor, dummy_hash}; + use futures::channel::mpsc; use polkadot_node_subsystem::messages::{ AllMessages, RuntimeApiMessage, RuntimeApiRequest::{ @@ -497,8 +499,8 @@ mod select_candidates { } mod select_disputes { - use super::{super::*, common::test_harness}; + use futures::channel::mpsc; use polkadot_node_subsystem::{ messages::{AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest}, RuntimeApiError, diff --git a/node/core/pvf-checker/Cargo.toml b/node/core/pvf-checker/Cargo.toml index 35428267ce33..03dba328ac23 100644 --- a/node/core/pvf-checker/Cargo.toml +++ b/node/core/pvf-checker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-pvf-checker" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/core/pvf-checker/src/lib.rs b/node/core/pvf-checker/src/lib.rs index e5ace4c8f7ef..f31f3f728aa6 100644 --- a/node/core/pvf-checker/src/lib.rs +++ b/node/core/pvf-checker/src/lib.rs @@ -23,7 +23,7 @@ use futures::{channel::oneshot, future::BoxFuture, prelude::*, stream::FuturesUn use polkadot_node_subsystem::{ messages::{CandidateValidationMessage, PreCheckOutcome, PvfCheckerMessage, RuntimeApiMessage}, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, SubsystemSender, }; use polkadot_primitives::v2::{ @@ -244,22 +244,22 @@ async fn handle_from_overseer( sender: &mut impl overseer::PvfCheckerSenderTrait, keystore: &SyncCryptoStorePtr, metrics: &Metrics, - from_overseer: FromOverseer, + from_overseer: FromOrchestra, ) -> Option { match from_overseer { - FromOverseer::Signal(OverseerSignal::Conclude) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => { gum::info!(target: LOG_TARGET, "Received `Conclude` signal, exiting"); Some(Conclude) }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(_, _)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, _)) => { // ignore None }, - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { handle_leaves_update(state, sender, keystore, metrics, update).await; None }, - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Communication { msg } => match msg { // uninhabited type, thus statically unreachable. }, } diff --git a/node/core/pvf-checker/src/tests.rs b/node/core/pvf-checker/src/tests.rs index 36ca35b187e7..f47e642ae98d 100644 --- a/node/core/pvf-checker/src/tests.rs +++ b/node/core/pvf-checker/src/tests.rs @@ -22,7 +22,7 @@ use polkadot_node_subsystem::{ AllMessages, CandidateValidationMessage, PreCheckOutcome, PvfCheckerMessage, RuntimeApiMessage, RuntimeApiRequest, }, - ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, RuntimeApiError, + ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, RuntimeApiError, }; use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle}; use polkadot_primitives::v2::{ @@ -134,7 +134,7 @@ impl TestState { }, } - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; } /// Convenience function to invoke [`active_leaves_update`] with the new leaf that starts a new @@ -206,7 +206,7 @@ impl TestState { }; handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated, deactivated: deactivated.into_iter().cloned().collect(), }))) diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index 0e58c6bd058c..46f35aa498cc 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-pvf" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -19,6 +19,7 @@ slotmap = "1.0" gum = { package = "tracing-gum", path = "../../gum" } pin-project = "1.0.9" rand = "0.8.5" +tempfile = "3.3.0" parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } polkadot-parachain = { path = "../../../parachain" } polkadot-core-primitives = { path = "../../../core-primitives" } diff --git a/node/core/pvf/src/artifacts.rs b/node/core/pvf/src/artifacts.rs index af579863cd61..49d1be75fed4 100644 --- a/node/core/pvf/src/artifacts.rs +++ b/node/core/pvf/src/artifacts.rs @@ -17,15 +17,12 @@ use crate::{error::PrepareError, host::PrepareResultSender}; use always_assert::always; use async_std::path::{Path, PathBuf}; -use parity_scale_codec::{Decode, Encode}; use polkadot_parachain::primitives::ValidationCodeHash; use std::{ collections::HashMap, time::{Duration, SystemTime}, }; -/// A wrapper for the compiled PVF code. -#[derive(Encode, Decode)] pub struct CompiledArtifact(Vec); impl CompiledArtifact { diff --git a/node/core/pvf/src/execute/worker.rs b/node/core/pvf/src/execute/worker.rs index 1140758e6aee..01bc59cb1a84 100644 --- a/node/core/pvf/src/execute/worker.rs +++ b/node/core/pvf/src/execute/worker.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use crate::{ - artifacts::{ArtifactPathId, CompiledArtifact}, + artifacts::ArtifactPathId, executor_intf::TaskExecutor, worker_common::{ bytes_to_path, framed_recv, framed_send, path_to_bytes, spawn_with_program_path, @@ -206,29 +206,12 @@ async fn validate_using_artifact( params: &[u8], spawner: &TaskExecutor, ) -> Response { - let artifact_bytes = match async_std::fs::read(artifact_path).await { - Err(e) => - return Response::InternalError(format!( - "failed to read the artifact at {}: {:?}", - artifact_path.display(), - e, - )), - Ok(b) => b, - }; - - let artifact = match CompiledArtifact::decode(&mut artifact_bytes.as_slice()) { - Err(e) => return Response::InternalError(format!("artifact deserialization: {:?}", e)), - Ok(a) => a, - }; - - let compiled_artifact = artifact.as_ref(); - let validation_started_at = Instant::now(); let descriptor_bytes = match unsafe { // SAFETY: this should be safe since the compiled artifact passed here comes from the // file created by the prepare workers. These files are obtained by calling // [`executor_intf::prepare`]. - crate::executor_intf::execute(compiled_artifact, params, spawner.clone()) + crate::executor_intf::execute(artifact_path.as_ref(), params, spawner.clone()) } { Err(err) => return Response::format_invalid("execute", &err.to_string()), Ok(d) => d, diff --git a/node/core/pvf/src/executor_intf.rs b/node/core/pvf/src/executor_intf.rs index b4064e13ecc0..7702923d7918 100644 --- a/node/core/pvf/src/executor_intf.rs +++ b/node/core/pvf/src/executor_intf.rs @@ -22,7 +22,11 @@ use sc_executor_common::{ }; use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics}; use sp_core::storage::{ChildInfo, TrackedStorageKey}; -use std::any::{Any, TypeId}; +use sp_externalities::MultiRemovalResults; +use std::{ + any::{Any, TypeId}, + path::Path, +}; // Memory configuration // @@ -40,15 +44,17 @@ const DEFAULT_HEAP_PAGES_ESTIMATE: u64 = 32; const EXTRA_HEAP_PAGES: u64 = 2048; const CONFIG: Config = Config { - // NOTE: This is specified in bytes, so we multiply by WASM page size. - max_memory_size: Some(((DEFAULT_HEAP_PAGES_ESTIMATE + EXTRA_HEAP_PAGES) * 65536) as usize), - allow_missing_func_imports: true, cache_path: None, semantics: Semantics { extra_heap_pages: EXTRA_HEAP_PAGES, - fast_instance_reuse: false, + // NOTE: This is specified in bytes, so we multiply by WASM page size. + max_memory_size: Some(((DEFAULT_HEAP_PAGES_ESTIMATE + EXTRA_HEAP_PAGES) * 65536) as usize), + + instantiation_strategy: + sc_executor_wasmtime::InstantiationStrategy::RecreateInstanceCopyOnWrite, + // Enable deterministic stack limit to pin down the exact number of items the wasmtime stack // can contain before it traps with stack overflow. // @@ -87,7 +93,7 @@ pub fn prevalidate(code: &[u8]) -> Result Result, sc_executor_common::error::WasmError> { sc_executor_wasmtime::prepare_runtime_artifact(blob, &CONFIG.semantics) } @@ -97,10 +103,16 @@ pub fn prepare(blob: RuntimeBlob) -> Result, sc_executor_common::error:: /// /// # Safety /// -/// The compiled artifact must be produced with [`prepare`]. Not following this guidance can lead -/// to arbitrary code execution. +/// The caller must ensure that the compiled artifact passed here was: +/// 1) produced by [`prepare`], +/// 2) written to the disk as a file, +/// 3) was not modified, +/// 4) will not be modified while any runtime using this artifact is alive, or is being +/// instantiated. +/// +/// Failure to adhere to these requirements might lead to crashes and arbitrary code execution. pub unsafe fn execute( - compiled_artifact: &[u8], + compiled_artifact_path: &Path, params: &[u8], spawner: impl sp_core::traits::SpawnNamed + 'static, ) -> Result, sc_executor_common::error::Error> { @@ -113,7 +125,7 @@ pub unsafe fn execute( sc_executor::with_externalities_safe(&mut ext, || { let runtime = sc_executor_wasmtime::create_runtime_from_artifact::( - compiled_artifact, + compiled_artifact_path, CONFIG, )?; runtime.new_instance()?.call(InvokeMethod::Export("validate_block"), params) @@ -149,15 +161,31 @@ impl sp_externalities::Externalities for ValidationExternalities { panic!("child_storage: unsupported feature for parachain validation") } - fn kill_child_storage(&mut self, _: &ChildInfo, _: Option) -> (bool, u32) { + fn kill_child_storage( + &mut self, + _child_info: &ChildInfo, + _maybe_limit: Option, + _maybe_cursor: Option<&[u8]>, + ) -> MultiRemovalResults { panic!("kill_child_storage: unsupported feature for parachain validation") } - fn clear_prefix(&mut self, _: &[u8], _: Option) -> (bool, u32) { + fn clear_prefix( + &mut self, + _prefix: &[u8], + _maybe_limit: Option, + _maybe_cursor: Option<&[u8]>, + ) -> MultiRemovalResults { panic!("clear_prefix: unsupported feature for parachain validation") } - fn clear_child_prefix(&mut self, _: &ChildInfo, _: &[u8], _: Option) -> (bool, u32) { + fn clear_child_prefix( + &mut self, + _child_info: &ChildInfo, + _prefix: &[u8], + _maybe_limit: Option, + _maybe_cursor: Option<&[u8]>, + ) -> MultiRemovalResults { panic!("clear_child_prefix: unsupported feature for parachain validation") } diff --git a/node/core/pvf/src/prepare/worker.rs b/node/core/pvf/src/prepare/worker.rs index d83346946f62..ca90285ca7b3 100644 --- a/node/core/pvf/src/prepare/worker.rs +++ b/node/core/pvf/src/prepare/worker.rs @@ -265,15 +265,13 @@ pub fn worker_entrypoint(socket_path: &str) { // worker is only required to send an empty `Ok` to the pool // to indicate the success. - let artifact_bytes = compiled_artifact.encode(); - gum::debug!( target: LOG_TARGET, worker_pid = %std::process::id(), "worker: writing artifact to {}", dest.display(), ); - async_std::fs::write(&dest, &artifact_bytes).await?; + async_std::fs::write(&dest, &compiled_artifact).await?; Ok(()) }, diff --git a/node/core/pvf/src/testing.rs b/node/core/pvf/src/testing.rs index 20cf85151f81..ba407e0b87cb 100644 --- a/node/core/pvf/src/testing.rs +++ b/node/core/pvf/src/testing.rs @@ -36,10 +36,15 @@ pub fn validate_candidate( let blob = prevalidate(&*code)?; let artifact = prepare(blob)?; + let tmpdir = tempfile::tempdir()?; + let artifact_path = tmpdir.path().join("blob"); + std::fs::write(&artifact_path, &artifact)?; + let executor = TaskExecutor::new()?; let result = unsafe { - // SAFETY: This is trivially safe since the artifact is obtained by calling `prepare`. - execute(&artifact, params, executor)? + // SAFETY: This is trivially safe since the artifact is obtained by calling `prepare` + // and is written into a temporary directory in an unmodified state. + execute(&artifact_path, params, executor)? }; Ok(result) diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 3c20bb60924c..48992d5a6d12 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-runtime-api" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -12,7 +12,6 @@ parity-util-mem = { version = "0.11.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index dd924675fdb8..4f77cf33eefe 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -25,7 +25,7 @@ use polkadot_node_subsystem::{ errors::RuntimeApiError, messages::{RuntimeApiMessage, RuntimeApiRequest as Request}, - overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, + overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_primitives::{ runtime_api::ParachainHost, @@ -35,7 +35,6 @@ use polkadot_primitives::{ use sp_api::ProvideRuntimeApi; use sp_authority_discovery::AuthorityDiscoveryApi; use sp_consensus_babe::BabeApi; -use sp_core::traits::SpawnNamed; use cache::{RequestResult, RequestResultCache}; use futures::{channel::oneshot, prelude::*, select, stream::FuturesUnordered}; @@ -62,7 +61,7 @@ const API_REQUEST_TASK_NAME: &str = "polkadot-runtime-api-request"; pub struct RuntimeApiSubsystem { client: Arc, metrics: Metrics, - spawn_handle: Box, + spawn_handle: Box, /// All the active runtime API requests that are currently being executed. active_requests: FuturesUnordered>>, /// Requests results cache @@ -74,12 +73,12 @@ impl RuntimeApiSubsystem { pub fn new( client: Arc, metrics: Metrics, - spawn_handle: impl SpawnNamed + 'static, + spawner: impl overseer::gen::Spawner + 'static, ) -> Self { RuntimeApiSubsystem { client, metrics, - spawn_handle: Box::new(spawn_handle), + spawn_handle: Box::new(spawner), active_requests: Default::default(), requests_cache: RequestResultCache::default(), } @@ -343,10 +342,10 @@ where select! { req = ctx.recv().fuse() => match req? { - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(_)) => {}, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}, - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(_)) => {}, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Communication { msg } => match msg { RuntimeApiMessage::Request(relay_parent, request) => { subsystem.spawn_request(relay_parent, request); }, diff --git a/node/core/runtime-api/src/tests.rs b/node/core/runtime-api/src/tests.rs index 0762f364a732..22318a69fb34 100644 --- a/node/core/runtime-api/src/tests.rs +++ b/node/core/runtime-api/src/tests.rs @@ -18,6 +18,7 @@ use super::*; use ::test_helpers::{dummy_committed_candidate_receipt, dummy_validation_code}; use polkadot_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfiguration}; +use polkadot_node_subsystem::SpawnGlue; use polkadot_node_subsystem_test_helpers::make_subsystem_context; use polkadot_primitives::{ v2::{ @@ -248,20 +249,21 @@ fn requests_authorities() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::Authorities(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.authorities); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -274,20 +276,21 @@ fn requests_validators() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::Validators(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validators); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -300,20 +303,21 @@ fn requests_validator_groups() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::ValidatorGroups(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap().0, runtime_api.validator_groups); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -326,20 +330,21 @@ fn requests_availability_cores() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::AvailabilityCores(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.availability_cores); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -357,13 +362,14 @@ fn requests_persisted_validation_data() { runtime_api.validation_data.insert(para_a, Default::default()); let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::PersistedValidationData(para_a, OccupiedCoreAssumption::Included, tx), @@ -375,7 +381,7 @@ fn requests_persisted_validation_data() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::PersistedValidationData(para_b, OccupiedCoreAssumption::Included, tx), @@ -385,7 +391,7 @@ fn requests_persisted_validation_data() { assert_eq!(rx.await.unwrap().unwrap(), None); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -409,13 +415,14 @@ fn requests_assumed_validation_data() { runtime_api.validation_data.insert(para_b, Default::default()); let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::AssumedValidationData(para_a, expected_data_hash, tx), @@ -427,7 +434,7 @@ fn requests_assumed_validation_data() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::AssumedValidationData(para_a, Hash::zero(), tx), @@ -437,7 +444,7 @@ fn requests_assumed_validation_data() { assert_eq!(rx.await.unwrap().unwrap(), None); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -458,13 +465,14 @@ fn requests_check_validation_outputs() { let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::CheckValidationOutputs(para_a, commitments.clone(), tx), @@ -475,7 +483,7 @@ fn requests_check_validation_outputs() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::CheckValidationOutputs(para_b, commitments, tx), @@ -484,7 +492,7 @@ fn requests_check_validation_outputs() { .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_b]); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -497,20 +505,21 @@ fn requests_session_index_for_child() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::SessionIndexForChild(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.session_index_for_child); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -544,13 +553,14 @@ fn requests_session_info() { let relay_parent = [1; 32].into(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::SessionInfo(session_index, tx), @@ -560,7 +570,7 @@ fn requests_session_info() { assert_eq!(rx.await.unwrap().unwrap(), Some(dummy_session_info())); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -580,13 +590,14 @@ fn requests_validation_code() { runtime_api.validation_code.insert(para_a, validation_code.clone()); let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::ValidationCode(para_a, OccupiedCoreAssumption::Included, tx), @@ -598,7 +609,7 @@ fn requests_validation_code() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::ValidationCode(para_b, OccupiedCoreAssumption::Included, tx), @@ -608,7 +619,7 @@ fn requests_validation_code() { assert_eq!(rx.await.unwrap().unwrap(), None); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -629,13 +640,14 @@ fn requests_candidate_pending_availability() { .insert(para_a, candidate_receipt.clone()); let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::CandidatePendingAvailability(para_a, tx), @@ -648,7 +660,7 @@ fn requests_candidate_pending_availability() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::CandidatePendingAvailability(para_b, tx), @@ -658,7 +670,7 @@ fn requests_candidate_pending_availability() { assert_eq!(rx.await.unwrap().unwrap(), None); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -671,20 +683,21 @@ fn requests_candidate_events() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::CandidateEvents(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), runtime_api.candidate_events); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -711,12 +724,13 @@ fn requests_dmq_contents() { runtime_api }); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::DmqContents(para_a, tx)), }) .await; @@ -724,7 +738,7 @@ fn requests_dmq_contents() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::DmqContents(para_b, tx)), }) .await; @@ -733,7 +747,7 @@ fn requests_dmq_contents() { vec![InboundDownwardMessage { sent_at: 228, msg: b"Novus Ordo Seclorum".to_vec() }] ); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); } @@ -765,12 +779,13 @@ fn requests_inbound_hrmp_channels_contents() { runtime_api }); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::InboundHrmpChannelsContents(para_a, tx), @@ -781,7 +796,7 @@ fn requests_inbound_hrmp_channels_contents() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::InboundHrmpChannelsContents(para_b, tx), @@ -790,7 +805,7 @@ fn requests_inbound_hrmp_channels_contents() { .await; assert_eq!(rx.await.unwrap().unwrap(), para_b_inbound_channels); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); } @@ -813,7 +828,8 @@ fn requests_validation_code_by_hash() { (runtime_api, validation_code) }; - let subsystem = RuntimeApiSubsystem::new(Arc::new(runtime_api), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(Arc::new(runtime_api), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -821,7 +837,7 @@ fn requests_validation_code_by_hash() { for code in validation_code { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::ValidationCodeByHash(code.hash(), tx), @@ -832,7 +848,7 @@ fn requests_validation_code_by_hash() { assert_eq!(rx.await.unwrap().unwrap(), Some(code)); } - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -846,7 +862,8 @@ fn multiple_requests_in_parallel_are_working() { let spawner = sp_core::testing::TaskExecutor::new(); let mutex = runtime_api.availability_cores_wait.clone(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { // Make all requests block until we release this mutex. @@ -857,7 +874,7 @@ fn multiple_requests_in_parallel_are_working() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::AvailabilityCores(tx)), }) .await; @@ -871,7 +888,7 @@ fn multiple_requests_in_parallel_are_working() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::AvailabilityCores(tx)), }) .await; @@ -884,7 +901,7 @@ fn multiple_requests_in_parallel_are_working() { .into_iter() .for_each(|r| assert_eq!(r.unwrap().unwrap(), runtime_api.availability_cores)); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -907,19 +924,20 @@ fn requests_babe_epoch() { let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::CurrentBabeEpoch(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), epoch); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -931,7 +949,8 @@ fn requests_submit_pvf_check_statement() { let spawner = sp_core::testing::TaskExecutor::new(); let runtime_api = Arc::new(MockRuntimeApi::default()); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -943,7 +962,7 @@ fn requests_submit_pvf_check_statement() { // Here we just want to ensure that those requests do not go through the cache. let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::SubmitPvfCheckStatement(stmt.clone(), sig.clone(), tx), @@ -953,7 +972,7 @@ fn requests_submit_pvf_check_statement() { assert_eq!(rx.await.unwrap().unwrap(), ()); let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::SubmitPvfCheckStatement(stmt.clone(), sig.clone(), tx), @@ -967,7 +986,7 @@ fn requests_submit_pvf_check_statement() { &[(stmt.clone(), sig.clone()), (stmt.clone(), sig.clone())] ); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -995,7 +1014,8 @@ fn requests_pvfs_require_precheck() { runtime_api }); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -1003,13 +1023,13 @@ fn requests_pvfs_require_precheck() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request(relay_parent, Request::PvfsRequirePrecheck(tx)), }) .await; assert_eq!(rx.await.unwrap().unwrap(), vec![[1; 32].into(), [2; 32].into()]); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); @@ -1029,13 +1049,14 @@ fn requests_validation_code_hash() { runtime_api.validation_code_hash.insert(para_a, validation_code_hash.clone()); let runtime_api = Arc::new(runtime_api); - let subsystem = RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), spawner); + let subsystem = + RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::ValidationCodeHash(para_a, OccupiedCoreAssumption::Included, tx), @@ -1047,7 +1068,7 @@ fn requests_validation_code_hash() { let (tx, rx) = oneshot::channel(); ctx_handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: RuntimeApiMessage::Request( relay_parent, Request::ValidationCodeHash(para_b, OccupiedCoreAssumption::Included, tx), @@ -1057,7 +1078,7 @@ fn requests_validation_code_hash() { assert_eq!(rx.await.unwrap().unwrap(), None); - ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::executor::block_on(future::join(subsystem_task, test_task)); diff --git a/node/gum/Cargo.toml b/node/gum/Cargo.toml index dab3cdcc188a..c6c0cb933b03 100644 --- a/node/gum/Cargo.toml +++ b/node/gum/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-gum" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Stick logs together with the TraceID as provided by tempo" diff --git a/node/gum/proc-macro/Cargo.toml b/node/gum/proc-macro/Cargo.toml index 90a1f752bd0c..115e948b91ae 100644 --- a/node/gum/proc-macro/Cargo.toml +++ b/node/gum/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-gum-proc-macro" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Generate an overseer including builder pattern and message wrapper from a single annotated struct definition." diff --git a/node/jaeger/Cargo.toml b/node/jaeger/Cargo.toml index da4fb06e58d4..6cc8cb8500e6 100644 --- a/node/jaeger/Cargo.toml +++ b/node/jaeger/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-jaeger" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Polkadot Jaeger primitives, but equally useful for Grafana/Tempo" diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index 051687fce735..b71b49852813 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-test-malus" description = "Misbehaving nodes for local testnets, system and Simnet tests." license = "GPL-3.0-only" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" readme = "README.md" diff --git a/node/malus/src/interceptor.rs b/node/malus/src/interceptor.rs index 19889b42e32a..a41712e469f1 100644 --- a/node/malus/src/interceptor.rs +++ b/node/malus/src/interceptor.rs @@ -21,7 +21,7 @@ //! messages on the overseer level. use polkadot_node_subsystem::*; -pub use polkadot_node_subsystem::{messages, messages::*, overseer, FromOverseer}; +pub use polkadot_node_subsystem::{messages, messages::*, overseer, FromOrchestra}; use std::{future::Future, pin::Pin}; /// Filter incoming and outgoing messages. @@ -42,8 +42,8 @@ where fn intercept_incoming( &self, _sender: &mut Sender, - msg: FromOverseer, - ) -> Option> { + msg: FromOrchestra, + ) -> Option> { Some(msg) } @@ -174,7 +174,7 @@ where type OutgoingMessages = <::Message as overseer::AssociateOutgoing>::OutgoingMessages; type Signal = OverseerSignal; - async fn try_recv(&mut self) -> Result>, ()> { + async fn try_recv(&mut self) -> Result>, ()> { loop { match self.inner.try_recv().await? { None => return Ok(None), @@ -188,7 +188,7 @@ where } } - async fn recv(&mut self) -> SubsystemResult> { + async fn recv(&mut self) -> SubsystemResult> { loop { let msg = self.inner.recv().await?; if let Some(msg) = self.message_filter.intercept_incoming(self.inner.sender(), msg) { @@ -243,10 +243,6 @@ where ::Sender, Message = ::Message, >, - // ::Sender: - // overseer::SubsystemSender< - // ::Sender>>::Message, - // >, ::Message: overseer::AssociateOutgoing, ::Sender: diff --git a/node/malus/src/shared.rs b/node/malus/src/shared.rs index 123497340ec5..11d81aded11e 100644 --- a/node/malus/src/shared.rs +++ b/node/malus/src/shared.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use futures::prelude::*; -use polkadot_node_primitives::SpawnNamed; +use sp_core::traits::SpawnNamed; pub const MALUS: &str = "MALUS"; diff --git a/node/malus/src/tests.rs b/node/malus/src/tests.rs index 6ce65fd9fc3b..706e8b931993 100644 --- a/node/malus/src/tests.rs +++ b/node/malus/src/tests.rs @@ -37,10 +37,10 @@ where fn intercept_incoming( &self, _sender: &mut Sender, - msg: FromOverseer, - ) -> Option> { + msg: FromOrchestra, + ) -> Option> { match msg { - FromOverseer::Communication { msg: _msg } => None, + FromOrchestra::Communication { msg: _msg } => None, // to conclude the test cleanly sig => Some(sig), } @@ -60,18 +60,20 @@ where } async fn overseer_send>(overseer: &mut TestSubsystemContextHandle, msg: T) { - overseer.send(FromOverseer::Communication { msg }).await; + overseer.send(FromOrchestra::Communication { msg }).await; } +use sp_core::testing::TaskExecutor; + fn launch_harness(test_gen: G) where F: Future> + Send, M: AssociateOutgoing + std::fmt::Debug + Send + 'static, // ::OutgoingMessages: From, - Sub: Subsystem, SubsystemError>, + Sub: Subsystem>, SubsystemError>, G: Fn(TestSubsystemContextHandle) -> (F, Sub), { - let pool = sp_core::testing::TaskExecutor::new(); + let pool = TaskExecutor::new(); let (context, overseer) = make_subsystem_context(pool); let (test_fut, subsystem) = test_gen(overseer); @@ -84,7 +86,7 @@ where futures::executor::block_on(futures::future::join( async move { let mut overseer = test_fut.await; - overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }, subsystem, )) diff --git a/node/malus/src/variants/back_garbage_candidate.rs b/node/malus/src/variants/back_garbage_candidate.rs index 5ece8cd4bd7b..cf72776b5f28 100644 --- a/node/malus/src/variants/back_garbage_candidate.rs +++ b/node/malus/src/variants/back_garbage_candidate.rs @@ -23,9 +23,11 @@ use polkadot_cli::{ service::{ AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, Overseer, OverseerConnector, OverseerGen, OverseerGenArgs, OverseerHandle, ParachainHost, - ProvideRuntimeApi, SpawnNamed, + ProvideRuntimeApi, }, }; +use polkadot_node_subsystem::SpawnGlue; +use sp_core::traits::SpawnNamed; use crate::{ interceptor::*, @@ -43,7 +45,7 @@ impl OverseerGen for BackGarbageCandidate { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer>, OverseerHandle), Error> + ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, @@ -53,7 +55,7 @@ impl OverseerGen for BackGarbageCandidate { let validation_filter = ReplaceValidationResult::new( FakeCandidateValidation::BackingAndApprovalValid, FakeCandidateValidationError::InvalidOutputs, - spawner.clone(), + SpawnGlue(spawner), ); prepared_overseer_builder(args)? diff --git a/node/malus/src/variants/common.rs b/node/malus/src/variants/common.rs index 138a91b759ab..e112aa49f83e 100644 --- a/node/malus/src/variants/common.rs +++ b/node/malus/src/variants/common.rs @@ -23,14 +23,15 @@ use crate::{ use polkadot_node_core_candidate_validation::find_validation_data; use polkadot_node_primitives::{InvalidCandidate, ValidationResult}; -use polkadot_node_subsystem::messages::{CandidateValidationMessage, ValidationFailed}; +use polkadot_node_subsystem::{ + messages::{CandidateValidationMessage, ValidationFailed}, + overseer, +}; use polkadot_primitives::v2::{ CandidateCommitments, CandidateDescriptor, CandidateReceipt, PersistedValidationData, }; -use polkadot_cli::service::SpawnNamed; - use futures::channel::oneshot; #[derive(clap::ArgEnum, Clone, Copy, Debug, PartialEq)] @@ -113,7 +114,7 @@ pub struct ReplaceValidationResult { impl ReplaceValidationResult where - Spawner: SpawnNamed, + Spawner: overseer::gen::Spawner, { pub fn new( fake_validation: FakeCandidateValidation, @@ -197,7 +198,7 @@ fn create_validation_response( impl MessageInterceptor for ReplaceValidationResult where Sender: overseer::CandidateValidationSenderTrait + Clone + Send + 'static, - Spawner: SpawnNamed + Clone + 'static, + Spawner: overseer::gen::Spawner + Clone + 'static, { type Message = CandidateValidationMessage; @@ -205,10 +206,10 @@ where fn intercept_incoming( &self, subsystem_sender: &mut Sender, - msg: FromOverseer, - ) -> Option> { + msg: FromOrchestra, + ) -> Option> { match msg { - FromOverseer::Communication { + FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromExhaustive( validation_data, @@ -224,7 +225,7 @@ where FakeCandidateValidation::BackingAndApprovalValid => { // Behave normally if the `PoV` is not known to be malicious. if pov.block_data.0.as_slice() != MALICIOUS_POV { - return Some(FromOverseer::Communication { + return Some(FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromExhaustive( validation_data, validation_code, @@ -257,7 +258,7 @@ where sender.send(Ok(validation_result)).unwrap(); None }, - _ => Some(FromOverseer::Communication { + _ => Some(FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromExhaustive( validation_data, validation_code, @@ -269,7 +270,7 @@ where }), } }, - FromOverseer::Communication { + FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromChainState( candidate_receipt, @@ -283,7 +284,7 @@ where FakeCandidateValidation::BackingAndApprovalValid => { // Behave normally if the `PoV` is not known to be malicious. if pov.block_data.0.as_slice() != MALICIOUS_POV { - return Some(FromOverseer::Communication { + return Some(FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromChainState( candidate_receipt, pov, @@ -314,7 +315,7 @@ where response_sender.send(Ok(validation_result)).unwrap(); None }, - _ => Some(FromOverseer::Communication { + _ => Some(FromOrchestra::Communication { msg: CandidateValidationMessage::ValidateFromChainState( candidate_receipt, pov, diff --git a/node/malus/src/variants/dispute_valid_candidates.rs b/node/malus/src/variants/dispute_valid_candidates.rs index 63a99e7df441..17ac070e619b 100644 --- a/node/malus/src/variants/dispute_valid_candidates.rs +++ b/node/malus/src/variants/dispute_valid_candidates.rs @@ -27,10 +27,12 @@ use polkadot_cli::{ service::{ AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, Overseer, OverseerConnector, OverseerGen, OverseerGenArgs, OverseerHandle, ParachainHost, - ProvideRuntimeApi, SpawnNamed, + ProvideRuntimeApi, }, RunCmd, }; +use polkadot_node_subsystem::SpawnGlue; +use sp_core::traits::SpawnNamed; // Filter wrapping related types. use super::common::{FakeCandidateValidation, FakeCandidateValidationError}; @@ -73,7 +75,7 @@ impl OverseerGen for DisputeValidCandidates { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer>, OverseerHandle), Error> + ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, @@ -83,7 +85,7 @@ impl OverseerGen for DisputeValidCandidates { let validation_filter = ReplaceValidationResult::new( self.opts.fake_validation, self.opts.fake_validation_error, - spawner.clone(), + SpawnGlue(spawner.clone()), ); prepared_overseer_builder(args)? diff --git a/node/malus/src/variants/suggest_garbage_candidate.rs b/node/malus/src/variants/suggest_garbage_candidate.rs index ef987278decb..b8aaaa18c10d 100644 --- a/node/malus/src/variants/suggest_garbage_candidate.rs +++ b/node/malus/src/variants/suggest_garbage_candidate.rs @@ -27,7 +27,7 @@ use polkadot_cli::{ service::{ AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, Overseer, OverseerConnector, OverseerGen, OverseerGenArgs, OverseerHandle, ParachainHost, - ProvideRuntimeApi, SpawnNamed, + ProvideRuntimeApi, }, }; use polkadot_node_core_candidate_validation::find_validation_data; @@ -35,6 +35,7 @@ use polkadot_node_primitives::{AvailableData, BlockData, PoV}; use polkadot_primitives::v2::{CandidateDescriptor, CandidateHash}; use polkadot_node_subsystem_util::request_validators; +use sp_core::traits::SpawnNamed; // Filter wrapping related types. use crate::{ @@ -48,7 +49,10 @@ use crate::{ // Import extra types relevant to the particular // subsystem. -use polkadot_node_subsystem::messages::{CandidateBackingMessage, CollatorProtocolMessage}; +use polkadot_node_subsystem::{ + messages::{CandidateBackingMessage, CollatorProtocolMessage}, + SpawnGlue, +}; use polkadot_primitives::v2::CandidateReceipt; use std::{ @@ -72,7 +76,7 @@ struct NoteCandidate { impl MessageInterceptor for NoteCandidate where Sender: overseer::CandidateBackingSenderTrait + Clone + Send + 'static, - Spawner: SpawnNamed + Clone + 'static, + Spawner: overseer::gen::Spawner + Clone + 'static, { type Message = CandidateBackingMessage; @@ -80,10 +84,10 @@ where fn intercept_incoming( &self, subsystem_sender: &mut Sender, - msg: FromOverseer, - ) -> Option> { + msg: FromOrchestra, + ) -> Option> { match msg { - FromOverseer::Communication { + FromOrchestra::Communication { msg: CandidateBackingMessage::Second(relay_parent, candidate, _pov), } => { gum::debug!( @@ -204,14 +208,14 @@ where .map .insert(malicious_candidate_hash, candidate.hash()); - let message = FromOverseer::Communication { + let message = FromOrchestra::Communication { msg: CandidateBackingMessage::Second(relay_parent, malicious_candidate, pov), }; Some(message) }, - FromOverseer::Communication { msg } => Some(FromOverseer::Communication { msg }), - FromOverseer::Signal(signal) => Some(FromOverseer::Signal(signal)), + FromOrchestra::Communication { msg } => Some(FromOrchestra::Communication { msg }), + FromOrchestra::Signal(signal) => Some(FromOrchestra::Signal(signal)), } } @@ -245,7 +249,7 @@ impl OverseerGen for BackGarbageCandidateWrapper { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer>, OverseerHandle), Error> + ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, @@ -254,12 +258,12 @@ impl OverseerGen for BackGarbageCandidateWrapper { let inner = Inner { map: std::collections::HashMap::new() }; let inner_mut = Arc::new(Mutex::new(inner)); let note_candidate = - NoteCandidate { inner: inner_mut.clone(), spawner: args.spawner.clone() }; + NoteCandidate { inner: inner_mut.clone(), spawner: SpawnGlue(args.spawner.clone()) }; let validation_filter = ReplaceValidationResult::new( FakeCandidateValidation::BackingAndApprovalValid, FakeCandidateValidationError::InvalidOutputs, - args.spawner.clone(), + SpawnGlue(args.spawner.clone()), ); prepared_overseer_builder(args)? diff --git a/node/metered-channel/Cargo.toml b/node/metered-channel/Cargo.toml index 8d9772573c60..f306f07eeeaf 100644 --- a/node/metered-channel/Cargo.toml +++ b/node/metered-channel/Cargo.toml @@ -1,15 +1,17 @@ [package] -name = "metered-channel" -version = "0.9.22" +name = "prioritized-metered-channel" +version = "0.2.0" authors = ["Parity Technologies "] edition = "2021" -description = "Channels with attached Meters" +description = "Channels with built-in observability and message priorizitazion (coming soon™)" +repository = "https://github.com/paritytech/polkadot.git" +license = "MIT OR Apache-2.0" [dependencies] futures = "0.3.21" futures-timer = "3.0.2" derive_more = "0.99" -gum = { package = "tracing-gum", path = "../gum" } +tracing = "0.1.34" thiserror = "1.0.31" crossbeam-queue = "0.3.5" nanorand = { version = "0.7.0", default-features = false, features = ["wyrand"] } diff --git a/node/metered-channel/src/oneshot.rs b/node/metered-channel/src/oneshot.rs index 520531beabd4..23cb548747b2 100644 --- a/node/metered-channel/src/oneshot.rs +++ b/node/metered-channel/src/oneshot.rs @@ -225,7 +225,7 @@ impl Future for MeteredReceiver { .get_or_insert_with(move || Delay::new(soft_timeout).fuse()); if Pin::new(soft_timeout).poll(ctx).is_ready() { - gum::warn!("Oneshot `{name}` exceeded the soft threshold", name = &self.name); + tracing::warn!(target: "oneshot", "Oneshot `{name}` exceeded the soft threshold", name = &self.name); } let hard_timeout = self.hard_timeout.clone().into(); diff --git a/node/metrics/Cargo.toml b/node/metrics/Cargo.toml index f657084a25b0..e9aa896e73e6 100644 --- a/node/metrics/Cargo.toml +++ b/node/metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-metrics" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Subsystem metric helpers" @@ -10,7 +10,7 @@ futures = "0.3.21" futures-timer = "3.0.2" gum = { package = "tracing-gum", path = "../gum" } -metered-channel = { path = "../metered-channel" } +metered = { package = "prioritized-metered-channel", path = "../metered-channel" , "version" = "0.2.0" } # Both `sc-service` and `sc-cli` are required by runtime metrics `logger_hook()`. sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -27,7 +27,7 @@ log = "0.4.17" assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" -hyper = { version = "0.14.18", default-features = false, features = ["http1", "tcp"] } +hyper = { version = "0.14.19", default-features = false, features = ["http1", "tcp"] } tokio = "1.18.2" polkadot-test-service = { path = "../test/service", features=["runtime-metrics"]} substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/metrics/src/lib.rs b/node/metrics/src/lib.rs index 0390788dde17..3c00272981ca 100644 --- a/node/metrics/src/lib.rs +++ b/node/metrics/src/lib.rs @@ -24,7 +24,7 @@ #![deny(missing_docs)] #![deny(unused_imports)] -pub use metered_channel as metered; +pub use metered; /// Cyclic metric collection support. pub mod metronome; diff --git a/node/network/approval-distribution/Cargo.toml b/node/network/approval-distribution/Cargo.toml index b1591f580c7d..e71e8aecc125 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-approval-distribution" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/network/approval-distribution/src/lib.rs b/node/network/approval-distribution/src/lib.rs index 39a5c75420ce..900fd5339dcb 100644 --- a/node/network/approval-distribution/src/lib.rs +++ b/node/network/approval-distribution/src/lib.rs @@ -34,7 +34,7 @@ use polkadot_node_subsystem::{ ApprovalCheckResult, ApprovalDistributionMessage, ApprovalVotingMessage, AssignmentCheckResult, NetworkBridgeEvent, NetworkBridgeMessage, }, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_primitives::v2::{ BlockNumber, CandidateIndex, Hash, SessionIndex, ValidatorIndex, ValidatorSignature, @@ -1617,9 +1617,9 @@ impl ApprovalDistribution { }, }; match message { - FromOverseer::Communication { msg } => + FromOrchestra::Communication { msg } => Self::handle_incoming(&mut ctx, state, msg, &self.metrics, rng).await, - FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { .. })) => { gum::trace!(target: LOG_TARGET, "active leaves signal (ignored)"); @@ -1627,11 +1627,11 @@ impl ApprovalDistribution { // are those that are available, but not finalized yet // actived and deactivated heads hence are irrelevant to this subsystem }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(_hash, number)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_hash, number)) => { gum::trace!(target: LOG_TARGET, number = %number, "finalized signal"); state.handle_block_finalized(&mut ctx, &self.metrics, number).await; }, - FromOverseer::Signal(OverseerSignal::Conclude) => return, + FromOrchestra::Signal(OverseerSignal::Conclude) => return, } } } diff --git a/node/network/approval-distribution/src/tests.rs b/node/network/approval-distribution/src/tests.rs index 2693cbd8bc66..8a46d565bd17 100644 --- a/node/network/approval-distribution/src/tests.rs +++ b/node/network/approval-distribution/src/tests.rs @@ -63,7 +63,7 @@ fn test_harness>( async move { let mut overseer = test_fut.await; overseer - .send(FromOverseer::Signal(OverseerSignal::Conclude)) + .send(FromOrchestra::Signal(OverseerSignal::Conclude)) .timeout(TIMEOUT) .await .expect("Conclude send timeout"); @@ -80,7 +80,7 @@ const TIMEOUT: Duration = Duration::from_millis(200); async fn overseer_send(overseer: &mut VirtualOverseer, msg: ApprovalDistributionMessage) { gum::trace!(msg = ?msg, "Sending message"); overseer - .send(FromOverseer::Communication { msg }) + .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await .expect("msg send timeout"); @@ -90,7 +90,7 @@ async fn overseer_signal_block_finalized(overseer: &mut VirtualOverseer, number: gum::trace!(?number, "Sending a finalized signal"); // we don't care about the block hash overseer - .send(FromOverseer::Signal(OverseerSignal::BlockFinalized(Hash::zero(), number))) + .send(FromOrchestra::Signal(OverseerSignal::BlockFinalized(Hash::zero(), number))) .timeout(TIMEOUT) .await .expect("signal send timeout"); diff --git a/node/network/availability-distribution/Cargo.toml b/node/network/availability-distribution/Cargo.toml index fb804ced295e..b21bac374407 100644 --- a/node/network/availability-distribution/Cargo.toml +++ b/node/network/availability-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-availability-distribution" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -19,7 +19,7 @@ sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "maste thiserror = "1.0.31" rand = "0.8.5" derive_more = "0.99.17" -lru = "0.7.5" +lru = "0.7.7" fatality = "0.0.6" [dev-dependencies] diff --git a/node/network/availability-distribution/src/lib.rs b/node/network/availability-distribution/src/lib.rs index 392b3a8dfd3b..3faaa80ce835 100644 --- a/node/network/availability-distribution/src/lib.rs +++ b/node/network/availability-distribution/src/lib.rs @@ -20,7 +20,7 @@ use sp_keystore::SyncCryptoStorePtr; use polkadot_node_network_protocol::request_response::{v1, IncomingRequestReceiver}; use polkadot_node_subsystem::{ - messages::AvailabilityDistributionMessage, overseer, FromOverseer, OverseerSignal, + messages::AvailabilityDistributionMessage, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; @@ -134,7 +134,7 @@ impl AvailabilityDistributionSubsystem { }, }; match message { - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { log_error( requester .get_mut() @@ -143,9 +143,9 @@ impl AvailabilityDistributionSubsystem { "Error in Requester::update_fetching_heads", )?; }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}, - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOverseer::Communication { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}, + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Communication { msg: AvailabilityDistributionMessage::FetchPoV { relay_parent, diff --git a/node/network/availability-distribution/src/requester/tests.rs b/node/network/availability-distribution/src/requester/tests.rs index 64e695530b68..9fd738a04388 100644 --- a/node/network/availability-distribution/src/requester/tests.rs +++ b/node/network/availability-distribution/src/requester/tests.rs @@ -19,18 +19,20 @@ use std::{future::Future, sync::Arc}; use futures::FutureExt; use polkadot_node_network_protocol::jaeger; -use polkadot_node_primitives::{BlockData, ErasureChunk, PoV, SpawnNamed}; +use polkadot_node_primitives::{BlockData, ErasureChunk, PoV}; use polkadot_node_subsystem_util::runtime::RuntimeInfo; use polkadot_primitives::v2::{ - BlockNumber, CoreState, GroupIndex, Hash, Id, ScheduledCore, SessionIndex, SessionInfo, + BlockNumber, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionIndex, + SessionInfo, }; +use sp_core::traits::SpawnNamed; use polkadot_node_subsystem::{ messages::{ AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage, NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, }, - ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, + ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; use polkadot_node_subsystem_test_helpers::{ make_subsystem_context, mock::make_ferdie_keystore, TestSubsystemContext, @@ -117,7 +119,7 @@ fn spawn_virtual_overseer( .expect("Receiver should be alive."); }, RuntimeApiRequest::AvailabilityCores(tx) => { - let para_id = Id::from(1); + let para_id = ParaId::from(1_u32); let maybe_block_position = test_state.relay_chain.iter().position(|h| *h == hash); let cores = match maybe_block_position { @@ -173,7 +175,9 @@ fn spawn_virtual_overseer( fn test_harness>( test_state: TestState, - test_fx: impl FnOnce(TestSubsystemContext) -> T, + test_fx: impl FnOnce( + TestSubsystemContext>, + ) -> T, ) { let pool = TaskExecutor::new(); let (ctx, ctx_handle) = make_subsystem_context(pool.clone()); diff --git a/node/network/availability-distribution/src/tests/state.rs b/node/network/availability-distribution/src/tests/state.rs index 2659eafcbb13..140713b9c4aa 100644 --- a/node/network/availability-distribution/src/tests/state.rs +++ b/node/network/availability-distribution/src/tests/state.rs @@ -44,7 +44,7 @@ use polkadot_node_subsystem::{ AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage, NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, }, - ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, + ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, }; use polkadot_node_subsystem_test_helpers as test_helpers; use polkadot_primitives::v2::{ @@ -295,12 +295,14 @@ impl TestState { } async fn overseer_signal( - mut tx: SingleItemSink>, + mut tx: SingleItemSink>, msg: impl Into, ) { let msg = msg.into(); gum::trace!(target: LOG_TARGET, msg = ?msg, "sending message"); - tx.send(FromOverseer::Signal(msg)).await.expect("Test subsystem no longer live"); + tx.send(FromOrchestra::Signal(msg)) + .await + .expect("Test subsystem no longer live"); } async fn overseer_recv(rx: &mut mpsc::UnboundedReceiver) -> AllMessages { diff --git a/node/network/availability-recovery/Cargo.toml b/node/network/availability-recovery/Cargo.toml index 287bb2630873..91564ae81bfd 100644 --- a/node/network/availability-recovery/Cargo.toml +++ b/node/network/availability-recovery/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "polkadot-availability-recovery" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" [dependencies] futures = "0.3.21" -lru = "0.7.5" +lru = "0.7.7" rand = "0.8.5" fatality = "0.0.6" thiserror = "1.0.31" diff --git a/node/network/availability-recovery/src/lib.rs b/node/network/availability-recovery/src/lib.rs index c23397975b55..1d50dcfef5cb 100644 --- a/node/network/availability-recovery/src/lib.rs +++ b/node/network/availability-recovery/src/lib.rs @@ -51,7 +51,7 @@ use polkadot_node_subsystem::{ errors::RecoveryError, jaeger, messages::{AvailabilityRecoveryMessage, AvailabilityStoreMessage, NetworkBridgeMessage}, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_node_subsystem_util::request_session_info; @@ -988,13 +988,13 @@ impl AvailabilityRecoverySubsystem { futures::select! { v = ctx.recv().fuse() => { match v? { - FromOverseer::Signal(signal) => if handle_signal( + FromOrchestra::Signal(signal) => if handle_signal( &mut state, signal, ).await? { return Ok(()); } - FromOverseer::Communication { msg } => { + FromOrchestra::Communication { msg } => { match msg { AvailabilityRecoveryMessage::RecoverAvailableData( receipt, diff --git a/node/network/availability-recovery/src/tests.rs b/node/network/availability-recovery/src/tests.rs index 2aa5723a6900..3a19c07e1082 100644 --- a/node/network/availability-recovery/src/tests.rs +++ b/node/network/availability-recovery/src/tests.rs @@ -124,7 +124,7 @@ async fn overseer_signal( ) { delay!(50); overseer - .send(FromOverseer::Signal(signal)) + .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await .expect("10ms is more than enough for sending signals."); @@ -136,7 +136,7 @@ async fn overseer_send( ) { gum::trace!(msg = ?msg, "sending message"); overseer - .send(FromOverseer::Communication { msg }) + .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await .expect("10ms is more than enough for sending messages."); diff --git a/node/network/bitfield-distribution/Cargo.toml b/node/network/bitfield-distribution/Cargo.toml index 1fe9d973acf2..e79c72c4f575 100644 --- a/node/network/bitfield-distribution/Cargo.toml +++ b/node/network/bitfield-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-availability-bitfield-distribution" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/network/bitfield-distribution/src/lib.rs b/node/network/bitfield-distribution/src/lib.rs index feba3344467d..06bad64911b1 100644 --- a/node/network/bitfield-distribution/src/lib.rs +++ b/node/network/bitfield-distribution/src/lib.rs @@ -32,7 +32,7 @@ use polkadot_node_network_protocol::{ v1 as protocol_v1, OurView, PeerId, UnifiedReputationChange as Rep, Versioned, View, }; use polkadot_node_subsystem::{ - jaeger, messages::*, overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, PerLeafSpan, + jaeger, messages::*, overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_node_subsystem_util::{self as util}; @@ -202,7 +202,7 @@ impl BitfieldDistribution { }, }; match message { - FromOverseer::Communication { + FromOrchestra::Communication { msg: BitfieldDistributionMessage::DistributeBitfield( relay_parent, @@ -220,14 +220,14 @@ impl BitfieldDistribution { ) .await; }, - FromOverseer::Communication { + FromOrchestra::Communication { msg: BitfieldDistributionMessage::NetworkBridgeUpdate(event), } => { gum::trace!(target: LOG_TARGET, "Processing NetworkMessage"); // a network message was received handle_network_msg(&mut ctx, state, &self.metrics, event, rng).await; }, - FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated, .. })) => { @@ -260,10 +260,10 @@ impl BitfieldDistribution { } } }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(hash, number)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash, number)) => { gum::trace!(target: LOG_TARGET, ?hash, %number, "block finalized"); }, - FromOverseer::Signal(OverseerSignal::Conclude) => { + FromOrchestra::Signal(OverseerSignal::Conclude) => { gum::info!(target: LOG_TARGET, "Conclude"); return }, diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index d625c7e94f17..f5b58becf172 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-network-bridge" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/network/bridge/src/lib.rs b/node/network/bridge/src/lib.rs index e11d3500487a..f10f7fa5b67a 100644 --- a/node/network/bridge/src/lib.rs +++ b/node/network/bridge/src/lib.rs @@ -42,9 +42,9 @@ use polkadot_node_subsystem::{ GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeMessage, StatementDistributionMessage, }, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, }; -use polkadot_overseer::gen::OverseerError; +use polkadot_overseer::gen::OrchestraError as OverseerError; use polkadot_primitives::v2::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex}; /// Peer set info for network initialization. @@ -208,7 +208,7 @@ where loop { futures::select! { msg = ctx.recv().fuse() => match msg { - Ok(FromOverseer::Signal(OverseerSignal::ActiveLeaves(active_leaves))) => { + Ok(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(active_leaves))) => { let ActiveLeavesUpdate { activated, deactivated } = active_leaves; gum::trace!( target: LOG_TARGET, @@ -248,7 +248,7 @@ where } } } - Ok(FromOverseer::Signal(OverseerSignal::BlockFinalized(_hash, number))) => { + Ok(FromOrchestra::Signal(OverseerSignal::BlockFinalized(_hash, number))) => { gum::trace!( target: LOG_TARGET, action = "BlockFinalized" @@ -261,10 +261,10 @@ where // that we never send the same `ActiveLeavesUpdate` finalized_number = number; } - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => { + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => { return Ok(()); } - Ok(FromOverseer::Communication { msg }) => match msg { + Ok(FromOrchestra::Communication { msg }) => match msg { NetworkBridgeMessage::ReportPeer(peer, rep) => { if !rep.is_benefit() { gum::debug!( diff --git a/node/network/bridge/src/tests.rs b/node/network/bridge/src/tests.rs index 09c7f270c11f..80929580d165 100644 --- a/node/network/bridge/src/tests.rs +++ b/node/network/bridge/src/tests.rs @@ -37,7 +37,7 @@ use polkadot_node_subsystem::{ AllMessages, ApprovalDistributionMessage, BitfieldDistributionMessage, GossipSupportMessage, StatementDistributionMessage, }, - ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, + ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, }; use polkadot_node_subsystem_test_helpers::{ SingleItemSink, SingleItemStream, TestSubsystemContextHandle, @@ -303,7 +303,7 @@ fn test_harness>( let _ = executor::block_on(future::join( async move { let mut virtual_overseer = test_fut.await; - virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }, network_bridge, )); @@ -367,7 +367,7 @@ fn send_our_view_upon_connection() { let head = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: head, number: 1, @@ -418,7 +418,7 @@ fn sends_view_updates_to_peers() { let peer_b = PeerId::random(); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated: Default::default(), deactivated: Default::default(), }))) @@ -450,7 +450,7 @@ fn sends_view_updates_to_peers() { let hash_a = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -518,7 +518,7 @@ fn do_not_send_view_update_until_synced() { let hash_b = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -534,7 +534,7 @@ fn do_not_send_view_update_until_synced() { handle.set_done(); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_b, number: 1, @@ -589,19 +589,21 @@ fn do_not_send_view_update_when_only_finalized_block_changed() { let hash_a = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::BlockFinalized(Hash::random(), 5))) + .send(FromOrchestra::Signal(OverseerSignal::BlockFinalized(Hash::random(), 5))) .await; // Send some empty active leaves update // // This should not trigger a view update to our peers. virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::default()))) + .send(FromOrchestra::Signal( + OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::default()), + )) .await; // This should trigger the view update to our peers. virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -797,7 +799,7 @@ fn peer_disconnect_from_just_one_peerset() { let hash_a = Hash::repeat_byte(1); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -1009,10 +1011,10 @@ fn sent_views_include_finalized_number_update() { let hash_b = Hash::repeat_byte(2); virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::BlockFinalized(hash_a, 1))) + .send(FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash_a, 1))) .await; virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_b, number: 1, @@ -1139,7 +1141,7 @@ fn send_messages_to_peers() { ); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: NetworkBridgeMessage::SendValidationMessage( vec![peer.clone()], Versioned::V1(message_v1.clone()), @@ -1170,7 +1172,7 @@ fn send_messages_to_peers() { protocol_v1::CollationProtocol::CollatorProtocol(collator_protocol_message.clone()); virtual_overseer - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: NetworkBridgeMessage::SendCollationMessage( vec![peer.clone()], Versioned::V1(message_v1.clone()), @@ -1204,7 +1206,7 @@ fn our_view_updates_decreasing_order_and_limited_to_max() { // These are in reverse order, so the subsystem must sort internally to // get the correct view. virtual_overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash, number: i as _, diff --git a/node/network/collator-protocol/Cargo.toml b/node/network/collator-protocol/Cargo.toml index 423f13590d5a..46a4f9800602 100644 --- a/node/network/collator-protocol/Cargo.toml +++ b/node/network/collator-protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-collator-protocol" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index 767d05aba357..66b404551c52 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -41,7 +41,7 @@ use polkadot_node_subsystem::{ messages::{ CollatorProtocolMessage, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage, }, - overseer, FromOverseer, OverseerSignal, PerLeafSpan, + overseer, FromOrchestra, OverseerSignal, PerLeafSpan, }; use polkadot_node_subsystem_util::{ metrics::{self, prometheus}, @@ -1012,15 +1012,15 @@ pub(crate) async fn run( pin_mut!(recv_req); select! { msg = ctx.recv().fuse() => match msg.map_err(FatalError::SubsystemReceive)? { - FromOverseer::Communication { msg } => { + FromOrchestra::Communication { msg } => { log_error( process_msg(&mut ctx, &mut runtime, &mut state, msg).await, "Failed to process message" )?; }, - FromOverseer::Signal(ActiveLeaves(_update)) => {} - FromOverseer::Signal(BlockFinalized(..)) => {} - FromOverseer::Signal(Conclude) => return Ok(()), + FromOrchestra::Signal(ActiveLeaves(_update)) => {} + FromOrchestra::Signal(BlockFinalized(..)) => {} + FromOrchestra::Signal(Conclude) => return Ok(()), }, (relay_parent, peer_id) = state.active_collation_fetches.select_next_some() => { let next = if let Some(waiting) = state.waiting_collation_fetches.get_mut(&relay_parent) { diff --git a/node/network/collator-protocol/src/collator_side/tests.rs b/node/network/collator-protocol/src/collator_side/tests.rs index f2c4c37a7f2d..41cabb39a600 100644 --- a/node/network/collator-protocol/src/collator_side/tests.rs +++ b/node/network/collator-protocol/src/collator_side/tests.rs @@ -228,7 +228,7 @@ const TIMEOUT: Duration = Duration::from_millis(100); async fn overseer_send(overseer: &mut VirtualOverseer, msg: CollatorProtocolMessage) { gum::trace!(?msg, "sending message"); overseer - .send(FromOverseer::Communication { msg }) + .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending messages.", TIMEOUT)); @@ -254,7 +254,7 @@ async fn overseer_recv_with_timeout( async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) { overseer - .send(FromOverseer::Signal(signal)) + .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending signals.", TIMEOUT)); diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 3ebc253edb78..592feaf9124a 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -50,7 +50,7 @@ use polkadot_node_subsystem::{ CandidateBackingMessage, CollatorProtocolMessage, IfDisconnected, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage, }, - overseer, FromOverseer, OverseerSignal, PerLeafSpan, SubsystemSender, + overseer, FromOrchestra, OverseerSignal, PerLeafSpan, SubsystemSender, }; use polkadot_node_subsystem_util::metrics::{self, prometheus}; use polkadot_primitives::v2::{CandidateReceipt, CollatorId, Hash, Id as ParaId}; @@ -1206,7 +1206,7 @@ pub(crate) async fn run( select! { res = ctx.recv().fuse() => { match res { - Ok(FromOverseer::Communication { msg }) => { + Ok(FromOrchestra::Communication { msg }) => { gum::trace!(target: LOG_TARGET, msg = ?msg, "received a message"); process_msg( &mut ctx, @@ -1215,8 +1215,8 @@ pub(crate) async fn run( &mut state, ).await; } - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) | Err(_) => break, - Ok(FromOverseer::Signal(_)) => continue, + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) | Err(_) => break, + Ok(FromOrchestra::Signal(_)) => continue, } } _ = next_inactivity_stream.next() => { diff --git a/node/network/collator-protocol/src/validator_side/tests.rs b/node/network/collator-protocol/src/validator_side/tests.rs index 6227b30551a4..77c209361422 100644 --- a/node/network/collator-protocol/src/validator_side/tests.rs +++ b/node/network/collator-protocol/src/validator_side/tests.rs @@ -168,7 +168,7 @@ const TIMEOUT: Duration = Duration::from_millis(200); async fn overseer_send(overseer: &mut VirtualOverseer, msg: CollatorProtocolMessage) { gum::trace!("Sending message:\n{:?}", &msg); overseer - .send(FromOverseer::Communication { msg }) + .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await .expect(&format!("{:?} is enough for sending messages.", TIMEOUT)); @@ -194,7 +194,7 @@ async fn overseer_recv_with_timeout( async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) { overseer - .send(FromOverseer::Signal(signal)) + .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await .expect(&format!("{:?} is more than enough for sending signals.", TIMEOUT)); diff --git a/node/network/dispute-distribution/Cargo.toml b/node/network/dispute-distribution/Cargo.toml index 39122164c4f2..58eb2e0ef5a9 100644 --- a/node/network/dispute-distribution/Cargo.toml +++ b/node/network/dispute-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-dispute-distribution" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -20,7 +20,7 @@ sp-application-crypto = { git = "https://github.com/paritytech/substrate", branc sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" fatality = "0.0.6" -lru = "0.7.5" +lru = "0.7.7" [dev-dependencies] async-trait = "0.1.53" diff --git a/node/network/dispute-distribution/src/lib.rs b/node/network/dispute-distribution/src/lib.rs index 3b195aa7b3e7..aefd66e0ae79 100644 --- a/node/network/dispute-distribution/src/lib.rs +++ b/node/network/dispute-distribution/src/lib.rs @@ -32,8 +32,8 @@ use sp_keystore::SyncCryptoStorePtr; use polkadot_node_network_protocol::request_response::{incoming::IncomingRequestReceiver, v1}; use polkadot_node_primitives::DISPUTE_WINDOW; use polkadot_node_subsystem::{ - messages::DisputeDistributionMessage, overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, - SubsystemError, + messages::DisputeDistributionMessage, overseer, FromOrchestra, OverseerSignal, + SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util::{runtime, runtime::RuntimeInfo}; @@ -177,17 +177,17 @@ where match message { MuxedMessage::Subsystem(result) => { let result = match result? { - FromOverseer::Signal(signal) => { + FromOrchestra::Signal(signal) => { match self.handle_signals(&mut ctx, signal).await { Ok(SignalResult::Conclude) => return Ok(()), Ok(SignalResult::Continue) => Ok(()), Err(f) => Err(f), } }, - FromOverseer::Communication { msg } => + FromOrchestra::Communication { msg } => self.handle_subsystem_message(&mut ctx, msg).await, }; - log_error(result, "on FromOverseer")?; + log_error(result, "on FromOrchestra")?; }, MuxedMessage::Sender(result) => { self.disputes_sender @@ -232,7 +232,7 @@ where #[derive(Debug)] enum MuxedMessage { /// Messages from other subsystems. - Subsystem(FatalResult>), + Subsystem(FatalResult>), /// Messages from spawned sender background tasks. Sender(Option), } diff --git a/node/network/dispute-distribution/src/tests/mod.rs b/node/network/dispute-distribution/src/tests/mod.rs index 3a294e1a34ef..dd9cd1da9420 100644 --- a/node/network/dispute-distribution/src/tests/mod.rs +++ b/node/network/dispute-distribution/src/tests/mod.rs @@ -46,7 +46,7 @@ use polkadot_node_subsystem::{ AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, }, - ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, Span, + ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, Span, }; use polkadot_node_subsystem_test_helpers::{ mock::make_ferdie_keystore, subsystem_test_harness, TestSubsystemContextHandle, @@ -74,7 +74,7 @@ fn send_dispute_sends_dispute() { let candidate = make_candidate_receipt(relay_parent); let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeDistributionMessage::SendDispute(message.clone()), }) .await; @@ -315,7 +315,7 @@ fn send_dispute_gets_cleaned_up() { let candidate = make_candidate_receipt(relay_parent); let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeDistributionMessage::SendDispute(message.clone()), }) .await; @@ -380,7 +380,7 @@ fn dispute_retries_and_works_across_session_boundaries() { let candidate = make_candidate_receipt(relay_parent); let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: DisputeDistributionMessage::SendDispute(message.clone()), }) .await; @@ -588,7 +588,7 @@ async fn conclude(handle: &mut TestSubsystemContextHandle"] edition = "2021" diff --git a/node/network/gossip-support/src/lib.rs b/node/network/gossip-support/src/lib.rs index bd323b3fe96e..1cebcc64f78e 100644 --- a/node/network/gossip-support/src/lib.rs +++ b/node/network/gossip-support/src/lib.rs @@ -48,7 +48,7 @@ use polkadot_node_subsystem::{ GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, }, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; use polkadot_node_subsystem_util as util; use polkadot_primitives::v2::{ @@ -164,10 +164,10 @@ where } ); match message { - FromOverseer::Communication { + FromOrchestra::Communication { msg: GossipSupportMessage::NetworkBridgeUpdate(ev), } => self.handle_connect_disconnect(ev), - FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated, .. })) => { @@ -178,8 +178,8 @@ where gum::debug!(target: LOG_TARGET, error = ?e); } }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(_hash, _number)) => {}, - FromOverseer::Signal(OverseerSignal::Conclude) => return self, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_hash, _number)) => {}, + FromOrchestra::Signal(OverseerSignal::Conclude) => return self, } } } @@ -256,12 +256,9 @@ where } } - // Gossip topology is only relevant for authorities in the current session. - let our_index = - ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys).await?; - if is_new_session { - self.update_authority_status_metrics(&session_info).await; + // Gossip topology is only relevant for authorities in the current session. + let our_index = self.get_key_index_and_update_metrics(&session_info).await?; update_gossip_topology( sender, @@ -277,35 +274,45 @@ where Ok(()) } - async fn update_authority_status_metrics(&mut self, session_info: &SessionInfo) { - let maybe_index = - match ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys).await { - Ok(index) => { - self.metrics.on_is_authority(); - Some(index) - }, - Err(util::Error::NotAValidator) => { - self.metrics.on_is_not_authority(); + // Checks if the node is an authority and also updates `polkadot_node_is_authority` and + // `polkadot_node_is_parachain_validator` metrics accordingly. + // On success, returns the index of our keys in `session_info.discovery_keys`. + async fn get_key_index_and_update_metrics( + &mut self, + session_info: &SessionInfo, + ) -> Result { + let authority_check_result = + ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys).await; + + match authority_check_result.as_ref() { + Ok(index) => { + gum::trace!(target: LOG_TARGET, "We are now an authority",); + self.metrics.on_is_authority(); + + // The subset of authorities participating in parachain consensus. + let parachain_validators_this_session = session_info.validators.len(); + + // First `maxValidators` entries are the parachain validators. We'll check + // if our index is in this set to avoid searching for the keys. + // https://github.com/paritytech/polkadot/blob/a52dca2be7840b23c19c153cf7e110b1e3e475f8/runtime/parachains/src/configuration.rs#L148 + if *index < parachain_validators_this_session { + gum::trace!(target: LOG_TARGET, "We are now a parachain validator",); + self.metrics.on_is_parachain_validator(); + } else { + gum::trace!(target: LOG_TARGET, "We are no longer a parachain validator",); self.metrics.on_is_not_parachain_validator(); - None - }, - // Don't update on runtime errors. - Err(_) => None, - }; - - if let Some(validator_index) = maybe_index { - // The subset of authorities participating in parachain consensus. - let parachain_validators_this_session = session_info.validators.len(); - - // First `maxValidators` entries are the parachain validators. We'll check - // if our index is in this set to avoid searching for the keys. - // https://github.com/paritytech/polkadot/blob/a52dca2be7840b23c19c153cf7e110b1e3e475f8/runtime/parachains/src/configuration.rs#L148 - if validator_index < parachain_validators_this_session { - self.metrics.on_is_parachain_validator(); - } else { + } + }, + Err(util::Error::NotAValidator) => { + gum::trace!(target: LOG_TARGET, "We are no longer an authority",); + self.metrics.on_is_not_authority(); self.metrics.on_is_not_parachain_validator(); - } - } + }, + // Don't update on runtime errors. + Err(_) => {}, + }; + + authority_check_result } async fn issue_connection_request( diff --git a/node/network/gossip-support/src/tests.rs b/node/network/gossip-support/src/tests.rs index 72c1dff85ad6..dbe44ea835d0 100644 --- a/node/network/gossip-support/src/tests.rs +++ b/node/network/gossip-support/src/tests.rs @@ -179,7 +179,7 @@ fn test_harness, AD: AuthorityDiscovery>( async move { let mut overseer = test_fut.await; overseer - .send(FromOverseer::Signal(OverseerSignal::Conclude)) + .send(FromOrchestra::Signal(OverseerSignal::Conclude)) .timeout(TIMEOUT) .await .expect("Conclude send timeout"); @@ -199,7 +199,7 @@ async fn overseer_signal_active_leaves(overseer: &mut VirtualOverseer, leaf: Has span: Arc::new(jaeger::Span::Disabled), }; overseer - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work( leaf, )))) .timeout(TIMEOUT) diff --git a/node/network/protocol/Cargo.toml b/node/network/protocol/Cargo.toml index f3a2dae4f007..a6554d048ba0 100644 --- a/node/network/protocol/Cargo.toml +++ b/node/network/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-network-protocol" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Primitives types for the Node-side" diff --git a/node/network/statement-distribution/Cargo.toml b/node/network/statement-distribution/Cargo.toml index a5d2001ed639..8e997d42bd93 100644 --- a/node/network/statement-distribution/Cargo.toml +++ b/node/network/statement-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-statement-distribution" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Statement Distribution Subsystem" edition = "2021" @@ -16,7 +16,7 @@ polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-network-protocol = { path = "../../network/protocol" } arrayvec = "0.5.2" -indexmap = "1.8.1" +indexmap = "1.9.0" parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } thiserror = "1.0.31" fatality = "0.0.6" diff --git a/node/network/statement-distribution/src/lib.rs b/node/network/statement-distribution/src/lib.rs index 00759fd9e95d..2abb765f392b 100644 --- a/node/network/statement-distribution/src/lib.rs +++ b/node/network/statement-distribution/src/lib.rs @@ -42,7 +42,7 @@ use polkadot_node_subsystem::{ CandidateBackingMessage, NetworkBridgeEvent, NetworkBridgeMessage, StatementDistributionMessage, }, - overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, PerLeafSpan, SpawnedSubsystem, + overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem, SubsystemError, }; use polkadot_primitives::v2::{ @@ -620,7 +620,7 @@ struct FetchingInfo { /// Messages to be handled in this subsystem. enum MuxedMessage { /// Messages from other subsystems. - Subsystem(FatalResult>), + Subsystem(FatalResult>), /// Messages from spawned requester background tasks. Requester(Option), /// Messages from spawned responder background task. @@ -1978,12 +1978,12 @@ impl StatementDistributionSubsystem { active_heads: &mut HashMap, recent_outdated_heads: &mut RecentOutdatedHeads, req_sender: &mpsc::Sender, - message: FromOverseer, + message: FromOrchestra, ) -> Result { let metrics = &self.metrics; match message { - FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { activated, deactivated, })) => { @@ -2025,11 +2025,11 @@ impl StatementDistributionSubsystem { )); } }, - FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => { + FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => { // do nothing }, - FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(true), - FromOverseer::Communication { msg } => match msg { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(true), + FromOrchestra::Communication { msg } => match msg { StatementDistributionMessage::Share(relay_parent, statement) => { let _timer = metrics.time_share(); diff --git a/node/network/statement-distribution/src/tests.rs b/node/network/statement-distribution/src/tests.rs index a7405d329971..9f5b4f6de326 100644 --- a/node/network/statement-distribution/src/tests.rs +++ b/node/network/statement-distribution/src/tests.rs @@ -739,7 +739,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { let test_fut = async move { // register our active heads. handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -773,7 +773,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { // notify of peers and view handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected(peer_a.clone(), ObservedRole::Full, 1, None), ), @@ -781,7 +781,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected(peer_b.clone(), ObservedRole::Full, 1, None), ), @@ -789,7 +789,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_a.clone(), view![hash_a]), ), @@ -797,7 +797,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_b.clone(), view![hash_a]), ), @@ -832,7 +832,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { }; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_a.clone(), @@ -874,7 +874,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { assert_eq!(s, statement.into()); } ); - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::pin_mut!(test_fut); @@ -932,7 +932,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( let test_fut = async move { // register our active heads. handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -966,7 +966,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // notify of peers and view handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_a.clone(), @@ -979,7 +979,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_b.clone(), @@ -991,7 +991,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_c.clone(), @@ -1003,7 +1003,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_bad.clone(), @@ -1016,7 +1016,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_a.clone(), view![hash_a]), ), @@ -1024,21 +1024,21 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_b.clone(), view![hash_a]), ), }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_c.clone(), view![hash_a]), ), }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_bad.clone(), view![hash_a]), ), @@ -1076,7 +1076,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( let metadata = derive_metadata_assuming_seconded(hash_a, statement.clone().into()); handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_a.clone(), @@ -1114,7 +1114,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( Delay::new(Duration::from_millis(20)).await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_c.clone(), @@ -1128,7 +1128,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // Malicious peer: handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_bad.clone(), @@ -1369,7 +1369,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( Decode::decode(&mut response_rx.await.unwrap().result.unwrap().as_ref()).unwrap(); assert_eq!(committed, candidate); - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::pin_mut!(test_fut); @@ -1444,7 +1444,7 @@ fn share_prioritizes_backing_group() { let test_fut = async move { // register our active heads. handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -1479,7 +1479,7 @@ fn share_prioritizes_backing_group() { // notify of dummy peers and view for (peer, pair) in dummy_peers.clone().into_iter().zip(dummy_pairs) { handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer, @@ -1492,7 +1492,7 @@ fn share_prioritizes_backing_group() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer, view![hash_a]), ), @@ -1502,7 +1502,7 @@ fn share_prioritizes_backing_group() { // notify of peers and view handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_a.clone(), @@ -1514,7 +1514,7 @@ fn share_prioritizes_backing_group() { }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_b.clone(), @@ -1526,7 +1526,7 @@ fn share_prioritizes_backing_group() { }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_c.clone(), @@ -1538,7 +1538,7 @@ fn share_prioritizes_backing_group() { }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_bad.clone(), @@ -1550,7 +1550,7 @@ fn share_prioritizes_backing_group() { }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_other_group.clone(), @@ -1563,7 +1563,7 @@ fn share_prioritizes_backing_group() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_a.clone(), view![hash_a]), ), @@ -1571,28 +1571,28 @@ fn share_prioritizes_backing_group() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_b.clone(), view![hash_a]), ), }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_c.clone(), view![hash_a]), ), }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_bad.clone(), view![hash_a]), ), }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_other_group.clone(), view![hash_a]), ), @@ -1630,7 +1630,7 @@ fn share_prioritizes_backing_group() { let metadata = derive_metadata_assuming_seconded(hash_a, statement.clone().into()); handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::Share(hash_a, statement.clone()), }) .await; @@ -1682,7 +1682,7 @@ fn share_prioritizes_backing_group() { Decode::decode(&mut response_rx.await.unwrap().result.unwrap().as_ref()).unwrap(); assert_eq!(committed, candidate); - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::pin_mut!(test_fut); @@ -1738,7 +1738,7 @@ fn peer_cant_flood_with_large_statements() { let test_fut = async move { // register our active heads. handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: hash_a, number: 1, @@ -1772,7 +1772,7 @@ fn peer_cant_flood_with_large_statements() { // notify of peers and view handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer_a.clone(), @@ -1785,7 +1785,7 @@ fn peer_cant_flood_with_large_statements() { .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer_a.clone(), view![hash_a]), ), @@ -1822,7 +1822,7 @@ fn peer_cant_flood_with_large_statements() { for _ in 0..MAX_LARGE_STATEMENTS_PER_SENDER + 1 { handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_a.clone(), @@ -1872,7 +1872,7 @@ fn peer_cant_flood_with_large_statements() { assert!(requested, "large data has not been requested."); assert!(punished, "Peer should have been punished for flooding."); - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::pin_mut!(test_fut); @@ -1943,7 +1943,7 @@ fn handle_multiple_seconded_statements() { let test_fut = async move { // register our active heads. handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( + .send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves( ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: relay_parent_hash, number: 1, @@ -1978,7 +1978,7 @@ fn handle_multiple_seconded_statements() { // notify of peers and view for peer in all_peers.iter() { handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerConnected( peer.clone(), @@ -1990,7 +1990,7 @@ fn handle_multiple_seconded_statements() { }) .await; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerViewChange(peer.clone(), view![relay_parent_hash]), ), @@ -2037,7 +2037,7 @@ fn handle_multiple_seconded_statements() { }; handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::NewGossipTopology(gossip_topology), ), @@ -2073,7 +2073,7 @@ fn handle_multiple_seconded_statements() { // `PeerA` sends a `Seconded` message handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_a.clone(), @@ -2125,7 +2125,7 @@ fn handle_multiple_seconded_statements() { // `PeerB` sends a `Seconded` message: valid but known handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_b.clone(), @@ -2176,7 +2176,7 @@ fn handle_multiple_seconded_statements() { // `PeerA` sends a `Valid` message handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_a.clone(), @@ -2227,7 +2227,7 @@ fn handle_multiple_seconded_statements() { // `PeerB` sends a `Valid` message handle - .send(FromOverseer::Communication { + .send(FromOrchestra::Communication { msg: StatementDistributionMessage::NetworkBridgeUpdate( NetworkBridgeEvent::PeerMessage( peer_b.clone(), @@ -2252,7 +2252,7 @@ fn handle_multiple_seconded_statements() { } ); - handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; + handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; futures::pin_mut!(test_fut); diff --git a/node/orchestra/Cargo.toml b/node/orchestra/Cargo.toml new file mode 100644 index 000000000000..67b16a244ad2 --- /dev/null +++ b/node/orchestra/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "orchestra" +version = "0.0.1" +authors = ["Parity Technologies "] +edition = "2021" +description = "Generate an orchestra of subsystems from a single struct." +repository = "https://github.com/paritytech/polkadot" +license = "MIT OR Apache-2.0" +autoexamples = false + +[dependencies] +tracing = "0.1.34" +futures = "0.3" +async-trait = "0.1" +thiserror = "1" +metered = { package = "prioritized-metered-channel", version = "0.2.0", path = "../metered-channel" } +orchestra-proc-macro = { version = "0.0.1", path = "./proc-macro" } +futures-timer = "3.0.2" +pin-project = "1.0" +dyn-clonable = "0.9" + +[dev-dependencies] +trybuild = "1.0.61" +rustversion = "1.0.6" + + +[[example]] +name = "duo" +crate-type = ["bin"] + +[[example]] +name = "solo" +crate-type = ["bin"] + +[features] +default = [] +expand = ["orchestra-proc-macro/expand"] diff --git a/node/overseer/overseer-gen/README.md b/node/orchestra/README.md similarity index 71% rename from node/overseer/overseer-gen/README.md rename to node/orchestra/README.md index ebce568ce9a5..2cfe4bb0a884 100644 --- a/node/overseer/overseer-gen/README.md +++ b/node/orchestra/README.md @@ -1,6 +1,7 @@ -# overseer pattern +# orchestra -The overseer pattern is a partial actor pattern +The orchestra pattern is a partial actor pattern, with a global orchestrator regarding +relevant work items. ## proc-macro @@ -9,8 +10,8 @@ where at it's core it creates and spawns a set of subsystems, which are purely declarative. ```rust - #[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] - pub struct Overseer { + #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] + pub struct Opera { #[subsystem(MsgA, sends: [MsgB])] sub_a: AwesomeSubSysA, @@ -23,24 +24,25 @@ declarative. being consumed by that particular subsystem. Each of those subsystems is required to implement the subsystem trait with the correct trait bounds. Commonly this is achieved by using `#[subsystem]` and `#[contextbounds]` macro. - * `#[contextbounds(Foo, error=Yikes, prefix=wherethetraitsat)]` can applied to `impl`-blocks and `fn`-blocks. It will add additional trait bounds for the generic `Context` with `Context: FooContextTrait` for `::Sender: FooSenderTrait` besides a few more. Note that `Foo` here references the name of the subsystem as declared in `#[overlord(..)]` macro. + * `#[contextbounds(Foo, error=Yikes, prefix=wherethetraitsat)]` can applied to `impl`-blocks and `fn`-blocks. It will add additional trait bounds for the generic `Context` with `Context: FooContextTrait` for `::Sender: FooSenderTrait` besides a few more. Note that `Foo` here references the name of the subsystem as declared in `#[orchestra(..)]` macro. * `#[subsystem(Foo, error=Yikes, prefix=wherethetraitsat)]` is a extension to the above, implementing `trait Subsystem`. -* `error=` tells the overseer to use the user provided +* `error=` tells the orchestra to use the user provided error type, if not provided a builtin one is used. Note that this is the one error type used throughout all calls, so make sure it does impl `From` for all other error types `E` that are relevant to your application. * `event=` declares an external event type, that injects certain events -into the overseer, without participating in the subsystem pattern. -* `signal=` defines a signal type to be used for the overseer. This is a shared "clock" for all subsystems. +into the orchestra, without participating in the subsystem pattern. +* `signal=` defines a signal type to be used for the orchestra. This is a shared "tick" or "clock" for all subsystems. * `gen=` defines a wrapping `enum` type that is used to wrap all messages that can be consumed by _any_ subsystem. ```rust - /// Execution context, always requred. + /// Execution context, always required. pub struct DummyCtx; - /// Task spawner, always required. + /// Task spawner, always required + /// and must implement `trait orchestra::Spawner`. pub struct DummySpawner; fn main() { - let _overseer = Overseer::builder() + let _orchestra = Opera::builder() .sub_a(AwesomeSubSysA::default()) .sub_b(AwesomeSubSysB::default()) .spawner(DummySpawner) @@ -48,7 +50,7 @@ into the overseer, without participating in the subsystem pattern. } ``` -In the shown `main`, the overseer is created by means of a generated, compile time erroring +In the shown `main`, the orchestra is created by means of a generated, compile time erroring builder pattern. The builder requires all subsystems, baggage fields (additional struct data) and spawner to be @@ -61,11 +63,11 @@ for the specific struct field. Therefore, if you see a compile time error that b not set prior to the `build` call. To exclude subsystems from such a check, one can set `wip` attribute on some subsystem that -is not ready to be included in the Overseer: +is not ready to be included in the Orchestra: ```rust - #[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] - pub struct Overseer { + #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] + pub struct Opera { #[subsystem(MsgA, sends: MsgB)] sub_a: AwesomeSubSysA, @@ -78,13 +80,20 @@ Baggage fields can be initialized more than one time, however, it is not true fo subsystems must be initialized only once (another compile time check) or be _replaced_ by a special setter like method `replace_`. -A task spawner and subsystem context are required to be defined with `SpawnNamed` and respectively `SubsystemContext` implemented. +A task spawner and subsystem context are required to be defined with `Spawner` and respectively `SubsystemContext` implemented. ## Debugging As always, debugging is notoriously annoying with bugged proc-macros. Therefore [`expander`](https://github.com/drahnr/expander) is employed to yield better -error messages. Enable with `--feature=polkadot-overseer-gen/expand` or -`--feature=polkadot-overseer/expand` from the root of the project or -make `"expand"` part of the default feature set. +error messages. Enable with `--feature=orchestra/expand`. + +## License + +Licensed under either of + +* Apache License, Version 2.0, (LICENSE-APACHE or ) +* MIT license (LICENSE-MIT or ) + +at your option. diff --git a/node/overseer/overseer-gen/adr/01-adr.md b/node/orchestra/adr/01-adr.md similarity index 56% rename from node/overseer/overseer-gen/adr/01-adr.md rename to node/orchestra/adr/01-adr.md index 410f5a699b29..3b1cb57eb322 100644 --- a/node/overseer/overseer-gen/adr/01-adr.md +++ b/node/orchestra/adr/01-adr.md @@ -10,12 +10,12 @@ Previously, there was no way to limit and hence reason about a subset of subsyst ## Decision -Annotate the `#[overlord]` inner `#[subsystem(..)]` annotation +Annotate the `#[orchestra]` inner `#[subsystem(..)]` annotation with an aditional set of outgoing messages and enforce this via more fine grained trait bounds on the `Sender` and `::Sender` bounds. ## Consequences -* A graph will be spawn for every compilation under the `OUT_DIR` of the crate where `#[overlord]` is specified. -* Each subsystem has a consuming message which is often referred to as generic `M` (no change on that, is as before), but now we have trait `AssociateOutgoing { type OutgoingMessages = ..; }` which defines an outgoing helper `enum` that is generated with an ident constructed as `${Subsystem}OutgoingMessages` where `${Subsystem}` is the subsystem identifier as used in the overseer declaration. `${Subsystem}OutgoingMessages` is used throughout everywhere to constrain the outgoing messages (commonly referred to as `OutgoingMessage` generic bounded by `${Subsystem}OutgoingMessages: From` or `::OutgoingMessages: From`. It's what allows the construction of the graph and compile time verification. -* `${Subsystem}SenderTrait` and `${Subsystem}ContextTrait` are accumulation traits or wrapper traits, that combine over all annotated M or `OutgoingMessages` from the overseer declaration or their respective outgoing types. It is usage convenience and assures consistency within a subsystem while also maintaining a single source of truth for which messages can be sent by a particular subsystem. Note that this is sidestepped for the test subsystem, which may consume `gen=AllMessages`, the global message wrapper type. +* A graph will be spawn for every compilation under the `OUT_DIR` of the crate where `#[orchestra]` is specified. +* Each subsystem has a consuming message which is often referred to as generic `M` (no change on that, is as before), but now we have trait `AssociateOutgoing { type OutgoingMessages = ..; }` which defines an outgoing helper `enum` that is generated with an ident constructed as `${Subsystem}OutgoingMessages` where `${Subsystem}` is the subsystem identifier as used in the orchestra declaration. `${Subsystem}OutgoingMessages` is used throughout everywhere to constrain the outgoing messages (commonly referred to as `OutgoingMessage` generic bounded by `${Subsystem}OutgoingMessages: From` or `::OutgoingMessages: From`. It's what allows the construction of the graph and compile time verification. +* `${Subsystem}SenderTrait` and `${Subsystem}ContextTrait` are accumulation traits or wrapper traits, that combine over all annotated M or `OutgoingMessages` from the orchestra declaration or their respective outgoing types. It is usage convenience and assures consistency within a subsystem while also maintaining a single source of truth for which messages can be sent by a particular subsystem. Note that this is sidestepped for the test subsystem, which may consume `gen=AllMessages`, the global message wrapper type. * `Job`-based subsystems, being on their way out, are patched, but they now are generic over the `Sender` type, leaking that type. diff --git a/node/orchestra/examples/duo.rs b/node/orchestra/examples/duo.rs new file mode 100644 index 000000000000..7fd465981273 --- /dev/null +++ b/node/orchestra/examples/duo.rs @@ -0,0 +1,106 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![allow(dead_code)] // orchestra events are not used + +//! A dummy to be used with cargo expand + +use orchestra::{self as orchestra, Spawner, *}; +use std::{collections::HashMap, sync::Arc}; +mod misc; + +pub use self::misc::*; + +/// Concrete subsystem implementation for `MsgStrukt` msg type. +#[derive(Default)] +pub struct AwesomeSubSys; + +#[orchestra::subsystem(Awesome, error=Yikes)] +impl AwesomeSubSys { + fn start(self, mut ctx: Context) -> SpawnedSubsystem { + let mut sender = ctx.sender().clone(); + ctx.spawn( + "AwesomeSubsys", + Box::pin(async move { + sender.send_message(Plinko).await; + }), + ) + .unwrap(); + unimplemented!("starting yay!") + } +} + +#[derive(Default)] +pub struct Fortified; + +#[orchestra::subsystem(GoblinTower, error=Yikes)] +impl Fortified { + fn start(self, mut ctx: Context) -> SpawnedSubsystem { + let mut sender = ctx.sender().clone(); + ctx.spawn( + "GoblinTower", + Box::pin(async move { + sender.send_message(MsgStrukt(8u8)).await; + }), + ) + .unwrap(); + unimplemented!("welcum") + } +} + +#[orchestra(signal=SigSigSig, event=EvX, error=Yikes, gen=AllMessages)] +struct Duo { + #[subsystem(consumes: MsgStrukt, sends: [Plinko])] + sub0: Awesome, + + #[subsystem(blocking, consumes: Plinko, sends: [MsgStrukt])] + plinkos: GoblinTower, + + i_like_pi: f64, + i_like_tuple: (f64, f64), + i_like_generic: Arc, + i_like_hash: HashMap<(U, V), Arc>, +} + +fn main() { + use futures::{executor, pin_mut}; + + executor::block_on(async move { + let (orchestra, _handle): (Duo<_, f64, u32, f32, f64>, _) = Duo::builder() + .sub0(AwesomeSubSys::default()) + .plinkos(Fortified::default()) + .i_like_pi(::std::f64::consts::PI) + .i_like_tuple((::std::f64::consts::PI, ::std::f64::consts::PI)) + .i_like_generic(Arc::new(42.0)) + .i_like_hash(HashMap::new()) + .spawner(DummySpawner) + .build() + .unwrap(); + + assert_eq!(orchestra.i_like_pi.floor() as i8, 3); + assert_eq!(orchestra.i_like_generic.floor() as i8, 42); + assert_eq!(orchestra.i_like_hash.len() as i8, 0); + + let orchestra_fut = orchestra + .running_subsystems + .into_future() + .timeout(std::time::Duration::from_millis(300)) + .fuse(); + + pin_mut!(orchestra_fut); + + orchestra_fut.await + }); +} diff --git a/node/overseer/overseer-gen/examples/misc.rs b/node/orchestra/examples/misc.rs similarity index 55% rename from node/overseer/overseer-gen/examples/misc.rs rename to node/orchestra/examples/misc.rs index 87f674e14134..ffd5001d07bd 100644 --- a/node/overseer/overseer-gen/examples/misc.rs +++ b/node/orchestra/examples/misc.rs @@ -1,4 +1,19 @@ -use polkadot_overseer_gen::{SpawnNamed, *}; +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use orchestra::{Spawner, *}; #[derive(Debug, Clone, Copy)] pub enum SigSigSig { @@ -9,7 +24,7 @@ pub enum SigSigSig { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -50,14 +65,14 @@ impl std::fmt::Display for Yikes { impl std::error::Error for Yikes {} -impl From for Yikes { - fn from(_: polkadot_overseer_gen::OverseerError) -> Yikes { +impl From for Yikes { + fn from(_: orchestra::OrchestraError) -> Yikes { Yikes } } -impl From for Yikes { - fn from(_: polkadot_overseer_gen::mpsc::SendError) -> Yikes { +impl From for Yikes { + fn from(_: orchestra::mpsc::SendError) -> Yikes { Yikes } } diff --git a/node/orchestra/examples/solo.rs b/node/orchestra/examples/solo.rs new file mode 100644 index 000000000000..67ebc292e46d --- /dev/null +++ b/node/orchestra/examples/solo.rs @@ -0,0 +1,69 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![allow(dead_code)] // orchestra events are not used + +//! A minimal demo to be used with cargo expand. + +use orchestra::{self as orchestra, Spawner, *}; +mod misc; + +pub use self::misc::*; + +#[orchestra(signal=SigSigSig, event=EvX, error=Yikes, gen=AllMessages)] +struct Solo { + #[subsystem(consumes: Plinko, sends: [MsgStrukt])] + goblin_tower: GoblinTower, +} + +#[derive(Default)] +pub struct Fortified; + +#[orchestra::subsystem(GoblinTower, error=Yikes)] +impl Fortified { + fn start(self, mut ctx: Context) -> SpawnedSubsystem { + let mut sender = ctx.sender().clone(); + ctx.spawn( + "GoblinTower", + Box::pin(async move { + sender.send_message(MsgStrukt(8u8)).await; + }), + ) + .unwrap(); + unimplemented!("welcum") + } +} + +fn main() { + use futures::{executor, pin_mut}; + + executor::block_on(async move { + let (orchestra, _handle): (Solo<_>, _) = Solo::builder() + .goblin_tower(Fortified::default()) + .spawner(DummySpawner) + .build() + .unwrap(); + + let orchestra_fut = orchestra + .running_subsystems + .into_future() + .timeout(std::time::Duration::from_millis(300)) + .fuse(); + + pin_mut!(orchestra_fut); + + orchestra_fut.await + }); +} diff --git a/node/overseer/overseer-gen/proc-macro/Cargo.toml b/node/orchestra/proc-macro/Cargo.toml similarity index 50% rename from node/overseer/overseer-gen/proc-macro/Cargo.toml rename to node/orchestra/proc-macro/Cargo.toml index e2494a0e5552..86653ab4604d 100644 --- a/node/overseer/overseer-gen/proc-macro/Cargo.toml +++ b/node/orchestra/proc-macro/Cargo.toml @@ -1,9 +1,11 @@ [package] -name = "polkadot-overseer-gen-proc-macro" -version = "0.9.22" +name = "orchestra-proc-macro" +version = "0.0.1" authors = ["Parity Technologies "] edition = "2021" -description = "Generate an overseer including builder pattern and message wrapper from a single annotated struct definition." +description = "Generate an orchestra of subsystems from a single annotated struct definition." +repository = "https://github.com/paritytech/polkadot" +license = "MIT OR Apache-2.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -18,18 +20,19 @@ proc-macro2 = "1.0.37" proc-macro-crate = "1.1.3" expander = { version = "0.0.6", default-features = false } petgraph = "0.6.0" +itertools = { version = "0.10.3" } [dev-dependencies] -assert_matches = "1.5.0" -polkadot-overseer-gen = { path = "../" } +assert_matches = "1.5" +orchestra = { path = "../" } thiserror = "1" -gum = { package = "tracing-gum", path = "../../../gum" } +tracing = "0.1" [features] -default = [] -# write the expanded version to a `overlord-expansion.[a-f0-9]{10}.rs` +default = [] # enable "graph" by default, blocked by +# write the expanded version to a `orchestra-expansion.[a-f0-9]{10}.rs` # in the `OUT_DIR` as defined by `cargo` for the `expander` crate. expand = [] # Create directional message consuming / outgoing graph. -# Generates: `${OUT_DIR}/${overseer|lowercase}-subsystem-messaging.dot` +# Generates: `${OUT_DIR}/${orchestra|lowercase}-subsystem-messaging.dot` graph = [] diff --git a/node/overseer/overseer-gen/proc-macro/build.rs b/node/orchestra/proc-macro/build.rs similarity index 100% rename from node/overseer/overseer-gen/proc-macro/build.rs rename to node/orchestra/proc-macro/build.rs diff --git a/node/orchestra/proc-macro/src/graph.rs b/node/orchestra/proc-macro/src/graph.rs new file mode 100644 index 000000000000..2fd07e5ec711 --- /dev/null +++ b/node/orchestra/proc-macro/src/graph.rs @@ -0,0 +1,432 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use quote::ToTokens; +use syn::{Ident, Path}; + +use petgraph::{graph::NodeIndex, Graph}; +use std::collections::{hash_map::RandomState, HashMap, HashSet}; + +use super::*; + +/// Representation of all subsystem connections +pub(crate) struct ConnectionGraph<'a> { + /// Graph of connected subsystems + /// + /// The graph represents a subsystem as a node or `NodeIndex` + /// and edges are messages sent, directed from the sender to + /// the receiver of the message. + pub(crate) graph: Graph, + /// Cycles within the graph + #[cfg_attr(not(feature = "graph"), allow(dead_code))] + pub(crate) sccs: Vec>, + /// Messages that are never being sent (and by which subsystem), but are consumed + /// Maps the message `Path` to the subsystem `Ident` represented by `NodeIndex`. + #[cfg_attr(not(feature = "graph"), allow(dead_code))] + pub(crate) unsent_messages: HashMap<&'a Path, (&'a Ident, NodeIndex)>, + /// Messages being sent (and by which subsystem), but not consumed by any subsystem + /// Maps the message `Path` to the subsystem `Ident` represented by `NodeIndex`. + #[cfg_attr(not(feature = "graph"), allow(dead_code))] + pub(crate) unconsumed_messages: HashMap<&'a Path, Vec<(&'a Ident, NodeIndex)>>, +} + +impl<'a> ConnectionGraph<'a> { + /// Generates all subsystem types and related accumulation traits. + pub(crate) fn construct(ssfs: &'a [SubSysField]) -> Self { + // create a directed graph with all the subsystems as nodes and the messages as edges + // key is always the message path, values are node indices in the graph and the subsystem generic identifier + // store the message path and the source sender, both in the graph as well as identifier + let mut outgoing_lut = HashMap::<&Path, Vec<(&Ident, NodeIndex)>>::with_capacity(128); + // same for consuming the incoming messages + let mut consuming_lut = HashMap::<&Path, (&Ident, NodeIndex)>::with_capacity(128); + + let mut graph = Graph::::new(); + + // prepare the full index of outgoing and source subsystems + for ssf in ssfs { + let node_index = graph.add_node(ssf.generic.clone()); + for outgoing in ssf.messages_to_send.iter() { + outgoing_lut.entry(outgoing).or_default().push((&ssf.generic, node_index)); + } + if let Some(_first_consument) = + consuming_lut.insert(&ssf.message_to_consume, (&ssf.generic, node_index)) + { + // bail, two subsystems consuming the same message + } + } + + for (message_ty, (_consuming_subsystem_ident, consuming_node_index)) in consuming_lut.iter() + { + // match the outgoing ones that were registered above with the consumed message + if let Some(origin_subsystems) = outgoing_lut.get(message_ty) { + for (_origin_subsystem_ident, sending_node_index) in origin_subsystems.iter() { + graph.add_edge( + *sending_node_index, + *consuming_node_index, + (*message_ty).clone(), + ); + } + } + } + + // extract unsent and unreceived messages + let outgoing_set = HashSet::<_, RandomState>::from_iter(outgoing_lut.keys().cloned()); + let consuming_set = HashSet::<_, RandomState>::from_iter(consuming_lut.keys().cloned()); + + let mut unsent_messages = consuming_lut; + unsent_messages.retain(|k, _v| !outgoing_set.contains(k)); + + let mut unconsumed_messages = outgoing_lut; + unconsumed_messages.retain(|k, _v| !consuming_set.contains(k)); + + let scc = Self::extract_scc(&graph); + + Self { graph, sccs: scc, unsent_messages, unconsumed_messages } + } + + /// Extract the strongly connected components (`scc`) which each + /// includes at least one cycle each. + fn extract_scc(graph: &Graph) -> Vec> { + use petgraph::visit::EdgeRef; + + // there is no guarantee regarding the node indices in the individual sccs + let sccs = petgraph::algo::kosaraju_scc(&graph); + let sccs = Vec::from_iter(sccs.into_iter().filter(|scc| { + match scc.len() { + 1 => { + // contains sccs of length one, + // which do not exists, might be an upstream bug? + let node_idx = scc[0]; + graph + .edges_directed(node_idx, petgraph::Direction::Outgoing) + .find(|edge| edge.target() == node_idx) + .is_some() + }, + 0 => false, + _n => true, + } + })); + match sccs.len() { + 0 => println!("✅ Found no strongly connected components, hence no cycles exist"), + 1 => println!( + "⚡ Found 1 strongly connected component which includes at least one cycle" + ), + n => println!( + "⚡ Found {n} strongly connected components which includes at least one cycle each" + ), + } + + let greek_alphabet = greek_alphabet(); + + for (scc_idx, scc) in sccs.iter().enumerate() { + let scc_tag = greek_alphabet.get(scc_idx).copied().unwrap_or('_'); + let mut acc = Vec::with_capacity(scc.len()); + assert!(scc.len() > 0); + let mut node_idx = scc[0].clone(); + let print_idx = scc_idx + 1; + // track which ones were visited and which step + // the step is required to truncate the output + // which is required to greedily find a cycle in the strongly connected component + let mut visited = HashMap::new(); + for step in 0..scc.len() { + if let Some(edge) = + graph.edges_directed(node_idx, petgraph::Direction::Outgoing).find(|edge| { + scc.iter().find(|&scc_node_idx| *scc_node_idx == edge.target()).is_some() + }) { + let next = edge.target(); + visited.insert(node_idx, step); + + let subsystem_name = &graph[node_idx].to_string(); + let message_name = &graph[edge.id()].to_token_stream().to_string(); + acc.push(format!("{subsystem_name} ~~{{{message_name:?}}}~~> ")); + node_idx = next; + + if let Some(step) = visited.get(&next) { + // we've been there, so there is a cycle + // cut off the extra tail + assert!(acc.len() >= *step); + acc.drain(..step); + // there might be more cycles in this cluster, + // but for they are ignored, the graph shows + // the entire strongly connected component. + break + } + } else { + eprintln!("cycle({print_idx:03}) ∈ {scc_tag}: Missing connection in hypothesized cycle after {step} steps, this is a bug 🐛"); + break + } + } + let acc = String::from_iter(acc); + println!("cycle({print_idx:03}) ∈ {scc_tag}: {acc} *"); + } + + sccs + } + + /// Render a graphviz (aka dot graph) to a file. + /// + /// Cycles are annotated with the lower + #[cfg(feature = "graph")] + pub(crate) fn graphviz(self, dest: &mut impl std::io::Write) -> std::io::Result<()> { + use self::graph_helpers::*; + use petgraph::{ + dot::{self, Dot}, + visit::{EdgeRef, IntoEdgeReferences, IntoNodeReferences}, + }; + + // only write the grap content, we want a custom color scheme + let config = &[ + dot::Config::GraphContentOnly, + dot::Config::EdgeNoLabel, + dot::Config::NodeNoLabel, + ][..]; + + let Self { mut graph, unsent_messages, unconsumed_messages, sccs } = self; + + // the greek alphabet, lowercase + let greek_alphabet = greek_alphabet(); + + const COLOR_SCHEME_N: usize = 10; // rdylgn10 + + // Adding more than 10, is _definitely_ too much visual clutter in the graph. + const UPPER_BOUND: usize = 10; + + assert!(UPPER_BOUND <= GREEK_ALPHABET_SIZE); + assert!(UPPER_BOUND <= COLOR_SCHEME_N); + + let n = sccs.len(); + let n = if n > UPPER_BOUND { + eprintln!("Too many ({n}) strongly connected components, only annotating the first {UPPER_BOUND}"); + UPPER_BOUND + } else { + n + }; + + // restructure for lookups + let mut scc_lut = HashMap::>::with_capacity(n); + // lookup the color index (which is equiv to the index in the cycle set vector _plus one_) + // based on the cycle_tag (the greek char) + let mut color_lut = HashMap::::with_capacity(COLOR_SCHEME_N); + for (scc_idx, scc) in sccs.into_iter().take(UPPER_BOUND).enumerate() { + for node_idx in scc { + let _ = scc_lut.entry(node_idx).or_default().insert(greek_alphabet[scc_idx]); + } + color_lut.insert(greek_alphabet[scc_idx], scc_idx + 1); + } + let color_lut = &color_lut; + + // Adding nodes is ok, the `NodeIndex` is append only as long + // there are no removals. + + // Depict sink for unconsumed messages + let unconsumed_idx = graph.add_node(quote::format_ident!("SENT_TO_NONONE")); + for (message_name, subsystems) in unconsumed_messages { + // iterate over all subsystems that send such a message + for (_sub_name, sub_node_idx) in subsystems { + graph.add_edge(sub_node_idx, unconsumed_idx, message_name.clone()); + } + } + + // depict source of unsent message, this is legit when + // integrated with an external source, and sending messages based + // on that + let unsent_idx = graph.add_node(quote::format_ident!("NEVER_SENT_ANYWHERE")); + for (message_name, (_sub_name, sub_node_idx)) in unsent_messages { + graph.add_edge(unsent_idx, sub_node_idx, message_name.clone()); + } + let unsent_node_label = r#"label="✨",fillcolor=black,shape=doublecircle,style=filled,fontname="NotoColorEmoji""#; + let unconsumed_node_label = r#"label="💀",fillcolor=black,shape=doublecircle,style=filled,fontname="NotoColorEmoji""#; + let edge_attr = |_graph: &Graph, + edge: <&Graph as IntoEdgeReferences>::EdgeRef| + -> String { + let source = edge.source(); + let sink = edge.target(); + + let message_name = + edge.weight().get_ident().expect("Must have a trailing identifier. qed"); + + // use the intersection only, that's the set of cycles the edge is part of + if let Some(edge_intersecting_scc_tags) = scc_lut.get(&source).and_then(|source_set| { + scc_lut.get(&sink).and_then(move |sink_set| { + let intersection = + HashSet::<_, RandomState>::from_iter(source_set.intersection(sink_set)); + if intersection.is_empty() { + None + } else { + Some(intersection) + } + }) + }) { + if edge_intersecting_scc_tags.len() != 1 { + unreachable!("Strongly connected components are disjunct by definition. qed"); + } + let scc_tag = edge_intersecting_scc_tags.iter().next().unwrap(); + let color = get_color_by_tag(scc_tag, color_lut); + let scc_tag_str = cycle_tags_to_annotation(edge_intersecting_scc_tags, color_lut); + format!( + r#"color="{color}",fontcolor="{color}",xlabel=<{scc_tag_str}>,label="{message_name}""#, + ) + } else { + format!(r#"label="{message_name}""#,) + } + }; + let node_attr = + |_graph: &Graph, + (node_index, subsystem_name): <&Graph as IntoNodeReferences>::NodeRef| + -> String { + if node_index == unsent_idx { + unsent_node_label.to_owned().clone() + } else if node_index == unconsumed_idx { + unconsumed_node_label.to_owned().clone() + } else if let Some(edge_intersecting_scc_tags) = scc_lut.get(&node_index) { + if edge_intersecting_scc_tags.len() != 1 { + unreachable!( + "Strongly connected components are disjunct by definition. qed" + ); + }; + let scc_tag = edge_intersecting_scc_tags.iter().next().unwrap(); + let color = get_color_by_tag(scc_tag, color_lut); + + let scc_tag_str = + cycle_tags_to_annotation(edge_intersecting_scc_tags, color_lut); + format!( + r#"color="{color}",fontcolor="{color}",xlabel=<{scc_tag_str}>,label="{subsystem_name}""#, + ) + } else { + format!(r#"label="{subsystem_name}""#) + } + }; + let dot = Dot::with_attr_getters( + &graph, config, &edge_attr, // with state, the reference is a trouble maker + &node_attr, + ); + dest.write_all( + format!( + r#"digraph {{ + node [colorscheme={}] + {:?} +}}"#, + color_scheme(), + &dot + ) + .as_bytes(), + )?; + Ok(()) + } +} + +const GREEK_ALPHABET_SIZE: usize = 24; + +fn greek_alphabet() -> [char; GREEK_ALPHABET_SIZE] { + let mut alphabet = ['\u{03B1}'; 24]; + alphabet + .iter_mut() + .enumerate() + // closure should never return `None`, + // but rather safe than sorry + .for_each(|(i, c)| { + *c = char::from_u32(*c as u32 + i as u32).unwrap(); + }); + alphabet +} + +#[cfg(feature = "graph")] +mod graph_helpers { + use super::HashMap; + + pub(crate) const fn color_scheme() -> &'static str { + "rdylgn10" + } + + pub(crate) fn get_color_by_idx(color_idx: usize) -> String { + let scheme = color_scheme(); + format!("/{scheme}/{color_idx}") + } + + pub(crate) fn get_color_by_tag(scc_tag: &char, color_lut: &HashMap) -> String { + get_color_by_idx(color_lut.get(scc_tag).copied().unwrap_or_default()) + } + + /// A node can be member of multiple cycles, + /// but only of one strongly connected component. + pub(crate) fn cycle_tags_to_annotation<'a>( + cycle_tags: impl IntoIterator, + color_lut: &HashMap, + ) -> String { + // Must use fully qualified syntax: + // + let cycle_annotation = String::from_iter(itertools::Itertools::intersperse( + cycle_tags.into_iter().map(|scc_tag| { + let color = get_color_by_tag(scc_tag, color_lut); + format!(r#"{scc_tag}"#) + }), + ",".to_owned(), + )); + cycle_annotation + } +} + +#[cfg(test)] +mod tests { + // whenever this starts working, we should consider + // replacing the all caps idents with something like + // the below. + // + // + // For now the rendering is modified, the ident is a placeholder. + #[test] + #[should_panic] + fn check_ident() { + let _ident = quote::format_ident!("x💀x"); + } + + #[test] + fn kosaraju_scc_check_nodes_cannot_be_part_of_two_clusters() { + let mut graph = petgraph::graph::DiGraph::::new(); + + let a_idx = graph.add_node('A'); + let b_idx = graph.add_node('B'); + let c_idx = graph.add_node('C'); + let d_idx = graph.add_node('D'); + let e_idx = graph.add_node('E'); + let f_idx = graph.add_node('F'); + + graph.add_edge(a_idx, b_idx, "10"); + graph.add_edge(b_idx, c_idx, "11"); + graph.add_edge(c_idx, a_idx, "12"); + + graph.add_edge(a_idx, d_idx, "20"); + graph.add_edge(d_idx, c_idx, "21"); + + graph.add_edge(b_idx, e_idx, "30"); + graph.add_edge(e_idx, c_idx, "31"); + + graph.add_edge(c_idx, f_idx, "40"); + + let mut sccs = dbg!(petgraph::algo::kosaraju_scc(&graph)); + + dbg!(graph); + + sccs.sort_by(|a, b| { + if a.len() < b.len() { + std::cmp::Ordering::Greater + } else { + std::cmp::Ordering::Less + } + }); + assert_eq!(sccs.len(), 2); // `f` and everything else + assert_eq!(sccs[0].len(), 5); // every node but `f` + } +} diff --git a/node/overseer/overseer-gen/proc-macro/src/impl_builder.rs b/node/orchestra/proc-macro/src/impl_builder.rs similarity index 82% rename from node/overseer/overseer-gen/proc-macro/src/impl_builder.rs rename to node/orchestra/proc-macro/src/impl_builder.rs index ceb9faf0ca39..1be25d45b5e4 100644 --- a/node/overseer/overseer-gen/proc-macro/src/impl_builder.rs +++ b/node/orchestra/proc-macro/src/impl_builder.rs @@ -1,21 +1,20 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use quote::{format_ident, quote}; -use syn::{parse_quote, Path, PathSegment}; +use syn::{parse_quote, Path, PathSegment, TypePath}; use super::*; @@ -26,16 +25,16 @@ fn recollect_without_idx(x: &[T], idx: usize) -> Vec { v } -/// Implement a builder pattern for the `Overseer`-type, -/// which acts as the gateway to constructing the overseer. +/// Implement a builder pattern for the `Orchestra`-type, +/// which acts as the gateway to constructing the orchestra. /// /// Elements tagged with `wip` are not covered here. -pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { - let overseer_name = info.overseer_name.clone(); - let builder = format_ident!("{}Builder", overseer_name); - let handle = format_ident!("{}Handle", overseer_name); - let connector = format_ident!("{}Connector", overseer_name); - let subsystem_ctx_name = format_ident!("{}SubsystemContext", overseer_name); +pub(crate) fn impl_builder(info: &OrchestraInfo) -> proc_macro2::TokenStream { + let orchestra_name = info.orchestra_name.clone(); + let builder = format_ident!("{}Builder", orchestra_name); + let handle = format_ident!("{}Handle", orchestra_name); + let connector = format_ident!("{}Connector", orchestra_name); + let subsystem_ctx_name = format_ident!("{}SubsystemContext", orchestra_name); let subsystem_name = &info.subsystem_names_without_wip(); let subsystem_generics = &info.subsystem_generic_types(); @@ -83,14 +82,19 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { // Helpers to use within quote! macros let spawner_where_clause: syn::TypeParam = parse_quote! { - S: #support_crate ::SpawnNamed + Send + S: #support_crate ::Spawner }; // Field names and real types let field_name = subsystem_name.iter().chain(baggage_name.iter()).collect::>(); let field_type = subsystem_generics .iter() - .map(|ident| Path::from(PathSegment::from(ident.clone()))) + .map(|ident| { + syn::Type::Path(TypePath { + qself: None, + path: Path::from(PathSegment::from(ident.clone())), + }) + }) .chain(info.baggage().iter().map(|bag| bag.field_ty.clone())) .collect::>(); @@ -250,14 +254,9 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { post_setter_generics[idx] = parse_quote! { Init<#field_type> }; // Baggage can also be generic, so we need to include that to a signature - let preserved_baggage_generic = if bag_field.generic { - quote! {#field_type,} - } else { - TokenStream::new() - }; - + let preserved_baggage_generics = &bag_field.generic_types; quote! { - impl + impl #builder { /// Specify the baggage in the builder when it was not initialized before @@ -279,7 +278,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { } } } - impl + impl #builder { /// Specify the baggage in the builder when it has been previously initialized pub fn #fname (self, var: #field_type ) -> @@ -305,7 +304,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { let event = &info.extern_event_ty; let initialized_builder = format_ident!("Initialized{}", builder); - // The direct generics as expected by the `Overseer<_,_,..>`, without states + // The direct generics as expected by the `Orchestra<_,_,..>`, without states let initialized_builder_generics = quote! { S, #( #baggage_generic_ty, )* #( #subsystem_generics, )* }; @@ -336,7 +335,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { /// Convenience alias. type SubsystemInitFn = Box ::std::result::Result >; - /// Type for the initialized field of the overseer builder + /// Type for the initialized field of the orchestra builder pub enum Init { /// Defer initialization to a point where the `handle` is available. Fn(SubsystemInitFn), @@ -344,7 +343,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { /// Also used for baggage fields Value(T), } - /// Type marker for the uninitialized field of the overseer builder. + /// Type marker for the uninitialized field of the orchestra builder. /// `PhantomData` is used for type hinting when creating uninitialized /// builder, e.g. to avoid specifying the generics when instantiating /// the `FooBuilder` when calling `Foo::builder()` @@ -352,10 +351,10 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { pub struct Missing(::core::marker::PhantomData); /// Trait used to mark fields status in a builder - trait OverseerFieldState {} + trait OrchestraFieldState {} - impl OverseerFieldState for Init {} - impl OverseerFieldState for Missing {} + impl OrchestraFieldState for Init {} + impl OrchestraFieldState for Missing {} impl ::std::default::Default for Missing { fn default() -> Self { @@ -363,11 +362,11 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { } } - impl #overseer_name + impl #orchestra_name where #spawner_where_clause, { - /// Create a new overseer utilizing the builder. + /// Create a new orchestra utilizing the builder. pub fn builder< #( #subsystem_generics),* >() -> #builder #(, Missing< #field_type > )* > where @@ -379,7 +378,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { }; ts.extend(quote! { - /// Handle for an overseer. + /// Handle for an orchestra. pub type #handle = #support_crate ::metered::MeteredSender< #event >; /// External connector. @@ -390,16 +389,16 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { /// /// For subsystems, use the `_with` variants of the builder. handle: #handle, - /// The side consumed by the `spawned` side of the overseer pattern. + /// The side consumed by the `spawned` side of the orchestra pattern. consumer: #support_crate ::metered::MeteredReceiver < #event >, } impl #connector { - /// Obtain access to the overseer handle. + /// Obtain access to the orchestra handle. pub fn as_handle_mut(&mut self) -> &mut #handle { &mut self.handle } - /// Obtain access to the overseer handle. + /// Obtain access to the orchestra handle. pub fn as_handle(&self) -> &#handle { &self.handle } @@ -440,7 +439,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { )* spawner: InitStateSpawner, // user provided runtime overrides, - // if `None`, the `overlord(message_capacity=123,..)` is used + // if `None`, the `orchestra(message_capacity=123,..)` is used // or the default value. channel_capacity: Option, signal_capacity: Option, @@ -455,7 +454,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { // explicitly assure the required traits are implemented fn trait_from_must_be_implemented() where - E: std::error::Error + Send + Sync + 'static + From<#support_crate ::OverseerError> + E: ::std::error::Error + Send + Sync + 'static + From<#support_crate ::OrchestraError> {} trait_from_must_be_implemented::< #error_ty >(); @@ -530,7 +529,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { .collect::>(); ts.extend(quote! { - /// Type used to represent a builder where all fields are initialized and the overseer could be constructed. + /// Type used to represent a builder where all fields are initialized and the orchestra could be constructed. pub type #initialized_builder<#initialized_builder_generics> = #builder, #( Init<#field_type>, )*>; // A builder specialization where all fields are set @@ -539,18 +538,18 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { #spawner_where_clause, #builder_where_clause { - /// Complete the construction and create the overseer type. + /// Complete the construction and create the orchestra type. pub fn build(self) - -> ::std::result::Result<(#overseer_name, #handle), #error_ty> { + -> ::std::result::Result<(#orchestra_name, #handle), #error_ty> { let connector = #connector ::with_event_capacity( self.signal_capacity.unwrap_or(SIGNAL_CHANNEL_CAPACITY) ); self.build_with_connector(connector) } - /// Complete the construction and create the overseer type based on an existing `connector`. + /// Complete the construction and create the orchestra type based on an existing `connector`. pub fn build_with_connector(self, connector: #connector) - -> ::std::result::Result<(#overseer_name, #handle), #error_ty> + -> ::std::result::Result<(#orchestra_name, #handle), #error_ty> { let #connector { handle: events_tx, @@ -559,8 +558,8 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { let handle = events_tx.clone(); - let (to_overseer_tx, to_overseer_rx) = #support_crate ::metered::unbounded::< - ToOverseer + let (to_orchestra_tx, to_orchestra_rx) = #support_crate ::metered::unbounded::< + ToOrchestra >(); #( @@ -606,9 +605,10 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { }; let unbounded_meter = #channel_name_unbounded_rx.meter().clone(); - - let message_rx: SubsystemIncomingMessages< #consumes > = #support_crate ::select( - #channel_name_rx, #channel_name_unbounded_rx + // Prefer unbounded channel when selecting + let message_rx: SubsystemIncomingMessages< #consumes > = #support_crate ::select_with_strategy( + #channel_name_rx, #channel_name_unbounded_rx, + #support_crate ::select_message_channel_strategy ); let (signal_tx, signal_rx) = #support_crate ::metered::channel( self.signal_capacity.unwrap_or(SIGNAL_CHANNEL_CAPACITY) @@ -618,11 +618,11 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { signal_rx, message_rx, channels_out.clone(), - to_overseer_tx.clone(), + to_orchestra_tx.clone(), #subsystem_name_str_literal ); - let #subsystem_name: OverseenSubsystem< #consumes > = + let #subsystem_name: OrchestratedSubsystem< #consumes > = spawn::<_,_, #blocking, _, _, _>( &mut spawner, #channel_name_tx, @@ -637,8 +637,8 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { use #support_crate ::StreamExt; - let to_overseer_rx = to_overseer_rx.fuse(); - let overseer = #overseer_name { + let to_orchestra_rx = to_orchestra_rx.fuse(); + let orchestra = #orchestra_name { #( #subsystem_name, )* @@ -653,10 +653,10 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { spawner, running_subsystems, events_rx, - to_overseer_rx, + to_orchestra_rx, }; - Ok((overseer, handle)) + Ok((orchestra, handle)) } } }); @@ -667,7 +667,7 @@ pub(crate) fn impl_builder(info: &OverseerInfo) -> proc_macro2::TokenStream { ts } -pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { +pub(crate) fn impl_task_kind(info: &OrchestraInfo) -> proc_macro2::TokenStream { let signal = &info.extern_signal_ty; let error_ty = &info.extern_error_ty; let support_crate = info.support_crate_name(); @@ -676,13 +676,13 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { /// Task kind to launch. pub trait TaskKind { /// Spawn a task, it depends on the implementer if this is blocking or not. - fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>); + fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>); } #[allow(missing_docs)] struct Regular; impl TaskKind for Regular { - fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>) { + fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>) { spawner.spawn(task_name, Some(subsystem_name), future) } } @@ -690,7 +690,7 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { #[allow(missing_docs)] struct Blocking; impl TaskKind for Blocking { - fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>) { + fn launch_task(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>) { spawner.spawn_blocking(task_name, Some(subsystem_name), future) } } @@ -706,13 +706,13 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { s: SubSys, subsystem_name: &'static str, futures: &mut #support_crate ::FuturesUnordered >>, - ) -> ::std::result::Result, #error_ty > + ) -> ::std::result::Result, #error_ty > where - S: #support_crate ::SpawnNamed, + S: #support_crate ::Spawner, M: std::fmt::Debug + Send + 'static, TK: TaskKind, Ctx: #support_crate ::SubsystemContext, - E: std::error::Error + Send + Sync + 'static + From<#support_crate ::OverseerError>, + E: ::std::error::Error + Send + Sync + 'static + ::std::convert::From<#support_crate ::OrchestraError>, SubSys: #support_crate ::Subsystem, { let #support_crate ::SpawnedSubsystem:: { future, name } = s.start(ctx); @@ -721,9 +721,9 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { let fut = Box::pin(async move { if let Err(e) = future.await { - #support_crate ::gum::error!(subsystem=name, err = ?e, "subsystem exited with error"); + #support_crate ::tracing::error!(subsystem=name, err = ?e, "subsystem exited with error"); } else { - #support_crate ::gum::debug!(subsystem=name, "subsystem exited without an error"); + #support_crate ::tracing::debug!(subsystem=name, "subsystem exited without an error"); } let _ = tx.send(()); }); @@ -732,7 +732,7 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { futures.push(Box::pin( rx.map(|e| { - gum::warn!(err = ?e, "dropping error"); + #support_crate ::tracing::warn!(err = ?e, "dropping error"); Ok(()) }) )); @@ -749,7 +749,7 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream { name, }); - Ok(OverseenSubsystem { + Ok(OrchestratedSubsystem { instance, }) } diff --git a/node/overseer/overseer-gen/proc-macro/src/impl_channels_out.rs b/node/orchestra/proc-macro/src/impl_channels_out.rs similarity index 74% rename from node/overseer/overseer-gen/proc-macro/src/impl_channels_out.rs rename to node/orchestra/proc-macro/src/impl_channels_out.rs index a337a69d46a9..5b694d15229d 100644 --- a/node/overseer/overseer-gen/proc-macro/src/impl_channels_out.rs +++ b/node/orchestra/proc-macro/src/impl_channels_out.rs @@ -1,18 +1,17 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use quote::quote; use syn::Result; @@ -20,7 +19,7 @@ use syn::Result; use super::*; /// Implement the helper type `ChannelsOut` and `MessagePacket`. -pub(crate) fn impl_channels_out_struct(info: &OverseerInfo) -> Result { +pub(crate) fn impl_channels_out_struct(info: &OrchestraInfo) -> Result { let message_wrapper = info.message_wrapper.clone(); let channel_name = &info.channel_names_without_wip(""); @@ -36,7 +35,7 @@ pub(crate) fn impl_channels_out_struct(info: &OverseerInfo) -> Result Result { - #support_crate :: gum :: warn!("Nothing consumes {:?}", unused_msg); + #support_crate :: tracing :: warn!("Nothing consumes {:?}", unused_msg); Ok(()) } }; if let Err(subsystem_name) = res { - #support_crate ::gum::debug!( + #support_crate ::tracing::debug!( target: LOG_TARGET, "Failed to send (bounded) a message to {} subsystem", subsystem_name @@ -123,13 +122,13 @@ pub(crate) fn impl_channels_out_struct(info: &OverseerInfo) -> Result { - #support_crate :: gum :: warn!("Nothing consumes {:?}", unused_msg); + #support_crate :: tracing :: warn!("Nothing consumes {:?}", unused_msg); Ok(()) } }; if let Err(subsystem_name) = res { - #support_crate ::gum::debug!( + #support_crate ::tracing::debug!( target: LOG_TARGET, "Failed to send_unbounded a message to {} subsystem", subsystem_name diff --git a/node/overseer/overseer-gen/proc-macro/src/impl_message_wrapper.rs b/node/orchestra/proc-macro/src/impl_message_wrapper.rs similarity index 64% rename from node/overseer/overseer-gen/proc-macro/src/impl_message_wrapper.rs rename to node/orchestra/proc-macro/src/impl_message_wrapper.rs index 7d29ddd458ab..3c2f99999208 100644 --- a/node/overseer/overseer-gen/proc-macro/src/impl_message_wrapper.rs +++ b/node/orchestra/proc-macro/src/impl_message_wrapper.rs @@ -1,18 +1,17 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use quote::quote; use syn::{spanned::Spanned, Result}; @@ -20,7 +19,7 @@ use syn::{spanned::Spanned, Result}; use super::*; /// Generates the wrapper type enum. -pub(crate) fn impl_message_wrapper_enum(info: &OverseerInfo) -> Result { +pub(crate) fn impl_message_wrapper_enum(info: &OrchestraInfo) -> Result { let consumes = info.any_message(); let consumes_variant = info.variant_names(); diff --git a/node/overseer/overseer-gen/proc-macro/src/impl_overseer.rs b/node/orchestra/proc-macro/src/impl_orchestra.rs similarity index 74% rename from node/overseer/overseer-gen/proc-macro/src/impl_overseer.rs rename to node/orchestra/proc-macro/src/impl_orchestra.rs index b3bb74665687..66ff6c60939b 100644 --- a/node/overseer/overseer-gen/proc-macro/src/impl_overseer.rs +++ b/node/orchestra/proc-macro/src/impl_orchestra.rs @@ -1,26 +1,25 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use quote::quote; use super::*; -pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStream { +pub(crate) fn impl_orchestra_struct(info: &OrchestraInfo) -> proc_macro2::TokenStream { let message_wrapper = &info.message_wrapper.clone(); - let overseer_name = info.overseer_name.clone(); + let orchestra_name = info.orchestra_name.clone(); let subsystem_name = &info.subsystem_names_without_wip(); let support_crate = info.support_crate_name(); @@ -34,7 +33,7 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr let where_clause = quote! { where - S: #support_crate ::SpawnNamed, + S: #support_crate ::Spawner, }; // TODO add `where ..` clauses for baggage types // TODO @@ -53,25 +52,25 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr let signal_channel_capacity = info.signal_channel_capacity; let log_target = - syn::LitStr::new(overseer_name.to_string().to_lowercase().as_str(), overseer_name.span()); + syn::LitStr::new(orchestra_name.to_string().to_lowercase().as_str(), orchestra_name.span()); let ts = quote! { - /// Capacity of a bounded message channel between overseer and subsystem + /// Capacity of a bounded message channel between orchestra and subsystem /// but also for bounded channels between two subsystems. const CHANNEL_CAPACITY: usize = #message_channel_capacity; - /// Capacity of a signal channel between a subsystem and the overseer. + /// Capacity of a signal channel between a subsystem and the orchestra. const SIGNAL_CHANNEL_CAPACITY: usize = #signal_channel_capacity; /// The log target tag. const LOG_TARGET: &'static str = #log_target; - /// The overseer. - pub struct #overseer_name #generics { + /// The orchestra. + pub struct #orchestra_name #generics { #( /// A subsystem instance. - #subsystem_name: OverseenSubsystem< #consumes >, + #subsystem_name: OrchestratedSubsystem< #consumes >, )* #( @@ -88,15 +87,15 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr >, /// Gather running subsystems' outbound streams into one. - to_overseer_rx: #support_crate ::stream::Fuse< - #support_crate ::metered::UnboundedMeteredReceiver< #support_crate ::ToOverseer > + to_orchestra_rx: #support_crate ::stream::Fuse< + #support_crate ::metered::UnboundedMeteredReceiver< #support_crate ::ToOrchestra > >, - /// Events that are sent to the overseer from the outside world. + /// Events that are sent to the orchestra from the outside world. events_rx: #support_crate ::metered::MeteredReceiver< #event_ty >, } - impl #generics #overseer_name #generics #where_clause { + impl #generics #orchestra_name #generics #where_clause { /// Send the given signal, a termination signal, to all subsystems /// and wait for all subsystems to go down. /// @@ -113,7 +112,7 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr ).fuse(); loop { - select! { + #support_crate ::futures::select! { _ = self.running_subsystems.next() => if self.running_subsystems.is_empty() { break; @@ -141,7 +140,7 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr match message { #( #message_wrapper :: #consumes_variant ( inner ) => - OverseenSubsystem::< #consumes >::send_message2(&mut self. #subsystem_name, inner, origin ).await?, + OrchestratedSubsystem::< #consumes >::send_message2(&mut self. #subsystem_name, inner, origin ).await?, )* // subsystems that are still work in progress #( @@ -152,7 +151,7 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr // And everything that's not WIP but no subsystem consumes it #[allow(unreachable_patterns)] unused_msg => { - #support_crate :: gum :: warn!("Nothing consumes {:?}", unused_msg); + #support_crate :: tracing :: warn!("Nothing consumes {:?}", unused_msg); } } Ok(()) @@ -163,7 +162,7 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr -> Vec where #( - Mapper: MapSubsystem<&'a OverseenSubsystem< #consumes >, Output=Output>, + Mapper: MapSubsystem<&'a OrchestratedSubsystem< #consumes >, Output=Output>, )* { vec![ @@ -184,27 +183,27 @@ pub(crate) fn impl_overseer_struct(info: &OverseerInfo) -> proc_macro2::TokenStr ts } -pub(crate) fn impl_overseen_subsystem(info: &OverseerInfo) -> proc_macro2::TokenStream { +pub(crate) fn impl_orchestrated_subsystem(info: &OrchestraInfo) -> proc_macro2::TokenStream { let signal = &info.extern_signal_ty; let error_ty = &info.extern_error_ty; let support_crate = info.support_crate_name(); let ts = quote::quote! { - /// A subsystem that the overseer oversees. + /// A subsystem that the orchestrator orchestrates. /// /// Ties together the [`Subsystem`] itself and it's running instance /// (which may be missing if the [`Subsystem`] is not running at the moment /// for whatever reason). /// /// [`Subsystem`]: trait.Subsystem.html - pub struct OverseenSubsystem { + pub struct OrchestratedSubsystem { /// The instance. pub instance: std::option::Option< #support_crate ::SubsystemInstance >, } - impl OverseenSubsystem { + impl OrchestratedSubsystem { /// Send a message to the wrapped subsystem. /// /// If the inner `instance` is `None`, nothing is happening. @@ -218,14 +217,14 @@ pub(crate) fn impl_overseen_subsystem(info: &OverseerInfo) -> proc_macro2::Token }).timeout(MESSAGE_TIMEOUT).await { None => { - #support_crate ::gum::error!( + #support_crate ::tracing::error!( target: LOG_TARGET, %origin, "Subsystem {} appears unresponsive.", instance.name, ); Err(#error_ty :: from( - #support_crate ::OverseerError::SubsystemStalled(instance.name) + #support_crate ::OrchestraError::SubsystemStalled(instance.name) )) } Some(res) => res.map_err(Into::into), @@ -245,7 +244,7 @@ pub(crate) fn impl_overseen_subsystem(info: &OverseerInfo) -> proc_macro2::Token match instance.tx_signal.send(signal).timeout(SIGNAL_TIMEOUT).await { None => { Err(#error_ty :: from( - #support_crate ::OverseerError::SubsystemStalled(instance.name) + #support_crate ::OrchestraError::SubsystemStalled(instance.name) )) } Some(res) => { diff --git a/node/overseer/overseer-gen/proc-macro/src/impl_subsystem_ctx_sender.rs b/node/orchestra/proc-macro/src/impl_subsystem_ctx_sender.rs similarity index 78% rename from node/overseer/overseer-gen/proc-macro/src/impl_subsystem_ctx_sender.rs rename to node/orchestra/proc-macro/src/impl_subsystem_ctx_sender.rs index 9bb051a38703..58e95ca72890 100644 --- a/node/overseer/overseer-gen/proc-macro/src/impl_subsystem_ctx_sender.rs +++ b/node/orchestra/proc-macro/src/impl_subsystem_ctx_sender.rs @@ -1,98 +1,39 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use proc_macro2::TokenStream; use quote::quote; use syn::{Ident, Path, Result, Type}; -use petgraph::{ - dot::{self, Dot}, - graph::NodeIndex, - visit::EdgeRef, - Direction, -}; -use std::collections::HashMap; +use petgraph::{visit::EdgeRef, Direction}; use super::*; -/// Render a graphviz (aka dot graph) to a file. -fn graphviz( - graph: &petgraph::Graph, - dest: &mut impl std::io::Write, -) -> std::io::Result<()> { - let config = &[dot::Config::EdgeNoLabel, dot::Config::NodeNoLabel][..]; - let dot = Dot::with_attr_getters( - graph, - config, - &|_graph, edge| -> String { - format!( - r#"label="{}""#, - edge.weight().get_ident().expect("Must have a trailing identifier. qed") - ) - }, - &|_graph, (_node_index, subsystem_name)| -> String { - format!(r#"label="{}""#, subsystem_name,) - }, - ); - dest.write_all(format!("{:?}", &dot).as_bytes())?; - Ok(()) -} - /// Generates all subsystem types and related accumulation traits. -pub(crate) fn impl_subsystem_types_all(info: &OverseerInfo) -> Result { +pub(crate) fn impl_subsystem_types_all(info: &OrchestraInfo) -> Result { let mut ts = TokenStream::new(); - let overseer_name = &info.overseer_name; - let span = overseer_name.span(); + let orchestra_name = &info.orchestra_name; + let span = orchestra_name.span(); let all_messages_wrapper = &info.message_wrapper; let support_crate = info.support_crate_name(); let signal_ty = &info.extern_signal_ty; let error_ty = &info.extern_error_ty; - // create a directed graph with all the subsystems as nodes and the messages as edges - // key is always the message path, values are node indices in the graph and the subsystem generic identifier - // store the message path and the source sender, both in the graph as well as identifier - let mut outgoing_lut = HashMap::<&Path, Vec<(Ident, NodeIndex)>>::with_capacity(128); - // same for consuming the incoming messages - let mut consuming_lut = HashMap::<&Path, (Ident, NodeIndex)>::with_capacity(128); - - // Ident = Node = subsystem generic names - // Path = Edge = messages - let mut graph = petgraph::Graph::::new(); - - // prepare the full index of outgoing and source subsystems - for ssf in info.subsystems() { - let node_index = graph.add_node(ssf.generic.clone()); - for outgoing in ssf.messages_to_send.iter() { - outgoing_lut - .entry(outgoing) - .or_default() - .push((ssf.generic.clone(), node_index)); - } - consuming_lut.insert(&ssf.message_to_consume, (ssf.generic.clone(), node_index)); - } - - for (message_ty, (_consuming_subsystem_ident, consuming_node_index)) in consuming_lut.iter() { - // match the outgoing ones that were registered above with the consumed message - if let Some(origin_subsystems) = outgoing_lut.get(message_ty) { - for (_origin_subsystem_ident, sending_node_index) in origin_subsystems.iter() { - graph.add_edge(*sending_node_index, *consuming_node_index, (*message_ty).clone()); - } - } - } + let cg = graph::ConnectionGraph::construct(info.subsystems()); + let graph = &cg.graph; // All outgoing edges are now usable to derive everything we need for node_index in graph.node_indices() { @@ -125,7 +66,7 @@ pub(crate) fn impl_subsystem_types_all(info: &OverseerInfo) -> Result { - #support_crate :: gum :: warn!("Nothing consumes {:?}", unused_msg); + #support_crate :: tracing :: warn!("Nothing consumes {:?}", unused_msg); #all_messages_wrapper :: Empty } } @@ -135,15 +76,16 @@ pub(crate) fn impl_subsystem_types_all(info: &OverseerInfo) -> Result Result; type Error = #error_ty; - async fn try_recv(&mut self) -> ::std::result::Result>, ()> { + async fn try_recv(&mut self) -> ::std::result::Result>, ()> { match #support_crate ::poll!(self.recv()) { #support_crate ::Poll::Ready(msg) => Ok(Some(msg.map_err(|_| ())?)), #support_crate ::Poll::Pending => Ok(None), } } - async fn recv(&mut self) -> ::std::result::Result, #error_ty> { + async fn recv(&mut self) -> ::std::result::Result, #error_ty> { loop { - // If we have a message pending an overseer signal, we only poll for signals + // If we have a message pending an orchestra signal, we only poll for signals // in the meantime. if let Some((needs_signals_received, msg)) = self.pending_incoming.take() { if needs_signals_received <= self.signals_received.load() { - return Ok( #support_crate ::FromOverseer::Communication { msg }); + return Ok( #support_crate ::FromOrchestra::Communication { msg }); } else { self.pending_incoming = Some((needs_signals_received, msg)); // wait for next signal. let signal = self.signals.next().await - .ok_or(#support_crate ::OverseerError::Context( + .ok_or(#support_crate ::OrchestraError::Context( "Signal channel is terminated and empty." .to_owned() ))?; self.signals_received.inc(); - return Ok( #support_crate ::FromOverseer::Signal(signal)) + return Ok( #support_crate ::FromOrchestra::Signal(signal)) } } @@ -471,19 +413,19 @@ pub(crate) fn impl_subsystem_context_trait_for( let pending_incoming = &mut self.pending_incoming; // Otherwise, wait for the next signal or incoming message. - let from_overseer = #support_crate ::futures::select_biased! { + let from_orchestra = #support_crate ::futures::select_biased! { signal = await_signal => { let signal = signal - .ok_or( #support_crate ::OverseerError::Context( + .ok_or( #support_crate ::OrchestraError::Context( "Signal channel is terminated and empty." .to_owned() ))?; - #support_crate ::FromOverseer::Signal(signal) + #support_crate ::FromOrchestra::Signal(signal) } msg = await_message => { let packet = msg - .ok_or( #support_crate ::OverseerError::Context( + .ok_or( #support_crate ::OrchestraError::Context( "Message channel is terminated and empty." .to_owned() ))?; @@ -494,16 +436,16 @@ pub(crate) fn impl_subsystem_context_trait_for( continue; } else { // we know enough to return this message. - #support_crate ::FromOverseer::Communication { msg: packet.message} + #support_crate ::FromOrchestra::Communication { msg: packet.message} } } }; - if let #support_crate ::FromOverseer::Signal(_) = from_overseer { + if let #support_crate ::FromOrchestra::Signal(_) = from_orchestra { self.signals_received.inc(); } - return Ok(from_overseer); + return Ok(from_orchestra); } } @@ -514,22 +456,22 @@ pub(crate) fn impl_subsystem_context_trait_for( fn spawn(&mut self, name: &'static str, s: Pin + Send>>) -> ::std::result::Result<(), #error_ty> { - self.to_overseer.unbounded_send(#support_crate ::ToOverseer::SpawnJob { + self.to_orchestra.unbounded_send(#support_crate ::ToOrchestra::SpawnJob { name, subsystem: Some(self.name()), s, - }).map_err(|_| #support_crate ::OverseerError::TaskSpawn(name))?; + }).map_err(|_| #support_crate ::OrchestraError::TaskSpawn(name))?; Ok(()) } fn spawn_blocking(&mut self, name: &'static str, s: Pin + Send>>) -> ::std::result::Result<(), #error_ty> { - self.to_overseer.unbounded_send(#support_crate ::ToOverseer::SpawnBlockingJob { + self.to_orchestra.unbounded_send(#support_crate ::ToOrchestra::SpawnBlockingJob { name, subsystem: Some(self.name()), s, - }).map_err(|_| #support_crate ::OverseerError::TaskSpawn(name))?; + }).map_err(|_| #support_crate ::OrchestraError::TaskSpawn(name))?; Ok(()) } } @@ -539,7 +481,7 @@ pub(crate) fn impl_subsystem_context_trait_for( /// Implement the additional subsystem accumulation traits, for simplified usage, /// i.e. `${Subsystem}SenderTrait` and `${Subsystem}ContextTrait`. pub(crate) fn impl_per_subsystem_helper_traits( - info: &OverseerInfo, + info: &OrchestraInfo, subsystem_ctx_name: &Ident, subsystem_ctx_trait: &Ident, subsystem_sender_name: &Ident, @@ -645,7 +587,7 @@ pub(crate) fn impl_per_subsystem_helper_traits( /// /// Note: The generated `fn new` is used by the [builder pattern](../impl_builder.rs). pub(crate) fn impl_subsystem_context( - info: &OverseerInfo, + info: &OrchestraInfo, subsystem_sender_name: &Ident, subsystem_ctx_name: &Ident, ) -> TokenStream { @@ -657,7 +599,7 @@ pub(crate) fn impl_subsystem_context( /// It can be used by [`Subsystem`] to communicate with other [`Subsystem`]s /// or to spawn it's [`SubsystemJob`]s. /// - /// [`Overseer`]: struct.Overseer.html + /// [`Orchestra`]: struct.Orchestra.html /// [`Subsystem`]: trait.Subsystem.html /// [`SubsystemJob`]: trait.SubsystemJob.html #[derive(Debug)] @@ -666,8 +608,8 @@ pub(crate) fn impl_subsystem_context( signals: #support_crate ::metered::MeteredReceiver< #signal_ty >, messages: SubsystemIncomingMessages< M >, to_subsystems: #subsystem_sender_name < ::OutgoingMessages >, - to_overseer: #support_crate ::metered::UnboundedMeteredSender< - #support_crate ::ToOverseer + to_orchestra: #support_crate ::metered::UnboundedMeteredSender< + #support_crate ::ToOrchestra >, signals_received: SignalsReceived, pending_incoming: Option<(usize, M)>, @@ -683,7 +625,7 @@ pub(crate) fn impl_subsystem_context( signals: #support_crate ::metered::MeteredReceiver< #signal_ty >, messages: SubsystemIncomingMessages< M >, to_subsystems: ChannelsOut, - to_overseer: #support_crate ::metered::UnboundedMeteredSender<#support_crate:: ToOverseer>, + to_orchestra: #support_crate ::metered::UnboundedMeteredSender<#support_crate:: ToOrchestra>, name: &'static str ) -> Self { let signals_received = SignalsReceived::default(); @@ -695,7 +637,7 @@ pub(crate) fn impl_subsystem_context( signals_received: signals_received.clone(), _phantom: ::core::marker::PhantomData::default(), }, - to_overseer, + to_orchestra, signals_received, pending_incoming: None, name diff --git a/node/overseer/overseer-gen/proc-macro/src/lib.rs b/node/orchestra/proc-macro/src/lib.rs similarity index 65% rename from node/overseer/overseer-gen/proc-macro/src/lib.rs rename to node/orchestra/proc-macro/src/lib.rs index 7845917cfbab..df3f216afdf6 100644 --- a/node/overseer/overseer-gen/proc-macro/src/lib.rs +++ b/node/orchestra/proc-macro/src/lib.rs @@ -1,28 +1,28 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use proc_macro2::{Ident, Span, TokenStream}; use syn::{parse_quote, spanned::Spanned, Path}; +mod graph; mod impl_builder; mod impl_channels_out; mod impl_message_wrapper; -mod impl_overseer; +mod impl_orchestra; mod impl_subsystem_ctx_sender; -mod overseer; +mod orchestra; mod parse; mod subsystem; @@ -32,11 +32,11 @@ mod tests; use impl_builder::*; use impl_channels_out::*; use impl_message_wrapper::*; -use impl_overseer::*; +use impl_orchestra::*; use impl_subsystem_ctx_sender::*; use parse::*; -use self::{overseer::*, subsystem::*}; +use self::{orchestra::*, subsystem::*}; /// Obtain the support crate `Path` as `TokenStream`. pub(crate) fn support_crate() -> Result { @@ -44,7 +44,7 @@ pub(crate) fn support_crate() -> Result { parse_quote! {crate} } else { use proc_macro_crate::{crate_name, FoundCrate}; - let crate_name = crate_name("polkadot-overseer-gen")?; + let crate_name = crate_name("orchestra")?; match crate_name { FoundCrate::Itself => parse_quote! {crate}, FoundCrate::Name(name) => Ident::new(&name, Span::call_site()).into(), @@ -53,13 +53,13 @@ pub(crate) fn support_crate() -> Result { } #[proc_macro_attribute] -pub fn overlord( +pub fn orchestra( attr: proc_macro::TokenStream, item: proc_macro::TokenStream, ) -> proc_macro::TokenStream { let attr: TokenStream = attr.into(); let item: TokenStream = item.into(); - impl_overseer_gen(attr, item) + impl_orchestra_gen(attr, item) .unwrap_or_else(|err| err.to_compile_error()) .into() } diff --git a/node/overseer/overseer-gen/proc-macro/src/overseer.rs b/node/orchestra/proc-macro/src/orchestra.rs similarity index 53% rename from node/overseer/overseer-gen/proc-macro/src/overseer.rs rename to node/orchestra/proc-macro/src/orchestra.rs index 127120337ae0..ab1f9af3082f 100644 --- a/node/overseer/overseer-gen/proc-macro/src/overseer.rs +++ b/node/orchestra/proc-macro/src/orchestra.rs @@ -1,39 +1,38 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use proc_macro2::TokenStream; use syn::{parse2, Result}; use super::{parse::*, *}; -pub(crate) fn impl_overseer_gen( +pub(crate) fn impl_orchestra_gen( attr: TokenStream, orig: TokenStream, ) -> Result { - let args: OverseerAttrArgs = parse2(attr)?; + let args: OrchestraAttrArgs = parse2(attr)?; let message_wrapper = args.message_wrapper; - let of: OverseerGuts = parse2(orig)?; + let of: OrchestraGuts = parse2(orig)?; let support_crate = support_crate().expect("The crate this macro is run for, includes the proc-macro support as dependency, otherwise it could not be run in the first place. qed"); - let info = OverseerInfo { + let info = OrchestraInfo { support_crate, subsystems: of.subsystems, baggage: of.baggage, - overseer_name: of.name, + orchestra_name: of.name, message_wrapper, message_channel_capacity: args.message_channel_capacity, signal_channel_capacity: args.signal_channel_capacity, @@ -43,17 +42,17 @@ pub(crate) fn impl_overseer_gen( outgoing_ty: args.outgoing_ty, }; - let mut additive = impl_overseer_struct(&info); + let mut additive = impl_orchestra_struct(&info); additive.extend(impl_builder(&info)); - additive.extend(impl_overseen_subsystem(&info)); + additive.extend(impl_orchestrated_subsystem(&info)); additive.extend(impl_channels_out_struct(&info)); additive.extend(impl_subsystem_types_all(&info)?); additive.extend(impl_message_wrapper_enum(&info)?); - let ts = expander::Expander::new("overlord-expansion") - .add_comment("Generated overseer code by `#[overlord(..)]`".to_owned()) + let ts = expander::Expander::new("orchestra-expansion") + .add_comment("Generated orchestra code by `#[orchestra(..)]`".to_owned()) .dry(!cfg!(feature = "expand")) .verbose(true) // once all our needed format options are available on stable diff --git a/node/orchestra/proc-macro/src/parse/mod.rs b/node/orchestra/proc-macro/src/parse/mod.rs new file mode 100644 index 000000000000..05d6cc2efcd7 --- /dev/null +++ b/node/orchestra/proc-macro/src/parse/mod.rs @@ -0,0 +1,38 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +mod kw { + syn::custom_keyword!(event); + syn::custom_keyword!(signal); + syn::custom_keyword!(error); + syn::custom_keyword!(outgoing); + syn::custom_keyword!(gen); + syn::custom_keyword!(signal_capacity); + syn::custom_keyword!(message_capacity); + syn::custom_keyword!(subsystem); + syn::custom_keyword!(prefix); +} + +mod parse_orchestra_attr; +mod parse_orchestra_struct; + +mod parse_subsystem_attr; + +#[cfg(test)] +mod tests; + +pub(crate) use self::{parse_orchestra_attr::*, parse_orchestra_struct::*}; + +pub(crate) use self::parse_subsystem_attr::*; diff --git a/node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_attr.rs b/node/orchestra/proc-macro/src/parse/parse_orchestra_attr.rs similarity index 69% rename from node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_attr.rs rename to node/orchestra/proc-macro/src/parse/parse_orchestra_attr.rs index e5cb30dd7513..27486b5697a2 100644 --- a/node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_attr.rs +++ b/node/orchestra/proc-macro/src/parse/parse_orchestra_attr.rs @@ -1,18 +1,17 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use super::kw; use proc_macro2::Span; @@ -26,9 +25,9 @@ use syn::{ }; #[derive(Clone, Debug)] -enum OverseerAttrItem { +enum OrchestraAttrItem { ExternEventType { tag: kw::event, eq_token: Token![=], value: Path }, - ExternOverseerSignalType { tag: kw::signal, eq_token: Token![=], value: Path }, + ExternOrchestraSignalType { tag: kw::signal, eq_token: Token![=], value: Path }, ExternErrorType { tag: kw::error, eq_token: Token![=], value: Path }, OutgoingType { tag: kw::outgoing, eq_token: Token![=], value: Path }, MessageWrapperName { tag: kw::gen, eq_token: Token![=], value: Ident }, @@ -36,13 +35,13 @@ enum OverseerAttrItem { MessageChannelCapacity { tag: kw::message_capacity, eq_token: Token![=], value: usize }, } -impl ToTokens for OverseerAttrItem { +impl ToTokens for OrchestraAttrItem { fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { let ts = match self { Self::ExternEventType { tag, eq_token, value } => { quote! { #tag #eq_token, #value } }, - Self::ExternOverseerSignalType { tag, eq_token, value } => { + Self::ExternOrchestraSignalType { tag, eq_token, value } => { quote! { #tag #eq_token, #value } }, Self::ExternErrorType { tag, eq_token, value } => { @@ -65,47 +64,47 @@ impl ToTokens for OverseerAttrItem { } } -impl Parse for OverseerAttrItem { +impl Parse for OrchestraAttrItem { fn parse(input: &ParseBuffer) -> Result { let lookahead = input.lookahead1(); if lookahead.peek(kw::event) { - Ok(OverseerAttrItem::ExternEventType { + Ok(OrchestraAttrItem::ExternEventType { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse()?, }) } else if lookahead.peek(kw::signal) { - Ok(OverseerAttrItem::ExternOverseerSignalType { + Ok(OrchestraAttrItem::ExternOrchestraSignalType { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse()?, }) } else if lookahead.peek(kw::error) { - Ok(OverseerAttrItem::ExternErrorType { + Ok(OrchestraAttrItem::ExternErrorType { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse()?, }) } else if lookahead.peek(kw::outgoing) { - Ok(OverseerAttrItem::OutgoingType { + Ok(OrchestraAttrItem::OutgoingType { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse()?, }) } else if lookahead.peek(kw::gen) { - Ok(OverseerAttrItem::MessageWrapperName { + Ok(OrchestraAttrItem::MessageWrapperName { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse()?, }) } else if lookahead.peek(kw::signal_capacity) { - Ok(OverseerAttrItem::SignalChannelCapacity { + Ok(OrchestraAttrItem::SignalChannelCapacity { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse::()?.base10_parse::()?, }) } else if lookahead.peek(kw::message_capacity) { - Ok(OverseerAttrItem::MessageChannelCapacity { + Ok(OrchestraAttrItem::MessageChannelCapacity { tag: input.parse::()?, eq_token: input.parse()?, value: input.parse::()?.base10_parse::()?, @@ -118,7 +117,7 @@ impl Parse for OverseerAttrItem { /// Attribute arguments #[derive(Clone, Debug)] -pub(crate) struct OverseerAttrArgs { +pub(crate) struct OrchestraAttrArgs { pub(crate) message_wrapper: Ident, pub(crate) extern_event_ty: Path, pub(crate) extern_signal_ty: Path, @@ -137,7 +136,7 @@ macro_rules! extract_variant { }; ($unique:expr, $variant:ident) => { $unique.values().find_map(|item| { - if let OverseerAttrItem::$variant { value, .. } = item { + if let OrchestraAttrItem::$variant { value, .. } = item { Some(value.clone()) } else { None @@ -146,21 +145,21 @@ macro_rules! extract_variant { }; } -impl Parse for OverseerAttrArgs { +impl Parse for OrchestraAttrArgs { fn parse(input: &ParseBuffer) -> Result { - let items: Punctuated = - input.parse_terminated(OverseerAttrItem::parse)?; + let items: Punctuated = + input.parse_terminated(OrchestraAttrItem::parse)?; let mut unique = HashMap::< - std::mem::Discriminant, - OverseerAttrItem, + std::mem::Discriminant, + OrchestraAttrItem, RandomState, >::default(); for item in items { if let Some(first) = unique.insert(std::mem::discriminant(&item), item.clone()) { let mut e = Error::new( item.span(), - format!("Duplicate definition of overseer generation type found"), + format!("Duplicate definition of orchestra generation type found"), ); e.combine(Error::new(first.span(), "previously defined here.")); return Err(e) @@ -172,13 +171,13 @@ impl Parse for OverseerAttrArgs { let message_channel_capacity = extract_variant!(unique, MessageChannelCapacity; default = 1024_usize); - let error = extract_variant!(unique, ExternErrorType; err = "Must declare the overseer error type via `error=..`.")?; - let event = extract_variant!(unique, ExternEventType; err = "Must declare the overseer event type via `event=..`.")?; - let signal = extract_variant!(unique, ExternOverseerSignalType; err = "Must declare the overseer signal type via `signal=..`.")?; - let message_wrapper = extract_variant!(unique, MessageWrapperName; err = "Must declare the overseer generated wrapping message type via `gen=..`.")?; + let error = extract_variant!(unique, ExternErrorType; err = "Must declare the orchestra error type via `error=..`.")?; + let event = extract_variant!(unique, ExternEventType; err = "Must declare the orchestra event type via `event=..`.")?; + let signal = extract_variant!(unique, ExternOrchestraSignalType; err = "Must declare the orchestra signal type via `signal=..`.")?; + let message_wrapper = extract_variant!(unique, MessageWrapperName; err = "Must declare the orchestra generated wrapping message type via `gen=..`.")?; let outgoing = extract_variant!(unique, OutgoingType); - Ok(OverseerAttrArgs { + Ok(OrchestraAttrArgs { signal_channel_capacity, message_channel_capacity, extern_event_ty: event, diff --git a/node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_struct.rs b/node/orchestra/proc-macro/src/parse/parse_orchestra_struct.rs similarity index 80% rename from node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_struct.rs rename to node/orchestra/proc-macro/src/parse/parse_orchestra_struct.rs index 179a4ada06eb..e8ab449af632 100644 --- a/node/overseer/overseer-gen/proc-macro/src/parse/parse_overseer_struct.rs +++ b/node/orchestra/proc-macro/src/parse/parse_orchestra_struct.rs @@ -1,19 +1,19 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use itertools::Itertools; use proc_macro2::{Span, TokenStream}; use std::collections::{hash_map::RandomState, HashMap, HashSet}; use syn::{ @@ -22,8 +22,8 @@ use syn::{ punctuated::Punctuated, spanned::Spanned, token::Bracket, - AttrStyle, Error, Field, FieldsNamed, GenericParam, Ident, ItemStruct, Path, Result, Token, - Type, Visibility, + AttrStyle, Error, Field, FieldsNamed, GenericParam, Ident, ItemStruct, Path, PathSegment, + Result, Token, Type, Visibility, }; use quote::{quote, ToTokens}; @@ -107,13 +107,73 @@ pub(crate) struct SubSysField { pub(crate) wip: bool, } -fn try_type_to_path(ty: Type, span: Span) -> Result { +// Converts a type enum to a path if this type is a TypePath +fn try_type_to_path(ty: &Type, span: Span) -> Result { match ty { - Type::Path(path) => Ok(path.path), + Type::Path(path) => Ok(path.path.clone()), _ => Err(Error::new(span, "Type must be a path expression.")), } } +// Converts a Rust type to a list of idents recursively checking the possible values +fn flatten_type(ty: &Type, span: Span) -> Result> { + match ty { + syn::Type::Array(ar) => flatten_type(&ar.elem, span), + syn::Type::Paren(par) => flatten_type(&par.elem, span), + syn::Type::Path(type_path) => type_path + .path + .segments + .iter() + .map(|seg| flatten_path_segments(seg, span.clone())) + .flatten_ok() + .collect::>>(), + syn::Type::Tuple(tup) => tup + .elems + .iter() + .map(|element| flatten_type(element, span.clone())) + .flatten_ok() + .collect::>>(), + _ => Err(Error::new(span, format!("Unsupported type: {:?}", ty))), + } +} + +// Flatten segments of some path to a list of idents used in these segments +fn flatten_path_segments(path_segment: &PathSegment, span: Span) -> Result> { + let mut result = vec![path_segment.ident.clone()]; + + match &path_segment.arguments { + syn::PathArguments::AngleBracketed(args) => { + let mut recursive_idents = args + .args + .iter() + .map(|generic_argument| match generic_argument { + syn::GenericArgument::Type(ty) => flatten_type(ty, span.clone()), + _ => Err(Error::new( + span, + format!( + "Field has a generic with an unsupported parameter {:?}", + generic_argument + ), + )), + }) + .flatten_ok() + .collect::>>()?; + result.append(&mut recursive_idents); + }, + syn::PathArguments::None => {}, + _ => + return Err(Error::new( + span, + format!( + "Field has a generic with an unsupported path {:?}", + path_segment.arguments + ), + )), + } + + Ok(result) +} + macro_rules! extract_variant { ($unique:expr, $variant:ident ; default = $fallback:expr) => { extract_variant!($unique, $variant).unwrap_or_else(|| $fallback) @@ -255,14 +315,14 @@ impl Parse for SubSystemAttrItems { #[derive(Debug, Clone)] pub(crate) struct BaggageField { pub(crate) field_name: Ident, - pub(crate) field_ty: Path, - pub(crate) generic: bool, + pub(crate) field_ty: Type, + pub(crate) generic_types: Vec, pub(crate) vis: Visibility, } #[derive(Clone, Debug)] -pub(crate) struct OverseerInfo { - /// Where the support crate `::polkadot_overseer_gen` lives. +pub(crate) struct OrchestraInfo { + /// Where the support crate `::orchestra` lives. pub(crate) support_crate: Path, /// Fields annotated with `#[subsystem(..)]`. @@ -272,9 +332,9 @@ pub(crate) struct OverseerInfo { pub(crate) baggage: Vec, /// Name of the wrapping enum for all messages, defaults to `AllMessages`. pub(crate) message_wrapper: Ident, - /// Name of the overseer struct, used as a prefix for + /// Name of the orchestra struct, used as a prefix for /// almost all generated types. - pub(crate) overseer_name: Ident, + pub(crate) orchestra_name: Ident, /// Size of the bounded channel. pub(crate) message_channel_capacity: usize, @@ -295,7 +355,7 @@ pub(crate) struct OverseerInfo { pub(crate) extern_error_ty: Path, } -impl OverseerInfo { +impl OrchestraInfo { pub(crate) fn support_crate_name(&self) -> &Path { &self.support_crate } @@ -360,8 +420,7 @@ impl OverseerInfo { pub(crate) fn baggage_generic_types(&self) -> Vec { self.baggage .iter() - .filter(|bag| bag.generic) - .filter_map(|bag| bag.field_ty.get_ident().cloned()) + .flat_map(|bag| bag.generic_types.clone()) .collect::>() } @@ -389,15 +448,15 @@ impl OverseerInfo { } } -/// Internals of the overseer. +/// Internals of the orchestra. #[derive(Debug, Clone)] -pub(crate) struct OverseerGuts { +pub(crate) struct OrchestraGuts { pub(crate) name: Ident, pub(crate) subsystems: Vec, pub(crate) baggage: Vec, } -impl OverseerGuts { +impl OrchestraGuts { pub(crate) fn parse_fields( name: Ident, baggage_generics: HashSet, @@ -424,7 +483,7 @@ impl OverseerGuts { let ident = ident.ok_or_else(|| { Error::new( ty.span(), - "Missing identifier for field, only named fields are expceted.", + "Missing identifier for field, only named fields are expected.", ) })?; @@ -443,7 +502,7 @@ impl OverseerGuts { let attr_tokens = attr_tokens.clone(); let subsystem_attrs: SubSystemAttrItems = syn::parse2(attr_tokens.clone())?; - let field_ty = try_type_to_path(ty, span)?; + let field_ty = try_type_to_path(&ty, span)?; let generic = field_ty .get_ident() .ok_or_else(|| { @@ -485,26 +544,27 @@ impl OverseerGuts { blocking, }); } else { - let field_ty = try_type_to_path(ty, ident.span())?; - let generic = field_ty - .get_ident() - .map(|ident| baggage_generics.contains(ident)) - .unwrap_or(false); - baggage.push(BaggageField { field_name: ident, generic, field_ty, vis }); + let flattened = flatten_type(&ty, ident.span())?; + let generic_types = flattened + .iter() + .filter(|flat_ident| baggage_generics.contains(flat_ident)) + .cloned() + .collect::>(); + baggage.push(BaggageField { field_name: ident, generic_types, field_ty: ty, vis }); } } Ok(Self { name, subsystems, baggage }) } } -impl Parse for OverseerGuts { +impl Parse for OrchestraGuts { fn parse(input: ParseStream) -> Result { let ds: ItemStruct = input.parse()?; match ds.fields { syn::Fields::Named(named) => { let name = ds.ident.clone(); - // collect the indepedentent subsystem generics + // collect the independent subsystem generics // which need to be carried along, there are the non-generated ones let mut orig_generics = ds.generics; diff --git a/node/overseer/overseer-gen/proc-macro/src/parse/parse_subsystem_attr.rs b/node/orchestra/proc-macro/src/parse/parse_subsystem_attr.rs similarity index 79% rename from node/overseer/overseer-gen/proc-macro/src/parse/parse_subsystem_attr.rs rename to node/orchestra/proc-macro/src/parse/parse_subsystem_attr.rs index ec308a6b804f..6df4a4c8e292 100644 --- a/node/overseer/overseer-gen/proc-macro/src/parse/parse_subsystem_attr.rs +++ b/node/orchestra/proc-macro/src/parse/parse_subsystem_attr.rs @@ -1,18 +1,17 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use super::kw; use proc_macro2::Span; @@ -29,13 +28,13 @@ use syn::{ enum SubsystemAttrItem { /// Error type provided by the user. Error { tag: kw::error, eq_token: Token![=], value: Path }, - /// For which slot in the overseer this should be plugged. + /// For which slot in the orchestra this should be plugged. /// /// The subsystem implementation can and should have a different name - /// from the declared parameter type in the overseer. + /// from the declared parameter type in the orchestra. Subsystem { tag: Option, eq_token: Option, value: Ident }, /// The prefix to apply when a subsystem is implemented in a different file/crate - /// than the overseer itself. + /// than the orchestra itself. /// /// Important for `#[subsystem(..)]` to reference the traits correctly. TraitPrefix { tag: kw::prefix, eq_token: Token![=], value: Path }, @@ -137,7 +136,7 @@ impl Parse for SubsystemAttrArgs { } } let error_path = extract_variant!(unique, Error); - let subsystem_ident = extract_variant!(unique, Subsystem; err = "Must annotate the identical overseer error type via `subsystem=..` or plainly as `Subsystem` as specified in the overseer declaration.")?; + let subsystem_ident = extract_variant!(unique, Subsystem; err = "Must annotate the identical orchestra error type via `subsystem=..` or plainly as `Subsystem` as specified in the orchestra declaration.")?; let trait_prefix_path = extract_variant!(unique, TraitPrefix); Ok(SubsystemAttrArgs { span, error_path, subsystem_ident, trait_prefix_path }) } diff --git a/node/overseer/overseer-gen/proc-macro/src/parse/tests.rs b/node/orchestra/proc-macro/src/parse/tests.rs similarity index 83% rename from node/overseer/overseer-gen/proc-macro/src/parse/tests.rs rename to node/orchestra/proc-macro/src/parse/tests.rs index 990b5d6872c0..3bcfda45db80 100644 --- a/node/overseer/overseer-gen/proc-macro/src/parse/tests.rs +++ b/node/orchestra/proc-macro/src/parse/tests.rs @@ -1,18 +1,17 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use super::*; use crate::{SubSysAttrItem, SubSystemAttrItems}; @@ -25,11 +24,11 @@ mod attr { #[test] fn attr_full_works() { - let attr: OverseerAttrArgs = parse_quote! { + let attr: OrchestraAttrArgs = parse_quote! { gen=AllMessage, event=::some::why::ExternEvent, signal=SigSigSig, signal_capacity=111, message_capacity=222, - error=OverseerError, + error=OrchestraError, }; - assert_matches!(attr, OverseerAttrArgs { + assert_matches!(attr, OrchestraAttrArgs { message_channel_capacity, signal_channel_capacity, .. @@ -41,11 +40,11 @@ mod attr { #[test] fn attr_partial_works() { - let attr: OverseerAttrArgs = parse_quote! { + let attr: OrchestraAttrArgs = parse_quote! { gen=AllMessage, event=::some::why::ExternEvent, signal=::foo::SigSigSig, - error=OverseerError, + error=OrchestraError, }; - assert_matches!(attr, OverseerAttrArgs { + assert_matches!(attr, OrchestraAttrArgs { message_channel_capacity: _, signal_channel_capacity: _, .. @@ -249,7 +248,7 @@ mod strukt { #[test] fn struct_parse_baggage() { - let item: OverseerGuts = parse_quote! { + let item: OrchestraGuts = parse_quote! { pub struct Ooooh where X: Secrit { #[subsystem(consumes: Foo, sends: [])] sub0: FooSubsystem, @@ -262,7 +261,7 @@ mod strukt { #[test] fn struct_parse_full() { - let item: OverseerGuts = parse_quote! { + let item: OrchestraGuts = parse_quote! { pub struct Ooooh where X: Secrit { #[subsystem(consumes: Foo, sends: [])] sub0: FooSubsystem, @@ -284,7 +283,7 @@ mod strukt { #[test] fn struct_parse_basic() { - let item: OverseerGuts = parse_quote! { + let item: OrchestraGuts = parse_quote! { pub struct Ooooh { #[subsystem(consumes: Foo, sends: [])] sub0: FooSubsystem, diff --git a/node/overseer/overseer-gen/proc-macro/src/subsystem.rs b/node/orchestra/proc-macro/src/subsystem.rs similarity index 81% rename from node/overseer/overseer-gen/proc-macro/src/subsystem.rs rename to node/orchestra/proc-macro/src/subsystem.rs index 7b5523e4b5c8..27f50704bb94 100644 --- a/node/overseer/overseer-gen/proc-macro/src/subsystem.rs +++ b/node/orchestra/proc-macro/src/subsystem.rs @@ -1,18 +1,17 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Generates the bounds for a particular subsystem `Context` and associate `type Sender`. //! @@ -20,16 +19,16 @@ //! ## Implement `trait Subsystem` via `subsystem` //! //! ```ignore -//! # use polkadot_overseer_gen_proc_macro::subsystem; +//! # use orchestra_proc_macro::subsystem; //! # mod somewhere { -//! # use polkadot_overseer_gen_proc_macro::overlord; -//! # pub use polkadot_overseer_gen::*; +//! # use orchestra_proc_macro::orchestra; +//! # pub use orchestra::*; //! # //! # #[derive(Debug, thiserror::Error)] //! # #[error("Yikes!")] //! # pub struct Yikes; -//! # impl From for Yikes { -//! # fn from(_: OverseerError) -> Yikes { Yikes } +//! # impl From for Yikes { +//! # fn from(_: OrchestraError) -> Yikes { Yikes } //! # } //! # impl From for Yikes { //! # fn from(_: mpsc::SendError) -> Yikes { Yikes } @@ -46,7 +45,7 @@ //! # #[derive(Debug, Clone, Copy)] //! # pub struct B; //! # -//! # #[overlord(signal=Sig, gen=AllOfThem, event=Eve, error=Yikes)] +//! # #[orchestra(signal=Sig, gen=AllOfThem, event=Eve, error=Yikes)] //! # pub struct Wonderland { //! # #[subsystem(A, sends: [B])] //! # foo: Foo, @@ -71,16 +70,16 @@ //! expands to //! //! ```ignore -//! # use polkadot_overseer_gen_proc_macro::subsystem; +//! # use orchestra_proc_macro::subsystem; //! # mod somewhere { -//! # use polkadot_overseer_gen_proc_macro::overlord; -//! # pub use polkadot_overseer_gen::*; +//! # use orchestra_proc_macro::orchestra; +//! # pub use orchestra::*; //! # //! # #[derive(Debug, thiserror::Error)] //! # #[error("Yikes!")] //! # pub struct Yikes; -//! # impl From for Yikes { -//! # fn from(_: OverseerError) -> Yikes { Yikes } +//! # impl From for Yikes { +//! # fn from(_: OrchestraError) -> Yikes { Yikes } //! # } //! # impl From for Yikes { //! # fn from(_: mpsc::SendError) -> Yikes { Yikes } @@ -97,7 +96,7 @@ //! # #[derive(Debug, Clone, Copy)] //! # pub struct B; //! # -//! # #[overlord(signal=Sig, gen=AllOfThem, event=Eve, error=Yikes)] +//! # #[orchestra(signal=Sig, gen=AllOfThem, event=Eve, error=Yikes)] //! # pub struct Wonderland { //! # #[subsystem(A, sends: [B])] //! # foo: Foo, @@ -106,7 +105,7 @@ //! # } //! # } //! # use somewhere::{Yikes, SpawnedSubsystem}; -//! # use polkadot_overseer_gen as support_crate; +//! # use orchestra as support_crate; //! # //! # struct FooSubsystem; //! # @@ -204,15 +203,15 @@ pub(crate) fn impl_subsystem_context_trait_bounds( // a `prefix=*` provided. Either is ok. // Technically this is two different things: - // The place where the `#[overlord]` is annotated is where all `trait *SenderTrait` and + // The place where the `#[orchestra]` is annotated is where all `trait *SenderTrait` and // `trait *ContextTrait` types exist. - // The other usage is the true support crate `polkadot-overseer-gen`, where the static ones + // The other usage is the true support crate `orchestra`, where the static ones // are declared. // Right now, if the `support_crate` is not included, it falls back silently to the `trait_prefix_path`. let support_crate = support_crate() .or_else(|_e| { trait_prefix_path.clone().ok_or_else(|| { - syn::Error::new(attr.span(), "Couldn't find `polkadot-overseer-gen` in manifest, but also missing a `prefix=` to help trait bound resolution") + syn::Error::new(attr.span(), "Couldn't find `orchestra` in manifest, but also missing a `prefix=` to help trait bound resolution") }) })?; @@ -255,7 +254,7 @@ pub(crate) fn impl_subsystem_context_trait_bounds( let error_path = error_path.ok_or_else(|| { syn::Error::new( span, - "Must annotate the identical overseer error type via `error=..`.", + "Must annotate the identical orchestra error type via `error=..`.", ) })?; // Only replace the subsystem trait if it's desired. diff --git a/node/overseer/overseer-gen/proc-macro/src/tests.rs b/node/orchestra/proc-macro/src/tests.rs similarity index 58% rename from node/overseer/overseer-gen/proc-macro/src/tests.rs rename to node/orchestra/proc-macro/src/tests.rs index 364e53f5b02a..2b19b5f29a56 100644 --- a/node/overseer/overseer-gen/proc-macro/src/tests.rs +++ b/node/orchestra/proc-macro/src/tests.rs @@ -1,18 +1,17 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. use super::*; use assert_matches::assert_matches; @@ -27,7 +26,7 @@ fn print() { signal=SigSigSig, signal_capacity=111, message_capacity=222, - error=OverseerError, + error=OrchestraError, }; let item = quote! { @@ -48,14 +47,14 @@ fn print() { } }; - let output = impl_overseer_gen(attr, item).expect("Simple example always works. qed"); + let output = impl_orchestra_gen(attr, item).expect("Simple example always works. qed"); println!("//generated:"); println!("{}", output); } #[test] fn struct_parse_full() { - let item: OverseerGuts = parse_quote! { + let item: OrchestraGuts = parse_quote! { pub struct Ooooh where X: Secrit { #[subsystem(Foo)] sub0: FooSubsystem, @@ -77,7 +76,7 @@ fn struct_parse_full() { #[test] fn struct_parse_basic() { - let item: OverseerGuts = parse_quote! { + let item: OrchestraGuts = parse_quote! { pub struct Ooooh { #[subsystem(Foo)] sub0: FooSubsystem, @@ -88,11 +87,11 @@ fn struct_parse_basic() { #[test] fn attr_full() { - let attr: OverseerAttrArgs = parse_quote! { + let attr: OrchestraAttrArgs = parse_quote! { gen=AllMessage, event=::some::why::ExternEvent, signal=SigSigSig, signal_capacity=111, message_capacity=222, - error=OverseerError, + error=OrchestraError, }; - assert_matches!(attr, OverseerAttrArgs { + assert_matches!(attr, OrchestraAttrArgs { message_channel_capacity, signal_channel_capacity, .. @@ -104,11 +103,11 @@ fn attr_full() { #[test] fn attr_partial() { - let attr: OverseerAttrArgs = parse_quote! { + let attr: OrchestraAttrArgs = parse_quote! { gen=AllMessage, event=::some::why::ExternEvent, signal=::foo::SigSigSig, - error=OverseerError, + error=OrchestraError, }; - assert_matches!(attr, OverseerAttrArgs { + assert_matches!(attr, OrchestraAttrArgs { message_channel_capacity: _, signal_channel_capacity: _, .. diff --git a/node/overseer/overseer-gen/src/lib.rs b/node/orchestra/src/lib.rs similarity index 79% rename from node/overseer/overseer-gen/src/lib.rs rename to node/orchestra/src/lib.rs index e0ec74793501..15bd661e7200 100644 --- a/node/overseer/overseer-gen/src/lib.rs +++ b/node/orchestra/src/lib.rs @@ -1,42 +1,43 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! # Overseer +// Copyright (C) 2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! # Orchestra +//! +//! `orchestra` provides a global information flow of what a token of information. +//! The token is arbitrary, but is used to notify all `Subsystem`s of what is relevant +//! and what is not. //! -//! `overseer` implements the Overseer architecture described in the -//! [implementers-guide](https://w3f.github.io/parachain-implementers-guide/node/index.html). -//! For the motivations behind implementing the overseer itself you should -//! check out that guide, documentation in this crate will be mostly discussing -//! technical stuff. +//! For the motivations behind implementing the orchestra itself you should +//! check out that guide, documentation in this crate will focus and be of +//! technical nature. //! -//! An `Overseer` is something that allows spawning/stopping and overseeing +//! An `Orchestra` is something that allows spawning/stopping and orchestrating //! asynchronous tasks as well as establishing a well-defined and easy to use //! protocol that the tasks can use to communicate with each other. It is desired //! that this protocol is the only way tasks communicate with each other, however //! at this moment there are no foolproof guards against other ways of communication. //! -//! The `Overseer` is instantiated with a pre-defined set of `Subsystems` that -//! share the same behavior from `Overseer`'s point of view. +//! The `Orchestra` is instantiated with a pre-defined set of `Subsystems` that +//! share the same behavior from `Orchestra`'s point of view. //! //! ```text //! +-----------------------------+ -//! | Overseer | +//! | Orchesta | //! +-----------------------------+ //! -//! ................| Overseer "holds" these and uses |.............. +//! ................| Orchestra "holds" these and uses |............. //! . them to (re)start things . //! . . //! . +-------------------+ +---------------------+ . @@ -47,7 +48,7 @@ //! | | //! start() start() //! V V -//! ..................| Overseer "runs" these |....................... +//! ..................| Orchestra "runs" these |....................... //! . +--------------------+ +---------------------+ . //! . | SubsystemInstance1 | <-- bidir --> | SubsystemInstance2 | . //! . +--------------------+ +---------------------+ . @@ -60,15 +61,12 @@ #![deny(missing_docs)] #![deny(unused_crate_dependencies)] -pub use polkadot_overseer_gen_proc_macro::{contextbounds, overlord, subsystem}; +pub use orchestra_proc_macro::{contextbounds, orchestra, subsystem}; -#[doc(hidden)] -pub use gum; #[doc(hidden)] pub use metered; - #[doc(hidden)] -pub use polkadot_node_primitives::SpawnNamed; +pub use tracing; #[doc(hidden)] pub use async_trait::async_trait; @@ -78,7 +76,7 @@ pub use futures::{ channel::{mpsc, oneshot}, future::{BoxFuture, Fuse, Future}, poll, select, - stream::{self, select, FuturesUnordered}, + stream::{self, select, select_with_strategy, FuturesUnordered, PollNext}, task::{Context, Poll}, FutureExt, StreamExt, }; @@ -95,19 +93,40 @@ pub use std::time::Duration; #[doc(hidden)] pub use futures_timer::Delay; -pub use polkadot_node_network_protocol::WrongVariant; - use std::fmt; #[cfg(test)] mod tests; -/// A type of messages that are sent from a [`Subsystem`] to the declared overseer. +/// A spawner +#[dyn_clonable::clonable] +pub trait Spawner: Clone + Send + Sync { + /// Spawn the given blocking future. + /// + /// The given `group` and `name` is used to identify the future in tracing. + fn spawn_blocking( + &self, + name: &'static str, + group: Option<&'static str>, + future: futures::future::BoxFuture<'static, ()>, + ); + /// Spawn the given non-blocking future. + /// + /// The given `group` and `name` is used to identify the future in tracing. + fn spawn( + &self, + name: &'static str, + group: Option<&'static str>, + future: futures::future::BoxFuture<'static, ()>, + ); +} + +/// A type of messages that are sent from a [`Subsystem`] to the declared orchestra. /// /// Used to launch jobs. -pub enum ToOverseer { +pub enum ToOrchestra { /// A message that wraps something the `Subsystem` is desiring to - /// spawn on the overseer and a `oneshot::Sender` to signal the result + /// spawn on the orchestra and a `oneshot::Sender` to signal the result /// of the spawn. SpawnJob { /// Name of the task to spawn which be shown in jaeger and tracing logs. @@ -130,7 +149,7 @@ pub enum ToOverseer { }, } -impl fmt::Debug for ToOverseer { +impl fmt::Debug for ToOrchestra { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::SpawnJob { name, subsystem, .. } => { @@ -184,10 +203,17 @@ pub fn make_packet(signals_received: usize, message: T) -> MessagePacket { MessagePacket { signals_received, message } } +/// A functor to specify strategy of the channels selection in the `SubsystemIncomingMessages` +pub fn select_message_channel_strategy(_: &mut ()) -> PollNext { + PollNext::Right +} + /// Incoming messages from both the bounded and unbounded channel. -pub type SubsystemIncomingMessages = self::stream::Select< +pub type SubsystemIncomingMessages = self::stream::SelectWithStrategy< self::metered::MeteredReceiver>, self::metered::UnboundedMeteredReceiver>, + fn(&mut ()) -> self::stream::PollNext, + (), >; /// Watermark to track the received signals. @@ -227,7 +253,7 @@ pub trait AnnotateErrorOrigin: 'static + Send + Sync + std::error::Error { /// In essence it's just a new type wrapping a `BoxFuture`. pub struct SpawnedSubsystem where - E: std::error::Error + Send + Sync + 'static + From, + E: std::error::Error + Send + Sync + 'static + From, { /// Name of the subsystem being spawned. pub name: &'static str, @@ -244,7 +270,7 @@ where /// * etc. #[derive(thiserror::Error, Debug)] #[allow(missing_docs)] -pub enum OverseerError { +pub enum OrchestraError { #[error(transparent)] NotifyCancellation(#[from] oneshot::Canceled), @@ -274,8 +300,8 @@ pub enum OverseerError { }, } -/// Alias for a result with error type `OverseerError`. -pub type OverseerResult = std::result::Result; +/// Alias for a result with error type `OrchestraError`. +pub type OrchestraResult = std::result::Result; /// Collection of meters related to a subsystem. #[derive(Clone)] @@ -329,14 +355,14 @@ pub struct SubsystemInstance { pub name: &'static str, } -/// A message type that a subsystem receives from an overseer. -/// It wraps signals from an overseer and messages that are circulating +/// A message type that a subsystem receives from an orchestra. +/// It wraps signals from an orchestra and messages that are circulating /// between subsystems. /// /// It is generic over over the message type `M` that a particular `Subsystem` may use. #[derive(Debug)] -pub enum FromOverseer { - /// Signal from the `Overseer`. +pub enum FromOrchestra { + /// Signal from the `Orchestra`. Signal(Signal), /// Some other `Subsystem`'s message. @@ -346,7 +372,7 @@ pub enum FromOverseer { }, } -impl From for FromOverseer { +impl From for FromOrchestra { fn from(signal: Signal) -> Self { Self::Signal(signal) } @@ -356,7 +382,7 @@ impl From for FromOverseer { /// It can be used by [`Subsystem`] to communicate with other [`Subsystem`]s /// or spawn jobs. /// -/// [`Overseer`]: struct.Overseer.html +/// [`Orchestra`]: struct.Orchestra.html /// [`SubsystemJob`]: trait.SubsystemJob.html #[async_trait::async_trait] pub trait SubsystemContext: Send + 'static { @@ -375,16 +401,16 @@ pub trait SubsystemContext: Send + 'static { /// The sender type as provided by `sender()` and underlying. type Sender: Clone + Send + 'static + SubsystemSender; /// The error type. - type Error: ::std::error::Error + ::std::convert::From + Sync + Send + 'static; + type Error: ::std::error::Error + ::std::convert::From + Sync + Send + 'static; /// Try to asynchronously receive a message. /// /// Has to be used with caution, if you loop over this without /// using `pending!()` macro you will end up with a busy loop! - async fn try_recv(&mut self) -> Result>, ()>; + async fn try_recv(&mut self) -> Result>, ()>; /// Receive a message. - async fn recv(&mut self) -> Result, Self::Error>; + async fn recv(&mut self) -> Result, Self::Error>; /// Spawn a child task on the executor. fn spawn( @@ -438,18 +464,18 @@ pub trait SubsystemContext: Send + 'static { fn sender(&mut self) -> &mut Self::Sender; } -/// A trait that describes the [`Subsystem`]s that can run on the [`Overseer`]. +/// A trait that describes the [`Subsystem`]s that can run on the [`Orchestra`]. /// /// It is generic over the message type circulating in the system. /// The idea that we want some type containing persistent state that /// can spawn actually running subsystems when asked. /// -/// [`Overseer`]: struct.Overseer.html +/// [`Orchestra`]: struct.Orchestra.html /// [`Subsystem`]: trait.Subsystem.html pub trait Subsystem where Ctx: SubsystemContext, - E: std::error::Error + Send + Sync + 'static + From, + E: std::error::Error + Send + Sync + 'static + From, { /// Start this `Subsystem` and return `SpawnedSubsystem`. fn start(self, ctx: Ctx) -> SpawnedSubsystem; diff --git a/node/orchestra/src/tests.rs b/node/orchestra/src/tests.rs new file mode 100644 index 000000000000..4b622faf889f --- /dev/null +++ b/node/orchestra/src/tests.rs @@ -0,0 +1,38 @@ +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#[test] +#[rustversion::attr(not(stable), ignore)] +fn ui_compile_fail() { + // Only run the ui tests when `RUN_UI_TESTS` is set. + if std::env::var("RUN_UI_TESTS").is_err() { + return + } + + let t = trybuild::TestCases::new(); + t.compile_fail("tests/ui/err-*.rs"); +} + +#[test] +#[rustversion::attr(not(stable), ignore)] +fn ui_pass() { + // Only run the ui tests when `RUN_UI_TESTS` is set. + if std::env::var("RUN_UI_TESTS").is_err() { + return + } + + let t = trybuild::TestCases::new(); + t.pass("tests/ui/ok-*.rs"); +} diff --git a/node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.rs b/node/orchestra/tests/ui/err-01-duplicate-consumer.rs similarity index 73% rename from node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.rs rename to node/orchestra/tests/ui/err-01-duplicate-consumer.rs index b81f10a7f0fa..589bcede9963 100644 --- a/node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.rs +++ b/node/orchestra/tests/ui/err-01-duplicate-consumer.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; @@ -16,8 +16,8 @@ struct Event; #[derive(Clone)] struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] -struct Overseer { +#[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, @@ -31,7 +31,7 @@ struct DummySpawner; struct DummyCtx; fn main() { - let overseer = Overseer::<_,_>::builder() + let orchestra = Orchestra::<_,_>::builder() .sub0(AwesomeSubSys::default()) .spawner(DummySpawner) .build(|| -> DummyCtx { DummyCtx } ); diff --git a/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr b/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr new file mode 100644 index 000000000000..cd117ebd7285 --- /dev/null +++ b/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr @@ -0,0 +1,21 @@ +error[E0119]: conflicting implementations of trait `orchestra::SubsystemSender` for type `OrchestraSubsystemSender` + --> tests/ui/err-01-duplicate-consumer.rs:19:1 + | +19 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | first implementation here + | conflicting implementation for `OrchestraSubsystemSender` + | + = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `std::convert::From` for type `AllMessages` + --> tests/ui/err-01-duplicate-consumer.rs:19:1 + | +19 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | first implementation here + | conflicting implementation for `AllMessages` + | + = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/node/overseer/overseer-gen/tests/ui/err-02-enum.rs b/node/orchestra/tests/ui/err-02-enum.rs similarity index 70% rename from node/overseer/overseer-gen/tests/ui/err-02-enum.rs rename to node/orchestra/tests/ui/err-02-enum.rs index c7e491bfba9a..8d1ddeac6dda 100644 --- a/node/overseer/overseer-gen/tests/ui/err-02-enum.rs +++ b/node/orchestra/tests/ui/err-02-enum.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; @@ -12,8 +12,8 @@ struct Event; #[derive(Clone, Debug)] struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] -enum Overseer { +#[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] +enum Orchestra { #[subsystem(MsgStrukt)] Sub0(AwesomeSubSys), } @@ -24,7 +24,7 @@ struct DummySpawner; struct DummyCtx; fn main() { - let overseer = Overseer::<_,_>::builder() + let orchestra = Orchestra::<_,_>::builder() .sub0(AwesomeSubSys::default()) .i_like_pie(std::f64::consts::PI) .spawner(DummySpawner) diff --git a/node/orchestra/tests/ui/err-02-enum.stderr b/node/orchestra/tests/ui/err-02-enum.stderr new file mode 100644 index 000000000000..d83aab2ea23b --- /dev/null +++ b/node/orchestra/tests/ui/err-02-enum.stderr @@ -0,0 +1,11 @@ +error: expected `struct` + --> $DIR/err-02-enum.rs:16:1 + | +16 | enum Orchestra { + | ^^^^ + +error[E0433]: failed to resolve: use of undeclared type `Orchestra` + --> $DIR/err-02-enum.rs:27:17 + | +27 | let orchestra = Orchestra::<_,_>::builder() + | ^^^^^^^^ use of undeclared type `Orchestra` diff --git a/node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.rs b/node/orchestra/tests/ui/err-03-subsys-twice.rs similarity index 75% rename from node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.rs rename to node/orchestra/tests/ui/err-03-subsys-twice.rs index 9a7ad951c8b7..187d9e1e7a5b 100644 --- a/node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.rs +++ b/node/orchestra/tests/ui/err-03-subsys-twice.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; @@ -16,8 +16,8 @@ struct MsgStrukt(u8); #[derive(Clone, Debug)] struct MsgStrukt2(f64); -#[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] -struct Overseer { +#[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, @@ -31,7 +31,7 @@ struct DummySpawner; struct DummyCtx; fn main() { - let overseer = Overseer::<_,_>::builder() + let orchestra = Orchestra::<_,_>::builder() .sub0(AwesomeSubSys::default()) .i_like_pie(std::f64::consts::PI) .spawner(DummySpawner) diff --git a/node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.stderr b/node/orchestra/tests/ui/err-03-subsys-twice.stderr similarity index 63% rename from node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.stderr rename to node/orchestra/tests/ui/err-03-subsys-twice.stderr index cba46366daed..3fb97a88d7ab 100644 --- a/node/overseer/overseer-gen/tests/ui/err-03-subsys-twice.stderr +++ b/node/orchestra/tests/ui/err-03-subsys-twice.stderr @@ -10,8 +10,8 @@ error: previously defined here. 22 | sub0: AwesomeSubSys, | ^^^^^^^^^^^^^ -error[E0433]: failed to resolve: use of undeclared type `Overseer` +error[E0433]: failed to resolve: use of undeclared type `Orchestra` --> $DIR/err-03-subsys-twice.rs:34:17 | -34 | let overseer = Overseer::<_,_>::builder() - | ^^^^^^^^ use of undeclared type `Overseer` +34 | let orchestra = Orchestra::<_,_>::builder() + | ^^^^^^^^ use of undeclared type `Orchestra` diff --git a/node/overseer/overseer-gen/tests/ui/err-04-missing-error.rs b/node/orchestra/tests/ui/err-04-missing-error.rs similarity index 75% rename from node/overseer/overseer-gen/tests/ui/err-04-missing-error.rs rename to node/orchestra/tests/ui/err-04-missing-error.rs index 3547eb36a5c5..74672a4549a4 100644 --- a/node/overseer/overseer-gen/tests/ui/err-04-missing-error.rs +++ b/node/orchestra/tests/ui/err-04-missing-error.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; @@ -13,8 +13,8 @@ struct Event; #[derive(Clone)] struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, @@ -27,7 +27,7 @@ struct DummySpawner; struct DummyCtx; fn main() { - let _ = Overseer::builder() + let _ = Orchestra::builder() .sub0(AwesomeSubSys::default()) .i_like_pie(std::f64::consts::PI) .spawner(DummySpawner) diff --git a/node/orchestra/tests/ui/err-04-missing-error.stderr b/node/orchestra/tests/ui/err-04-missing-error.stderr new file mode 100644 index 000000000000..7b7dc015eade --- /dev/null +++ b/node/orchestra/tests/ui/err-04-missing-error.stderr @@ -0,0 +1,13 @@ +error: Must declare the orchestra error type via `error=..`. + --> $DIR/err-04-missing-error.rs:16:1 + | +16 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0433]: failed to resolve: use of undeclared type `Orchestra` + --> $DIR/err-04-missing-error.rs:30:10 + | +30 | let _ = Orchestra::builder() + | ^^^^^^^^ use of undeclared type `Orchestra` diff --git a/node/overseer/overseer-gen/tests/ui/err-05-missing-field.rs b/node/orchestra/tests/ui/err-05-missing-field.rs similarity index 71% rename from node/overseer/overseer-gen/tests/ui/err-05-missing-field.rs rename to node/orchestra/tests/ui/err-05-missing-field.rs index 22ead71ea180..f351724072b6 100644 --- a/node/overseer/overseer-gen/tests/ui/err-05-missing-field.rs +++ b/node/orchestra/tests/ui/err-05-missing-field.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSys { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSys { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { unimplemented!("starting yay!") } } @@ -19,8 +19,8 @@ pub struct Event; #[derive(Clone, Debug)] pub struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, i_like_pie: f64, @@ -29,7 +29,7 @@ struct Overseer { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -52,7 +52,7 @@ impl SpawnNamed for DummySpawner { struct DummyCtx; fn main() { - let _ = Overseer::builder() + let _ = Orchestra::builder() .sub0(AwesomeSubSys::default()) //.i_like_pie(std::f64::consts::PI) // The filed is not initialised .spawner(DummySpawner) diff --git a/node/overseer/overseer-gen/tests/ui/err-05-missing-field.stderr b/node/orchestra/tests/ui/err-05-missing-field.stderr similarity index 56% rename from node/overseer/overseer-gen/tests/ui/err-05-missing-field.stderr rename to node/orchestra/tests/ui/err-05-missing-field.stderr index dcd9fbaa019b..76f4f1107f46 100644 --- a/node/overseer/overseer-gen/tests/ui/err-05-missing-field.stderr +++ b/node/orchestra/tests/ui/err-05-missing-field.stderr @@ -1,14 +1,14 @@ -error[E0599]: no method named `build` found for struct `OverseerBuilder, Init, Missing>` in the current scope +error[E0599]: no method named `build` found for struct `OrchestraBuilder, Init, Missing>` in the current scope --> tests/ui/err-05-missing-field.rs:59:4 | -22 | #[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] +22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] | -------------------------------------------------------------------------------- method `build` not found for this ... 59 | .build() - | ^^^^^ method not found in `OverseerBuilder, Init, Missing>` + | ^^^^^ method not found in `OrchestraBuilder, Init, Missing>` | = note: the method was found for - - `OverseerBuilder, Init, Init>` + - `OrchestraBuilder, Init, Init>` = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `build`, perhaps you need to implement one of them: candidate #1: `frame_support::traits::hooks::GenesisBuild` diff --git a/node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.rs b/node/orchestra/tests/ui/err-06-missing-subsystem.rs similarity index 71% rename from node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.rs rename to node/orchestra/tests/ui/err-06-missing-subsystem.rs index bccc990d5e66..85b1b2f618fe 100644 --- a/node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.rs +++ b/node/orchestra/tests/ui/err-06-missing-subsystem.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSys { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSys { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { unimplemented!("starting yay!") } } @@ -19,8 +19,8 @@ pub struct Event; #[derive(Clone, Debug)] pub struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, i_like_pie: f64, @@ -29,7 +29,7 @@ struct Overseer { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -52,7 +52,7 @@ impl SpawnNamed for DummySpawner { struct DummyCtx; fn main() { - let _ = Overseer::builder() + let _ = Orchestra::builder() //.sub0(AwesomeSubSys::default()) // Subsystem is uninitialized .i_like_pie(std::f64::consts::PI) .spawner(DummySpawner) diff --git a/node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.stderr b/node/orchestra/tests/ui/err-06-missing-subsystem.stderr similarity index 58% rename from node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.stderr rename to node/orchestra/tests/ui/err-06-missing-subsystem.stderr index 6d7a210fd9c3..3052464e0c38 100644 --- a/node/overseer/overseer-gen/tests/ui/err-06-missing-subsystem.stderr +++ b/node/orchestra/tests/ui/err-06-missing-subsystem.stderr @@ -1,14 +1,14 @@ -error[E0599]: no method named `build` found for struct `OverseerBuilder, Missing<_>, Init>` in the current scope +error[E0599]: no method named `build` found for struct `OrchestraBuilder, Missing<_>, Init>` in the current scope --> tests/ui/err-06-missing-subsystem.rs:59:4 | -22 | #[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] +22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] | -------------------------------------------------------------------------------- method `build` not found for this ... 59 | .build() - | ^^^^^ method not found in `OverseerBuilder, Missing<_>, Init>` + | ^^^^^ method not found in `OrchestraBuilder, Missing<_>, Init>` | = note: the method was found for - - `OverseerBuilder, Init, Init>` + - `OrchestraBuilder, Init, Init>` = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `build`, perhaps you need to implement one of them: candidate #1: `frame_support::traits::hooks::GenesisBuild` diff --git a/node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.rs b/node/orchestra/tests/ui/err-07-missing-spawner.rs similarity index 71% rename from node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.rs rename to node/orchestra/tests/ui/err-07-missing-spawner.rs index 4193d28ec879..45f0af1c6e50 100644 --- a/node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.rs +++ b/node/orchestra/tests/ui/err-07-missing-spawner.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSys { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSys { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { unimplemented!("starting yay!") } } @@ -19,8 +19,8 @@ pub struct Event; #[derive(Clone, Debug)] pub struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, i_like_pie: f64, @@ -29,7 +29,7 @@ struct Overseer { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -52,7 +52,7 @@ impl SpawnNamed for DummySpawner { struct DummyCtx; fn main() { - let _ = Overseer::builder() + let _ = Orchestra::builder() .sub0(AwesomeSubSys::default()) .i_like_pie(std::f64::consts::PI) //.spawner(DummySpawner) // Spawner is missing diff --git a/node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.stderr b/node/orchestra/tests/ui/err-07-missing-spawner.stderr similarity index 57% rename from node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.stderr rename to node/orchestra/tests/ui/err-07-missing-spawner.stderr index d265f36f5fa7..932e6fa776bd 100644 --- a/node/overseer/overseer-gen/tests/ui/err-07-missing-spawner.stderr +++ b/node/orchestra/tests/ui/err-07-missing-spawner.stderr @@ -1,14 +1,14 @@ -error[E0599]: no method named `build` found for struct `OverseerBuilder, Init, Init>` in the current scope +error[E0599]: no method named `build` found for struct `OrchestraBuilder, Init, Init>` in the current scope --> tests/ui/err-07-missing-spawner.rs:59:4 | -22 | #[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] +22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] | -------------------------------------------------------------------------------- method `build` not found for this ... 59 | .build() - | ^^^^^ method not found in `OverseerBuilder, Init, Init>` + | ^^^^^ method not found in `OrchestraBuilder, Init, Init>` | = note: the method was found for - - `OverseerBuilder, Init, Init>` + - `OrchestraBuilder, Init, Init>` = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `build`, perhaps you need to implement one of them: candidate #1: `frame_support::traits::hooks::GenesisBuild` diff --git a/node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.rs b/node/orchestra/tests/ui/err-08-duplicate-subsystem.rs similarity index 71% rename from node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.rs rename to node/orchestra/tests/ui/err-08-duplicate-subsystem.rs index 8895723abbc1..8a3eab1ee726 100644 --- a/node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.rs +++ b/node/orchestra/tests/ui/err-08-duplicate-subsystem.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSys { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSys { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { unimplemented!("starting yay!") } } @@ -19,8 +19,8 @@ pub struct Event; #[derive(Clone, Debug)] pub struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, i_like_pie: f64, @@ -29,7 +29,7 @@ struct Overseer { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -52,7 +52,7 @@ impl SpawnNamed for DummySpawner { struct DummyCtx; fn main() { - let _ = Overseer::builder() + let _ = Orchestra::builder() .sub0(AwesomeSubSys::default()) .sub0(AwesomeSubSys::default()) // Duplicate subsystem .i_like_pie(std::f64::consts::PI) diff --git a/node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.stderr b/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr similarity index 61% rename from node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.stderr rename to node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr index a0fcee914fd4..9053c1e814a1 100644 --- a/node/overseer/overseer-gen/tests/ui/err-08-duplicate-subsystem.stderr +++ b/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr @@ -1,7 +1,7 @@ -error[E0599]: no method named `sub0` found for struct `OverseerBuilder, Init, Missing>` in the current scope +error[E0599]: no method named `sub0` found for struct `OrchestraBuilder, Init, Missing>` in the current scope --> tests/ui/err-08-duplicate-subsystem.rs:57:4 | -22 | #[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] +22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] | -------------------------------------------------------------------------------- method `sub0` not found for this ... 57 | .sub0(AwesomeSubSys::default()) // Duplicate subsystem diff --git a/node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.rs b/node/orchestra/tests/ui/err-09-uninit_generic_baggage.rs similarity index 69% rename from node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.rs rename to node/orchestra/tests/ui/err-09-uninit_generic_baggage.rs index 64a2f6c4bffc..c90979c4e4e8 100644 --- a/node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.rs +++ b/node/orchestra/tests/ui/err-09-uninit_generic_baggage.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSys; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSys { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSys { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { unimplemented!("starting yay!") } } @@ -19,8 +19,8 @@ pub struct Event; #[derive(Clone, Debug)] pub struct MsgStrukt(u8); -#[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] -struct Overseer { +#[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] +struct Orchestra { #[subsystem(MsgStrukt)] sub0: AwesomeSubSys, i_like_pie: T, @@ -29,7 +29,7 @@ struct Overseer { #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -52,7 +52,7 @@ impl SpawnNamed for DummySpawner { struct DummyCtx; fn main() { - let (_, _): (Overseer<_, f64>, _) = Overseer::builder() + let (_, _): (Orchestra<_, f64>, _) = Orchestra::builder() .sub0(AwesomeSubSys::default()) //.i_like_pie(std::f64::consts::PI) // The filed is not initialised .spawner(DummySpawner) diff --git a/node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.stderr b/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr similarity index 57% rename from node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.stderr rename to node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr index 26998c4e418b..f4b7137ad688 100644 --- a/node/overseer/overseer-gen/tests/ui/err-09-uninit_generic_baggage.stderr +++ b/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr @@ -1,14 +1,14 @@ -error[E0599]: no method named `build` found for struct `OverseerBuilder, Init, Missing<_>>` in the current scope +error[E0599]: no method named `build` found for struct `OrchestraBuilder, Init, Missing<_>>` in the current scope --> tests/ui/err-09-uninit_generic_baggage.rs:59:4 | -22 | #[overlord(signal=SigSigSig, error=OverseerError, event=Event, gen=AllMessages)] +22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] | -------------------------------------------------------------------------------- method `build` not found for this ... 59 | .build() - | ^^^^^ method not found in `OverseerBuilder, Init, Missing<_>>` + | ^^^^^ method not found in `OrchestraBuilder, Init, Missing<_>>` | = note: the method was found for - - `OverseerBuilder, Init, Init>` + - `OrchestraBuilder, Init, Init>` = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `build`, perhaps you need to implement one of them: candidate #1: `frame_support::traits::hooks::GenesisBuild` diff --git a/node/overseer/overseer-gen/tests/ui/ok-01-wip.rs b/node/orchestra/tests/ui/ok-01-wip.rs similarity index 66% rename from node/overseer/overseer-gen/tests/ui/ok-01-wip.rs rename to node/orchestra/tests/ui/ok-01-wip.rs index b07855f67a1d..4efe75f29a46 100644 --- a/node/overseer/overseer-gen/tests/ui/ok-01-wip.rs +++ b/node/orchestra/tests/ui/ok-01-wip.rs @@ -1,18 +1,18 @@ #![allow(dead_code)] -use polkadot_overseer_gen::*; +use orchestra::*; #[derive(Default)] struct AwesomeSubSysA; -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSysA { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSysA { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { SpawnedSubsystem { name: "sub A", future: Box::pin(async move { Ok(()) }) } } } -impl ::polkadot_overseer_gen::Subsystem, OverseerError> for AwesomeSubSysB { - fn start(self, _ctx: OverseerSubsystemContext) -> SpawnedSubsystem { +impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSysB { + fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { SpawnedSubsystem { name: "sub B", future: Box::pin(async move { Ok(()) }) } } } @@ -20,7 +20,7 @@ impl ::polkadot_overseer_gen::Subsystem, Overseer #[derive(Debug, Clone)] pub struct DummySpawner; -impl SpawnNamed for DummySpawner { +impl Spawner for DummySpawner { fn spawn_blocking( &self, task_name: &'static str, @@ -54,8 +54,8 @@ pub struct MsgA(u8); #[derive(Clone, Debug)] pub struct MsgB(u8); -#[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] -pub struct Overseer { +#[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] +pub struct Orchestra { #[subsystem(MsgA)] sub_a: AwesomeSubSysA, @@ -66,7 +66,7 @@ pub struct Overseer { pub struct DummyCtx; fn main() { - let _overseer_builder = Overseer::builder() + let _orchestra_builder = Orchestra::builder() .sub_a(AwesomeSubSysA::default()) // b is tagged as `wip` // .sub_b(AwesomeSubSysB::default()) diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index e66fd2af3623..1898c536db80 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-overseer" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -15,13 +15,14 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem-types = { path = "../subsystem-types" } polkadot-node-metrics = { path = "../metrics" } polkadot-primitives = { path = "../../primitives" } -polkadot-overseer-gen = { path = "./overseer-gen" } +orchestra = { path = "../orchestra" } gum = { package = "tracing-gum", path = "../gum" } lru = "0.7" parity-util-mem = { version = "0.11.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] -metered-channel = { path = "../metered-channel" } +metered = { package = "prioritized-metered-channel", path = "../metered-channel" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } femme = "2.2.1" @@ -30,4 +31,4 @@ test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../pri [features] default = [] -expand = ["polkadot-overseer-gen/expand"] +expand = ["orchestra/expand"] diff --git a/node/overseer/examples/minimal-example.rs b/node/overseer/examples/minimal-example.rs index c3cbbd3b289a..6033815ddd50 100644 --- a/node/overseer/examples/minimal-example.rs +++ b/node/overseer/examples/minimal-example.rs @@ -28,7 +28,7 @@ use polkadot_node_subsystem_types::messages::CandidateValidationMessage; use polkadot_overseer::{ self as overseer, dummy::dummy_overseer_builder, - gen::{FromOverseer, SpawnedSubsystem}, + gen::{FromOrchestra, SpawnedSubsystem}, HeadSupportsParachains, SubsystemError, }; use polkadot_primitives::v2::{CandidateReceipt, Hash}; @@ -50,7 +50,7 @@ impl Subsystem1 { 'louy: loop { match ctx.try_recv().await { Ok(Some(msg)) => { - if let FromOverseer::Communication { msg } = msg { + if let FromOrchestra::Communication { msg } = msg { gum::info!("msg {:?}", msg); } continue 'louy diff --git a/node/overseer/overseer-gen/Cargo.toml b/node/overseer/overseer-gen/Cargo.toml deleted file mode 100644 index f22c36771934..000000000000 --- a/node/overseer/overseer-gen/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "polkadot-overseer-gen" -version = "0.9.22" -authors = ["Parity Technologies "] -edition = "2021" -description = "Generate an overseer including builder pattern and message wrapper from a single struct." -autoexamples = false - -[dependencies] -gum = { package = "tracing-gum", path = "../../gum" } -futures = "0.3" -async-trait = "0.1" -thiserror = "1" -metered = { package = "metered-channel", path = "../../metered-channel" } -polkadot-overseer-gen-proc-macro = { path = "./proc-macro" } -polkadot-node-network-protocol = { path = "../../network/protocol"} -# trait SpawnNamed -polkadot-node-primitives = { path = "../../primitives" } -futures-timer = "3.0.2" -pin-project = "1.0" - -[dev-dependencies] -trybuild = "1.0.61" -rustversion = "1.0.6" - - - -[[example]] -name = "duo" -crate-type = ["bin"] - -[[example]] -name = "solo" -crate-type = ["bin"] - -[features] -default = [] -expand = ["polkadot-overseer-gen-proc-macro/expand"] diff --git a/node/overseer/overseer-gen/examples/duo.rs b/node/overseer/overseer-gen/examples/duo.rs deleted file mode 100644 index b63a7df603e1..000000000000 --- a/node/overseer/overseer-gen/examples/duo.rs +++ /dev/null @@ -1,89 +0,0 @@ -#![allow(dead_code)] // overseer events are not used - -//! A dummy to be used with cargo expand - -use polkadot_overseer_gen::{self as overseer, SpawnNamed, *}; -use std::collections::HashMap; -mod misc; - -pub use self::misc::*; - -/// Concrete subsystem implementation for `MsgStrukt` msg type. -#[derive(Default)] -pub struct AwesomeSubSys; - -#[overseer::subsystem(Awesome, error=Yikes)] -impl AwesomeSubSys { - fn start(self, mut ctx: Context) -> SpawnedSubsystem { - let mut sender = ctx.sender().clone(); - ctx.spawn( - "AwesomeSubsys", - Box::pin(async move { - sender.send_message(Plinko).await; - }), - ) - .unwrap(); - unimplemented!("starting yay!") - } -} - -#[derive(Default)] -pub struct Fortified; - -#[overseer::subsystem(GoblinTower, error=Yikes)] -impl Fortified { - fn start(self, mut ctx: Context) -> SpawnedSubsystem { - let mut sender = ctx.sender().clone(); - ctx.spawn( - "GoblinTower", - Box::pin(async move { - sender.send_message(MsgStrukt(8u8)).await; - }), - ) - .unwrap(); - unimplemented!("welcum") - } -} - -#[overlord(signal=SigSigSig, event=EvX, error=Yikes, gen=AllMessages)] -struct Duo { - #[subsystem(consumes: MsgStrukt, sends: [Plinko])] - sub0: Awesome, - - #[subsystem(blocking, consumes: Plinko, sends: [MsgStrukt])] - plinkos: GoblinTower, - - i_like_pi: f64, - i_like_generic: T, - i_like_hash: HashMap, -} - -fn main() { - use futures::{executor, pin_mut}; - - executor::block_on(async move { - let (overseer, _handle): (Duo<_, f64>, _) = Duo::builder() - .sub0(AwesomeSubSys::default()) - .plinkos(Fortified::default()) - .i_like_pi(::std::f64::consts::PI) - .i_like_generic(42.0) - .i_like_hash(HashMap::new()) - .spawner(DummySpawner) - .build() - .unwrap(); - - assert_eq!(overseer.i_like_pi.floor() as i8, 3); - assert_eq!(overseer.i_like_generic.floor() as i8, 42); - assert_eq!(overseer.i_like_hash.len() as i8, 0); - - let overseer_fut = overseer - .running_subsystems - .into_future() - .timeout(std::time::Duration::from_millis(300)) - .fuse(); - - pin_mut!(overseer_fut); - - overseer_fut.await - }); -} diff --git a/node/overseer/overseer-gen/examples/solo.rs b/node/overseer/overseer-gen/examples/solo.rs deleted file mode 100644 index 74ecdc9d16ba..000000000000 --- a/node/overseer/overseer-gen/examples/solo.rs +++ /dev/null @@ -1,54 +0,0 @@ -#![allow(dead_code)] // overseer events are not used - -//! A minimal demo to be used with cargo expand. - -use polkadot_overseer_gen::{self as overseer, SpawnNamed, *}; -mod misc; - -pub use self::misc::*; - -#[overlord(signal=SigSigSig, event=EvX, error=Yikes, gen=AllMessages)] -struct Solo { - #[subsystem(consumes: Plinko, sends: [MsgStrukt])] - goblin_tower: GoblinTower, -} - -#[derive(Default)] -pub struct Fortified; - -#[overseer::subsystem(GoblinTower, error=Yikes)] -impl Fortified { - fn start(self, mut ctx: Context) -> SpawnedSubsystem { - let mut sender = ctx.sender().clone(); - ctx.spawn( - "GoblinTower", - Box::pin(async move { - sender.send_message(MsgStrukt(8u8)).await; - }), - ) - .unwrap(); - unimplemented!("welcum") - } -} - -fn main() { - use futures::{executor, pin_mut}; - - executor::block_on(async move { - let (overseer, _handle): (Solo<_>, _) = Solo::builder() - .goblin_tower(Fortified::default()) - .spawner(DummySpawner) - .build() - .unwrap(); - - let overseer_fut = overseer - .running_subsystems - .into_future() - .timeout(std::time::Duration::from_millis(300)) - .fuse(); - - pin_mut!(overseer_fut); - - overseer_fut.await - }); -} diff --git a/node/overseer/overseer-gen/proc-macro/src/parse/mod.rs b/node/overseer/overseer-gen/proc-macro/src/parse/mod.rs deleted file mode 100644 index f1d82ff93451..000000000000 --- a/node/overseer/overseer-gen/proc-macro/src/parse/mod.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -mod kw { - syn::custom_keyword!(event); - syn::custom_keyword!(signal); - syn::custom_keyword!(error); - syn::custom_keyword!(outgoing); - syn::custom_keyword!(gen); - syn::custom_keyword!(signal_capacity); - syn::custom_keyword!(message_capacity); - syn::custom_keyword!(subsystem); - syn::custom_keyword!(prefix); -} - -mod parse_overseer_attr; -mod parse_overseer_struct; - -mod parse_subsystem_attr; - -#[cfg(test)] -mod tests; - -pub(crate) use self::{parse_overseer_attr::*, parse_overseer_struct::*}; - -pub(crate) use self::parse_subsystem_attr::*; diff --git a/node/overseer/overseer-gen/src/tests.rs b/node/overseer/overseer-gen/src/tests.rs deleted file mode 100644 index 09de7ed4d3d4..000000000000 --- a/node/overseer/overseer-gen/src/tests.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -#[test] -#[rustversion::attr(not(stable), ignore)] -fn ui_compile_fail() { - // Only run the ui tests when `RUN_UI_TESTS` is set. - if std::env::var("RUN_UI_TESTS").is_err() { - return - } - - let t = trybuild::TestCases::new(); - t.compile_fail("tests/ui/err-*.rs"); -} - -#[test] -#[rustversion::attr(not(stable), ignore)] -fn ui_pass() { - // Only run the ui tests when `RUN_UI_TESTS` is set. - if std::env::var("RUN_UI_TESTS").is_err() { - return - } - - let t = trybuild::TestCases::new(); - t.pass("tests/ui/ok-*.rs"); -} diff --git a/node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.stderr b/node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.stderr deleted file mode 100644 index ea67ef7aad5b..000000000000 --- a/node/overseer/overseer-gen/tests/ui/err-01-duplicate-consumer.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0119]: conflicting implementations of trait `polkadot_overseer_gen::SubsystemSender` for type `OverseerSubsystemSender` - --> tests/ui/err-01-duplicate-consumer.rs:19:1 - | -19 | #[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | first implementation here - | conflicting implementation for `OverseerSubsystemSender` - | - = note: this error originates in the attribute macro `overlord` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0119]: conflicting implementations of trait `std::convert::From` for type `AllMessages` - --> tests/ui/err-01-duplicate-consumer.rs:19:1 - | -19 | #[overlord(signal=SigSigSig, event=Event, gen=AllMessages, error=OverseerError)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | first implementation here - | conflicting implementation for `AllMessages` - | - = note: this error originates in the attribute macro `overlord` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/node/overseer/overseer-gen/tests/ui/err-02-enum.stderr b/node/overseer/overseer-gen/tests/ui/err-02-enum.stderr deleted file mode 100644 index 7ed414a6ecb3..000000000000 --- a/node/overseer/overseer-gen/tests/ui/err-02-enum.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: expected `struct` - --> $DIR/err-02-enum.rs:16:1 - | -16 | enum Overseer { - | ^^^^ - -error[E0433]: failed to resolve: use of undeclared type `Overseer` - --> $DIR/err-02-enum.rs:27:17 - | -27 | let overseer = Overseer::<_,_>::builder() - | ^^^^^^^^ use of undeclared type `Overseer` diff --git a/node/overseer/overseer-gen/tests/ui/err-04-missing-error.stderr b/node/overseer/overseer-gen/tests/ui/err-04-missing-error.stderr deleted file mode 100644 index 7fa4d832253e..000000000000 --- a/node/overseer/overseer-gen/tests/ui/err-04-missing-error.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: Must declare the overseer error type via `error=..`. - --> $DIR/err-04-missing-error.rs:16:1 - | -16 | #[overlord(signal=SigSigSig, event=Event, gen=AllMessages)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the attribute macro `overlord` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0433]: failed to resolve: use of undeclared type `Overseer` - --> $DIR/err-04-missing-error.rs:30:10 - | -30 | let _ = Overseer::builder() - | ^^^^^^^^ use of undeclared type `Overseer` diff --git a/node/overseer/src/dummy.rs b/node/overseer/src/dummy.rs index 19d24fb82dfa..db6f21c2f50c 100644 --- a/node/overseer/src/dummy.rs +++ b/node/overseer/src/dummy.rs @@ -16,13 +16,12 @@ use crate::{ prometheus::Registry, HeadSupportsParachains, InitializedOverseerBuilder, MetricsTrait, - Overseer, OverseerMetrics, OverseerSignal, OverseerSubsystemContext, SpawnNamed, + Overseer, OverseerMetrics, OverseerSignal, OverseerSubsystemContext, SpawnGlue, KNOWN_LEAVES_CACHE_SIZE, }; use lru::LruCache; +use orchestra::{FromOrchestra, SpawnedSubsystem, Subsystem, SubsystemContext}; use polkadot_node_subsystem_types::{errors::SubsystemError, messages::*}; -use polkadot_overseer_gen::{FromOverseer, SpawnedSubsystem, Subsystem, SubsystemContext}; - /// A dummy subsystem that implements [`Subsystem`] for all /// types of messages. Used for tests or as a placeholder. #[derive(Clone, Copy, Debug)] @@ -37,7 +36,7 @@ where loop { match ctx.recv().await { Err(_) => return Ok(()), - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => return Ok(()), + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => return Ok(()), Ok(overseer_msg) => { gum::debug!( target: "dummy-subsystem", @@ -63,7 +62,7 @@ pub fn dummy_overseer_builder<'a, Spawner, SupportsParachains>( registry: Option<&'a Registry>, ) -> Result< InitializedOverseerBuilder< - Spawner, + SpawnGlue, SupportsParachains, DummySubsystem, DummySubsystem, @@ -91,7 +90,7 @@ pub fn dummy_overseer_builder<'a, Spawner, SupportsParachains>( SubsystemError, > where - Spawner: SpawnNamed + Send + Sync + 'static, + SpawnGlue: orchestra::Spawner + 'static, SupportsParachains: HeadSupportsParachains, { one_for_all_overseer_builder(spawner, supports_parachains, DummySubsystem, registry) @@ -105,7 +104,7 @@ pub fn one_for_all_overseer_builder<'a, Spawner, SupportsParachains, Sub>( registry: Option<&'a Registry>, ) -> Result< InitializedOverseerBuilder< - Spawner, + SpawnGlue, SupportsParachains, Sub, Sub, @@ -133,7 +132,7 @@ pub fn one_for_all_overseer_builder<'a, Spawner, SupportsParachains, Sub>( SubsystemError, > where - Spawner: SpawnNamed + Send + Sync + 'static, + SpawnGlue: orchestra::Spawner + 'static, SupportsParachains: HeadSupportsParachains, Sub: Clone + Subsystem, SubsystemError> @@ -189,7 +188,7 @@ where .active_leaves(Default::default()) .known_leaves(LruCache::new(KNOWN_LEAVES_CACHE_SIZE)) .leaves(Default::default()) - .spawner(spawner) + .spawner(SpawnGlue(spawner)) .metrics(metrics) .supports_parachains(supports_parachains); Ok(builder) diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 21cd09aee03d..28c4e6c03fbe 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -105,11 +105,12 @@ pub use polkadot_node_metrics::{ use parity_util_mem::MemoryAllocationTracker; -pub use polkadot_overseer_gen as gen; -pub use polkadot_overseer_gen::{ - contextbounds, overlord, subsystem, FromOverseer, MapSubsystem, MessagePacket, SignalsReceived, - SpawnNamed, Subsystem, SubsystemContext, SubsystemIncomingMessages, SubsystemInstance, - SubsystemMeterReadouts, SubsystemMeters, SubsystemSender, TimeoutExt, ToOverseer, +pub use orchestra as gen; +pub use orchestra::{ + contextbounds, orchestra, subsystem, FromOrchestra, MapSubsystem, MessagePacket, + SignalsReceived, Spawner, Subsystem, SubsystemContext, SubsystemIncomingMessages, + SubsystemInstance, SubsystemMeterReadouts, SubsystemMeters, SubsystemSender, TimeoutExt, + ToOrchestra, }; /// Store 2 days worth of blocks, not accounting for forks, @@ -119,6 +120,42 @@ pub const KNOWN_LEAVES_CACHE_SIZE: usize = 2 * 24 * 3600 / 6; #[cfg(test)] mod tests; +use sp_core::traits::SpawnNamed; + +/// Glue to connect `trait orchestra::Spawner` and `SpawnNamed` from `substrate`. +pub struct SpawnGlue(pub S); + +impl AsRef for SpawnGlue { + fn as_ref(&self) -> &S { + &self.0 + } +} + +impl Clone for SpawnGlue { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} + +impl crate::gen::Spawner for SpawnGlue { + fn spawn_blocking( + &self, + name: &'static str, + group: Option<&'static str>, + future: futures::future::BoxFuture<'static, ()>, + ) { + SpawnNamed::spawn_blocking(&self.0, name, group, future) + } + fn spawn( + &self, + name: &'static str, + group: Option<&'static str>, + future: futures::future::BoxFuture<'static, ()>, + ) { + SpawnNamed::spawn(&self.0, name, group, future) + } +} + /// Whether a header supports parachain consensus or not. pub trait HeadSupportsParachains { /// Return true if the given header supports parachain consensus. Otherwise, false. @@ -346,7 +383,7 @@ pub async fn forward_events>(client: Arc

, mut hand /// # SubsystemError, /// # gen::{ /// # SubsystemContext, -/// # FromOverseer, +/// # FromOrchestra, /// # SpawnedSubsystem, /// # }, /// # }; @@ -408,7 +445,7 @@ pub async fn forward_events>(client: Arc

, mut hand /// # }); /// # } /// ``` -#[overlord( +#[orchestra( gen=AllMessages, event=Event, signal=OverseerSignal, @@ -600,15 +637,15 @@ pub fn spawn_metronome_metrics( metronome_metrics: OverseerMetrics, ) -> Result<(), SubsystemError> where - S: SpawnNamed, + S: Spawner, SupportsParachains: HeadSupportsParachains, { struct ExtractNameAndMeters; - impl<'a, T: 'a> MapSubsystem<&'a OverseenSubsystem> for ExtractNameAndMeters { + impl<'a, T: 'a> MapSubsystem<&'a OrchestratedSubsystem> for ExtractNameAndMeters { type Output = Option<(&'static str, SubsystemMeters)>; - fn map_subsystem(&self, subsystem: &'a OverseenSubsystem) -> Self::Output { + fn map_subsystem(&self, subsystem: &'a OrchestratedSubsystem) -> Self::Output { subsystem .instance .as_ref() @@ -668,7 +705,7 @@ where impl Overseer where SupportsParachains: HeadSupportsParachains, - S: SpawnNamed, + S: Spawner, { /// Stop the `Overseer`. async fn stop(mut self) { @@ -713,12 +750,12 @@ where } } }, - msg = self.to_overseer_rx.select_next_some() => { + msg = self.to_orchestra_rx.select_next_some() => { match msg { - ToOverseer::SpawnJob { name, subsystem, s } => { + ToOrchestra::SpawnJob { name, subsystem, s } => { self.spawn_job(name, subsystem, s); } - ToOverseer::SpawnBlockingJob { name, subsystem, s } => { + ToOrchestra::SpawnBlockingJob { name, subsystem, s } => { self.spawn_blocking_job(name, subsystem, s); } } diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index ab7303297aea..5931af2527d8 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -39,7 +39,7 @@ use crate::{ gen::Delay, HeadSupportsParachains, }; -use metered_channel as metered; +use metered; use assert_matches::assert_matches; use sp_core::crypto::Pair as _; @@ -70,12 +70,12 @@ where let mut i = 0; loop { match ctx.recv().await { - Ok(FromOverseer::Communication { .. }) => { + Ok(FromOrchestra::Communication { .. }) => { let _ = sender.send(i).await; i += 1; continue }, - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => return Ok(()), + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => return Ok(()), Err(_) => return Ok(()), _ => (), } @@ -121,7 +121,7 @@ where continue } match ctx.try_recv().await { - Ok(Some(FromOverseer::Signal(OverseerSignal::Conclude))) => break, + Ok(Some(FromOrchestra::Signal(OverseerSignal::Conclude))) => break, Ok(Some(_)) => continue, Err(_) => return Ok(()), _ => (), @@ -318,8 +318,8 @@ where future: Box::pin(async move { loop { match ctx.try_recv().await { - Ok(Some(FromOverseer::Signal(OverseerSignal::Conclude))) => break, - Ok(Some(FromOverseer::Signal(s))) => { + Ok(Some(FromOrchestra::Signal(OverseerSignal::Conclude))) => break, + Ok(Some(FromOrchestra::Signal(s))) => { sender.send(s).await.unwrap(); continue }, @@ -350,8 +350,8 @@ where future: Box::pin(async move { loop { match ctx.try_recv().await { - Ok(Some(FromOverseer::Signal(OverseerSignal::Conclude))) => break, - Ok(Some(FromOverseer::Signal(s))) => { + Ok(Some(FromOrchestra::Signal(OverseerSignal::Conclude))) => break, + Ok(Some(FromOrchestra::Signal(s))) => { sender.send(s).await.unwrap(); continue }, @@ -754,15 +754,15 @@ where future: Box::pin(async move { loop { match ctx.try_recv().await { - Ok(Some(FromOverseer::Signal(OverseerSignal::Conclude))) => { + Ok(Some(FromOrchestra::Signal(OverseerSignal::Conclude))) => { self.stop_signals_received.fetch_add(1, atomic::Ordering::SeqCst); break }, - Ok(Some(FromOverseer::Signal(_))) => { + Ok(Some(FromOrchestra::Signal(_))) => { self.signals_received.fetch_add(1, atomic::Ordering::SeqCst); continue }, - Ok(Some(FromOverseer::Communication { .. })) => { + Ok(Some(FromOrchestra::Communication { .. })) => { self.msgs_received.fetch_add(1, atomic::Ordering::SeqCst); continue }, @@ -1143,7 +1143,11 @@ fn context_holds_onto_message_until_enough_signals_received() { let mut ctx = OverseerSubsystemContext::new( signal_rx, - stream::select(bounded_rx, unbounded_rx), + stream::select_with_strategy( + bounded_rx, + unbounded_rx, + orchestra::select_message_channel_strategy, + ), channels_out, to_overseer_tx, "test", @@ -1153,7 +1157,7 @@ fn context_holds_onto_message_until_enough_signals_received() { let test_fut = async move { signal_tx.send(OverseerSignal::Conclude).await.unwrap(); - assert_matches!(ctx.recv().await.unwrap(), FromOverseer::Signal(OverseerSignal::Conclude)); + assert_matches!(ctx.recv().await.unwrap(), FromOrchestra::Signal(OverseerSignal::Conclude)); assert_eq!(ctx.signals_received.load(), 1); bounded_tx @@ -1172,9 +1176,9 @@ fn context_holds_onto_message_until_enough_signals_received() { assert!(ctx.pending_incoming.is_some()); signal_tx.send(OverseerSignal::Conclude).await.unwrap(); - assert_matches!(ctx.recv().await.unwrap(), FromOverseer::Signal(OverseerSignal::Conclude)); - assert_matches!(ctx.recv().await.unwrap(), FromOverseer::Communication { msg: () }); - assert_matches!(ctx.recv().await.unwrap(), FromOverseer::Communication { msg: () }); + assert_matches!(ctx.recv().await.unwrap(), FromOrchestra::Signal(OverseerSignal::Conclude)); + assert_matches!(ctx.recv().await.unwrap(), FromOrchestra::Communication { msg: () }); + assert_matches!(ctx.recv().await.unwrap(), FromOrchestra::Communication { msg: () }); assert!(ctx.pending_incoming.is_none()); }; diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index fdfbe7179205..4aec75a4b4ac 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-primitives" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Primitives types for the Node-side" diff --git a/node/primitives/src/lib.rs b/node/primitives/src/lib.rs index c203e560647d..882b75a0e81f 100644 --- a/node/primitives/src/lib.rs +++ b/node/primitives/src/lib.rs @@ -29,17 +29,15 @@ use futures::Future; use parity_scale_codec::{Decode, Encode, Error as CodecError, Input}; use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; -pub use sp_consensus_babe::{ - AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, -}; -pub use sp_core::traits::SpawnNamed; - use polkadot_primitives::v2::{ BlakeTwo256, CandidateCommitments, CandidateHash, CollatorPair, CommittedCandidateReceipt, CompactStatement, EncodeAs, Hash, HashT, HeadData, Id as ParaId, OutboundHrmpMessage, PersistedValidationData, SessionIndex, Signed, UncheckedSigned, UpwardMessage, ValidationCode, ValidatorIndex, MAX_CODE_SIZE, MAX_POV_SIZE, }; +pub use sp_consensus_babe::{ + AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, +}; pub use polkadot_parachain::primitives::BlockData; diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 7560b5370105..47ef52ff2509 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-service" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -133,7 +133,7 @@ assert_matches = "1.5.0" default = ["db", "full-node", "polkadot-native"] db = [ - "service/db" + "service/rocksdb" ] full-node = [ diff --git a/node/service/res/.gitignore b/node/service/chain-specs/.gitignore similarity index 100% rename from node/service/res/.gitignore rename to node/service/chain-specs/.gitignore diff --git a/node/service/res/kusama.json b/node/service/chain-specs/kusama.json similarity index 100% rename from node/service/res/kusama.json rename to node/service/chain-specs/kusama.json diff --git a/node/service/res/polkadot.json b/node/service/chain-specs/polkadot.json similarity index 100% rename from node/service/res/polkadot.json rename to node/service/chain-specs/polkadot.json diff --git a/node/service/res/rococo.json b/node/service/chain-specs/rococo.json similarity index 100% rename from node/service/res/rococo.json rename to node/service/chain-specs/rococo.json diff --git a/node/service/res/westend.json b/node/service/chain-specs/westend.json similarity index 100% rename from node/service/res/westend.json rename to node/service/chain-specs/westend.json diff --git a/node/service/res/wococo.json b/node/service/chain-specs/wococo.json similarity index 100% rename from node/service/res/wococo.json rename to node/service/chain-specs/wococo.json diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 86da5b082414..3699b656d90a 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -143,24 +143,24 @@ impl sp_runtime::BuildStorage for RococoGenesisExt { } pub fn polkadot_config() -> Result { - PolkadotChainSpec::from_json_bytes(&include_bytes!("../res/polkadot.json")[..]) + PolkadotChainSpec::from_json_bytes(&include_bytes!("../chain-specs/polkadot.json")[..]) } pub fn kusama_config() -> Result { - KusamaChainSpec::from_json_bytes(&include_bytes!("../res/kusama.json")[..]) + KusamaChainSpec::from_json_bytes(&include_bytes!("../chain-specs/kusama.json")[..]) } pub fn westend_config() -> Result { - WestendChainSpec::from_json_bytes(&include_bytes!("../res/westend.json")[..]) + WestendChainSpec::from_json_bytes(&include_bytes!("../chain-specs/westend.json")[..]) } pub fn rococo_config() -> Result { - RococoChainSpec::from_json_bytes(&include_bytes!("../res/rococo.json")[..]) + RococoChainSpec::from_json_bytes(&include_bytes!("../chain-specs/rococo.json")[..]) } /// This is a temporary testnet that uses the same runtime as rococo. pub fn wococo_config() -> Result { - RococoChainSpec::from_json_bytes(&include_bytes!("../res/wococo.json")[..]) + RococoChainSpec::from_json_bytes(&include_bytes!("../chain-specs/wococo.json")[..]) } /// The default parachains host configuration. diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 687ea0269515..95b613d998f0 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -49,12 +49,12 @@ use { polkadot_node_core_dispute_coordinator::Config as DisputeCoordinatorConfig, polkadot_overseer::BlockInfo, sc_client_api::{BlockBackend, ExecutorProvider}, + sp_core::traits::SpawnNamed, sp_trie::PrefixedMemoryDB, }; use polkadot_node_subsystem_util::database::Database; -pub use sp_core::traits::SpawnNamed; #[cfg(feature = "full-node")] pub use { polkadot_overseer::{Handle, Overseer, OverseerConnector, OverseerHandle}, @@ -992,6 +992,8 @@ where let (worker, service) = sc_authority_discovery::new_worker_and_service_with_config( sc_authority_discovery::WorkerConfig { publish_non_global_ips: auth_disc_publish_non_global_ips, + // Require that authority discovery records are signed. + strict_record_validation: true, ..Default::default() }, client.clone(), diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index e0dce76b9393..527b99cdc1ce 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -14,7 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use super::{AuthorityDiscoveryApi, Block, Error, Hash, IsCollator, Registry, SpawnNamed}; +use super::{AuthorityDiscoveryApi, Block, Error, Hash, IsCollator, Registry}; +use sp_core::traits::SpawnNamed; + use lru::LruCache; use polkadot_availability_distribution::IncomingRequestReceivers; use polkadot_node_core_approval_voting::Config as ApprovalVotingConfig; @@ -22,18 +24,15 @@ use polkadot_node_core_av_store::Config as AvailabilityConfig; use polkadot_node_core_candidate_validation::Config as CandidateValidationConfig; use polkadot_node_core_chain_selection::Config as ChainSelectionConfig; use polkadot_node_core_dispute_coordinator::Config as DisputeCoordinatorConfig; -use polkadot_node_core_provisioner::ProvisionerConfig; use polkadot_node_network_protocol::request_response::{v1 as request_v1, IncomingRequestReceiver}; -use polkadot_node_subsystem_types::messages::{BitfieldSigningMessage, ProvisionerMessage}; #[cfg(any(feature = "malus", test))] pub use polkadot_overseer::{ dummy::{dummy_overseer_builder, DummySubsystem}, HeadSupportsParachains, }; use polkadot_overseer::{ - gen::SubsystemContext, metrics::Metrics as OverseerMetrics, BlockInfo, - InitializedOverseerBuilder, MetricsTrait, Overseer, OverseerConnector, OverseerHandle, - OverseerSubsystemContext, + metrics::Metrics as OverseerMetrics, BlockInfo, InitializedOverseerBuilder, MetricsTrait, + Overseer, OverseerConnector, OverseerHandle, SpawnGlue, }; use polkadot_primitives::runtime_api::ParachainHost; @@ -146,7 +145,7 @@ pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( }: OverseerGenArgs<'a, Spawner, RuntimeClient>, ) -> Result< InitializedOverseerBuilder< - Spawner, + SpawnGlue, Arc, CandidateValidationSubsystem, PvfCheckerSubsystem, @@ -154,15 +153,9 @@ pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( StatementDistributionSubsystem, AvailabilityDistributionSubsystem, AvailabilityRecoverySubsystem, - BitfieldSigningSubsystem< - Spawner, - as SubsystemContext>::Sender, - >, + BitfieldSigningSubsystem, BitfieldDistributionSubsystem, - ProvisionerSubsystem< - Spawner, - as SubsystemContext>::Sender, - >, + ProvisionerSubsystem, RuntimeApiSubsystem, AvailabilityStoreSubsystem, NetworkBridgeSubsystem< @@ -191,6 +184,8 @@ where let metrics = ::register(registry)?; + let spawner = SpawnGlue(spawner); + let builder = Overseer::builder() .availability_distribution(AvailabilityDistributionSubsystem::new( keystore.clone(), @@ -208,7 +203,6 @@ where )) .bitfield_distribution(BitfieldDistributionSubsystem::new(Metrics::register(registry)?)) .bitfield_signing(BitfieldSigningSubsystem::new( - spawner.clone(), keystore.clone(), Metrics::register(registry)?, )) @@ -250,11 +244,7 @@ where Box::new(network_service.clone()), Metrics::register(registry)?, )) - .provisioner(ProvisionerSubsystem::new( - spawner.clone(), - ProvisionerConfig, - Metrics::register(registry)?, - )) + .provisioner(ProvisionerSubsystem::new(Metrics::register(registry)?)) .runtime_api(RuntimeApiSubsystem::new( runtime_client.clone(), Metrics::register(registry)?, @@ -323,7 +313,7 @@ pub trait OverseerGen { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer>, OverseerHandle), Error> + ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, @@ -347,7 +337,7 @@ impl OverseerGen for RealOverseerGen { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer>, OverseerHandle), Error> + ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, diff --git a/node/service/src/parachains_db/mod.rs b/node/service/src/parachains_db/mod.rs index d80341e918d3..f6f6864a0e78 100644 --- a/node/service/src/parachains_db/mod.rs +++ b/node/service/src/parachains_db/mod.rs @@ -33,7 +33,8 @@ pub(crate) mod columns { pub const COL_APPROVAL_DATA: u32 = 2; pub const COL_CHAIN_SELECTION_DATA: u32 = 3; pub const COL_DISPUTE_COORDINATOR_DATA: u32 = 4; - pub const ORDERED_COL: &[u32] = &[COL_AVAILABILITY_META, COL_CHAIN_SELECTION_DATA]; + pub const ORDERED_COL: &[u32] = + &[COL_AVAILABILITY_META, COL_CHAIN_SELECTION_DATA, COL_DISPUTE_COORDINATOR_DATA]; } /// Columns used by different subsystems. diff --git a/node/subsystem-test-helpers/Cargo.toml b/node/subsystem-test-helpers/Cargo.toml index 91f8b62ebf52..2bb5bb541801 100644 --- a/node/subsystem-test-helpers/Cargo.toml +++ b/node/subsystem-test-helpers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Subsystem traits and message definitions" diff --git a/node/subsystem-test-helpers/src/lib.rs b/node/subsystem-test-helpers/src/lib.rs index b36c180a57b7..6ea0caabaddc 100644 --- a/node/subsystem-test-helpers/src/lib.rs +++ b/node/subsystem-test-helpers/src/lib.rs @@ -19,14 +19,14 @@ #![warn(missing_docs)] use polkadot_node_subsystem::{ - messages::AllMessages, overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, + messages::AllMessages, overseer, FromOrchestra, OverseerSignal, SpawnGlue, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_node_subsystem_util::TimeoutExt; use futures::{channel::mpsc, poll, prelude::*}; use parking_lot::Mutex; -use sp_core::{testing::TaskExecutor, traits::SpawnNamed}; +use sp_core::testing::TaskExecutor; use std::{ convert::Infallible, @@ -176,7 +176,7 @@ where /// A test subsystem context. pub struct TestSubsystemContext { tx: TestSubsystemSender, - rx: SingleItemStream>, + rx: SingleItemStream>, spawn: S, } @@ -186,7 +186,7 @@ where M: overseer::AssociateOutgoing + std::fmt::Debug + Send + 'static, AllMessages: From<::OutgoingMessages>, AllMessages: From, - Spawner: SpawnNamed + Send + 'static, + Spawner: overseer::gen::Spawner + Send + 'static, { type Message = M; type Sender = TestSubsystemSender; @@ -194,7 +194,7 @@ where type OutgoingMessages = ::OutgoingMessages; type Error = SubsystemError; - async fn try_recv(&mut self) -> Result>, ()> { + async fn try_recv(&mut self) -> Result>, ()> { match poll!(self.rx.next()) { Poll::Ready(Some(msg)) => Ok(Some(msg)), Poll::Ready(None) => Err(()), @@ -202,7 +202,7 @@ where } } - async fn recv(&mut self) -> SubsystemResult> { + async fn recv(&mut self) -> SubsystemResult> { self.rx .next() .await @@ -238,7 +238,7 @@ pub struct TestSubsystemContextHandle { /// /// Useful for shared ownership situations (one can have multiple senders, but only one /// receiver. - pub tx: SingleItemSink>, + pub tx: SingleItemSink>, /// Direct access to the receiver. pub rx: mpsc::UnboundedReceiver, @@ -247,7 +247,7 @@ pub struct TestSubsystemContextHandle { impl TestSubsystemContextHandle { /// Send a message or signal to the subsystem. This resolves at the point in time when the /// subsystem has _read_ the message. - pub async fn send(&mut self, from_overseer: FromOverseer) { + pub async fn send(&mut self, from_overseer: FromOrchestra) { self.tx.send(from_overseer).await.expect("Test subsystem no longer live"); } @@ -264,8 +264,8 @@ impl TestSubsystemContextHandle { /// Make a test subsystem context. pub fn make_subsystem_context( - spawn: S, -) -> (TestSubsystemContext, TestSubsystemContextHandle) { + spawner: S, +) -> (TestSubsystemContext>, TestSubsystemContextHandle) { let (overseer_tx, overseer_rx) = single_item_sink(); let (all_messages_tx, all_messages_rx) = mpsc::unbounded(); @@ -273,7 +273,7 @@ pub fn make_subsystem_context( TestSubsystemContext { tx: TestSubsystemSender { tx: all_messages_tx }, rx: overseer_rx, - spawn, + spawn: SpawnGlue(spawner), }, TestSubsystemContextHandle { tx: overseer_tx, rx: all_messages_rx }, ) @@ -290,7 +290,7 @@ pub fn subsystem_test_harness( ) where OverseerFactory: FnOnce(TestSubsystemContextHandle) -> Overseer, Overseer: Future, - TestFactory: FnOnce(TestSubsystemContext) -> Test, + TestFactory: FnOnce(TestSubsystemContext>) -> Test, Test: Future, { let pool = TaskExecutor::new(); @@ -330,8 +330,8 @@ where let future = Box::pin(async move { loop { match ctx.recv().await { - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => return Ok(()), - Ok(FromOverseer::Communication { msg }) => { + Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => return Ok(()), + Ok(FromOrchestra::Communication { msg }) => { let _ = self.0.send(msg).await; }, Err(_) => return Ok(()), @@ -381,6 +381,7 @@ mod tests { use polkadot_node_subsystem::messages::CollatorProtocolMessage; use polkadot_overseer::{dummy::dummy_overseer_builder, Handle, HeadSupportsParachains}; use polkadot_primitives::v2::Hash; + use sp_core::traits::SpawnNamed; struct AlwaysSupportsParachains; impl HeadSupportsParachains for AlwaysSupportsParachains { diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 8f94a6ac510c..027cecb1a3c2 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-subsystem-types" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Subsystem traits and message definitions" @@ -13,7 +13,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } -polkadot-overseer-gen = { path = "../overseer/overseer-gen" } +orchestra = { path = "../orchestra" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } smallvec = "1.8.0" substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/subsystem-types/src/errors.rs b/node/subsystem-types/src/errors.rs index 306b326e053e..27c4fcdf8d37 100644 --- a/node/subsystem-types/src/errors.rs +++ b/node/subsystem-types/src/errors.rs @@ -17,6 +17,7 @@ //! Error types for the subsystem requests. use crate::JaegerError; +use ::orchestra::OrchestraError as OverseerError; /// A description of an error causing the runtime API request to be unservable. #[derive(thiserror::Error, Debug, Clone)] @@ -120,7 +121,7 @@ pub enum SubsystemError { /// Generated by the `#[overseer(..)]` proc-macro #[error(transparent)] - Generated(#[from] ::polkadot_overseer_gen::OverseerError), + Generated(#[from] OverseerError), /// Per origin (or subsystem) annotations to wrap an error. #[error("Error originated in {origin}")] diff --git a/node/subsystem-util/Cargo.toml b/node/subsystem-util/Cargo.toml index 34d78940faf7..a8de4f904e6c 100644 --- a/node/subsystem-util/Cargo.toml +++ b/node/subsystem-util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-subsystem-util" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Subsystem traits and message definitions" @@ -17,7 +17,7 @@ thiserror = "1.0.31" fatality = "0.0.6" gum = { package = "tracing-gum", path = "../gum" } derive_more = "0.99.17" -lru = "0.7.5" +lru = "0.7.7" polkadot-node-subsystem = {path = "../subsystem" } polkadot-node-jaeger = { path = "../jaeger" } @@ -26,7 +26,7 @@ polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../primitives" } polkadot-overseer = { path = "../overseer" } -metered-channel = { path = "../metered-channel" } +metered = { package = "prioritized-metered-channel", path = "../metered-channel" , "version" = "0.2.0" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index cb51f49a489b..ef61400eb0f9 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -26,26 +26,19 @@ use polkadot_node_subsystem::{ errors::{RuntimeApiError, SubsystemError}, - messages::{BoundToRelayParent, RuntimeApiMessage, RuntimeApiRequest, RuntimeApiSender}, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, - SubsystemContext, SubsystemSender, + messages::{RuntimeApiMessage, RuntimeApiRequest, RuntimeApiSender}, + overseer, SubsystemSender, }; pub use overseer::{ - gen::{OverseerError, Timeout}, + gen::{OrchestraError as OverseerError, Timeout}, Subsystem, TimeoutExt, }; pub use polkadot_node_metrics::{metrics, Metronome}; -use futures::{ - channel::{mpsc, oneshot}, - prelude::*, - select, - stream::{SelectAll, Stream}, -}; +use futures::channel::{mpsc, oneshot}; use parity_scale_codec::Encode; -use pin_project::pin_project; use polkadot_primitives::v2::{ AuthorityDiscoveryId, CandidateEvent, CommittedCandidateReceipt, CoreState, EncodeAs, @@ -56,26 +49,19 @@ use polkadot_primitives::v2::{ }; pub use rand; use sp_application_crypto::AppKey; -use sp_core::{traits::SpawnNamed, ByteArray}; +use sp_core::ByteArray; use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr}; -use std::{ - collections::{hash_map::Entry, HashMap}, - fmt, - marker::Unpin, - pin::Pin, - task::{Context, Poll}, - time::Duration, -}; +use std::time::Duration; use thiserror::Error; -pub use metered_channel as metered; +pub use metered; pub use polkadot_node_network_protocol::MIN_GOSSIP_PEERS; pub use determine_new_blocks::determine_new_blocks; /// These reexports are required so that external crates can use the `delegated_subsystem` macro properly. pub mod reexports { - pub use polkadot_overseer::gen::{SpawnNamed, SpawnedSubsystem, Subsystem, SubsystemContext}; + pub use polkadot_overseer::gen::{SpawnedSubsystem, Spawner, Subsystem, SubsystemContext}; } /// An emulator for node-side code to predict the results of on-chain parachain inclusion @@ -391,396 +377,3 @@ impl Validator { Signed::sign(&keystore, payload, &self.signing_context, self.index, &self.key).await } } - -struct AbortOnDrop(future::AbortHandle); - -impl Drop for AbortOnDrop { - fn drop(&mut self) { - self.0.abort(); - } -} - -/// A `JobHandle` manages a particular job for a subsystem. -struct JobHandle { - _abort_handle: AbortOnDrop, - to_job: mpsc::Sender, -} - -impl JobHandle { - /// Send a message to the job. - async fn send_msg(&mut self, msg: Consumes) -> Result<(), Error> { - self.to_job.send(msg).await.map_err(Into::into) - } -} - -/// Commands from a job to the broader subsystem. -pub enum FromJobCommand { - /// Spawn a child task on the executor. - Spawn(&'static str, Pin + Send>>), - /// Spawn a blocking child task on the executor's dedicated thread pool. - SpawnBlocking(&'static str, Pin + Send>>), -} - -/// A sender for messages from jobs, as well as commands to the overseer. -pub struct JobSender { - sender: S, - from_job: mpsc::Sender, -} - -// A custom clone impl, since M does not need to impl `Clone` -// which `#[derive(Clone)]` requires. -impl Clone for JobSender { - fn clone(&self) -> Self { - Self { sender: self.sender.clone(), from_job: self.from_job.clone() } - } -} - -impl JobSender { - /// Get access to the underlying subsystem sender. - pub fn subsystem_sender(&mut self) -> &mut S { - &mut self.sender - } - - /// Send a command to the subsystem, to be relayed onwards to the overseer. - pub async fn send_command(&mut self, msg: FromJobCommand) -> Result<(), mpsc::SendError> { - self.from_job.send(msg).await - } -} - -#[async_trait::async_trait] -impl overseer::SubsystemSender for JobSender -where - M: Send + 'static, - S: SubsystemSender + Clone, -{ - async fn send_message(&mut self, msg: M) { - self.sender.send_message(msg).await - } - - async fn send_messages(&mut self, msgs: I) - where - I: IntoIterator + Send, - I::IntoIter: Send, - { - self.sender.send_messages(msgs).await - } - - fn send_unbounded_message(&mut self, msg: M) { - self.sender.send_unbounded_message(msg) - } -} - -impl fmt::Debug for FromJobCommand { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match self { - Self::Spawn(name, _) => write!(fmt, "FromJobCommand::Spawn({})", name), - Self::SpawnBlocking(name, _) => write!(fmt, "FromJobCommand::SpawnBlocking({})", name), - } - } -} - -/// This trait governs jobs. -/// -/// Jobs are instantiated and killed automatically on appropriate overseer messages. -/// Other messages are passed along to and from the job via the overseer to other subsystems. -pub trait JobTrait: Unpin + Sized { - /// Message type used to send messages to the job. - type ToJob: 'static + BoundToRelayParent + Send; - - /// The set of outgoing messages to be accumulated into. - type OutgoingMessages: 'static + Send; - - /// The sender to send outgoing messages. - // The trait bounds are rather minimal. - type Sender: 'static + Send + Clone; - - /// Job runtime error. - type Error: 'static + std::error::Error + Send; - /// Extra arguments this job needs to run properly. - /// - /// If no extra information is needed, it is perfectly acceptable to set it to `()`. - type RunArgs: 'static + Send; - /// Subsystem-specific Prometheus metrics. - /// - /// Jobs spawned by one subsystem should share the same - /// instance of metrics (use `.clone()`). - /// The `delegate_subsystem!` macro should take care of this. - type Metrics: 'static + metrics::Metrics + Send; - - /// Name of the job, i.e. `candidate-backing-job` - const NAME: &'static str; - - /// Run a job for the given relay `parent`. - /// - /// The job should be ended when `receiver` returns `None`. - fn run( - leaf: ActivatedLeaf, - run_args: Self::RunArgs, - metrics: Self::Metrics, - receiver: mpsc::Receiver, - sender: JobSender, - ) -> Pin> + Send>>; -} - -/// Error which can be returned by the jobs manager -/// -/// Wraps the utility error type and the job-specific error -#[derive(Debug, Error)] -pub enum JobsError { - /// utility error - #[error("Utility")] - Utility(#[source] Error), - /// internal job error - #[error("Internal")] - Job(#[source] JobError), -} - -/// Jobs manager for a subsystem -/// -/// - Spawns new jobs for a given relay-parent on demand. -/// - Closes old jobs for a given relay-parent on demand. -/// - Dispatches messages to the appropriate job for a given relay-parent. -/// - When dropped, aborts all remaining jobs. -/// - implements `Stream`, collecting all messages from subordinate jobs. -#[pin_project] -struct Jobs { - spawner: Spawner, - running: HashMap>, - outgoing_msgs: SelectAll>, -} - -impl Jobs -where - Spawner: SpawnNamed, - ToJob: Send + 'static, -{ - /// Create a new Jobs manager which handles spawning appropriate jobs. - pub fn new(spawner: Spawner) -> Self { - Self { spawner, running: HashMap::new(), outgoing_msgs: SelectAll::new() } - } - - /// Spawn a new job for this `parent_hash`, with whatever args are appropriate. - fn spawn_job( - &mut self, - leaf: ActivatedLeaf, - run_args: Job::RunArgs, - metrics: Job::Metrics, - sender: Job::Sender, - ) where - Job: JobTrait, - { - let hash = leaf.hash; - let (to_job_tx, to_job_rx) = mpsc::channel(JOB_CHANNEL_CAPACITY); - let (from_job_tx, from_job_rx) = mpsc::channel(JOB_CHANNEL_CAPACITY); - - let (future, abort_handle) = future::abortable(async move { - if let Err(e) = Job::run( - leaf, - run_args, - metrics, - to_job_rx, - JobSender { sender, from_job: from_job_tx }, - ) - .await - { - gum::error!( - job = Job::NAME, - parent_hash = %hash, - err = ?e, - "job finished with an error", - ); - - return Err(e) - } - - Ok(()) - }); - - self.spawner.spawn( - Job::NAME, - Some(Job::NAME.strip_suffix("-job").unwrap_or(Job::NAME)), - future.map(drop).boxed(), - ); - self.outgoing_msgs.push(from_job_rx); - - let handle = JobHandle { _abort_handle: AbortOnDrop(abort_handle), to_job: to_job_tx }; - - self.running.insert(hash, handle); - } - - /// Stop the job associated with this `parent_hash`. - pub async fn stop_job(&mut self, parent_hash: Hash) { - self.running.remove(&parent_hash); - } - - /// Send a message to the appropriate job for this `parent_hash`. - async fn send_msg(&mut self, parent_hash: Hash, msg: ToJob) { - if let Entry::Occupied(mut job) = self.running.entry(parent_hash) { - if job.get_mut().send_msg(msg).await.is_err() { - job.remove(); - } - } - } -} - -impl Stream for Jobs -where - Spawner: SpawnNamed, -{ - type Item = FromJobCommand; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - match futures::ready!(Pin::new(&mut self.outgoing_msgs).poll_next(cx)) { - Some(msg) => Poll::Ready(Some(msg)), - // Don't end if there are no jobs running - None => Poll::Pending, - } - } -} - -impl stream::FusedStream for Jobs -where - Spawner: SpawnNamed, -{ - fn is_terminated(&self) -> bool { - false - } -} - -/// Parameters to a job subsystem. -pub struct JobSubsystemParams { - /// A spawner for sub-tasks. - spawner: Spawner, - /// Arguments to each job. - run_args: RunArgs, - /// Metrics for the subsystem. - pub metrics: Metrics, -} - -/// A subsystem which wraps jobs. -/// -/// Conceptually, this is very simple: it just loops forever. -/// -/// - On incoming overseer messages, it starts or stops jobs as appropriate. -/// - On other incoming messages, if they can be converted into `Job::ToJob` and -/// include a hash, then they're forwarded to the appropriate individual job. -/// - On outgoing messages from the jobs, it forwards them to the overseer. -pub struct JobSubsystem { - #[allow(missing_docs)] - pub params: JobSubsystemParams, - _marker: std::marker::PhantomData, -} - -impl JobSubsystem { - /// Create a new `JobSubsystem`. - pub fn new(spawner: Spawner, run_args: Job::RunArgs, metrics: Job::Metrics) -> Self { - JobSubsystem { - params: JobSubsystemParams { spawner, run_args, metrics }, - _marker: std::marker::PhantomData, - } - } - - /// Run the subsystem to completion. - pub async fn run(self, mut ctx: Context) - where - Spawner: SpawnNamed + Send + Clone + Unpin + 'static, - Context: SubsystemContext< - Message = ::ToJob, - OutgoingMessages = ::OutgoingMessages, - Sender = ::Sender, - Signal = OverseerSignal, - >, - Job: 'static + JobTrait + Send, - ::RunArgs: Clone + Sync, - ::ToJob: - Sync + From<::Message>, - ::Metrics: Sync, - { - let JobSubsystem { params: JobSubsystemParams { spawner, run_args, metrics }, .. } = self; - - let mut jobs = Jobs::::new(spawner); - - loop { - select! { - incoming = ctx.recv().fuse() => { - match incoming { - Ok(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate { - activated, - deactivated, - }))) => { - for activated in activated { - let sender = ctx.sender().clone(); - jobs.spawn_job::( - activated, - run_args.clone(), - metrics.clone(), - sender, - ) - } - - for hash in deactivated { - jobs.stop_job(hash).await; - } - } - Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => { - jobs.running.clear(); - break; - } - Ok(FromOverseer::Signal(OverseerSignal::BlockFinalized(..))) => {} - Ok(FromOverseer::Communication { msg }) => { - if let Ok(to_job) = <::Message>::try_from(msg) { - jobs.send_msg(to_job.relay_parent(), to_job).await; - } - } - Err(err) => { - gum::error!( - job = Job::NAME, - err = ?err, - "error receiving message from subsystem context for job", - ); - break; - } - } - } - outgoing = jobs.next() => { - // TODO verify the introduced .await here is not a problem - // TODO it should only wait for the spawn to complete - // TODO but not for anything beyond that - let res = match outgoing.expect("the Jobs stream never ends; qed") { - FromJobCommand::Spawn(name, task) => ctx.spawn(name, task), - FromJobCommand::SpawnBlocking(name, task) => ctx.spawn_blocking(name, task), - }; - - if let Err(e) = res { - gum::warn!(err = ?e, "failed to handle command from job"); - } - } - complete => break, - } - } - } -} - -impl Subsystem for JobSubsystem -where - Spawner: SpawnNamed + Send + Clone + Unpin + 'static, - Context: SubsystemContext< - Message = Job::ToJob, - Signal = OverseerSignal, - OutgoingMessages = ::OutgoingMessages, - Sender = ::Sender, - >, - Job: 'static + JobTrait + Send, - Job::RunArgs: Clone + Sync, - ::ToJob: Sync + From<::Message>, - Job::Metrics: Sync, -{ - fn start(self, ctx: Context) -> SpawnedSubsystem { - let future = Box::pin(async move { - self.run(ctx).await; - Ok(()) - }); - - SpawnedSubsystem { name: Job::NAME.strip_suffix("-job").unwrap_or(Job::NAME), future } - } -} diff --git a/node/subsystem-util/src/tests.rs b/node/subsystem-util/src/tests.rs index 2a1a95a88458..e3bae035d714 100644 --- a/node/subsystem-util/src/tests.rs +++ b/node/subsystem-util/src/tests.rs @@ -17,208 +17,16 @@ #![cfg(test)] use super::*; -use assert_matches::assert_matches; use executor::block_on; -use futures::{channel::mpsc, executor, future, Future, FutureExt, SinkExt, StreamExt}; -use polkadot_node_jaeger as jaeger; -use polkadot_node_subsystem::{ - messages::{AllMessages, CollatorProtocolMessage}, - ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, SpawnedSubsystem, -}; -use polkadot_node_subsystem_test_helpers::{self as test_helpers, make_subsystem_context}; -use polkadot_primitives::v2::Hash; -use polkadot_primitives_test_helpers::{dummy_candidate_receipt, dummy_hash, AlwaysZeroRng}; +use futures::{channel::mpsc, executor, FutureExt, SinkExt, StreamExt}; +use polkadot_primitives_test_helpers::AlwaysZeroRng; use std::{ - pin::Pin, sync::{ atomic::{AtomicUsize, Ordering}, Arc, }, time::Duration, }; -use thiserror::Error; - -// basic usage: in a nutshell, when you want to define a subsystem, just focus on what its jobs do; -// you can leave the subsystem itself to the job manager. - -// for purposes of demonstration, we're going to whip up a fake subsystem. -// this will 'select' candidates which are pre-loaded in the job - -// job structs are constructed within JobTrait::run -// most will want to retain the sender and receiver, as well as whatever other data they like -struct FakeCollatorProtocolJob { - receiver: mpsc::Receiver, - _phantom: std::marker::PhantomData, -} - -// Error will mostly be a wrapper to make the try operator more convenient; -// deriving From implementations for most variants is recommended. -// It must implement Debug for logging. -#[derive(Debug, Error)] -enum Error { - #[error(transparent)] - Sending(#[from] mpsc::SendError), -} - -impl JobTrait for FakeCollatorProtocolJob -where - Sender: overseer::CollatorProtocolSenderTrait - + std::marker::Unpin - + overseer::SubsystemSender, - JobSender: overseer::CollatorProtocolSenderTrait - + std::marker::Unpin - + overseer::SubsystemSender, -{ - type ToJob = CollatorProtocolMessage; - type OutgoingMessages = overseer::CollatorProtocolOutgoingMessages; - type Sender = Sender; - type Error = Error; - type RunArgs = bool; - type Metrics = (); - - const NAME: &'static str = "fake-collator-protocol-job"; - - /// Run a job for the parent block indicated - // - // this function is in charge of creating and executing the job's main loop - fn run( - _: ActivatedLeaf, - run_args: Self::RunArgs, - _metrics: Self::Metrics, - receiver: mpsc::Receiver, - mut sender: JobSender, - ) -> Pin> + Send>> { - async move { - let job = - FakeCollatorProtocolJob { receiver, _phantom: std::marker::PhantomData:: }; - - if run_args { - sender - .send_message(CollatorProtocolMessage::Invalid( - dummy_hash(), - dummy_candidate_receipt(dummy_hash()), - )) - .await; - } - - // it isn't necessary to break run_loop into its own function, - // but it's convenient to separate the concerns in this way - job.run_loop().await - } - .boxed() - } -} - -impl FakeCollatorProtocolJob -where - Sender: overseer::CollatorProtocolSenderTrait, -{ - async fn run_loop(mut self) -> Result<(), Error> { - loop { - match self.receiver.next().await { - Some(_csm) => { - unimplemented!("we'd report the collator to the peer set manager here, but that's not implemented yet"); - }, - None => break, - } - } - - Ok(()) - } -} - -// with the job defined, it's straightforward to get a subsystem implementation. -type FakeCollatorProtocolSubsystem = - JobSubsystem, Spawner>; - -// this type lets us pretend to be the overseer -type OverseerHandle = test_helpers::TestSubsystemContextHandle; - -fn test_harness>(run_args: bool, test: impl FnOnce(OverseerHandle) -> T) { - let _ = env_logger::builder() - .is_test(true) - .filter(None, log::LevelFilter::Trace) - .try_init(); - - let pool = sp_core::testing::TaskExecutor::new(); - let (context, overseer_handle) = make_subsystem_context(pool.clone()); - - let subsystem = FakeCollatorProtocolSubsystem::new(pool, run_args, ()).run(context); - let test_future = test(overseer_handle); - - futures::pin_mut!(subsystem, test_future); - - executor::block_on(async move { - future::join(subsystem, test_future) - .timeout(Duration::from_secs(2)) - .await - .expect("test timed out instead of completing") - }); -} - -#[test] -fn starting_and_stopping_job_works() { - let relay_parent: Hash = [0; 32].into(); - - test_harness(true, |mut overseer_handle| async move { - overseer_handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( - ActiveLeavesUpdate::start_work(ActivatedLeaf { - hash: relay_parent, - number: 1, - status: LeafStatus::Fresh, - span: Arc::new(jaeger::Span::Disabled), - }), - ))) - .await; - assert_matches!(overseer_handle.recv().await, AllMessages::CollatorProtocol(_)); - overseer_handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( - ActiveLeavesUpdate::stop_work(relay_parent), - ))) - .await; - - overseer_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; - }); -} - -#[test] -fn sending_to_a_non_running_job_do_not_stop_the_subsystem() { - let relay_parent = Hash::repeat_byte(0x01); - - test_harness(true, |mut overseer_handle| async move { - overseer_handle - .send(FromOverseer::Signal(OverseerSignal::ActiveLeaves( - ActiveLeavesUpdate::start_work(ActivatedLeaf { - hash: relay_parent, - number: 1, - status: LeafStatus::Fresh, - span: Arc::new(jaeger::Span::Disabled), - }), - ))) - .await; - - // send to a non running job - overseer_handle - .send(FromOverseer::Communication { msg: Default::default() }) - .await; - - // the subsystem is still alive - assert_matches!(overseer_handle.recv().await, AllMessages::CollatorProtocol(_)); - - overseer_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await; - }); -} - -#[test] -fn test_subsystem_impl_and_name_derivation() { - let pool = sp_core::testing::TaskExecutor::new(); - let (context, _) = make_subsystem_context::(pool.clone()); - - let SpawnedSubsystem { name, .. } = - FakeCollatorProtocolSubsystem::new(pool, false, ()).start(context); - assert_eq!(name, "fake-collator-protocol"); -} #[test] fn tick_tack_metronome() { diff --git a/node/subsystem/Cargo.toml b/node/subsystem/Cargo.toml index f7204d409fb6..c681a0fd7cf5 100644 --- a/node/subsystem/Cargo.toml +++ b/node/subsystem/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-subsystem" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" description = "Subsystem traits and message definitions and the generated overseer" diff --git a/node/subsystem/src/lib.rs b/node/subsystem/src/lib.rs index 2ffd4871f4f8..ce5fef2c8b51 100644 --- a/node/subsystem/src/lib.rs +++ b/node/subsystem/src/lib.rs @@ -46,7 +46,7 @@ pub type SubsystemResult = Result; // subsystems at once. /// Specialized message type originating from the overseer. -pub type FromOverseer = polkadot_overseer::gen::FromOverseer; +pub type FromOrchestra = polkadot_overseer::gen::FromOrchestra; /// Specialized subsystem instance type of subsystems consuming a particular message type. pub type SubsystemInstance = diff --git a/node/test/client/Cargo.toml b/node/test/client/Cargo.toml index 0d4cb5ca2a11..852510e9c3e4 100644 --- a/node/test/client/Cargo.toml +++ b/node/test/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-test-client" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/test/performance-test/Cargo.toml b/node/test/performance-test/Cargo.toml index 475ad03d1773..37e6df53465c 100644 --- a/node/test/performance-test/Cargo.toml +++ b/node/test/performance-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-performance-test" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/node/test/service/Cargo.toml b/node/test/service/Cargo.toml index 6f13a713536f..9765c9c6a577 100644 --- a/node/test/service/Cargo.toml +++ b/node/test/service/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "polkadot-test-service" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" [dependencies] futures = "0.3.21" -futures01 = { package = "futures", version = "0.1.29" } hex = "0.4.3" gum = { package = "tracing-gum", path = "../../gum" } rand = "0.8.5" diff --git a/node/test/service/src/lib.rs b/node/test/service/src/lib.rs index e268e375dce6..90e311b910da 100644 --- a/node/test/service/src/lib.rs +++ b/node/test/service/src/lib.rs @@ -42,7 +42,10 @@ use sc_network::{ multiaddr, }; use sc_service::{ - config::{DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, WasmExecutionMethod}, + config::{ + DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, WasmExecutionMethod, + WasmtimeInstantiationStrategy, + }, BasePath, Configuration, KeepBlocks, Role, RpcHandlers, TaskManager, }; use sp_arithmetic::traits::SaturatedConversion; @@ -176,7 +179,9 @@ pub fn node_config( state_pruning: Default::default(), keep_blocks: KeepBlocks::All, chain_spec: Box::new(spec), - wasm_method: WasmExecutionMethod::Compiled, + wasm_method: WasmExecutionMethod::Compiled { + instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + }, wasm_runtime_overrides: Default::default(), // NOTE: we enforce the use of the native runtime to make the errors more debuggable execution_strategies: ExecutionStrategies { diff --git a/node/zombienet-backchannel/Cargo.toml b/node/zombienet-backchannel/Cargo.toml index 2187b9315e32..ab57fcbc9b7a 100644 --- a/node/zombienet-backchannel/Cargo.toml +++ b/node/zombienet-backchannel/Cargo.toml @@ -2,7 +2,7 @@ name = "zombienet-backchannel" description = "Zombienet backchannel to notify test runner and coordinate with malus actors." license = "GPL-3.0-only" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" readme = "README.md" diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index 7aba0b221800..eb53a106aa46 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-parachain" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Types and utilities for creating and working with parachains" edition = "2021" @@ -11,7 +11,7 @@ edition = "2021" # various unnecessary Substrate-specific endpoints. parity-scale-codec = { version = "3.1.2", default-features = false, features = [ "derive" ] } parity-util-mem = { version = "0.11.0", default-features = false, optional = true } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/parachain/test-parachains/Cargo.toml b/parachain/test-parachains/Cargo.toml index 0fa1f976acec..4b5492f58ca6 100644 --- a/parachain/test-parachains/Cargo.toml +++ b/parachain/test-parachains/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachains" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Integration tests using the test-parachains" edition = "2021" diff --git a/parachain/test-parachains/adder/Cargo.toml b/parachain/test-parachains/adder/Cargo.toml index 81bd33249430..69cf157ada89 100644 --- a/parachain/test-parachains/adder/Cargo.toml +++ b/parachain/test-parachains/adder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-adder" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Test parachain which adds to a number as its state transition" edition = "2021" diff --git a/parachain/test-parachains/adder/collator/Cargo.toml b/parachain/test-parachains/adder/collator/Cargo.toml index 6c538969287c..d3a165d14814 100644 --- a/parachain/test-parachains/adder/collator/Cargo.toml +++ b/parachain/test-parachains/adder/collator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-adder-collator" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Collator for the adder test parachain" edition = "2021" diff --git a/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index 25a1cc72f9c5..d14f1e0f4d90 100644 --- a/parachain/test-parachains/halt/Cargo.toml +++ b/parachain/test-parachains/halt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-halt" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Test parachain which executes forever" edition = "2021" diff --git a/parachain/test-parachains/undying/Cargo.toml b/parachain/test-parachains/undying/Cargo.toml index e636b4af3559..ef026bdce778 100644 --- a/parachain/test-parachains/undying/Cargo.toml +++ b/parachain/test-parachains/undying/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-undying" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Test parachain for zombienet integration tests" edition = "2021" diff --git a/parachain/test-parachains/undying/collator/Cargo.toml b/parachain/test-parachains/undying/collator/Cargo.toml index dded32322f51..923b323d75ac 100644 --- a/parachain/test-parachains/undying/collator/Cargo.toml +++ b/parachain/test-parachains/undying/collator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-undying-collator" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Collator for the undying test parachain" edition = "2021" diff --git a/parachain/test-parachains/undying/collator/src/lib.rs b/parachain/test-parachains/undying/collator/src/lib.rs index 8ca8e9409958..5d1a53f60cb3 100644 --- a/parachain/test-parachains/undying/collator/src/lib.rs +++ b/parachain/test-parachains/undying/collator/src/lib.rs @@ -24,7 +24,7 @@ use polkadot_node_primitives::{ MaybeCompressedPoV, PoV, Statement, }; use polkadot_primitives::v2::{CollatorId, CollatorPair, Hash}; -use sp_core::{traits::SpawnNamed, Pair}; +use sp_core::Pair; use std::{ collections::HashMap, sync::{ @@ -323,10 +323,11 @@ impl Collator { } } +use sp_core::traits::SpawnNamed; + #[cfg(test)] mod tests { use super::*; - use futures::executor::block_on; use polkadot_parachain::primitives::{ValidationParams, ValidationResult}; use polkadot_primitives::v2::{Hash, PersistedValidationData}; diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index c45a96dcb91e..ede9e5f21c35 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "polkadot-primitives" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" [dependencies] serde = { version = "1.0.137", optional = true, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["bit-vec", "derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["bit-vec", "derive"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["bit-vec", "derive"] } primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index 0a9de44480f4..4cab787edd23 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -1291,7 +1291,7 @@ impl DisputeStatement { } /// Different kinds of statements of validity on a candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum ValidDisputeStatementKind { /// An explicit statement issued as part of a dispute. @@ -1309,7 +1309,7 @@ pub enum ValidDisputeStatementKind { } /// Different kinds of statements of invalidity on a candidate. -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum InvalidDisputeStatementKind { /// An explicit statement issued as part of a dispute. diff --git a/primitives/test-helpers/Cargo.toml b/primitives/test-helpers/Cargo.toml index 6afe34f92753..cf91a6c3e02b 100644 --- a/primitives/test-helpers/Cargo.toml +++ b/primitives/test-helpers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-primitives-test-helpers" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/roadmap/implementers-guide/src/types/overseer-protocol.md b/roadmap/implementers-guide/src/types/overseer-protocol.md index f10537fcf666..b2559c4cfda7 100644 --- a/roadmap/implementers-guide/src/types/overseer-protocol.md +++ b/roadmap/implementers-guide/src/types/overseer-protocol.md @@ -19,7 +19,7 @@ enum OverseerSignal { All subsystems have their own message types; all of them need to be able to listen for overseer signals as well. There are currently two proposals for how to handle that with unified communication channels: -1. Retaining the `OverseerSignal` definition above, add `enum FromOverseer {Signal(OverseerSignal), Message(T)}`. +1. Retaining the `OverseerSignal` definition above, add `enum FromOrchestra {Signal(OverseerSignal), Message(T)}`. 1. Add a generic varint to `OverseerSignal`: `Message(T)`. Either way, there will be some top-level type encapsulating messages from the overseer to each subsystem. diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 39939ac9bfca..6175f9e3791b 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "polkadot-rpc" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" [dependencies] -jsonrpsee = { version = "0.13.1", features = ["server"] } +jsonrpsee = { version = "0.14.0", features = ["server"] } polkadot-primitives = { path = "../primitives" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 3082b0f97fd3..57659ba04c3b 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -115,14 +115,14 @@ where B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::StateBackend>, { - use beefy_gadget_rpc::{BeefyApiServer, BeefyRpcHandler}; - use frame_rpc_system::{SystemApiServer, SystemRpc}; - use pallet_mmr_rpc::{MmrApiServer, MmrRpc}; - use pallet_transaction_payment_rpc::{TransactionPaymentApiServer, TransactionPaymentRpc}; - use sc_consensus_babe_rpc::{BabeApiServer, BabeRpc}; - use sc_finality_grandpa_rpc::{GrandpaApiServer, GrandpaRpc}; - use sc_sync_state_rpc::{SyncStateRpc, SyncStateRpcApiServer}; - use substrate_state_trie_migration_rpc::StateMigrationApiServer; + use beefy_gadget_rpc::{Beefy, BeefyApiServer}; + use frame_rpc_system::{System, SystemApiServer}; + use pallet_mmr_rpc::{Mmr, MmrApiServer}; + use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use sc_consensus_babe_rpc::{Babe, BabeApiServer}; + use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; + use sc_sync_state_rpc::{SyncState, SyncStateApiServer}; + use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer}; let mut io = RpcModule::new(()); let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, beefy } = @@ -136,15 +136,12 @@ where finality_provider, } = grandpa; + io.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?; + io.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; + io.merge(TransactionPayment::new(client.clone()).into_rpc())?; + io.merge(Mmr::new(client.clone()).into_rpc())?; io.merge( - substrate_state_trie_migration_rpc::MigrationRpc::new(client.clone(), backend, deny_unsafe) - .into_rpc(), - )?; - io.merge(SystemRpc::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; - io.merge(TransactionPaymentRpc::new(client.clone()).into_rpc())?; - io.merge(MmrRpc::new(client.clone()).into_rpc())?; - io.merge( - BabeRpc::new( + Babe::new( client.clone(), shared_epoch_changes.clone(), keystore, @@ -155,7 +152,7 @@ where .into_rpc(), )?; io.merge( - GrandpaRpc::new( + Grandpa::new( subscription_executor, shared_authority_set.clone(), shared_voter_state, @@ -165,12 +162,11 @@ where .into_rpc(), )?; io.merge( - SyncStateRpc::new(chain_spec, client, shared_authority_set, shared_epoch_changes)? - .into_rpc(), + SyncState::new(chain_spec, client, shared_authority_set, shared_epoch_changes)?.into_rpc(), )?; io.merge( - BeefyRpcHandler::::new( + Beefy::::new( beefy.beefy_commitment_stream, beefy.beefy_best_block_stream, beefy.subscription_executor, diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 215655ab6a1f..555268fb8609 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-common" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -10,7 +10,7 @@ bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" diff --git a/runtime/common/slot_range_helper/Cargo.toml b/runtime/common/slot_range_helper/Cargo.toml index e8aa5042c011..375dbd23c282 100644 --- a/runtime/common/slot_range_helper/Cargo.toml +++ b/runtime/common/slot_range_helper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slot-range-helper" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index 2d71fd432d0f..114585e8aa3f 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -305,6 +305,7 @@ pub mod pallet { for ((bidder, _), amount) in ReservedAmounts::::drain() { CurrencyOf::::unreserve(&bidder, amount); } + #[allow(deprecated)] Winning::::remove_all(None); AuctionInfo::::kill(); Ok(()) @@ -557,6 +558,7 @@ impl Pallet { .unwrap_or([Self::EMPTY; SlotRange::SLOT_RANGE_COUNT]); // This `remove_all` statement should remove at most `EndingPeriod` / `SampleLength` items, // which should be bounded and sensibly configured in the runtime. + #[allow(deprecated)] Winning::::remove_all(None); AuctionInfo::::kill(); return Some((res, lease_period_index)) @@ -677,7 +679,7 @@ mod tests { assert_noop, assert_ok, assert_storage_noop, dispatch::DispatchError::BadOrigin, ord_parameter_types, parameter_types, - traits::{EnsureOneOf, OnFinalize, OnInitialize}, + traits::{EitherOfDiverse, OnFinalize, OnInitialize}, }; use frame_system::{EnsureRoot, EnsureSignedBy}; use pallet_balances; @@ -840,7 +842,7 @@ mod tests { pub const Six: u64 = 6; } - type RootOrSix = EnsureOneOf, EnsureSignedBy>; + type RootOrSix = EitherOfDiverse, EnsureSignedBy>; thread_local! { pub static LAST_RANDOM: RefCell> = RefCell::new(None); diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index fa886f01440b..4b2c29f5398d 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -691,6 +691,7 @@ impl Pallet { } pub fn crowdloan_kill(index: FundIndex) -> child::KillStorageResult { + #[allow(deprecated)] child::kill_storage(&Self::id_from_index(index), Some(T::RemoveKeysLimit::get())) } diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index 7066c9a6a955..1ee85fb4c346 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -164,6 +164,7 @@ mod tests { type SpendFunds = (); type MaxApprovals = MaxApprovals; type WeightInfo = (); + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; } pub struct OneAuthor; diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index d9dac14a0f5e..0a6ca7b6e9c8 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -226,6 +226,7 @@ impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig { /// pub LaunchPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "KSM_LAUNCH_PERIOD"); /// pub const VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES); /// } +/// ``` #[macro_export] macro_rules! prod_or_fast { ($prod:expr, $test:expr) => { diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index b534e2277059..3900f6edb318 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -451,10 +451,15 @@ pub fn remove_pallet() -> frame_support::weights::Weight where T: frame_system::Config, { + #[allow(deprecated)] use frame_support::migration::remove_storage_prefix; + #[allow(deprecated)] remove_storage_prefix(b"Purchase", b"Accounts", b""); + #[allow(deprecated)] remove_storage_prefix(b"Purchase", b"PaymentAccount", b""); + #[allow(deprecated)] remove_storage_prefix(b"Purchase", b"Statement", b""); + #[allow(deprecated)] remove_storage_prefix(b"Purchase", b"UnlockBlock", b""); ::BlockWeights::get().max_block diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 3064fa9292ea..c7732645e23d 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kusama-runtime" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" build = "build.rs" @@ -8,7 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.137", default-features = false } @@ -57,7 +57,6 @@ pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = " pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -148,7 +147,6 @@ std = [ "pallet-indices/std", "pallet-membership/std", "pallet-multisig/std", - "pallet-nicks/std", "pallet-nomination-pools/std", "pallet-offences/std", "pallet-preimage/std", @@ -241,6 +239,7 @@ try-runtime = [ "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-bags-list/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-transaction-payment/try-runtime", @@ -254,7 +253,6 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", - "pallet-nicks/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", diff --git a/runtime/kusama/constants/Cargo.toml b/runtime/kusama/constants/Cargo.toml index 3985dc39983a..30227eecd6fe 100644 --- a/runtime/kusama/constants/Cargo.toml +++ b/runtime/kusama/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kusama-runtime-constants" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/kusama/constants/src/lib.rs b/runtime/kusama/constants/src/lib.rs index 07a61a72bcc5..00e429cff568 100644 --- a/runtime/kusama/constants/src/lib.rs +++ b/runtime/kusama/constants/src/lib.rs @@ -100,14 +100,14 @@ mod tests { fee::WeightToFee, }; use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFeePolynomial; + use frame_support::weights::WeightToFee as WeightToFeeT; use runtime_common::MAXIMUM_BLOCK_WEIGHT; #[test] // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. fn full_block_fee_is_correct() { // A full block should cost between 1,000 and 10,000 CENTS. - let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT); + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); assert!(full_block >= 1_000 * CENTS); assert!(full_block <= 10_000 * CENTS); } @@ -117,7 +117,7 @@ mod tests { fn extrinsic_base_fee_is_correct() { // `ExtrinsicBaseWeight` should cost 1/10 of a CENT println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::calc(&ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); let y = CENTS / 10; assert!(x.max(y) - x.min(y) < MILLICENTS); } diff --git a/runtime/kusama/constants/src/weights/block_weights.rs b/runtime/kusama/constants/src/weights/block_weights.rs index 88b8dc081589..bd5e6ebb9fbf 100644 --- a/runtime/kusama/constants/src/weights/block_weights.rs +++ b/runtime/kusama/constants/src/weights/block_weights.rs @@ -16,7 +16,8 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11 (Y/M/D) +//! DATE: 2022-06-20 (Y/M/D) +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -43,17 +44,17 @@ parameter_types! { /// Time to execute an empty block. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 5_730_330, 5_985_274 - /// Average: 5_821_327 - /// Median: 5_803_676 - /// Std-Dev: 55670.15 + /// Stats nanoseconds: + /// Min, Max: 6_068_614, 6_421_324 + /// Average: 6_138_570 + /// Median: 6_122_267 + /// Std-Dev: 58179.19 /// - /// Percentiles [NS]: - /// 99th: 5_982_855 - /// 95th: 5_928_728 - /// 75th: 5_857_429 - pub const BlockExecutionWeight: Weight = 5_821_327 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 6_291_906 + /// 95th: 6_244_806 + /// 75th: 6_161_967 + pub const BlockExecutionWeight: Weight = 6_138_570 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 35247456ecea..3b6994aa685b 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -52,8 +52,8 @@ use frame_election_provider_support::{ use frame_support::{ construct_runtime, parameter_types, traits::{ - ConstU32, Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - OnRuntimeUpgrade, PrivilegeCmp, + ConstU32, Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, + PrivilegeCmp, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -116,13 +116,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 9220, + spec_version: 9250, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] apis: version::create_apis_vec![[]], - transaction_version: 11, + transaction_version: 12, state_version: 0, }; @@ -147,7 +147,7 @@ impl Contains for BaseFilter { } } -type MoreThanHalfCouncil = EnsureOneOf< +type MoreThanHalfCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; @@ -191,7 +191,7 @@ parameter_types! { pub const NoPreimagePostponement: Option = Some(10); } -type ScheduleOrigin = EnsureOneOf< +type ScheduleOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -327,6 +327,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -491,7 +492,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { (), >; type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EnsureOneOf< + type ForceOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -587,7 +588,7 @@ parameter_types! { pub const MaxNominations: u32 = ::LIMIT as u32; } -type SlashCancelOrigin = EnsureOneOf< +type SlashCancelOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -614,10 +615,10 @@ impl pallet_staking::Config for Runtime { type NextNewSession = Session; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; - type VoterList = BagsList; + type VoterList = VoterList; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; - type OnStakerSlash = (); + type OnStakerSlash = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -661,14 +662,14 @@ impl pallet_democracy::Config for Runtime { type InstantAllowed = InstantAllowed; type FastTrackVotingPeriod = FastTrackVotingPeriod; // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EnsureOneOf< + type CancellationOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; type BlacklistOrigin = EnsureRoot; // To cancel a proposal before it has been passed, the technical committee must be unanimous or // Root must agree. - type CancelProposalOrigin = EnsureOneOf< + type CancelProposalOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -788,7 +789,7 @@ parameter_types! { pub const MaxPeerDataEncodingSize: u32 = 1_000; } -type ApproveOrigin = EnsureOneOf< +type ApproveOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -809,6 +810,7 @@ impl pallet_treasury::Config for Runtime { type MaxApprovals = MaxApprovals; type WeightInfo = weights::pallet_treasury::WeightInfo; type SpendFunds = Bounties; + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; } parameter_types! { @@ -1194,7 +1196,7 @@ impl InstanceFilter for ProxyType { Call::Crowdloan(..) | Call::Slots(..) | Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::BagsList(..) + Call::VoterList(..) ), ProxyType::Governance => matches!( c, @@ -1376,7 +1378,7 @@ parameter_types! { pub const SampleLength: BlockNumber = 2 * MINUTES; } -type AuctionInitiate = EnsureOneOf< +type AuctionInitiate = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -1455,32 +1457,6 @@ impl pallet_nomination_pools::Config for Runtime { type MinPointsToBalance = MinPointsToBalance; } -pub struct InitiatePoolConfigs; -impl OnRuntimeUpgrade for InitiatePoolConfigs { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - // 1/600 KSM to join a pool. - pallet_nomination_pools::MinJoinBond::::put(50 * CENTS); - // 1 KSM to create a pool. - pallet_nomination_pools::MinCreateBond::::put(UNITS); - - // 128 initial pools: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPools::::put(128); - // 64k total pool members: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPoolMembers::::put(64 * 1024); - // 1024 members per pool: only for initial safety: can be set to infinity when needed. - pallet_nomination_pools::MaxPoolMembersPerPool::::put(1024); - - log::info!(target: "runtime::kusama", "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: "runtime::kusama", "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } -} - construct_runtime! { pub enum Runtime where Block = Block, @@ -1496,7 +1472,7 @@ construct_runtime! { Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 3, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 4, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 33, // Consensus support. // Authorship must be before session in order to note author in the correct session and era @@ -1563,7 +1539,7 @@ construct_runtime! { Gilt: pallet_gilt::{Pallet, Call, Storage, Event, Config} = 38, // Provides a semi-sorted list of nominators for staking. - BagsList: pallet_bags_list::{Pallet, Call, Storage, Event} = 39, + VoterList: pallet_bags_list::{Pallet, Call, Storage, Event} = 39, // nomination pools: extension to staking. NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 41, @@ -1624,7 +1600,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - InitiatePoolConfigs, + (), >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; @@ -1653,7 +1629,7 @@ mod benches { [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] - [pallet_bags_list, BagsList] + [pallet_bags_list, VoterList] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index 730335891c82..6c53cf8beb3b 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -17,7 +17,7 @@ //! Tests for the Kusama Runtime Configuration use crate::*; -use frame_support::weights::{GetDispatchInfo, WeightToFeePolynomial}; +use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT}; use keyring::Sr25519Keyring::Charlie; use pallet_transaction_payment::Multiplier; use parity_scale_codec::Encode; @@ -68,7 +68,7 @@ fn payout_weight_portion() { #[ignore] fn block_cost() { let max_block_weight = BlockWeights::get().max_block; - let raw_fee = WeightToFee::calc(&max_block_weight); + let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); println!( "Full Block weight == {} // WeightToFee(full_block) == {} plank", diff --git a/runtime/kusama/src/weights/frame_benchmarking_baseline.rs b/runtime/kusama/src/weights/frame_benchmarking_baseline.rs index 24e4f0e0f6ba..31df9f3a262a 100644 --- a/runtime/kusama/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/kusama/src/weights/frame_benchmarking_baseline.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/frame_benchmarking_baseline.rs @@ -44,38 +44,48 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_benchmarking::baseline`. pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { + /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - (162_000 as Weight) + (126_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - (157_000 as Weight) + (117_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - (157_000 as Weight) + (132_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - (154_000 as Weight) + (132_000 as Weight) } - fn hashing(_i: u32, ) -> Weight { - (19_250_882_000 as Weight) + /// The range of component `i` is `[0, 100]`. + fn hashing(i: u32, ) -> Weight { + (19_331_786_000 as Weight) + // Standard Error: 113_000 + .saturating_add((410_000 as Weight).saturating_mul(i as Weight)) } + /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 15_000 - .saturating_add((47_377_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((47_597_000 as Weight).saturating_mul(i as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 3_000 - .saturating_add((2_093_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((2_126_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((314_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((328_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } } diff --git a/runtime/kusama/src/weights/frame_election_provider_support.rs b/runtime/kusama/src/weights/frame_election_provider_support.rs index 6006d59d3cef..4d00765bf521 100644 --- a/runtime/kusama/src/weights/frame_election_provider_support.rs +++ b/runtime/kusama/src/weights/frame_election_provider_support.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/frame_election_provider_support.rs @@ -44,18 +44,24 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. pub struct WeightInfo(PhantomData); impl frame_election_provider_support::WeightInfo for WeightInfo { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 49_000 - .saturating_add((19_465_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 6_825_000 - .saturating_add((3_110_631_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 51_000 + .saturating_add((19_498_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 7_123_000 + .saturating_add((3_134_999_000 as Weight).saturating_mul(d as Weight)) } + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 46_000 - .saturating_add((16_871_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 6_400_000 - .saturating_add((2_804_456_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 51_000 + .saturating_add((17_090_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 7_104_000 + .saturating_add((2_847_863_000 as Weight).saturating_mul(d as Weight)) } } diff --git a/runtime/kusama/src/weights/frame_system.rs b/runtime/kusama/src/weights/frame_system.rs index 6356c3c3d62f..0fcec7e3cb7c 100644 --- a/runtime/kusama/src/weights/frame_system.rs +++ b/runtime/kusama/src/weights/frame_system.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/frame_system.rs @@ -44,11 +44,13 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -57,29 +59,32 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_373_000 as Weight) + (5_413_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((335_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((536_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((239_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((442_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((590_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 1_000 + .saturating_add((953_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/runtime/kusama/src/weights/pallet_bags_list.rs b/runtime/kusama/src/weights/pallet_bags_list.rs index b0f0fe6ae407..749377694981 100644 --- a/runtime/kusama/src/weights/pallet_bags_list.rs +++ b/runtime/kusama/src/weights/pallet_bags_list.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_bags_list.rs @@ -46,29 +46,29 @@ pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList ListNodes (r:4 w:4) + // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - (40_779_000 as Weight) + (50_326_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - (39_778_000 as Weight) + (49_559_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } - // Storage: BagsList ListNodes (r:4 w:4) + // Storage: VoterList ListNodes (r:4 w:4) // Storage: Staking Bonded (r:2 w:0) // Storage: Staking Ledger (r:2 w:0) - // Storage: BagsList CounterForListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - (44_889_000 as Weight) + (52_292_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_balances.rs b/runtime/kusama/src/weights/pallet_balances.rs index 6b5b27504e30..2fa00614be5e 100644 --- a/runtime/kusama/src/weights/pallet_balances.rs +++ b/runtime/kusama/src/weights/pallet_balances.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_balances.rs @@ -46,43 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (33_878_000 as Weight) + (38_902_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (25_664_000 as Weight) + (30_721_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (15_759_000 as Weight) + (19_752_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (18_860_000 as Weight) + (23_083_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (34_201_000 as Weight) + (39_556_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (31_021_000 as Weight) + (35_962_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (14_386_000 as Weight) + (18_319_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_bounties.rs b/runtime/kusama/src/weights/pallet_bounties.rs index 91db22df5a67..f7683caccbf2 100644 --- a/runtime/kusama/src/weights/pallet_bounties.rs +++ b/runtime/kusama/src/weights/pallet_bounties.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_bounties.rs @@ -48,8 +48,9 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) // Storage: Bounties Bounties (r:0 w:1) + /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { - (23_871_000 as Weight) + (26_583_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -58,34 +59,34 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: Bounties Bounties (r:1 w:1) // Storage: Bounties BountyApprovals (r:1 w:1) fn approve_bounty() -> Weight { - (6_968_000 as Weight) + (9_983_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) fn propose_curator() -> Weight { - (4_724_000 as Weight) + (8_096_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn unassign_curator() -> Weight { - (31_342_000 as Weight) + (36_380_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn accept_curator() -> Weight { - (18_849_000 as Weight) + (23_549_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: ChildBounties ParentChildBounties (r:1 w:0) fn award_bounty() -> Weight { - (16_324_000 as Weight) + (19_909_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -94,7 +95,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - (58_803_000 as Weight) + (66_795_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -103,7 +104,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - (35_730_000 as Weight) + (42_024_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -112,23 +113,24 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - (42_922_000 as Weight) + (49_333_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) fn extend_bounty_expiry() -> Weight { - (13_378_000 as Weight) + (17_625_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Bounties BountyApprovals (r:1 w:1) // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:2 w:2) + /// The range of component `b` is `[1, 100]`. fn spend_funds(b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 16_000 - .saturating_add((30_225_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 18_000 + .saturating_add((30_657_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_child_bounties.rs b/runtime/kusama/src/weights/pallet_child_bounties.rs index 99e42f0a9eb3..e6a4c73a1d16 100644 --- a/runtime/kusama/src/weights/pallet_child_bounties.rs +++ b/runtime/kusama/src/weights/pallet_child_bounties.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_child_bounties.rs @@ -50,8 +50,9 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (44_398_000 as Weight) + (49_341_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) @@ -61,7 +62,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (11_084_000 as Weight) + (14_642_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -69,7 +70,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (22_833_000 as Weight) + (27_599_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -77,14 +78,14 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (35_316_000 as Weight) + (39_749_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:0) // Storage: ChildBounties ChildBounties (r:1 w:1) fn award_child_bounty() -> Weight { - (17_734_000 as Weight) + (21_206_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -93,7 +94,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (61_853_000 as Weight) + (65_228_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -104,7 +105,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (42_697_000 as Weight) + (47_776_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -115,7 +116,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (51_585_000 as Weight) + (56_376_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_democracy.rs b/runtime/kusama/src/weights/pallet_democracy.rs index a2d10b27d19a..8e9158da11c6 100644 --- a/runtime/kusama/src/weights/pallet_democracy.rs +++ b/runtime/kusama/src/weights/pallet_democracy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_democracy.rs @@ -49,42 +49,45 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (33_014_000 as Weight) + (37_599_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy DepositOf (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn second(s: u32, ) -> Weight { - (23_956_000 as Weight) - // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + (28_626_000 as Weight) + // Standard Error: 1_000 + .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn vote_new(r: u32, ) -> Weight { - (31_400_000 as Weight) + (36_143_000 as Weight) // Standard Error: 0 - .saturating_add((138_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((129_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn vote_existing(r: u32, ) -> Weight { - (31_439_000 as Weight) - // Standard Error: 1_000 - .saturating_add((135_000 as Weight).saturating_mul(r as Weight)) + (35_740_000 as Weight) + // Standard Error: 0 + .saturating_add((134_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - (14_815_000 as Weight) + (17_934_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -94,80 +97,86 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:0 w:1) // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `p` is `[1, 100]`. fn blacklist(p: u32, ) -> Weight { - (48_030_000 as Weight) + (54_019_000 as Weight) // Standard Error: 3_000 - .saturating_add((202_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((208_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) + /// The range of component `v` is `[1, 100]`. fn external_propose(v: u32, ) -> Weight { - (7_547_000 as Weight) - // Standard Error: 0 - .saturating_add((33_000 as Weight).saturating_mul(v as Weight)) + (10_637_000 as Weight) + // Standard Error: 1_000 + .saturating_add((26_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - (1_656_000 as Weight) + (4_256_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (1_383_000 as Weight) + (3_910_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - (14_624_000 as Weight) + (18_324_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) + /// The range of component `v` is `[0, 100]`. fn veto_external(v: u32, ) -> Weight { - (15_246_000 as Weight) + (19_330_000 as Weight) // Standard Error: 0 - .saturating_add((65_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((60_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy PublicProps (r:1 w:1) // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `p` is `[1, 100]`. fn cancel_proposal(p: u32, ) -> Weight { - (35_279_000 as Weight) + (43_275_000 as Weight) // Standard Error: 1_000 - .saturating_add((195_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((194_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (9_279_000 as Weight) + (12_879_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn cancel_queued(r: u32, ) -> Weight { - (20_572_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_298_000 as Weight).saturating_mul(r as Weight)) + (23_811_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_935_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy LowestUnbaked (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// The range of component `r` is `[1, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - (1_835_000 as Weight) - // Standard Error: 2_000 - .saturating_add((2_925_000 as Weight).saturating_mul(r as Weight)) + (1_518_000 as Weight) + // Standard Error: 3_000 + .saturating_add((3_035_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -178,10 +187,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy NextExternal (r:1 w:0) // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// The range of component `r` is `[1, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (6_633_000 as Weight) - // Standard Error: 3_000 - .saturating_add((2_929_000 as Weight).saturating_mul(r as Weight)) + (6_466_000 as Weight) + // Standard Error: 2_000 + .saturating_add((3_030_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -189,10 +199,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:3 w:3) // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn delegate(r: u32, ) -> Weight { - (30_560_000 as Weight) - // Standard Error: 2_000 - .saturating_add((3_654_000 as Weight).saturating_mul(r as Weight)) + (37_036_000 as Weight) + // Standard Error: 3_000 + .saturating_add((3_961_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) @@ -200,10 +211,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn undelegate(r: u32, ) -> Weight { - (14_988_000 as Weight) + (20_072_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_600_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((3_920_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -211,69 +223,76 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (1_212_000 as Weight) + (4_230_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) + /// The range of component `b` is `[0, 16384]`. fn note_preimage(b: u32, ) -> Weight { - (21_356_000 as Weight) + (25_123_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) + /// The range of component `b` is `[0, 16384]`. fn note_imminent_preimage(b: u32, ) -> Weight { - (14_006_000 as Weight) + (18_007_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) + /// The range of component `b` is `[0, 16384]`. fn reap_preimage(b: u32, ) -> Weight { - (21_293_000 as Weight) + (25_534_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn unlock_remove(r: u32, ) -> Weight { - (19_105_000 as Weight) + (23_337_000 as Weight) // Standard Error: 0 - .saturating_add((30_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((35_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn unlock_set(r: u32, ) -> Weight { - (18_244_000 as Weight) + (22_595_000 as Weight) // Standard Error: 0 - .saturating_add((126_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn remove_vote(r: u32, ) -> Weight { - (10_046_000 as Weight) + (14_176_000 as Weight) // Standard Error: 0 - .saturating_add((119_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((113_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn remove_other_vote(r: u32, ) -> Weight { - (10_094_000 as Weight) + (14_328_000 as Weight) // Standard Error: 0 - .saturating_add((120_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((115_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs index 9f3f3f397be1..5a71bbd2c26f 100644 --- a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -53,45 +53,47 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - (12_870_000 as Weight) + (13_436_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - (12_495_000 as Weight) + (12_175_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - (12_470_000 as Weight) + (12_424_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - (25_315_000 as Weight) + (26_010_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - (18_773_000 as Weight) + (19_446_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - (31_691_000 as Weight) + (21_636_000 as Weight) // Standard Error: 2_000 - .saturating_add((517_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((544_000 as Weight).saturating_mul(v as Weight)) // Standard Error: 5_000 - .saturating_add((56_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((80_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -104,12 +106,14 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, d: u32, ) -> Weight { - (48_969_000 as Weight) - // Standard Error: 10_000 - .saturating_add((1_329_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 16_000 - .saturating_add((285_000 as Weight).saturating_mul(d as Weight)) + (0 as Weight) + // Standard Error: 14_000 + .saturating_add((1_999_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 21_000 + .saturating_add((332_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -120,7 +124,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - (45_398_000 as Weight) + (48_092_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -131,16 +135,18 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) - fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. + fn submit_unsigned(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 7_000 - .saturating_add((1_381_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 14_000 - .saturating_add((106_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 24_000 - .saturating_add((11_813_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 36_000 - .saturating_add((1_792_000 as Weight).saturating_mul(d as Weight)) + .saturating_add((1_415_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 25_000 + .saturating_add((11_454_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 38_000 + .saturating_add((1_780_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -148,16 +154,18 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) - fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. + fn feasibility_check(v: u32, _t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 6_000 - .saturating_add((1_348_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 12_000 - .saturating_add((27_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 20_000 - .saturating_add((9_706_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 9_000 + .saturating_add((1_433_000 as Weight).saturating_mul(v as Weight)) // Standard Error: 31_000 - .saturating_add((1_214_000 as Weight).saturating_mul(d as Weight)) + .saturating_add((9_150_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 46_000 + .saturating_add((1_185_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_elections_phragmen.rs b/runtime/kusama/src/weights/pallet_elections_phragmen.rs index e67f3f6d3c6c..776271f1c177 100644 --- a/runtime/kusama/src/weights/pallet_elections_phragmen.rs +++ b/runtime/kusama/src/weights/pallet_elections_phragmen.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_elections_phragmen.rs @@ -49,10 +49,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - (21_240_000 as Weight) - // Standard Error: 9_000 - .saturating_add((190_000 as Weight).saturating_mul(v as Weight)) + (25_291_000 as Weight) + // Standard Error: 5_000 + .saturating_add((164_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -61,10 +62,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - (33_409_000 as Weight) + (37_627_000 as Weight) // Standard Error: 12_000 - .saturating_add((152_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((200_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -73,35 +75,38 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - (32_961_000 as Weight) - // Standard Error: 9_000 - .saturating_add((180_000 as Weight).saturating_mul(v as Weight)) + (38_153_000 as Weight) + // Standard Error: 6_000 + .saturating_add((159_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn remove_voter() -> Weight { - (29_515_000 as Weight) + (34_316_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Candidates (r:1 w:1) // Storage: PhragmenElection Members (r:1 w:0) // Storage: PhragmenElection RunnersUp (r:1 w:0) + /// The range of component `c` is `[1, 200]`. fn submit_candidacy(c: u32, ) -> Weight { - (30_999_000 as Weight) + (35_283_000 as Weight) // Standard Error: 0 - .saturating_add((135_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((125_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: PhragmenElection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 200]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - (25_741_000 as Weight) + (30_277_000 as Weight) // Standard Error: 0 - .saturating_add((70_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((67_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -111,13 +116,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn renounce_candidacy_members() -> Weight { - (39_440_000 as Weight) + (44_936_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: PhragmenElection RunnersUp (r:1 w:1) fn renounce_candidacy_runners_up() -> Weight { - (27_483_000 as Weight) + (32_220_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -132,13 +137,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn remove_member_with_replacement() -> Weight { - (54_903_000 as Weight) + (61_276_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: PhragmenElection RunnersUp (r:1 w:0) fn remove_member_wrong_refund() -> Weight { - (5_203_000 as Weight) + (9_264_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: PhragmenElection Voting (r:251 w:250) @@ -147,12 +152,14 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection Candidates (r:1 w:0) // Storage: Balances Locks (r:250 w:250) // Storage: System Account (r:250 w:250) + /// The range of component `v` is `[250, 500]`. + /// The range of component `d` is `[1, 250]`. fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 42_000 - .saturating_add((47_366_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 40_000 - .saturating_add((240_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 47_000 + .saturating_add((49_929_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 46_000 + .saturating_add((138_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) @@ -166,14 +173,17 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) // Storage: System Account (r:2 w:2) + /// The range of component `c` is `[1, 200]`. + /// The range of component `v` is `[1, 500]`. + /// The range of component `e` is `[500, 8000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_735_000 - .saturating_add((135_428_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 1_137_000 - .saturating_add((103_462_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 77_000 - .saturating_add((7_116_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 3_121_000 + .saturating_add((153_885_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 1_298_000 + .saturating_add((117_511_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 88_000 + .saturating_add((8_170_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/kusama/src/weights/pallet_gilt.rs b/runtime/kusama/src/weights/pallet_gilt.rs index 2b06cea77ae4..162fc81f917e 100644 --- a/runtime/kusama/src/weights/pallet_gilt.rs +++ b/runtime/kusama/src/weights/pallet_gilt.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_gilt` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_gilt.rs @@ -46,55 +46,58 @@ pub struct WeightInfo(PhantomData); impl pallet_gilt::WeightInfo for WeightInfo { // Storage: Gilt Queues (r:1 w:1) // Storage: Gilt QueueTotals (r:1 w:1) + /// The range of component `l` is `[0, 999]`. fn place_bid(l: u32, ) -> Weight { - (38_024_000 as Weight) + (40_033_000 as Weight) // Standard Error: 0 - .saturating_add((152_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Gilt Queues (r:1 w:1) // Storage: Gilt QueueTotals (r:1 w:1) fn place_bid_max() -> Weight { - (154_433_000 as Weight) + (149_281_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Gilt Queues (r:1 w:1) // Storage: Gilt QueueTotals (r:1 w:1) + /// The range of component `l` is `[1, 1000]`. fn retract_bid(l: u32, ) -> Weight { - (37_541_000 as Weight) + (40_215_000 as Weight) // Standard Error: 0 - .saturating_add((125_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((116_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Gilt ActiveTotal (r:1 w:1) fn set_target() -> Weight { - (3_062_000 as Weight) + (5_305_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Gilt Active (r:1 w:1) // Storage: Gilt ActiveTotal (r:1 w:1) fn thaw() -> Weight { - (39_496_000 as Weight) + (44_110_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Gilt ActiveTotal (r:1 w:0) fn pursue_target_noop() -> Weight { - (1_598_000 as Weight) + (1_545_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Gilt ActiveTotal (r:1 w:1) // Storage: Gilt QueueTotals (r:1 w:1) // Storage: Gilt Queues (r:1 w:1) // Storage: Gilt Active (r:0 w:1) + /// The range of component `b` is `[1, 1000]`. fn pursue_target_per_item(b: u32, ) -> Weight { - (39_340_000 as Weight) + (37_794_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_415_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((4_377_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight))) @@ -103,10 +106,11 @@ impl pallet_gilt::WeightInfo for WeightInfo { // Storage: Gilt QueueTotals (r:1 w:1) // Storage: Gilt Queues (r:1 w:1) // Storage: Gilt Active (r:0 w:1) + /// The range of component `q` is `[1, 300]`. fn pursue_target_per_queue(q: u32, ) -> Weight { - (16_092_000 as Weight) - // Standard Error: 6_000 - .saturating_add((8_070_000 as Weight).saturating_mul(q as Weight)) + (12_295_000 as Weight) + // Standard Error: 8_000 + .saturating_add((8_188_000 as Weight).saturating_mul(q as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(q as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_identity.rs b/runtime/kusama/src/weights/pallet_identity.rs index c5c9b5df2f3b..ed2d6ac4fb3b 100644 --- a/runtime/kusama/src/weights/pallet_identity.rs +++ b/runtime/kusama/src/weights/pallet_identity.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_identity.rs @@ -45,30 +45,34 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - (12_429_000 as Weight) + (16_336_000 as Weight) // Standard Error: 4_000 - .saturating_add((200_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - (26_281_000 as Weight) - // Standard Error: 8_000 - .saturating_add((157_000 as Weight).saturating_mul(r as Weight)) + (29_008_000 as Weight) + // Standard Error: 11_000 + .saturating_add((214_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((367_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((358_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - (22_123_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_656_000 as Weight).saturating_mul(s as Weight)) + (28_210_000 as Weight) + // Standard Error: 2_000 + .saturating_add((2_961_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -77,10 +81,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - (22_181_000 as Weight) - // Standard Error: 0 - .saturating_add((739_000 as Weight).saturating_mul(p as Weight)) + (27_823_000 as Weight) + // Standard Error: 1_000 + .saturating_add((939_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) @@ -88,71 +93,83 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (27_995_000 as Weight) - // Standard Error: 6_000 - .saturating_add((86_000 as Weight).saturating_mul(r as Weight)) + (34_522_000 as Weight) + // Standard Error: 7_000 + .saturating_add((82_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((723_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((929_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((229_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((218_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - (27_627_000 as Weight) - // Standard Error: 5_000 - .saturating_add((166_000 as Weight).saturating_mul(r as Weight)) + (32_095_000 as Weight) + // Standard Error: 4_000 + .saturating_add((171_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((427_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((404_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - (23_894_000 as Weight) - // Standard Error: 7_000 - .saturating_add((153_000 as Weight).saturating_mul(r as Weight)) + (29_017_000 as Weight) + // Standard Error: 5_000 + .saturating_add((145_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((422_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((390_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - (4_504_000 as Weight) - // Standard Error: 2_000 - .saturating_add((163_000 as Weight).saturating_mul(r as Weight)) + (7_606_000 as Weight) + // Standard Error: 3_000 + .saturating_add((166_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - (4_320_000 as Weight) - // Standard Error: 1_000 - .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) + (7_636_000 as Weight) + // Standard Error: 3_000 + .saturating_add((166_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - (4_498_000 as Weight) - // Standard Error: 2_000 - .saturating_add((165_000 as Weight).saturating_mul(r as Weight)) + (7_489_000 as Weight) + // Standard Error: 3_000 + .saturating_add((179_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 19]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - (18_213_000 as Weight) - // Standard Error: 5_000 - .saturating_add((158_000 as Weight).saturating_mul(r as Weight)) + (22_625_000 as Weight) + // Standard Error: 4_000 + .saturating_add((131_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((427_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((395_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -160,12 +177,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) - fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { - (42_006_000 as Weight) - // Standard Error: 11_000 - .saturating_add((72_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((722_000 as Weight).saturating_mul(s as Weight)) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + (48_421_000 as Weight) + // Standard Error: 7_000 + .saturating_add((40_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 0 + .saturating_add((933_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((4_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) @@ -173,38 +195,42 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - (29_352_000 as Weight) + (34_590_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((109_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - (8_911_000 as Weight) + (12_956_000 as Weight) // Standard Error: 0 - .saturating_add((20_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((23_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - (30_027_000 as Weight) + (35_294_000 as Weight) // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - (19_939_000 as Weight) + (25_217_000 as Weight) // Standard Error: 0 - .saturating_add((96_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_im_online.rs b/runtime/kusama/src/weights/pallet_im_online.rs index 8757a45d7a43..9d17822f0e86 100644 --- a/runtime/kusama/src/weights/pallet_im_online.rs +++ b/runtime/kusama/src/weights/pallet_im_online.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_im_online.rs @@ -49,12 +49,14 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) // Storage: ImOnline AuthoredBlocks (r:1 w:0) // Storage: ImOnline Keys (r:1 w:0) + /// The range of component `k` is `[1, 1000]`. + /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (68_786_000 as Weight) + (74_828_000 as Weight) // Standard Error: 0 .saturating_add((71_000 as Weight).saturating_mul(k as Weight)) - // Standard Error: 3_000 - .saturating_add((345_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 4_000 + .saturating_add((325_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_indices.rs b/runtime/kusama/src/weights/pallet_indices.rs index bbe65750d33d..be623caf2a50 100644 --- a/runtime/kusama/src/weights/pallet_indices.rs +++ b/runtime/kusama/src/weights/pallet_indices.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_indices.rs @@ -46,33 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (19_905_000 as Weight) + (24_545_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (24_646_000 as Weight) + (30_495_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - (20_785_000 as Weight) + (25_356_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (20_719_000 as Weight) + (25_354_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - (23_350_000 as Weight) + (29_139_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_membership.rs b/runtime/kusama/src/weights/pallet_membership.rs index b4a8aa8e1801..655ce060a28e 100644 --- a/runtime/kusama/src/weights/pallet_membership.rs +++ b/runtime/kusama/src/weights/pallet_membership.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_membership.rs @@ -48,10 +48,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Proposals (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - (13_985_000 as Weight) + (14_420_000 as Weight) // Standard Error: 0 - .saturating_add((64_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((77_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -60,10 +61,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - (16_486_000 as Weight) - // Standard Error: 0 - .saturating_add((48_000 as Weight).saturating_mul(m as Weight)) + (17_405_000 as Weight) + // Standard Error: 1_000 + .saturating_add((59_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -72,10 +74,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - (16_548_000 as Weight) + (16_821_000 as Weight) // Standard Error: 0 - .saturating_add((60_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((79_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -84,10 +87,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - (15_964_000 as Weight) + (16_734_000 as Weight) // Standard Error: 0 - .saturating_add((199_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((205_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -96,27 +100,30 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:1) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - (16_833_000 as Weight) - // Standard Error: 0 - .saturating_add((55_000 as Weight).saturating_mul(m as Weight)) + (17_394_000 as Weight) + // Standard Error: 1_000 + .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: TechnicalMembership Members (r:1 w:0) // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - (4_251_000 as Weight) + (4_366_000 as Weight) // Standard Error: 0 - .saturating_add((33_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((29_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn clear_prime(_m: u32, ) -> Weight { - (1_195_000 as Weight) + (1_516_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_multisig.rs b/runtime/kusama/src/weights/pallet_multisig.rs index d6be009addeb..387ea2ec7600 100644 --- a/runtime/kusama/src/weights/pallet_multisig.rs +++ b/runtime/kusama/src/weights/pallet_multisig.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_multisig.rs @@ -44,17 +44,20 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (9_480_000 as Weight) + (14_635_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (26_959_000 as Weight) - // Standard Error: 1_000 - .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) + (31_293_000 as Weight) + // Standard Error: 0 + .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -63,20 +66,24 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (28_597_000 as Weight) + (33_912_000 as Weight) // Standard Error: 0 - .saturating_add((108_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (16_618_000 as Weight) + (20_173_000 as Weight) // Standard Error: 0 - .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -84,22 +91,26 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (27_929_000 as Weight) + (32_431_000 as Weight) // Standard Error: 0 - .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((120_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (34_821_000 as Weight) + (41_683_000 as Weight) // Standard Error: 0 - .saturating_add((149_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((145_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -107,38 +118,42 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (26_959_000 as Weight) + (30_992_000 as Weight) // Standard Error: 0 - .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (15_987_000 as Weight) + (20_381_000 as Weight) // Standard Error: 0 - .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (72_780_000 as Weight) + (74_809_000 as Weight) // Standard Error: 0 - .saturating_add((153_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((151_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (48_788_000 as Weight) + (52_717_000 as Weight) // Standard Error: 0 - .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_nomination_pools.rs b/runtime/kusama/src/weights/pallet_nomination_pools.rs index 996913aa75e2..b80d239ca4f4 100644 --- a/runtime/kusama/src/weights/pallet_nomination_pools.rs +++ b/runtime/kusama/src/weights/pallet_nomination_pools.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_nomination_pools.rs @@ -55,10 +55,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForPoolMembers (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn join() -> Weight { - (110_237_000 as Weight) + (115_531_000 as Weight) .saturating_add(T::DbWeight::get().reads(17 as Weight)) .saturating_add(T::DbWeight::get().writes(11 as Weight)) } @@ -69,10 +69,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_transfer() -> Weight { - (101_656_000 as Weight) + (107_149_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) } @@ -83,10 +83,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_reward() -> Weight { - (113_765_000 as Weight) + (118_271_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) } @@ -95,7 +95,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim_payout() -> Weight { - (46_614_000 as Weight) + (46_511_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -108,13 +108,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Nominators (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) // Storage: NominationPools SubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) fn unbond() -> Weight { - (107_378_000 as Weight) + (112_982_000 as Weight) .saturating_add(T::DbWeight::get().reads(18 as Weight)) .saturating_add(T::DbWeight::get().writes(13 as Weight)) } @@ -122,10 +122,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { - (36_925_000 as Weight) + (37_718_000 as Weight) // Standard Error: 0 - .saturating_add((26_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((27_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -137,10 +138,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - (75_565_000 as Weight) + (75_217_000 as Weight) // Standard Error: 0 - .saturating_add((30_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -163,8 +165,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - (130_832_000 as Weight) + /// The range of component `s` is `[0, 100]`. + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + (131_769_000 as Weight) + // Standard Error: 1_000 + .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(19 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } @@ -191,7 +196,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - (125_438_000 as Weight) + (123_342_000 as Weight) .saturating_add(T::DbWeight::get().reads(22 as Weight)) .saturating_add(T::DbWeight::get().writes(15 as Weight)) } @@ -203,14 +208,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) + /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { - (41_607_000 as Weight) + (46_741_000 as Weight) // Standard Error: 8_000 - .saturating_add((2_085_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((2_221_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(5 as Weight)) @@ -218,15 +224,16 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Ledger (r:1 w:0) fn set_state() -> Weight { - (21_333_000 as Weight) + (24_758_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: NominationPools BondedPools (r:1 w:0) // Storage: NominationPools Metadata (r:1 w:1) // Storage: NominationPools CounterForMetadata (r:1 w:1) + /// The range of component `n` is `[1, 256]`. fn set_metadata(n: u32, ) -> Weight { - (9_448_000 as Weight) + (12_640_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -238,13 +245,26 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinCreateBond (r:0 w:1) // Storage: NominationPools MaxPools (r:0 w:1) fn set_configs() -> Weight { - (2_690_000 as Weight) + (5_644_000 as Weight) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - (17_983_000 as Weight) + (20_363_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Ledger (r:1 w:0) + // Storage: Staking Validators (r:1 w:0) + // Storage: Staking Nominators (r:1 w:1) + // Storage: Staking CounterForNominators (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) + fn chill() -> Weight { + (45_020_000 as Weight) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } } diff --git a/runtime/kusama/src/weights/pallet_preimage.rs b/runtime/kusama/src/weights/pallet_preimage.rs index 9bc44fb4da48..0f1f06e77eb7 100644 --- a/runtime/kusama/src/weights/pallet_preimage.rs +++ b/runtime/kusama/src/weights/pallet_preimage.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_preimage.rs @@ -46,6 +46,7 @@ pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -55,6 +56,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -64,6 +66,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -74,58 +77,58 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (38_165_000 as Weight) + (36_666_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (25_192_000 as Weight) + (24_647_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (36_385_000 as Weight) + (34_340_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (23_791_000 as Weight) + (23_670_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (13_857_000 as Weight) + (15_590_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (4_599_000 as Weight) + (7_433_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (25_208_000 as Weight) + (24_233_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (13_875_000 as Weight) + (17_122_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (4_610_000 as Weight) + (7_318_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_proxy.rs b/runtime/kusama/src/weights/pallet_proxy.rs index 987467d28992..eddcde4f352a 100644 --- a/runtime/kusama/src/weights/pallet_proxy.rs +++ b/runtime/kusama/src/weights/pallet_proxy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_proxy.rs @@ -45,92 +45,108 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) + /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (13_789_000 as Weight) - // Standard Error: 1_000 - .saturating_add((71_000 as Weight).saturating_mul(p as Weight)) + (18_307_000 as Weight) + // Standard Error: 8_000 + .saturating_add((88_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (28_539_000 as Weight) - // Standard Error: 1_000 - .saturating_add((226_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((64_000 as Weight).saturating_mul(p as Weight)) + (34_767_000 as Weight) + // Standard Error: 2_000 + .saturating_add((198_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((54_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (19_545_000 as Weight) + (23_960_000 as Weight) // Standard Error: 1_000 - .saturating_add((218_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) - fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (19_613_000 as Weight) - // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(a as Weight)) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn reject_announcement(a: u32, p: u32, ) -> Weight { + (23_927_000 as Weight) + // Standard Error: 2_000 + .saturating_add((197_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((11_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (26_765_000 as Weight) + (31_118_000 as Weight) // Standard Error: 1_000 - .saturating_add((218_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((66_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (21_772_000 as Weight) + (25_933_000 as Weight) // Standard Error: 2_000 - .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((149_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (21_534_000 as Weight) + (26_083_000 as Weight) // Standard Error: 2_000 - .saturating_add((150_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((142_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (17_573_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(p as Weight)) + (22_268_000 as Weight) + // Standard Error: 3_000 + .saturating_add((88_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (24_480_000 as Weight) - // Standard Error: 1_000 - .saturating_add((37_000 as Weight).saturating_mul(p as Weight)) + (29_038_000 as Weight) + // Standard Error: 2_000 + .saturating_add((39_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (18_660_000 as Weight) - // Standard Error: 1_000 - .saturating_add((86_000 as Weight).saturating_mul(p as Weight)) + (22_988_000 as Weight) + // Standard Error: 2_000 + .saturating_add((98_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_scheduler.rs b/runtime/kusama/src/weights/pallet_scheduler.rs index 2116860e7d82..0233f6cd603e 100644 --- a/runtime/kusama/src/weights/pallet_scheduler.rs +++ b/runtime/kusama/src/weights/pallet_scheduler.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_scheduler.rs @@ -48,10 +48,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (1_014_000 as Weight) - // Standard Error: 33_000 - .saturating_add((25_640_000 as Weight).saturating_mul(s as Weight)) + (2_368_000 as Weight) + // Standard Error: 40_000 + .saturating_add((26_438_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -61,10 +62,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_resolved(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 29_000 - .saturating_add((20_816_000 as Weight).saturating_mul(s as Weight)) + (1_219_000 as Weight) + // Standard Error: 31_000 + .saturating_add((21_529_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -73,10 +75,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (315_000 as Weight) - // Standard Error: 33_000 - .saturating_add((23_338_000 as Weight).saturating_mul(s as Weight)) + (0 as Weight) + // Standard Error: 36_000 + .saturating_add((24_281_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -85,10 +88,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_resolved(s: u32, ) -> Weight { - (94_000 as Weight) - // Standard Error: 31_000 - .saturating_add((19_898_000 as Weight).saturating_mul(s as Weight)) + (4_273_000 as Weight) + // Standard Error: 29_000 + .saturating_add((20_365_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -97,10 +101,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_aborted(s: u32, ) -> Weight { - (2_095_000 as Weight) - // Standard Error: 16_000 - .saturating_add((9_978_000 as Weight).saturating_mul(s as Weight)) + (5_169_000 as Weight) + // Standard Error: 15_000 + .saturating_add((9_048_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -108,30 +113,33 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) + /// The range of component `s` is `[1, 50]`. fn on_initialize_aborted(s: u32, ) -> Weight { - (5_435_000 as Weight) - // Standard Error: 15_000 - .saturating_add((7_878_000 as Weight).saturating_mul(s as Weight)) + (5_315_000 as Weight) + // Standard Error: 13_000 + .saturating_add((6_973_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named(s: u32, ) -> Weight { - (6_842_000 as Weight) - // Standard Error: 21_000 - .saturating_add((16_006_000 as Weight).saturating_mul(s as Weight)) + (12_039_000 as Weight) + // Standard Error: 25_000 + .saturating_add((16_231_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:2 w:2) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic(s: u32, ) -> Weight { - (9_527_000 as Weight) - // Standard Error: 16_000 - .saturating_add((13_652_000 as Weight).saturating_mul(s as Weight)) + (10_723_000 as Weight) + // Standard Error: 19_000 + .saturating_add((13_961_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -139,54 +147,60 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named(s: u32, ) -> Weight { - (9_416_000 as Weight) - // Standard Error: 16_000 - .saturating_add((11_422_000 as Weight).saturating_mul(s as Weight)) + (11_270_000 as Weight) + // Standard Error: 24_000 + .saturating_add((11_633_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize(s: u32, ) -> Weight { - (9_432_000 as Weight) + (12_051_000 as Weight) // Standard Error: 15_000 - .saturating_add((10_651_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((10_607_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule(s: u32, ) -> Weight { - (16_045_000 as Weight) + (19_419_000 as Weight) // Standard Error: 1_000 - .saturating_add((42_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - (15_177_000 as Weight) - // Standard Error: 7_000 - .saturating_add((2_394_000 as Weight).saturating_mul(s as Weight)) + (18_945_000 as Weight) + // Standard Error: 6_000 + .saturating_add((2_018_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule_named(s: u32, ) -> Weight { - (18_430_000 as Weight) + (22_501_000 as Weight) // Standard Error: 1_000 - .saturating_add((59_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((55_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - (15_731_000 as Weight) + (20_359_000 as Weight) // Standard Error: 6_000 - .saturating_add((2_405_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_021_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_session.rs b/runtime/kusama/src/weights/pallet_session.rs index 6cc72cf69f53..5c93fcd76c64 100644 --- a/runtime/kusama/src/weights/pallet_session.rs +++ b/runtime/kusama/src/weights/pallet_session.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_session.rs @@ -48,7 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - (37_358_000 as Weight) + (43_882_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -56,7 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - (22_225_000 as Weight) + (28_522_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_staking.rs b/runtime/kusama/src/weights/pallet_staking.rs index fb3f71b59b52..7da12124f4b6 100644 --- a/runtime/kusama/src/weights/pallet_staking.rs +++ b/runtime/kusama/src/weights/pallet_staking.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_staking.rs @@ -51,17 +51,17 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - (34_738_000 as Weight) + (40_797_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - (59_369_000 as Weight) + (71_883_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -71,11 +71,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - (65_572_000 as Weight) + (76_790_000 as Weight) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -83,10 +83,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - (27_798_000 as Weight) + (31_781_000 as Weight) // Standard Error: 0 - .saturating_add((22_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((31_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -97,14 +98,17 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - (54_019_000 as Weight) + /// The range of component `s` is `[0, 100]`. + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + (62_500_000 as Weight) + // Standard Error: 0 + .saturating_add((4_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(11 as Weight)) } @@ -115,21 +119,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxValidatorsCount (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - (43_836_000 as Weight) + (49_955_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) + /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - (9_075_000 as Weight) - // Standard Error: 7_000 - .saturating_add((8_812_000 as Weight).saturating_mul(k as Weight)) + (11_810_000 as Weight) + // Standard Error: 9_000 + .saturating_add((9_217_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) @@ -141,14 +146,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) + /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { - (45_110_000 as Weight) - // Standard Error: 7_000 - .saturating_add((3_119_000 as Weight).saturating_mul(n as Weight)) + (51_791_000 as Weight) + // Standard Error: 8_000 + .saturating_add((3_341_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(6 as Weight)) @@ -157,53 +163,54 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - (39_502_000 as Weight) + (47_565_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - (6_220_000 as Weight) + (9_921_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - (13_455_000 as Weight) + (17_654_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - (1_132_000 as Weight) + (3_758_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - (1_122_000 as Weight) + (3_742_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - (1_130_000 as Weight) + (3_868_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - (1_065_000 as Weight) + (3_800_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Invulnerables (r:0 w:1) + /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - (1_117_000 as Weight) + (4_097_000 as Weight) // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((10_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Bonded (r:1 w:1) @@ -211,27 +218,29 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Ledger (r:0 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:2) + /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - (50_490_000 as Weight) + (59_824_000 as Weight) // Standard Error: 1_000 - .saturating_add((718_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((910_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Staking UnappliedSlashes (r:1 w:1) + /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - (2_766_550_000 as Weight) + (2_756_340_000 as Weight) // Standard Error: 182_000 - .saturating_add((16_175_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((16_194_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -245,10 +254,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasValidatorPrefs (r:1 w:0) // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (81_985_000 as Weight) - // Standard Error: 14_000 - .saturating_add((24_798_000 as Weight).saturating_mul(n as Weight)) + (77_427_000 as Weight) + // Standard Error: 19_000 + .saturating_add((25_941_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -265,10 +275,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (84_435_000 as Weight) - // Standard Error: 24_000 - .saturating_add((32_893_000 as Weight).saturating_mul(n as Weight)) + (89_777_000 as Weight) + // Standard Error: 25_000 + .saturating_add((34_793_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) @@ -277,13 +288,14 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) + /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - (58_105_000 as Weight) + (70_325_000 as Weight) // Standard Error: 3_000 - .saturating_add((50_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((49_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -296,10 +308,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:2) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `e` is `[1, 100]`. fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) // Standard Error: 55_000 - .saturating_add((18_785_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((21_656_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) @@ -311,24 +324,25 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:1) + /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - (56_451_000 as Weight) - // Standard Error: 0 - .saturating_add((716_000 as Weight).saturating_mul(s as Weight)) + (65_827_000 as Weight) + // Standard Error: 1_000 + .saturating_add((910_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: BagsList ListBags (r:183 w:0) - // Storage: BagsList ListNodes (r:101 w:0) + // Storage: VoterList ListBags (r:183 w:0) + // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking Bonded (r:101 w:0) @@ -344,35 +358,40 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `v` is `[1, 10]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 806_000 - .saturating_add((229_370_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 40_000 - .saturating_add((32_551_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 998_000 + .saturating_add((239_249_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 50_000 + .saturating_add((34_150_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(192 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:21 w:0) - // Storage: BagsList ListBags (r:183 w:0) - // Storage: BagsList ListNodes (r:1500 w:0) + // Storage: VoterList ListBags (r:183 w:0) + // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) // Storage: Staking Validators (r:500 w:0) // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. + /// The range of component `n` is `[500, 1000]`. + /// The range of component `s` is `[1, 20]`. fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 87_000 - .saturating_add((23_307_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 87_000 - .saturating_add((22_640_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 2_983_000 - .saturating_add((46_746_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 109_000 + .saturating_add((25_193_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 109_000 + .saturating_add((23_705_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_717_000 + .saturating_add((63_614_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(186 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) @@ -381,10 +400,11 @@ impl pallet_staking::WeightInfo for WeightInfo { } // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 29_000 - .saturating_add((7_101_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 37_000 + .saturating_add((7_606_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -396,7 +416,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - (3_090_000 as Weight) + (6_433_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:0 w:1) @@ -406,7 +426,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - (3_016_000 as Weight) + (6_343_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) @@ -416,18 +436,18 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Validators (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - (49_836_000 as Weight) + (56_726_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - (7_579_000 as Weight) + (10_887_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_timestamp.rs b/runtime/kusama/src/weights/pallet_timestamp.rs index 7e1d36840690..bb4410011bd7 100644 --- a/runtime/kusama/src/weights/pallet_timestamp.rs +++ b/runtime/kusama/src/weights/pallet_timestamp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_timestamp.rs @@ -47,11 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - (4_846_000 as Weight) + (8_042_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_025_000 as Weight) + (2_127_000 as Weight) } } diff --git a/runtime/kusama/src/weights/pallet_tips.rs b/runtime/kusama/src/weights/pallet_tips.rs index e37c8830b3b9..d670dd434134 100644 --- a/runtime/kusama/src/weights/pallet_tips.rs +++ b/runtime/kusama/src/weights/pallet_tips.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_tips.rs @@ -46,8 +46,9 @@ pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:1 w:1) // Storage: Tips Tips (r:1 w:1) + /// The range of component `r` is `[0, 16384]`. fn report_awesome(r: u32, ) -> Weight { - (24_012_000 as Weight) + (28_567_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -56,28 +57,31 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) fn retract_tip() -> Weight { - (22_820_000 as Weight) + (26_892_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Members (r:1 w:0) // Storage: Tips Reasons (r:1 w:1) // Storage: Tips Tips (r:0 w:1) + /// The range of component `r` is `[0, 16384]`. + /// The range of component `t` is `[1, 19]`. fn tip_new(r: u32, t: u32, ) -> Weight { - (15_944_000 as Weight) + (19_671_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 3_000 - .saturating_add((65_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((61_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Members (r:1 w:0) // Storage: Tips Tips (r:1 w:1) + /// The range of component `t` is `[1, 19]`. fn tip(t: u32, ) -> Weight { - (8_400_000 as Weight) - // Standard Error: 2_000 - .saturating_add((341_000 as Weight).saturating_mul(t as Weight)) + (11_147_000 as Weight) + // Standard Error: 3_000 + .saturating_add((348_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -85,19 +89,21 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: PhragmenElection Members (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) + /// The range of component `t` is `[1, 19]`. fn close_tip(t: u32, ) -> Weight { - (39_172_000 as Weight) - // Standard Error: 6_000 - .saturating_add((190_000 as Weight).saturating_mul(t as Weight)) + (43_732_000 as Weight) + // Standard Error: 7_000 + .saturating_add((162_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) + /// The range of component `t` is `[1, 19]`. fn slash_tip(t: u32, ) -> Weight { - (13_435_000 as Weight) - // Standard Error: 2_000 - .saturating_add((22_000 as Weight).saturating_mul(t as Weight)) + (17_029_000 as Weight) + // Standard Error: 3_000 + .saturating_add((39_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_treasury.rs b/runtime/kusama/src/weights/pallet_treasury.rs index c5437608bade..85d632dca200 100644 --- a/runtime/kusama/src/weights/pallet_treasury.rs +++ b/runtime/kusama/src/weights/pallet_treasury.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_treasury.rs @@ -44,32 +44,36 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { + fn spend() -> Weight { + (151_000 as Weight) + } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (20_053_000 as Weight) + (24_171_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - (31_437_000 as Weight) + (36_653_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - (6_947_000 as Weight) + (10_345_000 as Weight) // Standard Error: 0 - .saturating_add((28_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((36_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - (3_187_000 as Weight) + (6_101_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -77,10 +81,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Bounties BountyApprovals (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) + /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - (33_520_000 as Weight) - // Standard Error: 26_000 - .saturating_add((29_886_000 as Weight).saturating_mul(p as Weight)) + (28_435_000 as Weight) + // Standard Error: 31_000 + .saturating_add((30_169_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_utility.rs b/runtime/kusama/src/weights/pallet_utility.rs index 272125579a27..3b1ad78d22bc 100644 --- a/runtime/kusama/src/weights/pallet_utility.rs +++ b/runtime/kusama/src/weights/pallet_utility.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_utility.rs @@ -44,25 +44,28 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (6_177_000 as Weight) + (19_229_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_226_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_498_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_745_000 as Weight) + (5_984_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (9_506_000 as Weight) + (17_804_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_570_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_771_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (9_532_000 as Weight) + (12_943_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (10_834_000 as Weight) + (15_606_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_203_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_491_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index deb1fd0c044d..595100bd6df0 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/pallet_vesting.rs @@ -46,95 +46,111 @@ pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - (24_521_000 as Weight) - // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(l as Weight)) + (29_479_000 as Weight) // Standard Error: 1_000 - .saturating_add((179_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((163_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (24_314_000 as Weight) - // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(l as Weight)) + (29_255_000 as Weight) // Standard Error: 1_000 - .saturating_add((145_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((75_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (23_625_000 as Weight) + (29_386_000 as Weight) // Standard Error: 1_000 - .saturating_add((99_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((85_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 2_000 - .saturating_add((198_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((175_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (24_100_000 as Weight) - // Standard Error: 0 - .saturating_add((85_000 as Weight).saturating_mul(l as Weight)) + (29_841_000 as Weight) // Standard Error: 1_000 - .saturating_add((149_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((78_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - (39_750_000 as Weight) + (44_068_000 as Weight) // Standard Error: 2_000 - .saturating_add((90_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((88_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 4_000 - .saturating_add((142_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - (38_890_000 as Weight) - // Standard Error: 1_000 - .saturating_add((89_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 3_000 - .saturating_add((161_000 as Weight).saturating_mul(s as Weight)) + (44_428_000 as Weight) + // Standard Error: 2_000 + .saturating_add((79_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((151_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (24_945_000 as Weight) + (30_152_000 as Weight) // Standard Error: 0 - .saturating_add((93_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 1_000 - .saturating_add((189_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((89_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((177_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (25_402_000 as Weight) - // Standard Error: 0 - .saturating_add((85_000 as Weight).saturating_mul(l as Weight)) + (29_823_000 as Weight) // Standard Error: 1_000 - .saturating_add((178_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((89_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((184_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_auctions.rs b/runtime/kusama/src/weights/runtime_common_auctions.rs index 6d892fd7b12b..f9bc9ac11e61 100644 --- a/runtime/kusama/src/weights/runtime_common_auctions.rs +++ b/runtime/kusama/src/weights/runtime_common_auctions.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_common_auctions.rs @@ -47,7 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - (12_085_000 as Weight) + (15_200_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -59,7 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - (72_925_000 as Weight) + (72_370_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - (14_247_323_000 as Weight) + (15_429_283_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } @@ -85,7 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - (3_015_140_000 as Weight) + (4_648_763_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_claims.rs b/runtime/kusama/src/weights/runtime_common_claims.rs index a7e2dd302e12..abd1cf949273 100644 --- a/runtime/kusama/src/weights/runtime_common_claims.rs +++ b/runtime/kusama/src/weights/runtime_common_claims.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_common_claims.rs @@ -52,7 +52,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - (136_684_000 as Weight) + (145_391_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - (6_261_000 as Weight) + (10_946_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -73,7 +73,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - (140_914_000 as Weight) + (152_582_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -86,7 +86,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - (57_479_000 as Weight) + (71_396_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -95,7 +95,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - (15_201_000 as Weight) + (20_481_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_crowdloan.rs b/runtime/kusama/src/weights/runtime_common_crowdloan.rs index 68de43dd4d19..41765d2b22b7 100644 --- a/runtime/kusama/src/weights/runtime_common_crowdloan.rs +++ b/runtime/kusama/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_common_crowdloan.rs @@ -49,7 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - (45_635_000 as Weight) + (41_481_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (118_541_000 as Weight) + (113_348_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -69,15 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - (53_845_000 as Weight) + (50_618_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `k` is `[0, 1000]`. fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((18_707_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 16_000 + .saturating_add((19_530_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -86,27 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - (34_550_000 as Weight) + (33_281_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - (23_601_000 as Weight) + (23_023_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - (29_557_000 as Weight) + (28_250_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - (23_416_000 as Weight) + (23_628_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -120,10 +121,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Auctions Winning (r:1 w:1) // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 20_000 - .saturating_add((52_189_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 21_000 + .saturating_add((50_482_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs index f50ce91731c2..81b822b3655d 100644 --- a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs @@ -48,7 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - (24_098_000 as Weight) + (28_732_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -62,7 +62,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - (9_066_526_000 as Weight) + (8_755_004_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - (9_057_782_000 as Weight) + (8_767_988_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -87,7 +87,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - (47_015_000 as Weight) + (43_474_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -99,7 +99,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - (37_183_000 as Weight) + (38_200_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_slots.rs b/runtime/kusama/src/weights/runtime_common_slots.rs index 659decfb60ad..959a7c94ef71 100644 --- a/runtime/kusama/src/weights/runtime_common_slots.rs +++ b/runtime/kusama/src/weights/runtime_common_slots.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_common_slots.rs @@ -47,7 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (24_704_000 as Weight) + (28_483_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -57,12 +57,14 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((7_310_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 15_000 - .saturating_add((18_026_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 17_000 + .saturating_add((7_531_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 17_000 + .saturating_add((18_520_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -73,7 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (94_406_000 as Weight) + (96_600_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -83,7 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (22_477_000 as Weight) + (22_395_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_configuration.rs b/runtime/kusama/src/weights/runtime_parachains_configuration.rs index 0fc753381678..91ef6011f176 100644 --- a/runtime/kusama/src/weights/runtime_parachains_configuration.rs +++ b/runtime/kusama/src/weights/runtime_parachains_configuration.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs @@ -48,7 +48,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - (7_044_000 as Weight) + (9_396_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -56,7 +56,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - (6_906_000 as Weight) + (9_339_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -64,7 +64,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - (7_054_000 as Weight) + (9_705_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -72,7 +72,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - (6_967_000 as Weight) + (9_655_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -84,7 +84,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - (7_085_000 as Weight) + (9_412_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_disputes.rs b/runtime/kusama/src/weights/runtime_parachains_disputes.rs index ec4a76307a8f..2b23df428ede 100644 --- a/runtime/kusama/src/weights/runtime_parachains_disputes.rs +++ b/runtime/kusama/src/weights/runtime_parachains_disputes.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_disputes.rs @@ -46,7 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - (645_000 as Weight) + (3_302_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } } diff --git a/runtime/kusama/src/weights/runtime_parachains_hrmp.rs b/runtime/kusama/src/weights/runtime_parachains_hrmp.rs index 3da28c67b498..3353e2605b17 100644 --- a/runtime/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/kusama/src/weights/runtime_parachains_hrmp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs @@ -53,7 +53,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - (31_947_000 as Weight) + (39_585_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } @@ -64,7 +64,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - (29_263_000 as Weight) + (33_723_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -74,7 +74,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - (27_052_000 as Weight) + (32_409_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -84,12 +84,14 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:0 w:1) // Storage: Hrmp HrmpChannelContents (r:0 w:127) // Storage: Hrmp HrmpOpenChannelRequestCount (r:0 w:1) + /// The range of component `i` is `[0, 127]`. + /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((8_718_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 15_000 - .saturating_add((8_747_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 17_000 + .saturating_add((10_199_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 17_000 + .saturating_add((10_222_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(e as Weight))) @@ -105,10 +107,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpChannels (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 31_000 - .saturating_add((20_968_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 30_000 + .saturating_add((23_828_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((7 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -120,10 +123,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:2 w:2) // Storage: Hrmp HrmpCloseChannelRequests (r:0 w:2) // Storage: Hrmp HrmpChannelContents (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 14_000 - .saturating_add((11_525_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 17_000 + .saturating_add((13_545_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -132,19 +136,21 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) + /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - (21_928_000 as Weight) + (27_561_000 as Weight) // Standard Error: 0 - .saturating_add((56_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((52_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) + /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 5_000 - .saturating_add((3_542_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 6_000 + .saturating_add((3_889_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/kusama/src/weights/runtime_parachains_initializer.rs b/runtime/kusama/src/weights/runtime_parachains_initializer.rs index 10fa405fedc8..43fd6f7702af 100644 --- a/runtime/kusama/src/weights/runtime_parachains_initializer.rs +++ b/runtime/kusama/src/weights/runtime_parachains_initializer.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_initializer.rs @@ -45,8 +45,9 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_parachains::initializer::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) + /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - (2_796_000 as Weight) + (6_235_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/kusama/src/weights/runtime_parachains_paras.rs b/runtime/kusama/src/weights/runtime_parachains_paras.rs index 176ca13675cf..c49a77b87409 100644 --- a/runtime/kusama/src/weights/runtime_parachains_paras.rs +++ b/runtime/kusama/src/weights/runtime_parachains_paras.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs @@ -50,6 +50,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PastCodePruning (r:1 w:1) // Storage: Paras PastCodeHash (r:0 w:1) // Storage: Paras CodeByHash (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -58,8 +59,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - (10_169_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -81,6 +83,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -91,8 +94,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras FutureCodeUpgrades (r:1 w:0) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - (13_144_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -101,12 +105,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - (19_044_000 as Weight) + (22_662_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Paras PvfActiveVoteMap (r:1 w:0) // Storage: Paras CodeByHash (r:1 w:1) + /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -117,7 +122,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - (2_669_000 as Weight) + (5_150_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -125,7 +130,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - (105_747_000 as Weight) + (107_179_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -137,7 +142,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - (728_683_000 as Weight) + (720_869_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(104 as Weight)) } @@ -150,7 +155,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - (624_263_000 as Weight) + (611_027_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(204 as Weight)) } @@ -160,7 +165,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - (586_343_000 as Weight) + (561_955_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -174,7 +179,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - (681_138_000 as Weight) + (671_985_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(304 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs b/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs index 0cca3ae91908..9cdaf3f56eef 100644 --- a/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs @@ -58,8 +58,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParasShared ActiveValidatorKeys (r:1 w:0) // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -75,11 +74,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - (431_199_000 as Weight) - // Standard Error: 15_000 - .saturating_add((48_355_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(29 as Weight)) + (427_576_000 as Weight) + // Standard Error: 16_000 + .saturating_add((48_504_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(28 as Weight)) .saturating_add(T::DbWeight::get().writes(18 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -92,8 +92,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -113,8 +112,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - (413_674_000 as Weight) - .saturating_add(T::DbWeight::get().reads(26 as Weight)) + (403_312_000 as Weight) + .saturating_add(T::DbWeight::get().reads(25 as Weight)) .saturating_add(T::DbWeight::get().writes(17 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -127,8 +126,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -148,11 +146,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - (1_110_857_000 as Weight) - // Standard Error: 32_000 - .saturating_add((47_895_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(29 as Weight)) + (1_058_294_000 as Weight) + // Standard Error: 35_000 + .saturating_add((48_135_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(28 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -165,8 +164,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -189,8 +187,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - (47_273_272_000 as Weight) - .saturating_add(T::DbWeight::get().reads(31 as Weight)) + (44_871_604_000 as Weight) + .saturating_add(T::DbWeight::get().reads(30 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } } diff --git a/runtime/kusama/src/weights/runtime_parachains_ump.rs b/runtime/kusama/src/weights/runtime_parachains_ump.rs index 28582c041076..dcf68e9865a0 100644 --- a/runtime/kusama/src/weights/runtime_parachains_ump.rs +++ b/runtime/kusama/src/weights/runtime_parachains_ump.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs @@ -44,8 +44,9 @@ use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { + /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - (5_194_000 as Weight) + (5_007_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) } @@ -54,13 +55,13 @@ impl runtime_parachains::ump::WeightInfo for WeightInfo // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - (6_505_000 as Weight) + (6_726_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - (25_646_000 as Weight) + (22_502_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 5363541e31c1..5bf45cfc89c4 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -152,26 +152,29 @@ parameter_types! { pub const CouncilBodyId: BodyId = BodyId::Executive; } +/// Type to convert the council origin to a Plurality `MultiLocation` value. +pub type CouncilToPlurality = BackingToPlurality< + Origin, + pallet_collective::Origin, + CouncilBodyId, +>; + /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior location /// of this chain. pub type LocalOriginToLocation = ( // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality of the // `Unit` body. - BackingToPlurality< - Origin, - pallet_collective::Origin, - CouncilBodyId, - >, + CouncilToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type Event = Event; - // We don't allow any messages to be sent via the transaction yet. This is basically safe to - // enable, (safe the possibility of someone spamming the parachain if they're willing to pay - // the DOT to send from the Relay-chain). But it's useless until we bring in XCM v3 which will - // make `DescendOrigin` a bit more useful. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + // We only allow the council to send messages. This is basically safe to enable for everyone + // (safe the possibility of someone spamming the parachain if they're willing to pay the KSM to + // send from the Relay-chain), but it's useless until we bring in XCM v3 which will make + // `DescendOrigin` a bit more useful. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; diff --git a/runtime/metrics/Cargo.toml b/runtime/metrics/Cargo.toml index 8c403eefc7db..6660326a71e2 100644 --- a/runtime/metrics/Cargo.toml +++ b/runtime/metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-metrics" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 71eea7d8d7f1..63ef2254016a 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "polkadot-runtime-parachains" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } +parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137", features = [ "derive" ], optional = true } derive_more = "0.99.17" bitflags = "1.3.2" diff --git a/runtime/parachains/src/builder.rs b/runtime/parachains/src/builder.rs index 828785bd540a..42f54ecb3417 100644 --- a/runtime/parachains/src/builder.rs +++ b/runtime/parachains/src/builder.rs @@ -638,7 +638,9 @@ impl BenchBuilder { pub(crate) fn build(self) -> Bench { // Make sure relevant storage is cleared. This is just to get the asserts to work when // running tests because it seems the storage is not cleared in between. + #[allow(deprecated)] inclusion::PendingAvailabilityCommitments::::remove_all(None); + #[allow(deprecated)] inclusion::PendingAvailability::::remove_all(None); // We don't allow a core to have both disputes and be marked fully available at this block. diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index 29fa811cc44c..aec60a4eb0f7 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -516,14 +516,19 @@ pub mod pallet { bitflags::bitflags! { #[derive(Default)] struct DisputeStateFlags: u8 { + /// The byzantine threshold of `f + 1` votes (and hence participating validators) was reached. const CONFIRMED = 0b0001; + /// Is the supermajority for validity of the dispute reached. const FOR_SUPERMAJORITY = 0b0010; + /// Is the supermajority against the validity of the block reached. const AGAINST_SUPERMAJORITY = 0b0100; } } impl DisputeStateFlags { fn from_state(state: &DisputeState) -> Self { + // Only correct since `DisputeState` is _always_ initialized + // with the validator set based on the session. let n = state.validators_for.len(); let byzantine_threshold = byzantine_threshold(n); @@ -549,18 +554,20 @@ impl DisputeStateFlags { #[derive(PartialEq, RuntimeDebug)] enum SpamSlotChange { + /// Add a `+1` to the spam slot for a particular validator index in this session. Inc, + /// Subtract `-1` ... Dec, } struct ImportSummary { - // The new state, with all votes imported. + /// The new state, with all votes imported. state: DisputeState, - // Changes to spam slots. Validator index paired with directional change. + /// Changes to spam slots. Validator index paired with directional change. spam_slot_changes: Vec<(ValidatorIndex, SpamSlotChange)>, - // Validators to slash for being (wrongly) on the AGAINST side. + /// Validators to slash for being (wrongly) on the AGAINST side. slash_against: Vec, - // Validators to slash for being (wrongly) on the FOR side. + /// Validators to slash for being (wrongly) on the FOR side. slash_for: Vec, // New participants in the dispute. new_participants: bitvec::vec::BitVec, @@ -570,7 +577,9 @@ struct ImportSummary { #[derive(RuntimeDebug, PartialEq, Eq)] enum VoteImportError { + /// Validator index was outside the range of valid validator indices in the given session. ValidatorIndexOutOfBounds, + /// Found a duplicate statement in the dispute statement set. DuplicateStatement, } @@ -583,10 +592,15 @@ impl From for Error { } } +/// A transport statement bit change for a single validator. #[derive(RuntimeDebug, PartialEq, Eq)] struct ImportUndo { + /// The validator index to which to associate the statement import. validator_index: ValidatorIndex, + /// The direction of the vote, for block validity (`true`) or invalidity (`false`). valid: bool, + /// Has the validator participated before, i.e. in backing or + /// with an opposing vote. new_participant: bool, } @@ -632,9 +646,9 @@ impl DisputeStateImporter { bits.set(validator.0 as usize, true); - // New participants tracks those which didn't appear on either - // side of the dispute until now. So we check the other side - // and checked the first side before. + // New participants tracks those validators by index, which didn't appear on either + // side of the dispute until now (so they make a first appearance). + // To verify this we need to assure they also were not part of the opposing side before. if other_bits.get(validator.0 as usize).map_or(false, |b| !*b) { undo.new_participant = true; self.new_participants.set(validator.0 as usize, true); @@ -643,6 +657,7 @@ impl DisputeStateImporter { Ok(undo) } + /// Revert a done transaction. fn undo(&mut self, undo: ImportUndo) { if undo.valid { self.state.validators_for.set(undo.validator_index.0 as usize, false); @@ -655,6 +670,7 @@ impl DisputeStateImporter { } } + /// Collect all dispute votes. fn finish(mut self) -> ImportSummary { let pre_flags = self.pre_flags; let post_flags = DisputeStateFlags::from_state(&self.state); @@ -681,8 +697,12 @@ impl DisputeStateImporter { .map(|i| (ValidatorIndex(i as _), SpamSlotChange::Dec)) .collect() }, - (true, true) | (true, false) => { - // nothing to do. (true, false) is also impossible. + (true, false) => { + log::error!("Dispute statements are never removed. This is a bug"); + Vec::new() + }, + (true, true) => { + // No change, nothing to do. Vec::new() }, }; @@ -852,10 +872,12 @@ impl Pallet { for to_prune in to_prune { // This should be small, as disputes are rare, so `None` is fine. + #[allow(deprecated)] >::remove_prefix(to_prune, None); // This is larger, and will be extracted to the `shared` pallet for more proper pruning. // TODO: https://github.com/paritytech/polkadot/issues/3469 + #[allow(deprecated)] >::remove_prefix(to_prune, None); SpamSlots::::remove(to_prune); } @@ -923,27 +945,32 @@ impl Pallet { let n_validators = session_info.validators.len(); // Check for ancient. - let dispute_state = { + let (first_votes, dispute_state) = { if let Some(dispute_state) = >::get(&set.session, &set.candidate_hash) { if dispute_state.concluded_at.as_ref().map_or(false, |c| c < &oldest_accepted) { return StatementSetFilter::RemoveAll } - dispute_state + (false, dispute_state) } else { - DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], - validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], - start: now, - concluded_at: None, - } + // No state in storage, this indicates it's the first dispute statement set as well. + ( + true, + DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], + validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], + start: now, + concluded_at: None, + }, + ) } }; // Check and import all votes. - let summary = { + let mut summary = { let mut importer = DisputeStateImporter::new(dispute_state, now); for (i, (statement, validator_index, signature)) in set.statements.iter().enumerate() { + // assure the validator index and is present in the session info let validator_public = match session_info.validators.get(validator_index.0 as usize) { None => { @@ -1003,7 +1030,7 @@ impl Pallet { if !is_local { let mut spam_slots: Vec = SpamSlots::::get(&set.session).unwrap_or_else(|| vec![0; n_validators]); - + let mut spam_filter_struck = false; for (validator_index, spam_slot_change) in summary.spam_slot_changes { let spam_slot = spam_slots .get_mut(validator_index.0 as usize) @@ -1011,11 +1038,13 @@ impl Pallet { if let SpamSlotChange::Inc = spam_slot_change { if *spam_slot >= max_spam_slots { + spam_filter_struck = true; + // Find the vote by this validator and filter it out. let first_index_in_set = set .statements .iter() - .position(|(_, v_i, _)| &validator_index == v_i) + .position(|(_statement, v_i, _signature)| &validator_index == v_i) .expect( "spam slots are only incremented when a new statement \ from a validator is included; qed", @@ -1030,6 +1059,10 @@ impl Pallet { // by the duplicate checks above. It's only the first one which // may not already have been filtered out. filter.remove_index(first_index_in_set); + + // Removing individual statments can cause the dispute to become onesided. + // Checking that (again) is done after the loop. Remove the bit indices. + summary.new_participants.set(validator_index.0 as _, false); } // It's also worth noting that the `DisputeStateImporter` @@ -1055,6 +1088,36 @@ impl Pallet { // However, 3 sequential calls, where the first increments, // the second decrements, and the third increments would be allowed. SpamSlots::::insert(&set.session, spam_slots); + + // This is only relevant in cases where it's the first vote and the state + // would hence hold a onesided dispute. If a onesided dispute can never be + // started, by induction, we can never enter a state of a one sided dispute. + if spam_filter_struck && first_votes { + let mut vote_for_count = 0_u64; + let mut vote_against_count = 0_u64; + // Since this is the first set of statements for the dispute, + // it's sufficient to count the votes in the statement set after they + set.statements.iter().for_each(|(statement, v_i, _signature)| { + if Some(true) == + summary.new_participants.get(v_i.0 as usize).map(|b| b.as_ref().clone()) + { + match statement { + // `summary.new_flags` contains the spam free votes. + // Note that this does not distinguish between pro or con votes, + // since allowing both of them, even if the spam threshold would be reached + // is a good thing. + // Overflow of the counters is no concern, disputes are limited by weight. + DisputeStatement::Valid(_) => vote_for_count += 1, + DisputeStatement::Invalid(_) => vote_against_count += 1, + } + } + }); + if vote_for_count.is_zero() || vote_against_count.is_zero() { + // It wasn't one-sided before the spam filters, but now it is, + // so we need to be thorough and not import that dispute. + return StatementSetFilter::RemoveAll + } + } } filter diff --git a/runtime/parachains/src/disputes/tests.rs b/runtime/parachains/src/disputes/tests.rs index 28d22f24fc4a..2897ced22ed0 100644 --- a/runtime/parachains/src/disputes/tests.rs +++ b/runtime/parachains/src/disputes/tests.rs @@ -24,6 +24,7 @@ use crate::{ REWARD_VALIDATORS, }, }; +use assert_matches::assert_matches; use frame_support::{ assert_err, assert_noop, assert_ok, traits::{OnFinalize, OnInitialize}, @@ -288,6 +289,217 @@ fn test_import_slash_against() { assert_eq!(summary.new_flags, DisputeStateFlags::FOR_SUPERMAJORITY); } +fn generate_dispute_statement_set_entry( + session: u32, + candidate_hash: CandidateHash, + statement: DisputeStatement, + validator: &::Pair, +) -> (DisputeStatement, ValidatorSignature) { + let valid = match &statement { + DisputeStatement::Valid(_) => true, + _ => false, + }; + let signature_bytes = validator + .sign(&ExplicitDisputeStatement { valid, candidate_hash, session }.signing_payload()); + let signature = ValidatorSignature::try_from(signature_bytes).unwrap(); + (statement, signature) +} + +fn generate_dispute_statement_set( + session: SessionIndex, + candidate_hash: CandidateHash, + validators: &[::Pair], + vidxs: Vec<(usize, DisputeStatement)>, +) -> DisputeStatementSet { + let statements = vidxs + .into_iter() + .map(|(v_i, statement)| { + let validator_index = ValidatorIndex(v_i as u32); + let (statement, signature) = generate_dispute_statement_set_entry( + session, + candidate_hash.clone(), + statement, + &validators[v_i], + ); + (statement, validator_index, signature) + }) + .collect::>(); + DisputeStatementSet { candidate_hash: candidate_hash.clone(), session, statements } +} + +#[test] +fn dispute_statement_becoming_onesided_due_to_spamslots_is_accepted() { + let dispute_conclusion_by_time_out_period = 3; + let start = 10; + let session = start - 1; + let dispute_max_spam_slots = 2; + let post_conclusion_acceptance_period = 3; + + let mock_genesis_config = MockGenesisConfig { + configuration: crate::configuration::GenesisConfig { + config: HostConfiguration { + dispute_conclusion_by_time_out_period, + dispute_max_spam_slots, + ..Default::default() + }, + ..Default::default() + }, + ..Default::default() + }; + + new_test_ext(mock_genesis_config).execute_with(|| { + // We need 6 validators for the byzantine threshold to be 2 + static ACCOUNT_IDS: &[AccountId] = &[0, 1, 2, 3, 4, 5, 6, 7]; + let validators = std::iter::repeat(()) + .take(7) + .map(|_| ::Pair::generate().0) + .collect::>(); + let validators = &validators; + + // a new session at each block, but always the same validators + let session_change_callback = |block_number: u32| -> Option> { + let session_validators = + Vec::from_iter(ACCOUNT_IDS.iter().zip(validators.iter().map(|pair| pair.public()))); + Some((true, block_number, session_validators.clone(), Some(session_validators))) + }; + + run_to_block(start, session_change_callback); + + // Must be _foreign_ parachain candidate + // otherwise slots do not trigger. + let candidate_hash_a = CandidateHash(sp_core::H256::repeat_byte(0xA)); + let candidate_hash_b = CandidateHash(sp_core::H256::repeat_byte(0xB)); + let candidate_hash_c = CandidateHash(sp_core::H256::repeat_byte(0xC)); + let candidate_hash_d = CandidateHash(sp_core::H256::repeat_byte(0xD)); + + let stmts = vec![ + // a + generate_dispute_statement_set( + session, + candidate_hash_a, + validators, + vec![ + (3, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // b + generate_dispute_statement_set( + session, + candidate_hash_b, + validators, + vec![ + (1, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // c + generate_dispute_statement_set( + session, + candidate_hash_c, + validators, + vec![ + (2, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // d + generate_dispute_statement_set( + session, + candidate_hash_d, + validators, + vec![ + (4, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (5, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + generate_dispute_statement_set( + session, + candidate_hash_d, + validators, + vec![(6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit))], + ), + ]; + + // no filtering happens, host config for `dispute_max_spam_slots: 2` is the default + // updates spam slots implicitly + let set = stmts[0].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { + assert_eq!(&set, modified.as_ref()); + }); + assert_eq!(SpamSlots::::get(session), Some(vec![0, 0, 0, 1, 0, 0, 1])); + + // <-----> + + // 2nd, still ok? Should be + let set = stmts[1].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { + assert_eq!(&set, modified.as_ref()); + }); + assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 0, 1, 0, 0, 2])); + + // <-----> + + // now this is the third spammy participation of validator 6 and hence + let set = stmts[2].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveAll); + // no need to apply the filter, + // we don't do anything with the result, and spam slots were updated already + + // <-----> + + // now there is no pariticipation in this dispute being initiated + // only validator 4 and 5 are part of it + // with 3 validators it's not a an unconfirmed dispute anymore + // so validator 6, while being considered spammy should work again + let set = stmts[3].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + // no need to apply the filter, + // we don't do anything with the result, and spam slots were updated already + + // <-----> + + // it's a spammy participant, so a new dispute will not be accepted being initiated by a spammer + let set = stmts[4].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveAll); + assert_matches!(filter.filter_statement_set(set.clone()), None); + + assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 1, 1, 1, 1, 3])); + }); +} + // Test that punish_inconclusive is correctly called. #[test] fn test_initializer_initialize() { diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index bd959ea6dc4b..2e0420fbc4a8 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -535,6 +535,7 @@ fn bitfield_checks() { ); // clean up + #[allow(deprecated)] PendingAvailability::::remove_all(None); } @@ -593,6 +594,7 @@ fn bitfield_checks() { 0 ); + #[allow(deprecated)] PendingAvailability::::remove_all(None); } diff --git a/runtime/parachains/src/origin.rs b/runtime/parachains/src/origin.rs index 4eedffe5862f..282afca6aef0 100644 --- a/runtime/parachains/src/origin.rs +++ b/runtime/parachains/src/origin.rs @@ -54,7 +54,16 @@ pub mod pallet { /// Origin for the parachains. #[pallet::origin] - #[derive(PartialEq, Eq, Clone, Encode, Decode, sp_core::RuntimeDebug, scale_info::TypeInfo)] + #[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + sp_core::RuntimeDebug, + scale_info::TypeInfo, + MaxEncodedLen, + )] pub enum Origin { /// It comes from a parachain. Parachain(ParaId), diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 72137430cfad..9fa4383d5456 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" build = "build.rs" @@ -8,7 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.137", default-features = false } @@ -54,7 +54,6 @@ pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = " pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -141,7 +140,6 @@ std = [ "pallet-indices/std", "pallet-membership/std", "pallet-multisig/std", - "pallet-nicks/std", "pallet-offences/std", "pallet-preimage/std", "pallet-proxy/std", @@ -222,6 +220,7 @@ try-runtime = [ "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-bags-list/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-transaction-payment/try-runtime", @@ -235,7 +234,6 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", - "pallet-nicks/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", diff --git a/runtime/polkadot/constants/Cargo.toml b/runtime/polkadot/constants/Cargo.toml index 2b017e40d0ba..06c668f9f24a 100644 --- a/runtime/polkadot/constants/Cargo.toml +++ b/runtime/polkadot/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-constants" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/polkadot/constants/src/lib.rs b/runtime/polkadot/constants/src/lib.rs index 523f09176477..dfd50b7f0bb6 100644 --- a/runtime/polkadot/constants/src/lib.rs +++ b/runtime/polkadot/constants/src/lib.rs @@ -102,14 +102,14 @@ mod tests { fee::WeightToFee, }; use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFeePolynomial; + use frame_support::weights::WeightToFee as WeightToFeeT; use runtime_common::MAXIMUM_BLOCK_WEIGHT; #[test] // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. fn full_block_fee_is_correct() { // A full block should cost between 10 and 100 DOLLARS. - let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT); + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); assert!(full_block >= 10 * DOLLARS); assert!(full_block <= 100 * DOLLARS); } @@ -119,7 +119,7 @@ mod tests { fn extrinsic_base_fee_is_correct() { // `ExtrinsicBaseWeight` should cost 1/10 of a CENT println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::calc(&ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); let y = CENTS / 10; assert!(x.max(y) - x.min(y) < MILLICENTS); } diff --git a/runtime/polkadot/constants/src/weights/block_weights.rs b/runtime/polkadot/constants/src/weights/block_weights.rs index 4d4a110de507..70a71602c910 100644 --- a/runtime/polkadot/constants/src/weights/block_weights.rs +++ b/runtime/polkadot/constants/src/weights/block_weights.rs @@ -16,7 +16,8 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11 (Y/M/D) +//! DATE: 2022-06-20 (Y/M/D) +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -43,17 +44,17 @@ parameter_types! { /// Time to execute an empty block. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 5_394_233, 5_575_834 - /// Average: 5_457_046 - /// Median: 5_449_483 - /// Std-Dev: 45548.21 + /// Stats nanoseconds: + /// Min, Max: 5_722_294, 5_960_144 + /// Average: 5_797_172 + /// Median: 5_786_450 + /// Std-Dev: 48146.81 /// - /// Percentiles [NS]: - /// 99th: 5_568_516 - /// 95th: 5_555_190 - /// 75th: 5_478_365 - pub const BlockExecutionWeight: Weight = 5_457_046 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 5_940_244 + /// 95th: 5_890_113 + /// 75th: 5_824_797 + pub const BlockExecutionWeight: Weight = 5_797_172 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 6c6e854839e0..a84f72de3316 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -41,7 +41,8 @@ use frame_election_provider_support::{generate_solution_type, onchain, Sequentia use frame_support::{ construct_runtime, parameter_types, traits::{ - Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, + Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, + PrivilegeCmp, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -111,13 +112,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 9220, + spec_version: 9250, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] apis: version::create_apis_vec![[]], - transaction_version: 12, + transaction_version: 13, state_version: 0, }; @@ -181,7 +182,7 @@ impl Contains for BaseFilter { Call::Registrar(_) | Call::Auctions(_) | Call::Crowdloan(_) | - Call::BagsList(_) | + Call::VoterList(_) | Call::XcmPallet(_) => true, // All pallets are allowed, but exhaustive match is defensive // in the case of adding new pallets. @@ -189,7 +190,7 @@ impl Contains for BaseFilter { } } -type MoreThanHalfCouncil = EnsureOneOf< +type MoreThanHalfCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; @@ -233,7 +234,7 @@ parameter_types! { pub const NoPreimagePostponement: Option = Some(10); } -type ScheduleOrigin = EnsureOneOf< +type ScheduleOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -369,6 +370,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -531,7 +533,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { (), >; type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EnsureOneOf< + type ForceOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -581,7 +583,7 @@ parameter_types! { pub const MaxNominations: u32 = ::LIMIT as u32; } -type SlashCancelOrigin = EnsureOneOf< +type SlashCancelOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -608,7 +610,7 @@ impl pallet_staking::Config for Runtime { type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::UnboundedExecution; - type VoterList = BagsList; + type VoterList = VoterList; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type OnStakerSlash = (); @@ -662,41 +664,41 @@ impl pallet_democracy::Config for Runtime { type VotingPeriod = VotingPeriod; type MinimumDeposit = MinimumDeposit; /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = EnsureOneOf< + type ExternalOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, frame_system::EnsureRoot, >; /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = EnsureOneOf< + type ExternalMajorityOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, frame_system::EnsureRoot, >; /// A unanimous council can have the next scheduled referendum be a straight default-carries /// (NTB) vote. - type ExternalDefaultOrigin = EnsureOneOf< + type ExternalDefaultOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, frame_system::EnsureRoot, >; /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = EnsureOneOf< + type FastTrackOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, frame_system::EnsureRoot, >; - type InstantOrigin = EnsureOneOf< + type InstantOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, frame_system::EnsureRoot, >; type InstantAllowed = InstantAllowed; type FastTrackVotingPeriod = FastTrackVotingPeriod; // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EnsureOneOf< + type CancellationOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, EnsureRoot, >; // To cancel a proposal before it has been passed, the technical committee must be unanimous or // Root must agree. - type CancelProposalOrigin = EnsureOneOf< + type CancelProposalOrigin = EitherOfDiverse< pallet_collective::EnsureProportionAtLeast, EnsureRoot, >; @@ -817,7 +819,7 @@ parameter_types! { pub const MaxPeerDataEncodingSize: u32 = 1_000; } -type ApproveOrigin = EnsureOneOf< +type ApproveOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -838,6 +840,7 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = Bounties; type MaxApprovals = MaxApprovals; type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; } parameter_types! { @@ -1177,7 +1180,7 @@ impl InstanceFilter for ProxyType { Call::Crowdloan(..) | Call::Slots(..) | Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::BagsList(..) + Call::VoterList(..) ), ProxyType::Governance => matches!( c, @@ -1370,7 +1373,7 @@ parameter_types! { pub const SampleLength: BlockNumber = 2 * MINUTES; } -type AuctionInitiate = EnsureOneOf< +type AuctionInitiate = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -1403,7 +1406,7 @@ construct_runtime! { Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 4, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 5, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 32, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 32, // Consensus support. // Authorship must be before session in order to note author in the correct session and era @@ -1453,7 +1456,7 @@ construct_runtime! { ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 36, // Provides a semi-sorted list of nominators for staking. - BagsList: pallet_bags_list::{Pallet, Call, Storage, Event} = 37, + VoterList: pallet_bags_list::{Pallet, Call, Storage, Event} = 37, // Parachains pallets. Start indices at 50 to leave room. ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, @@ -1539,7 +1542,7 @@ mod benches { [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::ump, Ump] // Substrate - [pallet_bags_list, BagsList] + [pallet_bags_list, VoterList] [pallet_balances, Balances] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] @@ -1998,7 +2001,7 @@ sp_api::impl_runtime_apis! { #[cfg(test)] mod test_fees { use super::*; - use frame_support::weights::{GetDispatchInfo, WeightToFeePolynomial}; + use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT}; use keyring::Sr25519Keyring::Charlie; use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; @@ -2027,7 +2030,7 @@ mod test_fees { #[ignore] fn block_cost() { let max_block_weight = BlockWeights::get().max_block; - let raw_fee = WeightToFee::calc(&max_block_weight); + let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); println!( "Full Block weight == {} // WeightToFee(full_block) == {} plank", diff --git a/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs b/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs index de91c074837c..2941258c8fe4 100644 --- a/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/frame_benchmarking_baseline.rs @@ -44,40 +44,48 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_benchmarking::baseline`. pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { + /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - (112_000 as Weight) + (126_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - (111_000 as Weight) + (130_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - (112_000 as Weight) + (122_000 as Weight) } + /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - (108_000 as Weight) + (120_000 as Weight) } + /// The range of component `i` is `[0, 100]`. fn hashing(i: u32, ) -> Weight { - (19_129_386_000 as Weight) - // Standard Error: 93_000 - .saturating_add((24_000 as Weight).saturating_mul(i as Weight)) + (19_227_440_000 as Weight) + // Standard Error: 146_000 + .saturating_add((324_000 as Weight).saturating_mul(i as Weight)) } + /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 15_000 - .saturating_add((47_331_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((47_466_000 as Weight).saturating_mul(i as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 3_000 - .saturating_add((2_062_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 4_000 + .saturating_add((2_190_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((319_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((331_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } } diff --git a/runtime/polkadot/src/weights/frame_election_provider_support.rs b/runtime/polkadot/src/weights/frame_election_provider_support.rs index 7abdec2e5fa7..6d893f16d34a 100644 --- a/runtime/polkadot/src/weights/frame_election_provider_support.rs +++ b/runtime/polkadot/src/weights/frame_election_provider_support.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/frame_election_provider_support.rs @@ -44,18 +44,24 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. pub struct WeightInfo(PhantomData); impl frame_election_provider_support::WeightInfo for WeightInfo { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 50_000 - .saturating_add((19_294_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 6_946_000 - .saturating_add((3_117_127_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 48_000 + .saturating_add((19_022_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 6_773_000 + .saturating_add((3_057_489_000 as Weight).saturating_mul(d as Weight)) } + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 50_000 - .saturating_add((16_534_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 7_044_000 - .saturating_add((2_760_221_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 74_000 + .saturating_add((16_908_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 10_394_000 + .saturating_add((2_838_177_000 as Weight).saturating_mul(d as Weight)) } } diff --git a/runtime/polkadot/src/weights/frame_system.rs b/runtime/polkadot/src/weights/frame_system.rs index 51c77edf2c76..4d58051adf12 100644 --- a/runtime/polkadot/src/weights/frame_system.rs +++ b/runtime/polkadot/src/weights/frame_system.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/frame_system.rs @@ -44,11 +44,13 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -57,29 +59,32 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_379_000 as Weight) + (5_134_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((334_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((537_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((238_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((438_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((587_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 1_000 + .saturating_add((949_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/runtime/polkadot/src/weights/pallet_bags_list.rs b/runtime/polkadot/src/weights/pallet_bags_list.rs index d3b72c4d4075..864b3b125831 100644 --- a/runtime/polkadot/src/weights/pallet_bags_list.rs +++ b/runtime/polkadot/src/weights/pallet_bags_list.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_bags_list.rs @@ -46,29 +46,29 @@ pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList ListNodes (r:4 w:4) + // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - (41_590_000 as Weight) + (49_497_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - (39_378_000 as Weight) + (48_400_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } - // Storage: BagsList ListNodes (r:4 w:4) + // Storage: VoterList ListNodes (r:4 w:4) // Storage: Staking Bonded (r:2 w:0) // Storage: Staking Ledger (r:2 w:0) - // Storage: BagsList CounterForListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - (45_584_000 as Weight) + (50_695_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_balances.rs b/runtime/polkadot/src/weights/pallet_balances.rs index 427ea2a0f20b..0b2ed24bc93c 100644 --- a/runtime/polkadot/src/weights/pallet_balances.rs +++ b/runtime/polkadot/src/weights/pallet_balances.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_balances.rs @@ -46,43 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (33_480_000 as Weight) + (39_463_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (24_910_000 as Weight) + (30_198_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (15_675_000 as Weight) + (20_558_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (18_277_000 as Weight) + (23_692_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (34_072_000 as Weight) + (39_690_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (30_810_000 as Weight) + (35_891_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (14_107_000 as Weight) + (18_036_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_bounties.rs b/runtime/polkadot/src/weights/pallet_bounties.rs index 895761f52c3b..a839ebf72a67 100644 --- a/runtime/polkadot/src/weights/pallet_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_bounties.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_bounties.rs @@ -48,8 +48,9 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) // Storage: Bounties Bounties (r:0 w:1) + /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { - (21_600_000 as Weight) + (26_747_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -58,34 +59,34 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: Bounties Bounties (r:1 w:1) // Storage: Bounties BountyApprovals (r:1 w:1) fn approve_bounty() -> Weight { - (6_677_000 as Weight) + (10_012_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) fn propose_curator() -> Weight { - (4_738_000 as Weight) + (8_148_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn unassign_curator() -> Weight { - (30_471_000 as Weight) + (35_250_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn accept_curator() -> Weight { - (19_009_000 as Weight) + (23_337_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: ChildBounties ParentChildBounties (r:1 w:0) fn award_bounty() -> Weight { - (15_562_000 as Weight) + (20_156_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -94,7 +95,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - (57_824_000 as Weight) + (64_690_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -103,7 +104,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - (33_381_000 as Weight) + (39_618_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -112,23 +113,24 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - (42_629_000 as Weight) + (48_535_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Bounties Bounties (r:1 w:1) fn extend_bounty_expiry() -> Weight { - (13_298_000 as Weight) + (17_642_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Bounties BountyApprovals (r:1 w:1) // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:2 w:2) + /// The range of component `b` is `[1, 100]`. fn spend_funds(b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 17_000 - .saturating_add((29_544_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 18_000 + .saturating_add((30_533_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_child_bounties.rs b/runtime/polkadot/src/weights/pallet_child_bounties.rs index 1e3be783d739..25d0598b9724 100644 --- a/runtime/polkadot/src/weights/pallet_child_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_child_bounties.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_child_bounties.rs @@ -50,8 +50,9 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (43_352_000 as Weight) + (47_964_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) @@ -61,7 +62,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (10_302_000 as Weight) + (13_967_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -69,7 +70,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (22_251_000 as Weight) + (26_378_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -77,14 +78,14 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (34_792_000 as Weight) + (39_433_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Bounties Bounties (r:1 w:0) // Storage: ChildBounties ChildBounties (r:1 w:1) fn award_child_bounty() -> Weight { - (17_114_000 as Weight) + (21_498_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -93,7 +94,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (61_069_000 as Weight) + (65_934_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -104,7 +105,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (41_815_000 as Weight) + (46_800_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -115,7 +116,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - (51_801_000 as Weight) + (55_171_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_democracy.rs b/runtime/polkadot/src/weights/pallet_democracy.rs index 792b046cddb6..1dd2d2de1b3b 100644 --- a/runtime/polkadot/src/weights/pallet_democracy.rs +++ b/runtime/polkadot/src/weights/pallet_democracy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_democracy.rs @@ -49,42 +49,45 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (33_079_000 as Weight) + (38_760_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy DepositOf (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn second(s: u32, ) -> Weight { - (23_547_000 as Weight) + (28_399_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((92_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn vote_new(r: u32, ) -> Weight { - (31_390_000 as Weight) + (36_370_000 as Weight) // Standard Error: 0 - .saturating_add((128_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((132_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn vote_existing(r: u32, ) -> Weight { - (31_436_000 as Weight) + (35_984_000 as Weight) // Standard Error: 0 - .saturating_add((128_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((139_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - (13_837_000 as Weight) + (18_382_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -94,17 +97,19 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:0 w:1) // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `p` is `[1, 100]`. fn blacklist(p: u32, ) -> Weight { - (47_583_000 as Weight) + (54_335_000 as Weight) // Standard Error: 3_000 - .saturating_add((190_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) + /// The range of component `v` is `[1, 100]`. fn external_propose(v: u32, ) -> Weight { - (7_020_000 as Weight) + (10_113_000 as Weight) // Standard Error: 0 .saturating_add((31_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -112,62 +117,66 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - (1_236_000 as Weight) + (4_161_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (1_228_000 as Weight) + (3_982_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - (13_726_000 as Weight) + (18_469_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) + /// The range of component `v` is `[0, 100]`. fn veto_external(v: u32, ) -> Weight { - (14_757_000 as Weight) + (19_497_000 as Weight) // Standard Error: 0 - .saturating_add((61_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((59_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy PublicProps (r:1 w:1) // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `p` is `[1, 100]`. fn cancel_proposal(p: u32, ) -> Weight { - (35_058_000 as Weight) - // Standard Error: 0 - .saturating_add((185_000 as Weight).saturating_mul(p as Weight)) + (44_021_000 as Weight) + // Standard Error: 1_000 + .saturating_add((192_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (8_971_000 as Weight) + (12_749_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn cancel_queued(r: u32, ) -> Weight { - (20_554_000 as Weight) + (24_315_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_920_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_934_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy LowestUnbaked (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// The range of component `r` is `[1, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - (1_808_000 as Weight) + (1_409_000 as Weight) // Standard Error: 2_000 - .saturating_add((2_943_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((3_021_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -178,10 +187,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy NextExternal (r:1 w:0) // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// The range of component `r` is `[1, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (6_134_000 as Weight) + (6_374_000 as Weight) // Standard Error: 2_000 - .saturating_add((2_952_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((3_024_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -189,10 +199,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:3 w:3) // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn delegate(r: u32, ) -> Weight { - (31_253_000 as Weight) - // Standard Error: 3_000 - .saturating_add((3_695_000 as Weight).saturating_mul(r as Weight)) + (38_282_000 as Weight) + // Standard Error: 8_000 + .saturating_add((4_001_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) @@ -200,10 +211,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn undelegate(r: u32, ) -> Weight { - (15_040_000 as Weight) - // Standard Error: 2_000 - .saturating_add((3_681_000 as Weight).saturating_mul(r as Weight)) + (20_343_000 as Weight) + // Standard Error: 3_000 + .saturating_add((3_921_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -211,20 +223,22 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (1_155_000 as Weight) + (4_326_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) + /// The range of component `b` is `[0, 16384]`. fn note_preimage(b: u32, ) -> Weight { - (20_936_000 as Weight) + (25_988_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) + /// The range of component `b` is `[0, 16384]`. fn note_imminent_preimage(b: u32, ) -> Weight { - (14_059_000 as Weight) + (18_549_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -232,8 +246,9 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) + /// The range of component `b` is `[0, 16384]`. fn reap_preimage(b: u32, ) -> Weight { - (21_124_000 as Weight) + (26_198_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -242,38 +257,42 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn unlock_remove(r: u32, ) -> Weight { - (19_086_000 as Weight) + (23_408_000 as Weight) // Standard Error: 0 - .saturating_add((31_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((34_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn unlock_set(r: u32, ) -> Weight { - (18_407_000 as Weight) + (22_694_000 as Weight) // Standard Error: 0 - .saturating_add((118_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn remove_vote(r: u32, ) -> Weight { - (10_287_000 as Weight) + (13_839_000 as Weight) // Standard Error: 0 - .saturating_add((111_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) + /// The range of component `r` is `[1, 99]`. fn remove_other_vote(r: u32, ) -> Weight { - (10_257_000 as Weight) + (14_110_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((117_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs index d0a38ccd3c1d..2ea426d42b8f 100644 --- a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -53,45 +53,47 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - (12_610_000 as Weight) + (13_089_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - (12_273_000 as Weight) + (12_640_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - (12_191_000 as Weight) + (12_531_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - (25_751_000 as Weight) + (26_401_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - (19_431_000 as Weight) + (19_808_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - (25_896_000 as Weight) + (0 as Weight) // Standard Error: 1_000 - .saturating_add((332_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 2_000 - .saturating_add((73_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((388_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 3_000 + .saturating_add((89_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -104,12 +106,14 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, d: u32, ) -> Weight { - (81_841_000 as Weight) - // Standard Error: 6_000 - .saturating_add((835_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 10_000 - .saturating_add((89_000 as Weight).saturating_mul(d as Weight)) + (41_962_000 as Weight) + // Standard Error: 8_000 + .saturating_add((895_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 12_000 + .saturating_add((110_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -120,7 +124,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - (42_651_000 as Weight) + (47_673_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -131,16 +135,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 5_000 - .saturating_add((992_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 11_000 - .saturating_add((75_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((1_181_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 10_000 + .saturating_add((85_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 18_000 - .saturating_add((8_029_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((8_119_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 27_000 - .saturating_add((1_746_000 as Weight).saturating_mul(d as Weight)) + .saturating_add((1_690_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -148,16 +156,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 3_000 - .saturating_add((947_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 7_000 - .saturating_add((30_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 13_000 - .saturating_add((5_937_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 19_000 - .saturating_add((1_213_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 4_000 + .saturating_add((1_182_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 9_000 + .saturating_add((119_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 15_000 + .saturating_add((5_905_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 22_000 + .saturating_add((1_368_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs index 847305e3a342..9a2cf224007a 100644 --- a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs +++ b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_elections_phragmen.rs @@ -49,10 +49,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - (20_896_000 as Weight) + (24_689_000 as Weight) // Standard Error: 5_000 - .saturating_add((187_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -61,10 +62,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - (32_601_000 as Weight) - // Standard Error: 10_000 - .saturating_add((187_000 as Weight).saturating_mul(v as Weight)) + (37_520_000 as Weight) + // Standard Error: 8_000 + .saturating_add((192_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -73,35 +75,38 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - (33_131_000 as Weight) - // Standard Error: 9_000 - .saturating_add((146_000 as Weight).saturating_mul(v as Weight)) + (37_783_000 as Weight) + // Standard Error: 10_000 + .saturating_add((168_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn remove_voter() -> Weight { - (29_183_000 as Weight) + (34_185_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Candidates (r:1 w:1) // Storage: PhragmenElection Members (r:1 w:0) // Storage: PhragmenElection RunnersUp (r:1 w:0) + /// The range of component `c` is `[1, 200]`. fn submit_candidacy(c: u32, ) -> Weight { - (30_526_000 as Weight) + (34_746_000 as Weight) // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((127_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: PhragmenElection Candidates (r:1 w:1) + /// The range of component `c` is `[1, 200]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - (25_651_000 as Weight) + (30_131_000 as Weight) // Standard Error: 0 - .saturating_add((65_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((67_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -111,13 +116,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn renounce_candidacy_members() -> Weight { - (38_587_000 as Weight) + (43_814_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: PhragmenElection RunnersUp (r:1 w:1) fn renounce_candidacy_runners_up() -> Weight { - (27_742_000 as Weight) + (32_228_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -132,13 +137,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn remove_member_with_replacement() -> Weight { - (54_864_000 as Weight) + (59_701_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: PhragmenElection RunnersUp (r:1 w:0) fn remove_member_wrong_refund() -> Weight { - (5_142_000 as Weight) + (9_232_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: PhragmenElection Voting (r:251 w:250) @@ -147,12 +152,12 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection Candidates (r:1 w:0) // Storage: Balances Locks (r:250 w:250) // Storage: System Account (r:250 w:250) - fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { + /// The range of component `v` is `[250, 500]`. + /// The range of component `d` is `[1, 250]`. + fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 47_000 - .saturating_add((47_802_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 45_000 - .saturating_add((235_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 56_000 + .saturating_add((50_089_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) @@ -166,14 +171,17 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `c` is `[1, 200]`. + /// The range of component `v` is `[1, 500]`. + /// The range of component `e` is `[500, 8000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_789_000 - .saturating_add((117_725_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 1_160_000 - .saturating_add((98_768_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 79_000 - .saturating_add((6_876_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 3_227_000 + .saturating_add((121_351_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 1_342_000 + .saturating_add((107_477_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 91_000 + .saturating_add((7_521_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/polkadot/src/weights/pallet_identity.rs b/runtime/polkadot/src/weights/pallet_identity.rs index dab263796f55..9582b63e98a4 100644 --- a/runtime/polkadot/src/weights/pallet_identity.rs +++ b/runtime/polkadot/src/weights/pallet_identity.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_identity.rs @@ -45,18 +45,21 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - (12_206_000 as Weight) - // Standard Error: 4_000 - .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) + (15_974_000 as Weight) + // Standard Error: 6_000 + .saturating_add((211_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - (25_393_000 as Weight) + (29_596_000 as Weight) // Standard Error: 8_000 - .saturating_add((193_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 .saturating_add((345_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -65,10 +68,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - (22_720_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_658_000 as Weight).saturating_mul(s as Weight)) + (26_400_000 as Weight) + // Standard Error: 3_000 + .saturating_add((2_917_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -77,10 +81,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - (22_422_000 as Weight) + (27_107_000 as Weight) // Standard Error: 0 - .saturating_add((735_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((930_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) @@ -88,71 +93,83 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (28_686_000 as Weight) - // Standard Error: 5_000 - .saturating_add((73_000 as Weight).saturating_mul(r as Weight)) + (33_187_000 as Weight) + // Standard Error: 7_000 + .saturating_add((102_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((722_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((927_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((208_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((219_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - (27_521_000 as Weight) + (31_887_000 as Weight) // Standard Error: 4_000 - .saturating_add((156_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((187_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((401_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((403_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - (24_345_000 as Weight) + (28_527_000 as Weight) // Standard Error: 5_000 - .saturating_add((127_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((153_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((393_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((394_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - (4_308_000 as Weight) - // Standard Error: 2_000 - .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) + (7_281_000 as Weight) + // Standard Error: 3_000 + .saturating_add((185_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - (4_206_000 as Weight) - // Standard Error: 2_000 - .saturating_add((150_000 as Weight).saturating_mul(r as Weight)) + (7_541_000 as Weight) + // Standard Error: 3_000 + .saturating_add((167_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - (4_411_000 as Weight) - // Standard Error: 2_000 - .saturating_add((151_000 as Weight).saturating_mul(r as Weight)) + (7_458_000 as Weight) + // Standard Error: 3_000 + .saturating_add((169_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 19]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - (18_382_000 as Weight) - // Standard Error: 4_000 - .saturating_add((131_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 0 - .saturating_add((399_000 as Weight).saturating_mul(x as Weight)) + (23_603_000 as Weight) + // Standard Error: 14_000 + .saturating_add((103_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_000 + .saturating_add((387_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -160,14 +177,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (37_147_000 as Weight) - // Standard Error: 15_000 - .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((742_000 as Weight).saturating_mul(s as Weight)) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. + fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { + (46_812_000 as Weight) + // Standard Error: 13_000 + .saturating_add((119_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((24_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((946_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) @@ -175,38 +193,42 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - (29_464_000 as Weight) + (33_988_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - (8_997_000 as Weight) + (12_564_000 as Weight) // Standard Error: 0 - .saturating_add((19_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((26_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - (30_195_000 as Weight) + (34_832_000 as Weight) // Standard Error: 0 - .saturating_add((92_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - (20_164_000 as Weight) + (24_441_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((93_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_im_online.rs b/runtime/polkadot/src/weights/pallet_im_online.rs index a2832d9d310d..3ac7dd6552f7 100644 --- a/runtime/polkadot/src/weights/pallet_im_online.rs +++ b/runtime/polkadot/src/weights/pallet_im_online.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_im_online.rs @@ -49,12 +49,14 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) // Storage: ImOnline AuthoredBlocks (r:1 w:0) // Storage: ImOnline Keys (r:1 w:0) + /// The range of component `k` is `[1, 1000]`. + /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (69_438_000 as Weight) + (73_491_000 as Weight) // Standard Error: 0 - .saturating_add((65_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((71_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 3_000 - .saturating_add((315_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((326_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_indices.rs b/runtime/polkadot/src/weights/pallet_indices.rs index 950f8261ce8f..162535ea5b97 100644 --- a/runtime/polkadot/src/weights/pallet_indices.rs +++ b/runtime/polkadot/src/weights/pallet_indices.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_indices.rs @@ -46,33 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (19_895_000 as Weight) + (22_953_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (24_079_000 as Weight) + (29_218_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - (20_845_000 as Weight) + (24_477_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (20_541_000 as Weight) + (24_631_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - (23_602_000 as Weight) + (28_166_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_membership.rs b/runtime/polkadot/src/weights/pallet_membership.rs index 88ba58df72be..71feb6620c4b 100644 --- a/runtime/polkadot/src/weights/pallet_membership.rs +++ b/runtime/polkadot/src/weights/pallet_membership.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_membership.rs @@ -48,10 +48,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Proposals (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - (13_530_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(m as Weight)) + (14_705_000 as Weight) + // Standard Error: 0 + .saturating_add((77_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -60,10 +61,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - (16_111_000 as Weight) + (17_213_000 as Weight) // Standard Error: 0 - .saturating_add((46_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((65_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -72,10 +74,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - (16_187_000 as Weight) + (17_293_000 as Weight) // Standard Error: 0 - .saturating_add((57_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((75_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -84,10 +87,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:0) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - (15_829_000 as Weight) - // Standard Error: 1_000 - .saturating_add((188_000 as Weight).saturating_mul(m as Weight)) + (16_761_000 as Weight) + // Standard Error: 0 + .saturating_add((208_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -96,18 +100,20 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalMembership Prime (r:1 w:1) // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - (16_873_000 as Weight) + (17_636_000 as Weight) // Standard Error: 0 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: TechnicalMembership Members (r:1 w:0) // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - (4_251_000 as Weight) + (4_439_000 as Weight) // Standard Error: 0 .saturating_add((29_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -115,8 +121,9 @@ impl pallet_membership::WeightInfo for WeightInfo { } // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn clear_prime(_m: u32, ) -> Weight { - (1_198_000 as Weight) + (1_544_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_multisig.rs b/runtime/polkadot/src/weights/pallet_multisig.rs index 3b4f1929b08d..39a6d816d12f 100644 --- a/runtime/polkadot/src/weights/pallet_multisig.rs +++ b/runtime/polkadot/src/weights/pallet_multisig.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_multisig.rs @@ -44,17 +44,20 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (8_822_000 as Weight) + (14_372_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (25_660_000 as Weight) - // Standard Error: 0 - .saturating_add((95_000 as Weight).saturating_mul(s as Weight)) + (31_029_000 as Weight) + // Standard Error: 1_000 + .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -63,20 +66,24 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (27_951_000 as Weight) - // Standard Error: 0 - .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) + (32_026_000 as Weight) + // Standard Error: 1_000 + .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (16_039_000 as Weight) + (19_765_000 as Weight) // Standard Error: 0 - .saturating_add((95_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -84,10 +91,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (26_522_000 as Weight) - // Standard Error: 1_000 - .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) + (32_372_000 as Weight) + // Standard Error: 0 + .saturating_add((115_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -96,10 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (33_823_000 as Weight) + (39_837_000 as Weight) // Standard Error: 0 - .saturating_add((140_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((152_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -107,38 +118,42 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (25_402_000 as Weight) + (29_954_000 as Weight) // Standard Error: 0 - .saturating_add((98_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((109_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (15_306_000 as Weight) + (19_277_000 as Weight) // Standard Error: 0 - .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (67_281_000 as Weight) + (73_763_000 as Weight) // Standard Error: 0 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((155_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (45_673_000 as Weight) + (51_834_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_preimage.rs b/runtime/polkadot/src/weights/pallet_preimage.rs index f27db6c2c4ed..4c7ecd4f56cf 100644 --- a/runtime/polkadot/src/weights/pallet_preimage.rs +++ b/runtime/polkadot/src/weights/pallet_preimage.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_preimage.rs @@ -46,6 +46,7 @@ pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -55,6 +56,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -64,6 +66,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -74,58 +77,58 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (37_608_000 as Weight) + (36_082_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (25_216_000 as Weight) + (24_883_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (35_781_000 as Weight) + (34_301_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (22_926_000 as Weight) + (23_091_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (13_194_000 as Weight) + (16_137_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (4_587_000 as Weight) + (7_083_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (23_975_000 as Weight) + (23_053_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (13_960_000 as Weight) + (17_096_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (3_943_000 as Weight) + (6_862_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_proxy.rs b/runtime/polkadot/src/weights/pallet_proxy.rs index 95b7bd503a76..0b026ba33574 100644 --- a/runtime/polkadot/src/weights/pallet_proxy.rs +++ b/runtime/polkadot/src/weights/pallet_proxy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_proxy.rs @@ -45,92 +45,108 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) + /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (12_948_000 as Weight) - // Standard Error: 1_000 - .saturating_add((77_000 as Weight).saturating_mul(p as Weight)) + (17_842_000 as Weight) + // Standard Error: 2_000 + .saturating_add((81_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (27_855_000 as Weight) + (34_052_000 as Weight) // Standard Error: 2_000 - .saturating_add((201_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((207_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 2_000 - .saturating_add((59_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((65_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (18_930_000 as Weight) + (23_704_000 as Weight) // Standard Error: 1_000 - .saturating_add((199_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((209_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) - fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (19_213_000 as Weight) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn reject_announcement(a: u32, p: u32, ) -> Weight { + (23_988_000 as Weight) + // Standard Error: 1_000 + .saturating_add((195_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((196_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (26_264_000 as Weight) + (30_946_000 as Weight) // Standard Error: 1_000 - .saturating_add((193_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((49_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((58_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (21_390_000 as Weight) + (25_781_000 as Weight) // Standard Error: 2_000 - .saturating_add((117_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (21_286_000 as Weight) + (25_809_000 as Weight) // Standard Error: 2_000 - .saturating_add((129_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((151_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (17_525_000 as Weight) - // Standard Error: 1_000 - .saturating_add((81_000 as Weight).saturating_mul(p as Weight)) + (22_180_000 as Weight) + // Standard Error: 2_000 + .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (24_122_000 as Weight) - // Standard Error: 1_000 - .saturating_add((27_000 as Weight).saturating_mul(p as Weight)) + (28_764_000 as Weight) + // Standard Error: 2_000 + .saturating_add((32_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (18_411_000 as Weight) - // Standard Error: 2_000 - .saturating_add((82_000 as Weight).saturating_mul(p as Weight)) + (22_336_000 as Weight) + // Standard Error: 15_000 + .saturating_add((159_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_scheduler.rs b/runtime/polkadot/src/weights/pallet_scheduler.rs index 96de1315ba45..ee156d2bf34b 100644 --- a/runtime/polkadot/src/weights/pallet_scheduler.rs +++ b/runtime/polkadot/src/weights/pallet_scheduler.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_scheduler.rs @@ -48,10 +48,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 35_000 - .saturating_add((24_327_000 as Weight).saturating_mul(s as Weight)) + (2_739_000 as Weight) + // Standard Error: 32_000 + .saturating_add((26_230_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -61,10 +62,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_resolved(s: u32, ) -> Weight { - (2_806_000 as Weight) - // Standard Error: 21_000 - .saturating_add((19_225_000 as Weight).saturating_mul(s as Weight)) + (1_517_000 as Weight) + // Standard Error: 29_000 + .saturating_add((21_305_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -73,10 +75,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 25_000 - .saturating_add((21_888_000 as Weight).saturating_mul(s as Weight)) + (1_851_000 as Weight) + // Standard Error: 29_000 + .saturating_add((23_826_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -85,10 +88,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_resolved(s: u32, ) -> Weight { - (3_124_000 as Weight) - // Standard Error: 25_000 - .saturating_add((18_227_000 as Weight).saturating_mul(s as Weight)) + (4_340_000 as Weight) + // Standard Error: 33_000 + .saturating_add((20_124_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -97,10 +101,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_aborted(s: u32, ) -> Weight { - (2_823_000 as Weight) - // Standard Error: 16_000 - .saturating_add((8_925_000 as Weight).saturating_mul(s as Weight)) + (5_748_000 as Weight) + // Standard Error: 13_000 + .saturating_add((8_979_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -108,30 +113,33 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) + /// The range of component `s` is `[1, 50]`. fn on_initialize_aborted(s: u32, ) -> Weight { - (7_632_000 as Weight) - // Standard Error: 20_000 - .saturating_add((6_842_000 as Weight).saturating_mul(s as Weight)) + (5_823_000 as Weight) + // Standard Error: 10_000 + .saturating_add((6_938_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named(s: u32, ) -> Weight { - (5_902_000 as Weight) - // Standard Error: 18_000 - .saturating_add((14_703_000 as Weight).saturating_mul(s as Weight)) + (8_570_000 as Weight) + // Standard Error: 23_000 + .saturating_add((16_278_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:2 w:2) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic(s: u32, ) -> Weight { - (8_149_000 as Weight) + (12_054_000 as Weight) // Standard Error: 18_000 - .saturating_add((12_311_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((13_823_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -139,25 +147,28 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named(s: u32, ) -> Weight { - (9_273_000 as Weight) + (11_777_000 as Weight) // Standard Error: 13_000 - .saturating_add((10_133_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((11_441_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize(s: u32, ) -> Weight { - (10_020_000 as Weight) - // Standard Error: 13_000 - .saturating_add((9_200_000 as Weight).saturating_mul(s as Weight)) + (15_020_000 as Weight) + // Standard Error: 69_000 + .saturating_add((10_582_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule(s: u32, ) -> Weight { - (15_091_000 as Weight) + (19_644_000 as Weight) // Standard Error: 1_000 .saturating_add((43_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -165,28 +176,31 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - (14_485_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_006_000 as Weight).saturating_mul(s as Weight)) + (18_988_000 as Weight) + // Standard Error: 6_000 + .saturating_add((2_019_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule_named(s: u32, ) -> Weight { - (17_904_000 as Weight) + (22_760_000 as Weight) // Standard Error: 1_000 - .saturating_add((53_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((55_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - (15_327_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_029_000 as Weight).saturating_mul(s as Weight)) + (20_361_000 as Weight) + // Standard Error: 6_000 + .saturating_add((2_030_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_session.rs b/runtime/polkadot/src/weights/pallet_session.rs index 148837bd4706..466ed5aa17dd 100644 --- a/runtime/polkadot/src/weights/pallet_session.rs +++ b/runtime/polkadot/src/weights/pallet_session.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_session.rs @@ -48,7 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - (36_651_000 as Weight) + (42_998_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -56,7 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - (21_731_000 as Weight) + (27_884_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_staking.rs b/runtime/polkadot/src/weights/pallet_staking.rs index f55bd06d694b..53bb3a1597ac 100644 --- a/runtime/polkadot/src/weights/pallet_staking.rs +++ b/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_staking.rs @@ -51,17 +51,17 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - (34_465_000 as Weight) + (40_524_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - (59_012_000 as Weight) + (69_748_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -71,11 +71,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - (65_479_000 as Weight) + (76_133_000 as Weight) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -83,10 +83,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - (26_969_000 as Weight) + (32_571_000 as Weight) // Standard Error: 0 - .saturating_add((25_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((27_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -97,16 +98,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) - fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (53_759_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) + /// The range of component `s` is `[0, 100]`. + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { + (61_327_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(11 as Weight)) } @@ -117,21 +117,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxValidatorsCount (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - (43_754_000 as Weight) + (49_297_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) + /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - (8_194_000 as Weight) + (14_984_000 as Weight) // Standard Error: 7_000 - .saturating_add((8_081_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((8_534_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) @@ -143,14 +144,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) + /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - (46_009_000 as Weight) - // Standard Error: 12_000 - .saturating_add((3_189_000 as Weight).saturating_mul(n as Weight)) + (51_432_000 as Weight) + // Standard Error: 18_000 + .saturating_add((3_414_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(6 as Weight)) @@ -159,51 +161,52 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - (41_010_000 as Weight) + (47_005_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - (6_363_000 as Weight) + (10_087_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - (13_508_000 as Weight) + (17_935_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - (1_023_000 as Weight) + (3_787_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - (1_066_000 as Weight) + (3_855_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - (1_044_000 as Weight) + (3_857_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - (1_049_000 as Weight) + (3_801_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Invulnerables (r:0 w:1) + /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - (1_134_000 as Weight) + (4_282_000 as Weight) // Standard Error: 0 .saturating_add((10_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -213,27 +216,29 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Ledger (r:0 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:2) + /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - (50_872_000 as Weight) - // Standard Error: 1_000 - .saturating_add((711_000 as Weight).saturating_mul(s as Weight)) + (59_775_000 as Weight) + // Standard Error: 2_000 + .saturating_add((891_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Staking UnappliedSlashes (r:1 w:1) + /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - (2_747_586_000 as Weight) - // Standard Error: 182_000 - .saturating_add((16_178_000 as Weight).saturating_mul(s as Weight)) + (2_745_276_000 as Weight) + // Standard Error: 181_000 + .saturating_add((16_191_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -247,10 +252,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasValidatorPrefs (r:1 w:0) // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (76_273_000 as Weight) - // Standard Error: 11_000 - .saturating_add((24_395_000 as Weight).saturating_mul(n as Weight)) + (74_726_000 as Weight) + // Standard Error: 18_000 + .saturating_add((25_768_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -267,10 +273,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (98_647_000 as Weight) - // Standard Error: 24_000 - .saturating_add((32_718_000 as Weight).saturating_mul(n as Weight)) + (106_530_000 as Weight) + // Standard Error: 26_000 + .saturating_add((34_516_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) @@ -279,13 +286,14 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) + /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - (58_702_000 as Weight) - // Standard Error: 2_000 - .saturating_add((35_000 as Weight).saturating_mul(l as Weight)) + (69_810_000 as Weight) + // Standard Error: 3_000 + .saturating_add((43_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -298,10 +306,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:2) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `e` is `[1, 100]`. fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 58_000 - .saturating_add((19_022_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 56_000 + .saturating_add((21_772_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) @@ -313,24 +322,25 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:1) + /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - (58_097_000 as Weight) - // Standard Error: 0 - .saturating_add((700_000 as Weight).saturating_mul(s as Weight)) + (65_508_000 as Weight) + // Standard Error: 2_000 + .saturating_add((894_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: BagsList ListBags (r:178 w:0) - // Storage: BagsList ListNodes (r:101 w:0) + // Storage: VoterList ListBags (r:178 w:0) + // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking Bonded (r:101 w:0) @@ -346,35 +356,40 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `v` is `[1, 10]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 825_000 - .saturating_add((233_731_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 829_000 + .saturating_add((242_208_000 as Weight).saturating_mul(v as Weight)) // Standard Error: 41_000 - .saturating_add((32_900_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((33_977_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(187 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:21 w:0) - // Storage: BagsList ListBags (r:178 w:0) - // Storage: BagsList ListNodes (r:1500 w:0) + // Storage: VoterList ListBags (r:178 w:0) + // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) // Storage: Staking Validators (r:500 w:0) // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. + /// The range of component `n` is `[500, 1000]`. + /// The range of component `s` is `[1, 20]`. fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 95_000 - .saturating_add((23_598_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 95_000 - .saturating_add((21_421_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_246_000 - .saturating_add((48_044_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 121_000 + .saturating_add((24_711_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 121_000 + .saturating_add((22_795_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 4_140_000 + .saturating_add((56_269_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(181 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) @@ -383,10 +398,11 @@ impl pallet_staking::WeightInfo for WeightInfo { } // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 28_000 - .saturating_add((7_086_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 35_000 + .saturating_add((7_588_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -398,7 +414,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - (3_034_000 as Weight) + (6_734_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:0 w:1) @@ -408,7 +424,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - (2_761_000 as Weight) + (6_521_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) @@ -418,18 +434,18 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Validators (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - (50_236_000 as Weight) + (56_886_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - (7_149_000 as Weight) + (11_089_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_timestamp.rs b/runtime/polkadot/src/weights/pallet_timestamp.rs index e7b047b4f881..04ab6a7008a9 100644 --- a/runtime/polkadot/src/weights/pallet_timestamp.rs +++ b/runtime/polkadot/src/weights/pallet_timestamp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_timestamp.rs @@ -47,11 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - (5_087_000 as Weight) + (7_836_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_044_000 as Weight) + (2_266_000 as Weight) } } diff --git a/runtime/polkadot/src/weights/pallet_tips.rs b/runtime/polkadot/src/weights/pallet_tips.rs index d61f8e9a1d9a..d444c102c367 100644 --- a/runtime/polkadot/src/weights/pallet_tips.rs +++ b/runtime/polkadot/src/weights/pallet_tips.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_tips.rs @@ -46,8 +46,9 @@ pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:1 w:1) // Storage: Tips Tips (r:1 w:1) + /// The range of component `r` is `[0, 16384]`. fn report_awesome(r: u32, ) -> Weight { - (22_932_000 as Weight) + (28_844_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -56,28 +57,31 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) fn retract_tip() -> Weight { - (21_858_000 as Weight) + (27_488_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Members (r:1 w:0) // Storage: Tips Reasons (r:1 w:1) // Storage: Tips Tips (r:0 w:1) + /// The range of component `r` is `[0, 16384]`. + /// The range of component `t` is `[1, 13]`. fn tip_new(r: u32, t: u32, ) -> Weight { - (14_580_000 as Weight) + (19_846_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 5_000 - .saturating_add((80_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 7_000 + .saturating_add((59_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: PhragmenElection Members (r:1 w:0) // Storage: Tips Tips (r:1 w:1) + /// The range of component `t` is `[1, 13]`. fn tip(t: u32, ) -> Weight { - (7_921_000 as Weight) + (11_282_000 as Weight) // Standard Error: 4_000 - .saturating_add((329_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((352_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -85,19 +89,21 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: PhragmenElection Members (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) + /// The range of component `t` is `[1, 13]`. fn close_tip(t: u32, ) -> Weight { - (37_132_000 as Weight) - // Standard Error: 13_000 + (43_226_000 as Weight) + // Standard Error: 12_000 .saturating_add((220_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) + /// The range of component `t` is `[1, 13]`. fn slash_tip(t: u32, ) -> Weight { - (12_285_000 as Weight) - // Standard Error: 23_000 - .saturating_add((101_000 as Weight).saturating_mul(t as Weight)) + (17_640_000 as Weight) + // Standard Error: 5_000 + .saturating_add((21_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_treasury.rs b/runtime/polkadot/src/weights/pallet_treasury.rs index 1c87ea7e3571..d59622fd1bba 100644 --- a/runtime/polkadot/src/weights/pallet_treasury.rs +++ b/runtime/polkadot/src/weights/pallet_treasury.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_treasury.rs @@ -44,32 +44,36 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { + fn spend() -> Weight { + (149_000 as Weight) + } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (20_093_000 as Weight) + (24_222_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - (30_940_000 as Weight) + (35_625_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) + /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - (7_060_000 as Weight) + (10_274_000 as Weight) // Standard Error: 0 - .saturating_add((28_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((36_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - (3_220_000 as Weight) + (6_249_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -77,10 +81,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Bounties BountyApprovals (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) // Storage: System Account (r:4 w:4) + /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - (17_360_000 as Weight) - // Standard Error: 21_000 - .saturating_add((29_033_000 as Weight).saturating_mul(p as Weight)) + (20_205_000 as Weight) + // Standard Error: 24_000 + .saturating_add((29_614_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_utility.rs b/runtime/polkadot/src/weights/pallet_utility.rs index f5e9b3172128..efed84781ba9 100644 --- a/runtime/polkadot/src/weights/pallet_utility.rs +++ b/runtime/polkadot/src/weights/pallet_utility.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_utility.rs @@ -44,28 +44,28 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (4_943_000 as Weight) + (21_474_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_798_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_432_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_437_000 as Weight) + (5_588_000 as Weight) } - // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (13_408_000 as Weight) + (16_310_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_189_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((4_765_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (9_233_000 as Weight) + (12_947_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (532_000 as Weight) + (17_311_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_792_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_443_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index e12e50023123..55e0983f4149 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/pallet_vesting.rs @@ -46,95 +46,111 @@ pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - (24_311_000 as Weight) - // Standard Error: 0 - .saturating_add((85_000 as Weight).saturating_mul(l as Weight)) + (29_630_000 as Weight) // Standard Error: 1_000 - .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((179_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (24_198_000 as Weight) - // Standard Error: 0 - .saturating_add((80_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 1_000 - .saturating_add((142_000 as Weight).saturating_mul(s as Weight)) + (29_861_000 as Weight) + // Standard Error: 3_000 + .saturating_add((82_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 7_000 + .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (24_604_000 as Weight) - // Standard Error: 0 - .saturating_add((81_000 as Weight).saturating_mul(l as Weight)) + (30_066_000 as Weight) // Standard Error: 1_000 - .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((86_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((176_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (24_324_000 as Weight) + (29_994_000 as Weight) // Standard Error: 0 - .saturating_add((74_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((76_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 1_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - (38_481_000 as Weight) - // Standard Error: 1_000 - .saturating_add((83_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 3_000 - .saturating_add((150_000 as Weight).saturating_mul(s as Weight)) + (44_216_000 as Weight) + // Standard Error: 2_000 + .saturating_add((95_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((164_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - (38_143_000 as Weight) - // Standard Error: 1_000 - .saturating_add((80_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 3_000 - .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) + (46_247_000 as Weight) + // Standard Error: 2_000 + .saturating_add((57_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (24_998_000 as Weight) - // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(l as Weight)) + (30_690_000 as Weight) // Standard Error: 1_000 - .saturating_add((166_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((90_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((181_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (24_977_000 as Weight) - // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(l as Weight)) + (30_498_000 as Weight) // Standard Error: 1_000 - .saturating_add((157_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((89_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((179_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_common_auctions.rs b/runtime/polkadot/src/weights/runtime_common_auctions.rs index 979cfdbe31ca..641dbc871f27 100644 --- a/runtime/polkadot/src/weights/runtime_common_auctions.rs +++ b/runtime/polkadot/src/weights/runtime_common_auctions.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_common_auctions.rs @@ -47,7 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - (11_757_000 as Weight) + (16_333_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -59,7 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - (70_003_000 as Weight) + (71_275_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - (14_623_266_000 as Weight) + (15_531_817_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } @@ -85,7 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - (3_001_064_000 as Weight) + (4_560_781_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_common_claims.rs b/runtime/polkadot/src/weights/runtime_common_claims.rs index c623b3e0b216..534efe281cbf 100644 --- a/runtime/polkadot/src/weights/runtime_common_claims.rs +++ b/runtime/polkadot/src/weights/runtime_common_claims.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_common_claims.rs @@ -52,7 +52,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - (134_278_000 as Weight) + (141_935_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - (5_864_000 as Weight) + (10_614_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -73,7 +73,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - (137_226_000 as Weight) + (145_495_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -86,7 +86,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - (57_821_000 as Weight) + (64_898_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -95,7 +95,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - (14_729_000 as Weight) + (20_059_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_common_crowdloan.rs b/runtime/polkadot/src/weights/runtime_common_crowdloan.rs index 0d527ee10f4d..c40453618d0c 100644 --- a/runtime/polkadot/src/weights/runtime_common_crowdloan.rs +++ b/runtime/polkadot/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_common_crowdloan.rs @@ -49,7 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - (45_887_000 as Weight) + (42_986_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (120_540_000 as Weight) + (113_348_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -69,15 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - (55_430_000 as Weight) + (51_518_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `k` is `[0, 1000]`. fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 17_000 - .saturating_add((19_000_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 16_000 + .saturating_add((19_684_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -86,27 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - (34_736_000 as Weight) + (33_578_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - (23_379_000 as Weight) + (22_605_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - (30_985_000 as Weight) + (29_411_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - (25_195_000 as Weight) + (24_466_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -120,10 +121,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Auctions Winning (r:1 w:1) // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { - (32_000 as Weight) - // Standard Error: 21_000 - .saturating_add((49_444_000 as Weight).saturating_mul(n as Weight)) + (0 as Weight) + // Standard Error: 19_000 + .saturating_add((50_061_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs b/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs index af847d1217dd..6f6be50c9db2 100644 --- a/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_common_paras_registrar.rs @@ -48,7 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - (24_332_000 as Weight) + (28_440_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -63,7 +63,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - (8_492_302_000 as Weight) + (8_755_966_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -78,7 +78,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - (8_607_635_000 as Weight) + (8_798_048_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -89,7 +89,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - (44_842_000 as Weight) + (44_121_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -101,7 +101,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - (37_231_000 as Weight) + (38_235_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_common_slots.rs b/runtime/polkadot/src/weights/runtime_common_slots.rs index 6d086e1266f4..996dd2485328 100644 --- a/runtime/polkadot/src/weights/runtime_common_slots.rs +++ b/runtime/polkadot/src/weights/runtime_common_slots.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_common_slots.rs @@ -47,7 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (24_107_000 as Weight) + (27_708_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -57,12 +57,14 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((7_092_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 15_000 - .saturating_add((17_503_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 16_000 + .saturating_add((7_277_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 16_000 + .saturating_add((18_147_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -73,7 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (94_115_000 as Weight) + (94_442_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -83,7 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (23_190_000 as Weight) + (22_018_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_configuration.rs b/runtime/polkadot/src/weights/runtime_parachains_configuration.rs index 6566dafa3bc8..d89ac864f55a 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_configuration.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_parachains_configuration.rs @@ -49,7 +49,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - (6_643_000 as Weight) + (9_532_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -58,7 +58,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - (6_648_000 as Weight) + (9_666_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -67,7 +67,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - (6_820_000 as Weight) + (9_781_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - (6_712_000 as Weight) + (9_593_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -89,7 +89,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - (6_778_000 as Weight) + (9_591_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_disputes.rs b/runtime/polkadot/src/weights/runtime_parachains_disputes.rs index 791994fbe4a9..7802837fe2e2 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_disputes.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_disputes.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_parachains_disputes.rs @@ -46,7 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - (689_000 as Weight) + (3_428_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } } diff --git a/runtime/polkadot/src/weights/runtime_parachains_initializer.rs b/runtime/polkadot/src/weights/runtime_parachains_initializer.rs index fa03f7bac68f..f6b32ee1363d 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_initializer.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_initializer.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_parachains_initializer.rs @@ -45,8 +45,9 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_parachains::initializer::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) + /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - (4_201_000 as Weight) + (6_947_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/polkadot/src/weights/runtime_parachains_paras.rs b/runtime/polkadot/src/weights/runtime_parachains_paras.rs index 42f2375c2639..fccac4cf0396 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_paras.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_paras.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs @@ -50,6 +50,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PastCodePruning (r:1 w:1) // Storage: Paras PastCodeHash (r:0 w:1) // Storage: Paras CodeByHash (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -58,8 +59,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - (9_803_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -81,6 +83,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -91,8 +94,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras FutureCodeUpgrades (r:1 w:0) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - (9_676_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -101,12 +105,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - (18_217_000 as Weight) + (21_477_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Paras PvfActiveVoteMap (r:1 w:0) // Storage: Paras CodeByHash (r:1 w:1) + /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -117,7 +122,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - (2_655_000 as Weight) + (5_046_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -126,7 +131,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - (103_046_000 as Weight) + (106_463_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -139,7 +144,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - (683_525_000 as Weight) + (697_049_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(104 as Weight)) } @@ -153,7 +158,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - (586_167_000 as Weight) + (604_793_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(204 as Weight)) } @@ -164,7 +169,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - (549_812_000 as Weight) + (560_917_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -179,7 +184,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - (640_600_000 as Weight) + (656_754_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(304 as Weight)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs b/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs index 34bfa70e8e73..e87760723bf3 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs @@ -59,8 +59,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParasShared ActiveValidatorKeys (r:1 w:0) // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -76,11 +75,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - (407_116_000 as Weight) - // Standard Error: 15_000 - .saturating_add((48_196_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(30 as Weight)) + (412_872_000 as Weight) + // Standard Error: 17_000 + .saturating_add((48_382_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(29 as Weight)) .saturating_add(T::DbWeight::get().writes(18 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -94,8 +94,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -115,8 +114,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - (392_466_000 as Weight) - .saturating_add(T::DbWeight::get().reads(27 as Weight)) + (405_206_000 as Weight) + .saturating_add(T::DbWeight::get().reads(26 as Weight)) .saturating_add(T::DbWeight::get().writes(17 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -130,8 +129,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -151,11 +149,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - (1_029_516_000 as Weight) - // Standard Error: 30_000 - .saturating_add((47_838_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(30 as Weight)) + (1_053_542_000 as Weight) + // Standard Error: 31_000 + .saturating_add((47_871_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(29 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -169,8 +168,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -193,8 +191,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - (43_125_836_000 as Weight) - .saturating_add(T::DbWeight::get().reads(32 as Weight)) + (44_583_474_000 as Weight) + .saturating_add(T::DbWeight::get().reads(31 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } } diff --git a/runtime/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index f75d30d079f4..a7ea36445bd8 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -157,24 +157,27 @@ parameter_types! { pub const AdvertisedXcmVersion: u32 = 2; } +/// Type to convert a council origin to a Plurality `MultiLocation` value. +pub type CouncilToPlurality = BackingToPlurality< + Origin, + pallet_collective::Origin, + CouncilBodyId, +>; + /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior location /// of this chain. pub type LocalOriginToLocation = ( // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality of the // `Unit` body. - BackingToPlurality< - Origin, - pallet_collective::Origin, - CouncilBodyId, - >, + CouncilToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type Event = Event; - // Not much use in sending XCM at this point. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; // == Deny All + // Only allow the council to send messages. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index c74f97653ee0..d83b98a977aa 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "rococo-runtime" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" build = "build.rs" [dependencies] parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.8.0" diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index 50cba9cb8206..947640a7c934 100644 --- a/runtime/rococo/constants/Cargo.toml +++ b/runtime/rococo/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-runtime-constants" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/rococo/constants/src/lib.rs b/runtime/rococo/constants/src/lib.rs index 180b2c726a48..5a39c3431e38 100644 --- a/runtime/rococo/constants/src/lib.rs +++ b/runtime/rococo/constants/src/lib.rs @@ -100,14 +100,14 @@ mod tests { fee::WeightToFee, }; use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFeePolynomial; + use frame_support::weights::WeightToFee as WeightToFeeT; use runtime_common::MAXIMUM_BLOCK_WEIGHT; #[test] // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. fn full_block_fee_is_correct() { // A full block should cost between 10 and 100 DOLLARS. - let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT); + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); assert!(full_block >= 10 * DOLLARS); assert!(full_block <= 100 * DOLLARS); } @@ -117,7 +117,7 @@ mod tests { fn extrinsic_base_fee_is_correct() { // `ExtrinsicBaseWeight` should cost 1/10 of a CENT println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::calc(&ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); let y = CENTS / 10; assert!(x.max(y) - x.min(y) < MILLICENTS); } diff --git a/runtime/rococo/constants/src/weights/block_weights.rs b/runtime/rococo/constants/src/weights/block_weights.rs index 83a949579cae..06fa0473057a 100644 --- a/runtime/rococo/constants/src/weights/block_weights.rs +++ b/runtime/rococo/constants/src/weights/block_weights.rs @@ -16,7 +16,8 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11 (Y/M/D) +//! DATE: 2022-06-20 (Y/M/D) +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -43,17 +44,17 @@ parameter_types! { /// Time to execute an empty block. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 3_744_634, 4_861_755 - /// Average: 3_868_923 - /// Median: 3_813_630 - /// Std-Dev: 218133.97 + /// Stats nanoseconds: + /// Min, Max: 4_046_459, 4_231_051 + /// Average: 4_082_928 + /// Median: 4_081_116 + /// Std-Dev: 35220.13 /// - /// Percentiles [NS]: - /// 99th: 4_820_671 - /// 95th: 4_303_283 - /// 75th: 3_852_252 - pub const BlockExecutionWeight: Weight = 3_868_923 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 4_184_187 + /// 95th: 4_156_894 + /// 75th: 4_097_529 + pub const BlockExecutionWeight: Weight = 4_082_928 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/rococo/constants/src/weights/extrinsic_weights.rs b/runtime/rococo/constants/src/weights/extrinsic_weights.rs index 104157381b9b..57886463b465 100644 --- a/runtime/rococo/constants/src/weights/extrinsic_weights.rs +++ b/runtime/rococo/constants/src/weights/extrinsic_weights.rs @@ -16,7 +16,7 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-03 (Y/M/D) +//! DATE: 2022-05-25 (Y/M/D) //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -25,7 +25,8 @@ // Executed Command: // ./target/production/polkadot -// benchmark-overhead +// benchmark +// overhead // --chain=rococo-dev // --execution=wasm // --wasm-execution=compiled @@ -42,17 +43,17 @@ parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 78_951, 81_171 - /// Average: 79_545 - /// Median: 79_348 - /// Std-Dev: 523.95 + /// Stats nanoseconds: + /// Min, Max: 77_945, 79_607 + /// Average: 78_269 + /// Median: 78_211 + /// Std-Dev: 259.27 /// - /// Percentiles [NS]: - /// 99th: 81_101 - /// 95th: 80_797 - /// 75th: 79_810 - pub const ExtrinsicBaseWeight: Weight = 79_545 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 79_591 + /// 95th: 78_730 + /// 75th: 78_272 + pub const ExtrinsicBaseWeight: Weight = 78_269 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/rococo/src/bridge_messages.rs b/runtime/rococo/src/bridge_messages.rs index 53f5b90f5dc3..5302768b84d3 100644 --- a/runtime/rococo/src/bridge_messages.rs +++ b/runtime/rococo/src/bridge_messages.rs @@ -34,7 +34,7 @@ use bridge_runtime_common::messages::{ }; use frame_support::{ traits::Get, - weights::{Weight, WeightToFeePolynomial}, + weights::{Weight, WeightToFee as WeightToFeeT}, RuntimeDebug, }; use rococo_runtime_constants::fee::WeightToFee; @@ -141,7 +141,7 @@ impl ThisChainWithMessages for RococoLikeChain { .base_extrinsic, crate::TransactionByteFee::get(), pallet_transaction_payment::Pallet::::next_fee_multiplier(), - |weight| WeightToFee::calc(&weight), + |weight| WeightToFee::weight_to_fee(&weight), transaction, ) } @@ -199,7 +199,7 @@ impl BridgedChainWithMessages for RococoLikeChain { .base_extrinsic, crate::TransactionByteFee::get(), pallet_transaction_payment::Pallet::::next_fee_multiplier(), - |weight| WeightToFee::calc(&weight), + |weight| WeightToFee::weight_to_fee(&weight), transaction, ) } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 9ae752fc6388..6011c14da4ef 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("rococo"), impl_name: create_runtime_str!("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 9220, + spec_version: 9250, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -459,6 +459,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -679,6 +680,7 @@ impl paras_registrar::Config for Runtime { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; + type MaxAuthorities = MaxAuthorities; } type MmrHash = ::Output; diff --git a/runtime/rococo/src/weights/frame_system.rs b/runtime/rococo/src/weights/frame_system.rs index 34fe129d135a..ded7115051c2 100644 --- a/runtime/rococo/src/weights/frame_system.rs +++ b/runtime/rococo/src/weights/frame_system.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/frame_system.rs @@ -44,11 +44,13 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -57,29 +59,32 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_341_000 as Weight) + (5_270_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((332_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((538_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((238_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((432_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((589_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 1_000 + .saturating_add((951_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/runtime/rococo/src/weights/pallet_balances.rs b/runtime/rococo/src/weights/pallet_balances.rs index 51077774df30..0f449641fde7 100644 --- a/runtime/rococo/src/weights/pallet_balances.rs +++ b/runtime/rococo/src/weights/pallet_balances.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_balances.rs @@ -46,43 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (33_946_000 as Weight) + (38_801_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (25_396_000 as Weight) + (29_992_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (16_179_000 as Weight) + (20_411_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (19_408_000 as Weight) + (23_461_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (34_494_000 as Weight) + (39_002_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (31_193_000 as Weight) + (35_960_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (14_898_000 as Weight) + (18_124_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_collective.rs b/runtime/rococo/src/weights/pallet_collective.rs index 2689e70487c5..e2c77e70f0be 100644 --- a/runtime/rococo/src/weights/pallet_collective.rs +++ b/runtime/rococo/src/weights/pallet_collective.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_collective.rs @@ -48,36 +48,43 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Proposals (r:1 w:0) // Storage: Collective Voting (r:100 w:100) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. + /// The range of component `n` is `[1, 100]`. + /// The range of component `p` is `[1, 100]`. fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 11_000 - .saturating_add((11_689_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 11_000 - .saturating_add((17_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 11_000 - .saturating_add((14_149_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 13_000 + .saturating_add((12_171_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 13_000 + .saturating_add((21_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 13_000 + .saturating_add((14_949_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } // Storage: Collective Members (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - (12_615_000 as Weight) + (16_747_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((33_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((38_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Collective Members (r:1 w:0) // Storage: Collective ProposalOf (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - (14_774_000 as Weight) + (19_211_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((62_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((66_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Collective Members (r:1 w:0) @@ -85,23 +92,27 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Proposals (r:1 w:1) // Storage: Collective ProposalCount (r:1 w:1) // Storage: Collective Voting (r:0 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (21_068_000 as Weight) + (26_174_000 as Weight) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 .saturating_add((39_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((137_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((142_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Collective Members (r:1 w:0) // Storage: Collective Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - (19_356_000 as Weight) + (24_215_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((92_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -109,12 +120,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Members (r:1 w:0) // Storage: Collective Proposals (r:1 w:1) // Storage: Collective ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (22_415_000 as Weight) + (27_539_000 as Weight) // Standard Error: 0 - .saturating_add((66_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((71_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -122,14 +135,17 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Members (r:1 w:0) // Storage: Collective ProposalOf (r:1 w:1) // Storage: Collective Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (31_366_000 as Weight) + (37_477_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((66_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((69_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((119_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((120_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -138,12 +154,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Prime (r:1 w:0) // Storage: Collective Proposals (r:1 w:1) // Storage: Collective ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - (24_976_000 as Weight) + (29_699_000 as Weight) // Standard Error: 0 - .saturating_add((67_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((73_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((114_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((122_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -152,24 +170,28 @@ impl pallet_collective::WeightInfo for WeightInfo { // Storage: Collective Prime (r:1 w:0) // Storage: Collective ProposalOf (r:1 w:1) // Storage: Collective Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (32_799_000 as Weight) + (39_441_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((69_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((70_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((121_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((127_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Collective Proposals (r:1 w:1) // Storage: Collective Voting (r:0 w:1) // Storage: Collective ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - (13_572_000 as Weight) + (18_354_000 as Weight) // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_im_online.rs b/runtime/rococo/src/weights/pallet_im_online.rs index 8239110b1622..678c0539a794 100644 --- a/runtime/rococo/src/weights/pallet_im_online.rs +++ b/runtime/rococo/src/weights/pallet_im_online.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_im_online.rs @@ -50,12 +50,14 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Storage: ImOnline AuthoredBlocks (r:1 w:0) // Storage: ImOnline Keys (r:1 w:0) // Storage: unknown [0x39e295d143ed41353167609a3d816584] (r:1 w:0) + /// The range of component `k` is `[1, 1000]`. + /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (71_164_000 as Weight) + (75_706_000 as Weight) // Standard Error: 0 - .saturating_add((66_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((70_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 3_000 - .saturating_add((316_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((327_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_indices.rs b/runtime/rococo/src/weights/pallet_indices.rs index 47b298e2c9c4..3d5042807e52 100644 --- a/runtime/rococo/src/weights/pallet_indices.rs +++ b/runtime/rococo/src/weights/pallet_indices.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_indices.rs @@ -46,33 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (19_394_000 as Weight) + (23_671_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (23_883_000 as Weight) + (28_638_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - (20_333_000 as Weight) + (24_638_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (20_452_000 as Weight) + (24_704_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - (22_797_000 as Weight) + (27_956_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_membership.rs b/runtime/rococo/src/weights/pallet_membership.rs index 85db4b58ef1a..7284fa38161d 100644 --- a/runtime/rococo/src/weights/pallet_membership.rs +++ b/runtime/rococo/src/weights/pallet_membership.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_membership.rs @@ -48,10 +48,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: Collective Proposals (r:1 w:0) // Storage: Collective Members (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - (12_686_000 as Weight) - // Standard Error: 1_000 - .saturating_add((60_000 as Weight).saturating_mul(m as Weight)) + (13_953_000 as Weight) + // Standard Error: 0 + .saturating_add((76_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -60,10 +61,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: Membership Prime (r:1 w:0) // Storage: Collective Members (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - (14_641_000 as Weight) + (15_902_000 as Weight) // Standard Error: 0 - .saturating_add((44_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((67_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -72,10 +74,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: Membership Prime (r:1 w:0) // Storage: Collective Members (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - (14_603_000 as Weight) + (15_835_000 as Weight) // Standard Error: 0 - .saturating_add((56_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((80_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -84,10 +87,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: Membership Prime (r:1 w:0) // Storage: Collective Members (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - (14_392_000 as Weight) + (15_606_000 as Weight) // Standard Error: 0 - .saturating_add((183_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((204_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -96,27 +100,30 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: Membership Prime (r:1 w:1) // Storage: Collective Members (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - (15_375_000 as Weight) + (16_562_000 as Weight) // Standard Error: 0 - .saturating_add((52_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((74_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Membership Members (r:1 w:0) // Storage: Membership Prime (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - (3_633_000 as Weight) + (3_884_000 as Weight) // Standard Error: 0 - .saturating_add((29_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((30_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Membership Prime (r:0 w:1) // Storage: Collective Prime (r:0 w:1) + /// The range of component `m` is `[1, 100]`. fn clear_prime(_m: u32, ) -> Weight { - (919_000 as Weight) + (975_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/rococo/src/weights/pallet_multisig.rs b/runtime/rococo/src/weights/pallet_multisig.rs index a31a2d253612..b5f97ec3ff91 100644 --- a/runtime/rococo/src/weights/pallet_multisig.rs +++ b/runtime/rococo/src/weights/pallet_multisig.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_multisig.rs @@ -44,17 +44,20 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (8_915_000 as Weight) + (14_662_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (24_976_000 as Weight) + (31_093_000 as Weight) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -63,20 +66,24 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (28_211_000 as Weight) - // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) + (35_044_000 as Weight) + // Standard Error: 1_000 + .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (16_175_000 as Weight) + (20_177_000 as Weight) // Standard Error: 0 - .saturating_add((96_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -84,10 +91,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (27_284_000 as Weight) + (32_376_000 as Weight) // Standard Error: 0 - .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -96,10 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (34_393_000 as Weight) + (41_899_000 as Weight) // Standard Error: 0 - .saturating_add((142_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((149_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -107,38 +118,42 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (25_335_000 as Weight) + (30_656_000 as Weight) // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (15_528_000 as Weight) + (19_647_000 as Weight) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (67_671_000 as Weight) + (74_780_000 as Weight) // Standard Error: 0 - .saturating_add((144_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((155_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (46_346_000 as Weight) + (52_380_000 as Weight) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_proxy.rs b/runtime/rococo/src/weights/pallet_proxy.rs index 2d654596a474..149c985541a5 100644 --- a/runtime/rococo/src/weights/pallet_proxy.rs +++ b/runtime/rococo/src/weights/pallet_proxy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_proxy.rs @@ -45,94 +45,110 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) + /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (12_968_000 as Weight) + (17_698_000 as Weight) // Standard Error: 1_000 - .saturating_add((74_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (26_979_000 as Weight) - // Standard Error: 7_000 - .saturating_add((217_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 7_000 - .saturating_add((80_000 as Weight).saturating_mul(p as Weight)) + (34_229_000 as Weight) + // Standard Error: 1_000 + .saturating_add((206_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 1_000 + .saturating_add((61_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) - fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (19_183_000 as Weight) - // Standard Error: 1_000 - .saturating_add((195_000 as Weight).saturating_mul(a as Weight)) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn remove_announcement(a: u32, p: u32, ) -> Weight { + (23_885_000 as Weight) + // Standard Error: 3_000 + .saturating_add((203_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 3_000 + .saturating_add((10_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - (18_720_000 as Weight) - // Standard Error: 3_000 - .saturating_add((205_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 3_000 - .saturating_add((6_000 as Weight).saturating_mul(p as Weight)) + (23_776_000 as Weight) + // Standard Error: 1_000 + .saturating_add((208_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((7_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (26_582_000 as Weight) - // Standard Error: 2_000 - .saturating_add((174_000 as Weight).saturating_mul(a as Weight)) + (30_620_000 as Weight) + // Standard Error: 1_000 + .saturating_add((208_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 2_000 - .saturating_add((61_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((68_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (21_026_000 as Weight) + (25_787_000 as Weight) // Standard Error: 2_000 - .saturating_add((129_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((122_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (20_934_000 as Weight) + (26_111_000 as Weight) // Standard Error: 2_000 .saturating_add((137_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (17_296_000 as Weight) - // Standard Error: 1_000 - .saturating_add((82_000 as Weight).saturating_mul(p as Weight)) + (22_290_000 as Weight) + // Standard Error: 2_000 + .saturating_add((86_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (23_346_000 as Weight) + (28_513_000 as Weight) // Standard Error: 2_000 - .saturating_add((41_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((30_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (18_342_000 as Weight) - // Standard Error: 2_000 - .saturating_add((84_000 as Weight).saturating_mul(p as Weight)) + (23_237_000 as Weight) + // Standard Error: 6_000 + .saturating_add((89_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/rococo/src/weights/pallet_timestamp.rs b/runtime/rococo/src/weights/pallet_timestamp.rs index 4ebea81fc33b..1d9123796b74 100644 --- a/runtime/rococo/src/weights/pallet_timestamp.rs +++ b/runtime/rococo/src/weights/pallet_timestamp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_timestamp.rs @@ -47,11 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - (4_681_000 as Weight) + (7_640_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (1_983_000 as Weight) + (2_171_000 as Weight) } } diff --git a/runtime/rococo/src/weights/pallet_utility.rs b/runtime/rococo/src/weights/pallet_utility.rs index 65985299d96b..652495c7ae98 100644 --- a/runtime/rococo/src/weights/pallet_utility.rs +++ b/runtime/rococo/src/weights/pallet_utility.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/pallet_utility.rs @@ -44,28 +44,28 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (9_005_000 as Weight) + (24_765_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_863_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_549_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_484_000 as Weight) + (5_754_000 as Weight) } - // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (12_096_000 as Weight) + (18_582_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_235_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((4_819_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (9_050_000 as Weight) + (12_715_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (8_905_000 as Weight) + (19_412_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_874_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_564_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/rococo/src/weights/runtime_common_auctions.rs b/runtime/rococo/src/weights/runtime_common_auctions.rs index b5dd194756f2..c5681f3727b6 100644 --- a/runtime/rococo/src/weights/runtime_common_auctions.rs +++ b/runtime/rococo/src/weights/runtime_common_auctions.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_common_auctions.rs @@ -47,7 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - (11_956_000 as Weight) + (15_046_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -59,7 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - (71_666_000 as Weight) + (72_126_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - (2_804_699_000 as Weight) + (2_921_640_000 as Weight) .saturating_add(T::DbWeight::get().reads(688 as Weight)) .saturating_add(T::DbWeight::get().writes(683 as Weight)) } @@ -85,7 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - (971_482_000 as Weight) + (1_213_336_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(673 as Weight)) } diff --git a/runtime/rococo/src/weights/runtime_common_crowdloan.rs b/runtime/rococo/src/weights/runtime_common_crowdloan.rs index c1c90c28fb15..fa986b445e64 100644 --- a/runtime/rococo/src/weights/runtime_common_crowdloan.rs +++ b/runtime/rococo/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_common_crowdloan.rs @@ -49,7 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - (42_737_000 as Weight) + (40_915_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (116_773_000 as Weight) + (111_901_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -69,15 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - (51_178_000 as Weight) + (50_377_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `k` is `[0, 500]`. fn refund(k: u32, ) -> Weight { - (30_444_000 as Weight) - // Standard Error: 11_000 - .saturating_add((17_722_000 as Weight).saturating_mul(k as Weight)) + (0 as Weight) + // Standard Error: 14_000 + .saturating_add((18_973_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -86,27 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - (33_274_000 as Weight) + (32_758_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - (22_712_000 as Weight) + (21_995_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - (28_974_000 as Weight) + (27_186_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - (22_430_000 as Weight) + (22_776_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -120,10 +121,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Auctions Winning (r:1 w:1) // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 18_000 - .saturating_add((49_092_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 21_000 + .saturating_add((50_159_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/rococo/src/weights/runtime_common_paras_registrar.rs b/runtime/rococo/src/weights/runtime_common_paras_registrar.rs index ab8144a879b8..55a54762441d 100644 --- a/runtime/rococo/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/rococo/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_common_paras_registrar.rs @@ -48,7 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - (24_009_000 as Weight) + (28_209_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -63,7 +63,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - (8_509_235_000 as Weight) + (8_909_398_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -78,7 +78,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - (8_472_595_000 as Weight) + (8_705_540_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -89,7 +89,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - (45_170_000 as Weight) + (43_260_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -101,7 +101,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - (35_387_000 as Weight) + (38_730_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/rococo/src/weights/runtime_common_slots.rs b/runtime/rococo/src/weights/runtime_common_slots.rs index 80e26827e9fb..c2830d87a670 100644 --- a/runtime/rococo/src/weights/runtime_common_slots.rs +++ b/runtime/rococo/src/weights/runtime_common_slots.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_common_slots.rs @@ -47,7 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (23_690_000 as Weight) + (27_821_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -57,12 +57,14 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((7_099_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 15_000 - .saturating_add((17_517_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 17_000 + .saturating_add((7_507_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 17_000 + .saturating_add((18_744_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -73,7 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (94_646_000 as Weight) + (96_571_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -83,7 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (23_111_000 as Weight) + (22_208_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_configuration.rs b/runtime/rococo/src/weights/runtime_parachains_configuration.rs index 65028370ce54..0f07def6edda 100644 --- a/runtime/rococo/src/weights/runtime_parachains_configuration.rs +++ b/runtime/rococo/src/weights/runtime_parachains_configuration.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_configuration.rs @@ -49,7 +49,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - (7_195_000 as Weight) + (9_883_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -58,7 +58,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - (7_082_000 as Weight) + (9_831_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -67,7 +67,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - (7_047_000 as Weight) + (9_926_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - (7_329_000 as Weight) + (9_990_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -89,7 +89,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - (7_312_000 as Weight) + (10_260_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_disputes.rs b/runtime/rococo/src/weights/runtime_parachains_disputes.rs index 912f32b82dca..2c89bd053695 100644 --- a/runtime/rococo/src/weights/runtime_parachains_disputes.rs +++ b/runtime/rococo/src/weights/runtime_parachains_disputes.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_disputes.rs @@ -46,7 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - (641_000 as Weight) + (3_277_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } } diff --git a/runtime/rococo/src/weights/runtime_parachains_hrmp.rs b/runtime/rococo/src/weights/runtime_parachains_hrmp.rs index 08910f031f1e..2cdbd75152b9 100644 --- a/runtime/rococo/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/rococo/src/weights/runtime_parachains_hrmp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_hrmp.rs @@ -54,7 +54,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - (31_167_000 as Weight) + (36_524_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } @@ -66,7 +66,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - (28_412_000 as Weight) + (33_668_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -77,7 +77,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - (27_020_000 as Weight) + (32_389_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -87,12 +87,14 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:0 w:1) // Storage: Hrmp HrmpChannelContents (r:0 w:127) // Storage: Hrmp HrmpOpenChannelRequestCount (r:0 w:1) + /// The range of component `i` is `[0, 127]`. + /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 13_000 - .saturating_add((8_620_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 13_000 - .saturating_add((8_771_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 16_000 + .saturating_add((9_981_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 16_000 + .saturating_add((10_024_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(e as Weight))) @@ -109,10 +111,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpChannels (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 23_000 - .saturating_add((20_641_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 25_000 + .saturating_add((23_217_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((7 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -124,10 +127,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:2 w:2) // Storage: Hrmp HrmpCloseChannelRequests (r:0 w:2) // Storage: Hrmp HrmpChannelContents (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 13_000 - .saturating_add((11_381_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 15_000 + .saturating_add((13_110_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -136,19 +140,21 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) + /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - (21_575_000 as Weight) + (26_803_000 as Weight) // Standard Error: 0 - .saturating_add((53_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((55_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) + /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 4_000 - .saturating_add((3_533_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 5_000 + .saturating_add((3_789_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/rococo/src/weights/runtime_parachains_initializer.rs b/runtime/rococo/src/weights/runtime_parachains_initializer.rs index 4d26aabaa708..d3a76b8a787f 100644 --- a/runtime/rococo/src/weights/runtime_parachains_initializer.rs +++ b/runtime/rococo/src/weights/runtime_parachains_initializer.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_initializer.rs @@ -45,8 +45,9 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_parachains::initializer::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) + /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - (2_843_000 as Weight) + (8_017_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/rococo/src/weights/runtime_parachains_paras.rs b/runtime/rococo/src/weights/runtime_parachains_paras.rs index cef237facd84..6b276c3ab8f5 100644 --- a/runtime/rococo/src/weights/runtime_parachains_paras.rs +++ b/runtime/rococo/src/weights/runtime_parachains_paras.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs @@ -50,6 +50,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PastCodePruning (r:1 w:1) // Storage: Paras PastCodeHash (r:0 w:1) // Storage: Paras CodeByHash (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -58,8 +59,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - (10_266_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -81,6 +83,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -91,8 +94,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras FutureCodeUpgrades (r:1 w:0) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - (11_286_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -101,12 +105,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - (19_246_000 as Weight) + (23_028_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Paras PvfActiveVoteMap (r:1 w:0) // Storage: Paras CodeByHash (r:1 w:1) + /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -117,7 +122,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - (2_656_000 as Weight) + (5_017_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -126,7 +131,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - (103_372_000 as Weight) + (106_381_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -139,7 +144,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - (680_563_000 as Weight) + (708_329_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(104 as Weight)) } @@ -153,7 +158,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - (591_308_000 as Weight) + (610_542_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(204 as Weight)) } @@ -164,7 +169,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - (546_722_000 as Weight) + (567_128_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -179,7 +184,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - (642_447_000 as Weight) + (664_965_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(304 as Weight)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_ump.rs b/runtime/rococo/src/weights/runtime_parachains_ump.rs index 3086c60908c7..0c10f2fd44a2 100644 --- a/runtime/rococo/src/weights/runtime_parachains_ump.rs +++ b/runtime/rococo/src/weights/runtime_parachains_ump.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs @@ -44,8 +44,9 @@ use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { + /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - (4_715_000 as Weight) + (6_500_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) } @@ -54,13 +55,13 @@ impl runtime_parachains::ump::WeightInfo for WeightInfo // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - (6_648_000 as Weight) + (6_868_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - (18_577_000 as Weight) + (22_158_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index 0961b7084816..a685736a63e9 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-test-runtime" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" build = "build.rs" @@ -10,7 +10,7 @@ bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.8.0" @@ -42,7 +42,6 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -109,7 +108,6 @@ std = [ "frame-executive/std", "pallet-grandpa/std", "pallet-indices/std", - "pallet-nicks/std", "pallet-offences/std", "sp-runtime/std", "sp-staking/std", diff --git a/runtime/test-runtime/constants/Cargo.toml b/runtime/test-runtime/constants/Cargo.toml index 6e0aeef7488a..cbf517b39bd4 100644 --- a/runtime/test-runtime/constants/Cargo.toml +++ b/runtime/test-runtime/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-runtime-constants" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 9311e90e7122..50cc531637cf 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -236,6 +236,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = CurrencyAdapter; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -669,7 +670,7 @@ construct_runtime! { Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Indices: pallet_indices::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, // Consensus support. Authorship: pallet_authorship::{Pallet, Call, Storage}, diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index 693027e01ed5..74b55a835b39 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-runtime" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" build = "build.rs" @@ -8,7 +8,7 @@ build = "build.rs" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.137", default-features = false } @@ -54,7 +54,6 @@ pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = " pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -140,7 +139,6 @@ std = [ "pallet-membership/std", "beefy-primitives/std", "pallet-multisig/std", - "pallet-nicks/std", "pallet-nomination-pools/std", "pallet-offences/std", "pallet-preimage/std", @@ -227,6 +225,7 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-balances/try-runtime", + "pallet-bags-list/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-collective/try-runtime", "pallet-elections-phragmen/try-runtime", @@ -238,7 +237,6 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", - "pallet-nicks/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", diff --git a/runtime/westend/constants/Cargo.toml b/runtime/westend/constants/Cargo.toml index 05e05c9b5b2d..019955698400 100644 --- a/runtime/westend/constants/Cargo.toml +++ b/runtime/westend/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-runtime-constants" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/runtime/westend/constants/src/lib.rs b/runtime/westend/constants/src/lib.rs index 1093dad220fc..247876e4ffd0 100644 --- a/runtime/westend/constants/src/lib.rs +++ b/runtime/westend/constants/src/lib.rs @@ -100,14 +100,14 @@ mod tests { fee::WeightToFee, }; use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFeePolynomial; + use frame_support::weights::WeightToFee as WeightToFeeT; use runtime_common::MAXIMUM_BLOCK_WEIGHT; #[test] // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. fn full_block_fee_is_correct() { // A full block should cost between 10 and 100 UNITS. - let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT); + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); assert!(full_block >= 10 * UNITS); assert!(full_block <= 100 * UNITS); } @@ -117,7 +117,7 @@ mod tests { fn extrinsic_base_fee_is_correct() { // `ExtrinsicBaseWeight` should cost 1/10 of a CENT println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::calc(&ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); let y = CENTS / 10; assert!(x.max(y) - x.min(y) < MILLICENTS); } diff --git a/runtime/westend/constants/src/weights/block_weights.rs b/runtime/westend/constants/src/weights/block_weights.rs index ac11d6cbcbac..afcbc74b06f1 100644 --- a/runtime/westend/constants/src/weights/block_weights.rs +++ b/runtime/westend/constants/src/weights/block_weights.rs @@ -16,7 +16,8 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12 (Y/M/D) +//! DATE: 2022-06-21 (Y/M/D) +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -43,17 +44,17 @@ parameter_types! { /// Time to execute an empty block. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 4_573_451, 4_754_631 - /// Average: 4_630_717 - /// Median: 4_621_633 - /// Std-Dev: 43625.6 + /// Stats nanoseconds: + /// Min, Max: 5_188_531, 5_436_303 + /// Average: 5_243_156 + /// Median: 5_238_065 + /// Std-Dev: 43468.21 /// - /// Percentiles [NS]: - /// 99th: 4_746_405 - /// 95th: 4_719_237 - /// 75th: 4_655_892 - pub const BlockExecutionWeight: Weight = 4_630_717 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 5_352_969 + /// 95th: 5_306_692 + /// 75th: 5_259_882 + pub const BlockExecutionWeight: Weight = 5_243_156 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/westend/constants/src/weights/extrinsic_weights.rs b/runtime/westend/constants/src/weights/extrinsic_weights.rs index 91431748d34b..1e5ba5515cf4 100644 --- a/runtime/westend/constants/src/weights/extrinsic_weights.rs +++ b/runtime/westend/constants/src/weights/extrinsic_weights.rs @@ -16,7 +16,7 @@ // limitations under the License. //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-21 (Y/M/D) +//! DATE: 2022-05-26 (Y/M/D) //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` @@ -43,17 +43,17 @@ parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 77_361, 78_466 - /// Average: 77_592 - /// Median: 77_522 - /// Std-Dev: 234.67 + /// Stats nanoseconds: + /// Min, Max: 78_822, 82_445 + /// Average: 79_088 + /// Median: 79_012 + /// Std-Dev: 422.84 /// - /// Percentiles [NS]: - /// 99th: 78_413 - /// 95th: 78_216 - /// 75th: 77_596 - pub const ExtrinsicBaseWeight: Weight = 77_592 * WEIGHT_PER_NANOS; + /// Percentiles nanoseconds: + /// 99th: 80_770 + /// 95th: 79_394 + /// 75th: 79_071 + pub const ExtrinsicBaseWeight: Weight = 79_088 * WEIGHT_PER_NANOS; } #[cfg(test)] diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index aff9c6b4b242..b7b5cd81e883 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -44,8 +44,8 @@ use primitives::v2::{ }; use runtime_common::{ assigned_slots, auctions, crowdloan, elections::OnChainAccuracy, impl_runtime_weights, - impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots, BlockHashCount, BlockLength, - CurrencyToVote, SlowAdjustingFeeUpdate, + impls::ToAuthor, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, + BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, }; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, @@ -105,7 +105,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("westend"), impl_name: create_runtime_str!("parity-westend"), authoring_version: 2, - spec_version: 9220, + spec_version: 9250, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -206,7 +206,10 @@ impl pallet_preimage::Config for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; + pub const EpochDuration: u64 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS as u64, + 2 * MINUTES as u64 + ); pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); @@ -279,6 +282,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -342,8 +346,14 @@ impl pallet_session::historical::Config for Runtime { parameter_types! { // phase durations. 1/4 of the last session for each. - pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; - pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; + pub SignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) + ); + pub UnsignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2) + ); // signed config pub const SignedMaxSubmissions: u32 = 128; @@ -466,10 +476,10 @@ pallet_staking_reward_curve::build! { parameter_types! { // Six sessions in an era (6 hours). pub const SessionsPerEra: SessionIndex = 6; - // 28 eras for unbonding (7 days). - pub const BondingDuration: sp_staking::EraIndex = 28; - // 27 eras in which slashes can be cancelled (slightly less than 7 days). - pub const SlashDeferDuration: sp_staking::EraIndex = 27; + // 2 eras for unbonding (12 hours). + pub const BondingDuration: sp_staking::EraIndex = 2; + // 1 era in which slashes can be cancelled (6 hours). + pub const SlashDeferDuration: sp_staking::EraIndex = 1; pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; pub const MaxNominatorRewardedPerValidator: u32 = 64; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); @@ -498,10 +508,10 @@ impl pallet_staking::Config for Runtime { type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::UnboundedExecution; - type VoterList = BagsList; + type VoterList = VoterList; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; - type OnStakerSlash = (); + type OnStakerSlash = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -792,7 +802,7 @@ impl InstanceFilter for ProxyType { Call::Crowdloan(..) | Call::Slots(..) | Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::BagsList(..) | + Call::VoterList(..) | Call::NominationPools(..) ), ProxyType::Staking => { @@ -1053,7 +1063,7 @@ construct_runtime! { Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 3, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 4, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 26, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 26, // Consensus support. // Authorship must be before session in order to note author in the correct session and era @@ -1098,7 +1108,7 @@ construct_runtime! { ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 24, // Provides a semi-sorted list of nominators for staking. - BagsList: pallet_bags_list::{Pallet, Call, Storage, Event} = 25, + VoterList: pallet_bags_list::{Pallet, Call, Storage, Event} = 25, // Nomination pools for staking. NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 29, @@ -1188,7 +1198,7 @@ mod benches { [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::ump, Ump] // Substrate - [pallet_bags_list, BagsList] + [pallet_bags_list, VoterList] [pallet_balances, Balances] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [frame_election_provider_support, ElectionProviderBench::] diff --git a/runtime/westend/src/weights/frame_election_provider_support.rs b/runtime/westend/src/weights/frame_election_provider_support.rs index c120057fe053..94b925bd92dc 100644 --- a/runtime/westend/src/weights/frame_election_provider_support.rs +++ b/runtime/westend/src/weights/frame_election_provider_support.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/frame_election_provider_support.rs @@ -44,18 +44,24 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. pub struct WeightInfo(PhantomData); impl frame_election_provider_support::WeightInfo for WeightInfo { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 49_000 - .saturating_add((19_266_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 6_878_000 - .saturating_add((3_111_337_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 50_000 + .saturating_add((19_195_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 7_058_000 + .saturating_add((3_085_869_000 as Weight).saturating_mul(d as Weight)) } + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 53_000 - .saturating_add((16_585_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 7_437_000 - .saturating_add((2_790_963_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 48_000 + .saturating_add((16_478_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 6_751_000 + .saturating_add((2_765_358_000 as Weight).saturating_mul(d as Weight)) } } diff --git a/runtime/westend/src/weights/frame_system.rs b/runtime/westend/src/weights/frame_system.rs index 41ea5341ca53..3890f0c9c9b5 100644 --- a/runtime/westend/src/weights/frame_system.rs +++ b/runtime/westend/src/weights/frame_system.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/frame_system.rs @@ -44,11 +44,13 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -57,29 +59,32 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_287_000 as Weight) + (9_641_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((334_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((536_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((238_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 1_000 + .saturating_add((433_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((595_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 1_000 + .saturating_add((947_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } diff --git a/runtime/westend/src/weights/pallet_bags_list.rs b/runtime/westend/src/weights/pallet_bags_list.rs index 1eb15e839814..3fd04d930c15 100644 --- a/runtime/westend/src/weights/pallet_bags_list.rs +++ b/runtime/westend/src/weights/pallet_bags_list.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_bags_list.rs @@ -46,29 +46,29 @@ pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:4 w:4) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList ListNodes (r:4 w:4) + // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - (39_981_000 as Weight) + (50_327_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - (39_802_000 as Weight) + (49_811_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } - // Storage: BagsList ListNodes (r:4 w:4) + // Storage: VoterList ListNodes (r:4 w:4) // Storage: Staking Bonded (r:2 w:0) // Storage: Staking Ledger (r:2 w:0) - // Storage: BagsList CounterForListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - (45_741_000 as Weight) + (52_179_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_balances.rs b/runtime/westend/src/weights/pallet_balances.rs index ae6f92daf587..426f9009e9d9 100644 --- a/runtime/westend/src/weights/pallet_balances.rs +++ b/runtime/westend/src/weights/pallet_balances.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_balances.rs @@ -46,43 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (33_386_000 as Weight) + (38_640_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (25_482_000 as Weight) + (30_110_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (15_488_000 as Weight) + (19_985_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (18_607_000 as Weight) + (22_920_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (33_893_000 as Weight) + (38_846_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (30_688_000 as Weight) + (35_218_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (14_150_000 as Weight) + (17_754_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs index 7abe76bdef04..d6a4dfe3e42d 100644 --- a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_election_provider_multi_phase.rs @@ -53,45 +53,47 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - (12_233_000 as Weight) + (12_660_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - (11_233_000 as Weight) + (11_613_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - (11_045_000 as Weight) + (11_704_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - (25_456_000 as Weight) + (25_918_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - (19_685_000 as Weight) + (19_962_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - (29_225_000 as Weight) + (0 as Weight) // Standard Error: 1_000 - .saturating_add((348_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 2_000 - .saturating_add((72_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((386_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 3_000 + .saturating_add((83_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -104,12 +106,14 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, d: u32, ) -> Weight { - (34_484_000 as Weight) + (81_616_000 as Weight) // Standard Error: 7_000 - .saturating_add((877_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((860_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 11_000 - .saturating_add((145_000 as Weight).saturating_mul(d as Weight)) + .saturating_add((52_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -120,7 +124,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - (57_373_000 as Weight) + (64_020_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -131,16 +135,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 5_000 - .saturating_add((990_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 10_000 - .saturating_add((43_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 17_000 - .saturating_add((8_266_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 26_000 - .saturating_add((1_785_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 6_000 + .saturating_add((1_196_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 13_000 + .saturating_add((76_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 22_000 + .saturating_add((7_951_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 34_000 + .saturating_add((1_632_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -148,16 +156,20 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `a` is `[500, 800]`. + /// The range of component `d` is `[200, 400]`. fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 3_000 - .saturating_add((932_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 7_000 - .saturating_add((21_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 11_000 - .saturating_add((6_044_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 17_000 - .saturating_add((1_373_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 4_000 + .saturating_add((1_178_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 9_000 + .saturating_add((66_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 15_000 + .saturating_add((5_783_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 22_000 + .saturating_add((1_371_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_identity.rs b/runtime/westend/src/weights/pallet_identity.rs index 1ceb371f34b9..d3eb3ce124e1 100644 --- a/runtime/westend/src/weights/pallet_identity.rs +++ b/runtime/westend/src/weights/pallet_identity.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_identity.rs @@ -45,30 +45,34 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - (11_939_000 as Weight) - // Standard Error: 3_000 - .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) + (15_643_000 as Weight) + // Standard Error: 4_000 + .saturating_add((211_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - (25_648_000 as Weight) + (29_261_000 as Weight) // Standard Error: 8_000 - .saturating_add((166_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((217_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((342_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((343_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - (22_151_000 as Weight) - // Standard Error: 4_000 - .saturating_add((2_747_000 as Weight).saturating_mul(s as Weight)) + (27_385_000 as Weight) + // Standard Error: 3_000 + .saturating_add((2_934_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -77,10 +81,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - (22_217_000 as Weight) + (27_126_000 as Weight) // Standard Error: 0 - .saturating_add((737_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((933_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) @@ -88,71 +93,83 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (27_466_000 as Weight) + (34_178_000 as Weight) // Standard Error: 9_000 - .saturating_add((88_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((60_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((725_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((928_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 1_000 - .saturating_add((219_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((214_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - (27_195_000 as Weight) - // Standard Error: 4_000 - .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) + (31_373_000 as Weight) + // Standard Error: 5_000 + .saturating_add((187_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 .saturating_add((400_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 20]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - (24_721_000 as Weight) + (28_981_000 as Weight) // Standard Error: 5_000 - .saturating_add((125_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((121_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((390_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((395_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - (4_647_000 as Weight) - // Standard Error: 2_000 - .saturating_add((150_000 as Weight).saturating_mul(r as Weight)) + (7_177_000 as Weight) + // Standard Error: 3_000 + .saturating_add((183_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - (4_454_000 as Weight) + (7_354_000 as Weight) // Standard Error: 2_000 - .saturating_add((146_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((172_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:1) + /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - (4_551_000 as Weight) - // Standard Error: 2_000 - .saturating_add((144_000 as Weight).saturating_mul(r as Weight)) + (7_190_000 as Weight) + // Standard Error: 3_000 + .saturating_add((186_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) + /// The range of component `r` is `[1, 19]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - (18_877_000 as Weight) - // Standard Error: 4_000 - .saturating_add((122_000 as Weight).saturating_mul(r as Weight)) + (22_231_000 as Weight) + // Standard Error: 5_000 + .saturating_add((132_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((395_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((400_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -160,14 +177,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (30_905_000 as Weight) - // Standard Error: 12_000 - .saturating_add((115_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((736_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 1_000 - .saturating_add((4_000 as Weight).saturating_mul(x as Weight)) + /// The range of component `r` is `[1, 20]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. + fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { + (38_841_000 as Weight) + // Standard Error: 21_000 + .saturating_add((72_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 2_000 + .saturating_add((927_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) @@ -175,38 +193,42 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - (29_779_000 as Weight) - // Standard Error: 1_000 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + (33_776_000 as Weight) + // Standard Error: 0 + .saturating_add((114_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - (9_009_000 as Weight) + (12_513_000 as Weight) // Standard Error: 0 - .saturating_add((21_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((27_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - (30_168_000 as Weight) + (34_936_000 as Weight) // Standard Error: 0 - .saturating_add((94_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - (19_897_000 as Weight) + (24_565_000 as Weight) // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_im_online.rs b/runtime/westend/src/weights/pallet_im_online.rs index 76028d2c142c..682447233176 100644 --- a/runtime/westend/src/weights/pallet_im_online.rs +++ b/runtime/westend/src/weights/pallet_im_online.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_im_online.rs @@ -49,12 +49,14 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) // Storage: ImOnline AuthoredBlocks (r:1 w:0) // Storage: ImOnline Keys (r:1 w:0) + /// The range of component `k` is `[1, 1000]`. + /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (69_510_000 as Weight) + (74_325_000 as Weight) // Standard Error: 0 - .saturating_add((65_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((72_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 3_000 - .saturating_add((319_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((316_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_indices.rs b/runtime/westend/src/weights/pallet_indices.rs index 81e00f258e19..c079929c86c6 100644 --- a/runtime/westend/src/weights/pallet_indices.rs +++ b/runtime/westend/src/weights/pallet_indices.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_indices.rs @@ -46,33 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (19_885_000 as Weight) + (23_516_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (24_502_000 as Weight) + (29_429_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - (20_457_000 as Weight) + (24_439_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (20_260_000 as Weight) + (24_228_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - (23_157_000 as Weight) + (27_516_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_multisig.rs b/runtime/westend/src/weights/pallet_multisig.rs index f2bfe3c90133..e7c606a94b8a 100644 --- a/runtime/westend/src/weights/pallet_multisig.rs +++ b/runtime/westend/src/weights/pallet_multisig.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_multisig.rs @@ -44,17 +44,20 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - (8_944_000 as Weight) + (14_540_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - (26_043_000 as Weight) + (31_144_000 as Weight) // Standard Error: 0 - .saturating_add((94_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -63,20 +66,24 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (27_893_000 as Weight) + (33_117_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((111_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (16_405_000 as Weight) + (20_666_000 as Weight) // Standard Error: 0 - .saturating_add((97_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -84,10 +91,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (27_446_000 as Weight) + (32_663_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((117_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -96,10 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (34_755_000 as Weight) + (40_456_000 as Weight) // Standard Error: 0 - .saturating_add((141_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((153_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -107,38 +118,42 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - (25_302_000 as Weight) + (30_652_000 as Weight) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - (15_689_000 as Weight) + (19_862_000 as Weight) // Standard Error: 0 - .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - (67_966_000 as Weight) + (74_360_000 as Weight) // Standard Error: 0 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((153_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) + /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - (46_641_000 as Weight) + (52_296_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((112_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_nomination_pools.rs b/runtime/westend/src/weights/pallet_nomination_pools.rs index e95f0353ed17..a2d755636cb1 100644 --- a/runtime/westend/src/weights/pallet_nomination_pools.rs +++ b/runtime/westend/src/weights/pallet_nomination_pools.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_nomination_pools.rs @@ -55,10 +55,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForPoolMembers (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn join() -> Weight { - (111_313_000 as Weight) + (117_158_000 as Weight) .saturating_add(T::DbWeight::get().reads(17 as Weight)) .saturating_add(T::DbWeight::get().writes(11 as Weight)) } @@ -69,10 +69,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_transfer() -> Weight { - (102_080_000 as Weight) + (109_131_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) } @@ -83,10 +83,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_reward() -> Weight { - (115_292_000 as Weight) + (118_267_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) } @@ -95,7 +95,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim_payout() -> Weight { - (45_950_000 as Weight) + (46_699_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -108,13 +108,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Nominators (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) // Storage: NominationPools SubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) fn unbond() -> Weight { - (107_255_000 as Weight) + (114_197_000 as Weight) .saturating_add(T::DbWeight::get().reads(18 as Weight)) .saturating_add(T::DbWeight::get().writes(13 as Weight)) } @@ -122,10 +122,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { - (36_495_000 as Weight) + (37_925_000 as Weight) // Standard Error: 0 - .saturating_add((31_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((32_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -137,10 +138,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - (73_895_000 as Weight) + (75_654_000 as Weight) // Standard Error: 0 - .saturating_add((36_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((38_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -163,8 +165,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - (129_094_000 as Weight) + /// The range of component `s` is `[0, 100]`. + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + (133_218_000 as Weight) + // Standard Error: 2_000 + .saturating_add((27_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(19 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } @@ -191,7 +196,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - (122_771_000 as Weight) + (125_904_000 as Weight) .saturating_add(T::DbWeight::get().reads(22 as Weight)) .saturating_add(T::DbWeight::get().writes(15 as Weight)) } @@ -203,14 +208,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) + /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - (42_238_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_104_000 as Weight).saturating_mul(n as Weight)) + (47_863_000 as Weight) + // Standard Error: 22_000 + .saturating_add((2_203_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(5 as Weight)) @@ -218,17 +224,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Ledger (r:1 w:0) fn set_state() -> Weight { - (20_632_000 as Weight) + (24_519_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: NominationPools BondedPools (r:1 w:0) // Storage: NominationPools Metadata (r:1 w:1) // Storage: NominationPools CounterForMetadata (r:1 w:1) + /// The range of component `n` is `[1, 256]`. fn set_metadata(n: u32, ) -> Weight { - (8_986_000 as Weight) + (12_782_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -238,13 +245,26 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinCreateBond (r:0 w:1) // Storage: NominationPools MaxPools (r:0 w:1) fn set_configs() -> Weight { - (2_487_000 as Weight) + (5_851_000 as Weight) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - (17_038_000 as Weight) + (20_228_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Ledger (r:1 w:0) + // Storage: Staking Validators (r:1 w:0) + // Storage: Staking Nominators (r:1 w:1) + // Storage: Staking CounterForNominators (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) + fn chill() -> Weight { + (45_288_000 as Weight) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } } diff --git a/runtime/westend/src/weights/pallet_preimage.rs b/runtime/westend/src/weights/pallet_preimage.rs index 3192a91c84dc..4a14e5819c19 100644 --- a/runtime/westend/src/weights/pallet_preimage.rs +++ b/runtime/westend/src/weights/pallet_preimage.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_preimage.rs @@ -46,6 +46,7 @@ pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -55,6 +56,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -64,6 +66,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) + /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -74,58 +77,58 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (37_944_000 as Weight) + (38_166_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (24_578_000 as Weight) + (25_588_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (36_010_000 as Weight) + (36_673_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (24_383_000 as Weight) + (24_803_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (12_997_000 as Weight) + (16_114_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (4_560_000 as Weight) + (7_659_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (24_407_000 as Weight) + (24_903_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (13_420_000 as Weight) + (17_022_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (4_224_000 as Weight) + (7_121_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_proxy.rs b/runtime/westend/src/weights/pallet_proxy.rs index eb4a159135b7..11699b40c624 100644 --- a/runtime/westend/src/weights/pallet_proxy.rs +++ b/runtime/westend/src/weights/pallet_proxy.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_proxy.rs @@ -45,92 +45,108 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) + /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - (13_190_000 as Weight) - // Standard Error: 1_000 - .saturating_add((76_000 as Weight).saturating_mul(p as Weight)) + (17_750_000 as Weight) + // Standard Error: 2_000 + .saturating_add((89_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - (28_359_000 as Weight) - // Standard Error: 1_000 - .saturating_add((194_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(p as Weight)) + (33_706_000 as Weight) + // Standard Error: 2_000 + .saturating_add((214_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 3_000 + .saturating_add((72_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) - fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (20_206_000 as Weight) - // Standard Error: 7_000 - .saturating_add((199_000 as Weight).saturating_mul(a as Weight)) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. + fn remove_announcement(a: u32, p: u32, ) -> Weight { + (23_747_000 as Weight) + // Standard Error: 1_000 + .saturating_add((196_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 1_000 + .saturating_add((6_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (19_543_000 as Weight) + (23_845_000 as Weight) // Standard Error: 1_000 - .saturating_add((191_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `a` is `[0, 31]`. + /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - (26_197_000 as Weight) - // Standard Error: 1_000 - .saturating_add((199_000 as Weight).saturating_mul(a as Weight)) + (30_730_000 as Weight) // Standard Error: 1_000 - .saturating_add((53_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((62_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - (21_371_000 as Weight) + (25_994_000 as Weight) // Standard Error: 2_000 - .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - (21_155_000 as Weight) + (26_061_000 as Weight) // Standard Error: 2_000 - .saturating_add((139_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((133_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - (17_550_000 as Weight) - // Standard Error: 1_000 - .saturating_add((81_000 as Weight).saturating_mul(p as Weight)) + (22_107_000 as Weight) + // Standard Error: 2_000 + .saturating_add((85_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[1, 31]`. fn anonymous(p: u32, ) -> Weight { - (23_757_000 as Weight) + (28_375_000 as Weight) // Standard Error: 2_000 - .saturating_add((36_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((34_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Proxy Proxies (r:1 w:1) + /// The range of component `p` is `[0, 30]`. fn kill_anonymous(p: u32, ) -> Weight { - (18_489_000 as Weight) - // Standard Error: 1_000 - .saturating_add((78_000 as Weight).saturating_mul(p as Weight)) + (22_875_000 as Weight) + // Standard Error: 2_000 + .saturating_add((83_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_scheduler.rs b/runtime/westend/src/weights/pallet_scheduler.rs index 7a16009b8e7d..730953580938 100644 --- a/runtime/westend/src/weights/pallet_scheduler.rs +++ b/runtime/westend/src/weights/pallet_scheduler.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_scheduler.rs @@ -48,10 +48,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (431_000 as Weight) - // Standard Error: 28_000 - .saturating_add((24_245_000 as Weight).saturating_mul(s as Weight)) + (5_079_000 as Weight) + // Standard Error: 33_000 + .saturating_add((26_738_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -61,10 +62,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_resolved(s: u32, ) -> Weight { - (2_260_000 as Weight) - // Standard Error: 28_000 - .saturating_add((19_666_000 as Weight).saturating_mul(s as Weight)) + (5_021_000 as Weight) + // Standard Error: 24_000 + .saturating_add((21_541_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -73,10 +75,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (1_271_000 as Weight) - // Standard Error: 28_000 - .saturating_add((22_074_000 as Weight).saturating_mul(s as Weight)) + (392_000 as Weight) + // Standard Error: 33_000 + .saturating_add((24_462_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -85,10 +88,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_resolved(s: u32, ) -> Weight { - (2_194_000 as Weight) - // Standard Error: 25_000 - .saturating_add((18_605_000 as Weight).saturating_mul(s as Weight)) + (1_755_000 as Weight) + // Standard Error: 76_000 + .saturating_add((20_919_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -97,10 +101,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named_aborted(s: u32, ) -> Weight { - (5_435_000 as Weight) - // Standard Error: 12_000 - .saturating_add((9_038_000 as Weight).saturating_mul(s as Weight)) + (5_824_000 as Weight) + // Standard Error: 14_000 + .saturating_add((9_198_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -108,30 +113,33 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) + /// The range of component `s` is `[1, 50]`. fn on_initialize_aborted(s: u32, ) -> Weight { - (6_074_000 as Weight) + (6_226_000 as Weight) // Standard Error: 13_000 - .saturating_add((7_030_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((7_188_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named(s: u32, ) -> Weight { - (4_629_000 as Weight) - // Standard Error: 30_000 - .saturating_add((14_643_000 as Weight).saturating_mul(s as Weight)) + (10_112_000 as Weight) + // Standard Error: 24_000 + .saturating_add((16_279_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:2 w:2) + /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic(s: u32, ) -> Weight { - (9_115_000 as Weight) - // Standard Error: 16_000 - .saturating_add((12_338_000 as Weight).saturating_mul(s as Weight)) + (10_797_000 as Weight) + // Standard Error: 20_000 + .saturating_add((14_070_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -139,54 +147,60 @@ impl pallet_scheduler::WeightInfo for WeightInfo { } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize_named(s: u32, ) -> Weight { - (9_414_000 as Weight) - // Standard Error: 13_000 - .saturating_add((10_060_000 as Weight).saturating_mul(s as Weight)) + (12_340_000 as Weight) + // Standard Error: 15_000 + .saturating_add((11_422_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn on_initialize(s: u32, ) -> Weight { - (8_757_000 as Weight) - // Standard Error: 41_000 - .saturating_add((9_383_000 as Weight).saturating_mul(s as Weight)) + (11_674_000 as Weight) + // Standard Error: 21_000 + .saturating_add((10_610_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule(s: u32, ) -> Weight { - (15_418_000 as Weight) + (19_589_000 as Weight) // Standard Error: 1_000 - .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((44_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - (14_605_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_016_000 as Weight).saturating_mul(s as Weight)) + (19_165_000 as Weight) + // Standard Error: 6_000 + .saturating_add((2_009_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[0, 50]`. fn schedule_named(s: u32, ) -> Weight { - (17_857_000 as Weight) + (22_693_000 as Weight) // Standard Error: 1_000 - .saturating_add((57_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((59_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) + /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - (15_617_000 as Weight) + (20_523_000 as Weight) // Standard Error: 5_000 - .saturating_add((2_025_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_019_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_session.rs b/runtime/westend/src/weights/pallet_session.rs index 3437bf93647d..ab5fde6a5708 100644 --- a/runtime/westend/src/weights/pallet_session.rs +++ b/runtime/westend/src/weights/pallet_session.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_session.rs @@ -48,7 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - (37_469_000 as Weight) + (42_620_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -56,7 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - (22_220_000 as Weight) + (27_707_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_staking.rs b/runtime/westend/src/weights/pallet_staking.rs index de0e46ea5bb2..b7dd3b4483c6 100644 --- a/runtime/westend/src/weights/pallet_staking.rs +++ b/runtime/westend/src/weights/pallet_staking.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_staking.rs @@ -51,17 +51,17 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - (33_921_000 as Weight) + (40_402_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListNodes (r:3 w:3) + // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - (58_031_000 as Weight) + (69_642_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -71,11 +71,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - (64_065_000 as Weight) + (75_312_000 as Weight) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -83,10 +83,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - (26_819_000 as Weight) + (31_967_000 as Weight) // Standard Error: 0 - .saturating_add((27_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((28_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -97,16 +98,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) - fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (52_826_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) + /// The range of component `s` is `[0, 100]`. + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { + (60_159_000 as Weight) .saturating_add(T::DbWeight::get().reads(13 as Weight)) .saturating_add(T::DbWeight::get().writes(11 as Weight)) } @@ -117,21 +117,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxValidatorsCount (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:1 w:1) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - (43_035_000 as Weight) + (49_209_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) + /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - (8_732_000 as Weight) - // Standard Error: 6_000 - .saturating_add((7_909_000 as Weight).saturating_mul(k as Weight)) + (12_133_000 as Weight) + // Standard Error: 8_000 + .saturating_add((8_437_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) @@ -143,14 +144,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) + /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - (45_309_000 as Weight) - // Standard Error: 13_000 - .saturating_add((3_051_000 as Weight).saturating_mul(n as Weight)) + (52_313_000 as Weight) + // Standard Error: 21_000 + .saturating_add((3_140_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(6 as Weight)) @@ -159,51 +161,52 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - (38_763_000 as Weight) + (46_301_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - (6_540_000 as Weight) + (9_804_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - (13_360_000 as Weight) + (17_817_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - (974_000 as Weight) + (3_652_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - (1_073_000 as Weight) + (3_644_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - (1_077_000 as Weight) + (3_731_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - (1_126_000 as Weight) + (3_807_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Staking Invulnerables (r:0 w:1) + /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - (1_050_000 as Weight) + (4_207_000 as Weight) // Standard Error: 0 .saturating_add((10_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -213,27 +216,29 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Ledger (r:0 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:2) + /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - (49_899_000 as Weight) + (57_937_000 as Weight) // Standard Error: 1_000 - .saturating_add((721_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((898_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Staking UnappliedSlashes (r:1 w:1) + /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - (2_722_142_000 as Weight) - // Standard Error: 179_000 - .saturating_add((16_226_000 as Weight).saturating_mul(s as Weight)) + (2_753_430_000 as Weight) + // Standard Error: 182_000 + .saturating_add((16_187_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -247,10 +252,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasValidatorPrefs (r:1 w:0) // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 64]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (65_603_000 as Weight) - // Standard Error: 18_000 - .saturating_add((23_268_000 as Weight).saturating_mul(n as Weight)) + (73_629_000 as Weight) + // Standard Error: 21_000 + .saturating_add((24_546_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -267,10 +273,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Payee (r:2 w:0) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 64]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (77_169_000 as Weight) - // Standard Error: 26_000 - .saturating_add((30_649_000 as Weight).saturating_mul(n as Weight)) + (87_109_000 as Weight) + // Standard Error: 32_000 + .saturating_add((32_533_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) @@ -279,13 +286,14 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) - // Storage: BagsList ListNodes (r:3 w:3) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: Staking Bonded (r:1 w:0) - // Storage: BagsList ListBags (r:2 w:2) + // Storage: VoterList ListBags (r:2 w:2) + /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - (57_441_000 as Weight) - // Standard Error: 3_000 - .saturating_add((50_000 as Weight).saturating_mul(l as Weight)) + (69_491_000 as Weight) + // Standard Error: 4_000 + .saturating_add((42_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } @@ -298,10 +306,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:2) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `e` is `[1, 100]`. fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 53_000 - .saturating_add((18_639_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 61_000 + .saturating_add((21_881_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) @@ -313,24 +322,25 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) // Storage: Staking SpanSlash (r:0 w:1) + /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - (55_919_000 as Weight) - // Standard Error: 0 - .saturating_add((714_000 as Weight).saturating_mul(s as Weight)) + (64_137_000 as Weight) + // Standard Error: 1_000 + .saturating_add((915_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().writes(12 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: BagsList ListBags (r:178 w:0) - // Storage: BagsList ListNodes (r:101 w:0) + // Storage: VoterList ListBags (r:178 w:0) + // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking Bonded (r:101 w:0) @@ -346,35 +356,40 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// The range of component `v` is `[1, 10]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 807_000 - .saturating_add((236_727_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 40_000 - .saturating_add((32_735_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 913_000 + .saturating_add((228_026_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 45_000 + .saturating_add((33_002_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(187 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } - // Storage: BagsList CounterForListNodes (r:1 w:0) + // Storage: VoterList CounterForListNodes (r:1 w:0) // Storage: Staking SlashingSpans (r:21 w:0) - // Storage: BagsList ListBags (r:178 w:0) - // Storage: BagsList ListNodes (r:1500 w:0) + // Storage: VoterList ListBags (r:178 w:0) + // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) // Storage: Staking Validators (r:500 w:0) // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. + /// The range of component `n` is `[500, 1000]`. + /// The range of component `s` is `[1, 20]`. fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 85_000 - .saturating_add((23_692_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 85_000 - .saturating_add((21_845_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 2_909_000 - .saturating_add((31_618_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 110_000 + .saturating_add((24_976_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 110_000 + .saturating_add((22_817_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_771_000 + .saturating_add((46_293_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(181 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) @@ -383,10 +398,11 @@ impl pallet_staking::WeightInfo for WeightInfo { } // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) + /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 30_000 - .saturating_add((6_958_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 35_000 + .saturating_add((7_560_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -398,7 +414,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - (2_997_000 as Weight) + (6_343_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:0 w:1) @@ -408,7 +424,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - (2_729_000 as Weight) + (6_135_000 as Weight) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking Ledger (r:1 w:0) @@ -418,18 +434,18 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Validators (r:1 w:0) - // Storage: BagsList ListNodes (r:2 w:2) - // Storage: BagsList ListBags (r:1 w:1) - // Storage: BagsList CounterForListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) + // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - (48_848_000 as Weight) + (54_562_000 as Weight) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - (7_072_000 as Weight) + (10_832_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_timestamp.rs b/runtime/westend/src/weights/pallet_timestamp.rs index b4eaa909ab5f..dd260a61ae9c 100644 --- a/runtime/westend/src/weights/pallet_timestamp.rs +++ b/runtime/westend/src/weights/pallet_timestamp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_timestamp.rs @@ -47,11 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - (5_169_000 as Weight) + (7_625_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_106_000 as Weight) + (2_077_000 as Weight) } } diff --git a/runtime/westend/src/weights/pallet_utility.rs b/runtime/westend/src/weights/pallet_utility.rs index aead8700aa58..c702916e139c 100644 --- a/runtime/westend/src/weights/pallet_utility.rs +++ b/runtime/westend/src/weights/pallet_utility.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_utility.rs @@ -44,25 +44,28 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (5_214_000 as Weight) + (13_464_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_845_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_505_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_487_000 as Weight) + (5_859_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (12_039_000 as Weight) + (17_829_000 as Weight) // Standard Error: 2_000 - .saturating_add((4_189_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_760_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (8_809_000 as Weight) + (12_995_000 as Weight) } + /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (10_307_000 as Weight) + (16_571_000 as Weight) // Standard Error: 2_000 - .saturating_add((3_829_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((4_485_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index 6f41f4e0b7e0..29075145a4d2 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/pallet_vesting.rs @@ -46,95 +46,111 @@ pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - (24_158_000 as Weight) + (28_303_000 as Weight) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((88_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 1_000 - .saturating_add((163_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((180_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (24_470_000 as Weight) - // Standard Error: 0 - .saturating_add((74_000 as Weight).saturating_mul(l as Weight)) + (28_538_000 as Weight) // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((81_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (23_979_000 as Weight) + (28_809_000 as Weight) // Standard Error: 0 - .saturating_add((84_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((88_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 1_000 - .saturating_add((162_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((177_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (24_204_000 as Weight) - // Standard Error: 0 - .saturating_add((71_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(s as Weight)) + (29_211_000 as Weight) + // Standard Error: 2_000 + .saturating_add((70_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((158_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - (39_204_000 as Weight) + (43_405_000 as Weight) // Standard Error: 2_000 - .saturating_add((67_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 5_000 - .saturating_add((149_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((83_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((155_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - (38_097_000 as Weight) + (43_355_000 as Weight) // Standard Error: 2_000 - .saturating_add((86_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 5_000 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((83_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((171_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (25_246_000 as Weight) + (29_633_000 as Weight) // Standard Error: 1_000 - .saturating_add((79_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(l as Weight)) // Standard Error: 2_000 - .saturating_add((164_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((182_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Vesting Vesting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (24_907_000 as Weight) + (29_219_000 as Weight) // Standard Error: 0 - .saturating_add((82_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 1_000 - .saturating_add((169_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 2_000 + .saturating_add((189_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_auctions.rs b/runtime/westend/src/weights/runtime_common_auctions.rs index c332c4bb3f21..d9f7465293d4 100644 --- a/runtime/westend/src/weights/runtime_common_auctions.rs +++ b/runtime/westend/src/weights/runtime_common_auctions.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_common_auctions.rs @@ -47,7 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - (11_896_000 as Weight) + (14_815_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -59,7 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - (71_470_000 as Weight) + (70_989_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - (14_346_199_000 as Weight) + (15_372_729_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } @@ -85,7 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - (3_001_142_000 as Weight) + (4_568_902_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_crowdloan.rs b/runtime/westend/src/weights/runtime_common_crowdloan.rs index f80a972fb14b..9cf7a3afa035 100644 --- a/runtime/westend/src/weights/runtime_common_crowdloan.rs +++ b/runtime/westend/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs @@ -49,7 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - (44_707_000 as Weight) + (41_935_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -61,7 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (117_630_000 as Weight) + (110_841_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -69,15 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - (51_402_000 as Weight) + (50_027_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `k` is `[0, 500]`. fn refund(k: u32, ) -> Weight { - (25_657_000 as Weight) - // Standard Error: 12_000 - .saturating_add((17_803_000 as Weight).saturating_mul(k as Weight)) + (0 as Weight) + // Standard Error: 13_000 + .saturating_add((18_916_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -86,27 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - (34_117_000 as Weight) + (31_833_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - (22_554_000 as Weight) + (21_680_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - (29_524_000 as Weight) + (26_914_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - (23_142_000 as Weight) + (22_808_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -120,10 +121,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Auctions Winning (r:1 w:1) // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 22_000 - .saturating_add((49_234_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 23_000 + .saturating_add((49_926_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/westend/src/weights/runtime_common_paras_registrar.rs b/runtime/westend/src/weights/runtime_common_paras_registrar.rs index 6290d220e31e..5313f608d956 100644 --- a/runtime/westend/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/westend/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs @@ -48,7 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - (24_025_000 as Weight) + (29_017_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -62,7 +62,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - (8_501_187_000 as Weight) + (8_644_247_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -76,7 +76,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - (8_485_348_000 as Weight) + (8_668_583_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } @@ -87,7 +87,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - (45_544_000 as Weight) + (43_308_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -99,7 +99,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - (36_518_000 as Weight) + (37_977_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_slots.rs b/runtime/westend/src/weights/runtime_common_slots.rs index ea801c6736e3..17f2133d08b3 100644 --- a/runtime/westend/src/weights/runtime_common_slots.rs +++ b/runtime/westend/src/weights/runtime_common_slots.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_common_slots.rs @@ -47,7 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (23_842_000 as Weight) + (28_087_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -57,12 +57,14 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((7_108_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 15_000 - .saturating_add((17_597_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 18_000 + .saturating_add((7_361_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 18_000 + .saturating_add((18_358_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -73,7 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (93_627_000 as Weight) + (95_047_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } @@ -83,7 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (23_174_000 as Weight) + (22_456_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_parachains_configuration.rs b/runtime/westend/src/weights/runtime_parachains_configuration.rs index 13dc040b6840..466555032839 100644 --- a/runtime/westend/src/weights/runtime_parachains_configuration.rs +++ b/runtime/westend/src/weights/runtime_parachains_configuration.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_configuration.rs @@ -48,7 +48,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - (6_667_000 as Weight) + (9_382_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -56,7 +56,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - (6_652_000 as Weight) + (9_379_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -64,7 +64,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - (6_617_000 as Weight) + (9_124_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -72,7 +72,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - (6_829_000 as Weight) + (9_448_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -84,7 +84,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - (6_777_000 as Weight) + (9_722_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_parachains_disputes.rs b/runtime/westend/src/weights/runtime_parachains_disputes.rs index 77e8e9c6d80f..a60b82540eb5 100644 --- a/runtime/westend/src/weights/runtime_parachains_disputes.rs +++ b/runtime/westend/src/weights/runtime_parachains_disputes.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_disputes.rs @@ -46,7 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - (717_000 as Weight) + (3_482_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } } diff --git a/runtime/westend/src/weights/runtime_parachains_hrmp.rs b/runtime/westend/src/weights/runtime_parachains_hrmp.rs index deab05f57a70..7835e85c33c4 100644 --- a/runtime/westend/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/westend/src/weights/runtime_parachains_hrmp.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs @@ -53,7 +53,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - (31_047_000 as Weight) + (37_029_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } @@ -64,7 +64,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - (28_387_000 as Weight) + (32_796_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -74,7 +74,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - (27_123_000 as Weight) + (32_600_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -84,12 +84,14 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:0 w:1) // Storage: Hrmp HrmpChannelContents (r:0 w:127) // Storage: Hrmp HrmpOpenChannelRequestCount (r:0 w:1) + /// The range of component `i` is `[0, 127]`. + /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((8_774_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 15_000 - .saturating_add((8_792_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 17_000 + .saturating_add((9_716_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 17_000 + .saturating_add((9_742_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(e as Weight))) @@ -105,10 +107,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpChannels (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 24_000 - .saturating_add((20_669_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 25_000 + .saturating_add((22_960_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((7 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -120,10 +123,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:2 w:2) // Storage: Hrmp HrmpCloseChannelRequests (r:0 w:2) // Storage: Hrmp HrmpChannelContents (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 14_000 - .saturating_add((11_431_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 17_000 + .saturating_add((12_958_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -132,19 +136,21 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) + /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - (22_017_000 as Weight) - // Standard Error: 0 - .saturating_add((53_000 as Weight).saturating_mul(c as Weight)) + (26_431_000 as Weight) + // Standard Error: 1_000 + .saturating_add((58_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) + /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 5_000 - .saturating_add((3_652_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_671_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/westend/src/weights/runtime_parachains_initializer.rs b/runtime/westend/src/weights/runtime_parachains_initializer.rs index af623bf53ef4..5d5d921edbbc 100644 --- a/runtime/westend/src/weights/runtime_parachains_initializer.rs +++ b/runtime/westend/src/weights/runtime_parachains_initializer.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_initializer.rs @@ -45,8 +45,9 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_parachains::initializer::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) + /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - (2_780_000 as Weight) + (5_995_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/westend/src/weights/runtime_parachains_paras.rs b/runtime/westend/src/weights/runtime_parachains_paras.rs index 89e83a662896..100a62101f4c 100644 --- a/runtime/westend/src/weights/runtime_parachains_paras.rs +++ b/runtime/westend/src/weights/runtime_parachains_paras.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_paras.rs @@ -50,6 +50,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PastCodePruning (r:1 w:1) // Storage: Paras PastCodeHash (r:0 w:1) // Storage: Paras CodeByHash (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -58,8 +59,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - (5_485_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -80,6 +82,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -90,8 +93,9 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras FutureCodeUpgrades (r:1 w:0) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - (12_715_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -100,12 +104,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - (18_466_000 as Weight) + (22_009_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Paras PvfActiveVoteMap (r:1 w:0) // Storage: Paras CodeByHash (r:1 w:1) + /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 @@ -116,7 +121,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - (2_707_000 as Weight) + (5_070_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -124,7 +129,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - (103_130_000 as Weight) + (104_756_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -136,7 +141,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - (701_327_000 as Weight) + (697_953_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(104 as Weight)) } @@ -149,7 +154,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - (602_680_000 as Weight) + (601_352_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(204 as Weight)) } @@ -159,7 +164,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - (561_433_000 as Weight) + (561_928_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -173,7 +178,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - (651_409_000 as Weight) + (662_113_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(304 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs b/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs index 5841023c6070..3dc69108f3ea 100644 --- a/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs @@ -58,8 +58,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParasShared ActiveValidatorKeys (r:1 w:0) // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -75,11 +74,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - (405_470_000 as Weight) - // Standard Error: 15_000 - .saturating_add((48_167_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(29 as Weight)) + (419_358_000 as Weight) + // Standard Error: 16_000 + .saturating_add((48_388_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(28 as Weight)) .saturating_add(T::DbWeight::get().writes(18 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -92,8 +92,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -113,8 +112,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - (391_179_000 as Weight) - .saturating_add(T::DbWeight::get().reads(26 as Weight)) + (397_954_000 as Weight) + .saturating_add(T::DbWeight::get().reads(25 as Weight)) .saturating_add(T::DbWeight::get().writes(17 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -127,8 +126,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -148,11 +146,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - (1_044_937_000 as Weight) - // Standard Error: 31_000 - .saturating_add((47_734_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(29 as Weight)) + (1_062_327_000 as Weight) + // Standard Error: 32_000 + .saturating_add((48_307_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(28 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } // Storage: ParaInherent Included (r:1 w:1) @@ -165,8 +164,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: ParasShared ActiveValidatorIndices (r:1 w:0) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -189,8 +187,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - (43_274_163_000 as Weight) - .saturating_add(T::DbWeight::get().reads(31 as Weight)) + (44_307_445_000 as Weight) + .saturating_add(T::DbWeight::get().reads(30 as Weight)) .saturating_add(T::DbWeight::get().writes(16 as Weight)) } } diff --git a/runtime/westend/src/weights/runtime_parachains_ump.rs b/runtime/westend/src/weights/runtime_parachains_ump.rs index 74036b753a32..e0b16f16d71c 100644 --- a/runtime/westend/src/weights/runtime_parachains_ump.rs +++ b/runtime/westend/src/weights/runtime_parachains_ump.rs @@ -16,7 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -30,7 +31,6 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_ump.rs @@ -44,8 +44,9 @@ use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { + /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - (5_119_000 as Weight) + (5_040_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) } @@ -54,13 +55,13 @@ impl runtime_parachains::ump::WeightInfo for WeightInfo // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - (6_506_000 as Weight) + (6_946_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - (18_544_000 as Weight) + (22_325_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index cbe0ed31f5cd..cb1d382980b4 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -38,7 +38,8 @@ use xcm_builder::{ parameter_types! { pub const WndLocation: MultiLocation = Here.into(); pub const Ancestry: MultiLocation = Here.into(); - pub WestendNetwork: NetworkId = NetworkId::Named(b"Westend".to_vec()); + pub WestendNetwork: NetworkId = + NetworkId::Named(b"Westend".to_vec().try_into().expect("shorter than length limit; qed")); pub CheckAccount: AccountId = XcmPallet::check_account(); } diff --git a/scripts/ci/changelog/templates/change.md.tera b/scripts/ci/changelog/templates/change.md.tera index a3d5331385ff..432b93eb687d 100644 --- a/scripts/ci/changelog/templates/change.md.tera +++ b/scripts/ci/changelog/templates/change.md.tera @@ -38,5 +38,5 @@ {%- else -%} {%- set xcm = "" -%} {%- endif -%} -{{- repo }} {{ audit }}[`#{{c.number}}`]({{c.html_url}}) {{- prio }} - {{ c.title | capitalize | truncate(length=60, end="…") }}{{xcm }} +{{- repo }} {{ audit }}[`#{{c.number}}`]({{c.html_url}}) {{- prio }} - {{ c.title | capitalize | truncate(length=120, end="…") }}{{xcm }} {%- endmacro change -%} diff --git a/scripts/ci/changelog/templates/runtime.md.tera b/scripts/ci/changelog/templates/runtime.md.tera index 85ea9cfb8369..23b589da915f 100644 --- a/scripts/ci/changelog/templates/runtime.md.tera +++ b/scripts/ci/changelog/templates/runtime.md.tera @@ -22,7 +22,7 @@ 🎁 Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} 🗳️ system.setCode hash: {{ runtime.data.runtimes.compressed.subwasm.proposal_hash }} 🗳️ authorizeUpgrade hash: {{ runtime.data.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash }} -#️⃣ Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} +🗳️ Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} 📦 IPFS: {{ runtime.data.runtimes.compressed.subwasm.ipfs_hash }} ``` {%- endmacro runtime %} \ No newline at end of file diff --git a/scripts/ci/github/check-rel-br b/scripts/ci/github/check-rel-br new file mode 100755 index 000000000000..5efebeea3136 --- /dev/null +++ b/scripts/ci/github/check-rel-br @@ -0,0 +1,127 @@ +#!/usr/bin/env bash + +# This script helps running sanity checks on a release branch +# It is intended to be ran from the repo and from the release branch + +# NOTE: The diener runs do take time and are not really required because +# if we missed the diener runs, the Cargo.lock that we check won't pass +# the tests. See https://github.com/bkchr/diener/issues/17 + +grv=$(git remote --verbose | grep push) +export RUST_LOG=none +REPO=$(echo "$grv" | cut -d ' ' -f1 | cut -d$'\t' -f2 | cut -d '/' -f2 | cut -d '.' -f1 | sort | uniq) +echo "[+] Detected repo: $REPO" + +BRANCH=$(git branch --show-current) +if ! [[ "$BRANCH" =~ ^release.*$ || "$BRANCH" =~ ^polkadot.*$ ]]; then + echo "This script is meant to run only on a RELEASE branch." + echo "Try one of the following branch:" + git branch -r --format "%(refname:short)" --sort=-committerdate | grep -Ei '/?release' | head + exit 1 +fi +echo "[+] Working on $BRANCH" + +# Tried to get the version of the release from the branch +# input: release-foo-v0.9.22 or release-bar-v9220 or release-foo-v0.9.220 +# output: 0.9.22 +get_version() { + branch=$1 + [[ $branch =~ -v(.*) ]] + version=${BASH_REMATCH[1]} + if [[ $version =~ \. ]]; then + MAJOR=$(($(echo $version | cut -d '.' -f1))) + MINOR=$(($(echo $version | cut -d '.' -f2))) + PATCH=$(($(echo $version | cut -d '.' -f3))) + echo $MAJOR.$MINOR.${PATCH:0:2} + else + MAJOR=$(echo $(($version / 100000))) + remainer=$(($version - $MAJOR * 100000)) + MINOR=$(echo $(($remainer / 1000))) + remainer=$(($remainer - $MINOR * 1000)) + PATCH=$(echo $(($remainer / 10))) + echo $MAJOR.$MINOR.$PATCH + fi +} + +# return the name of the release branch for a given repo and version +get_release_branch() { + repo=$1 + version=$2 + case $repo in + polkadot) + echo "release-v$version" + ;; + + substrate) + echo "polkadot-v$version" + ;; + + *) + echo "Repo $repo is not supported, exiting" + exit 1 + ;; + esac +} + +# repo = substrate / polkadot +check_release_branch_repo() { + repo=$1 + branch=$2 + + echo "[+] Checking deps for $repo=$branch" + + POSTIVE=$(cat Cargo.lock | grep "$repo?branch=$branch" | sort | uniq | wc -l) + NEGATIVE=$(cat Cargo.lock | grep "$repo?branch=" | grep -v $branch | sort | uniq | wc -l) + + if [[ $POSTIVE -eq 1 && $NEGATIVE -eq 0 ]]; then + echo -e "[+] ✅ Looking good" + cat Cargo.lock | grep "$repo?branch=" | sort | uniq | sed 's/^/\t - /' + return 0 + else + echo -e "[+] ❌ Something seems to be wrong, we want 1 unique match and 0 non match (1, 0) and we got ($(($POSTIVE)), $(($NEGATIVE)))" + cat Cargo.lock | grep "$repo?branch=" | sort | uniq | sed 's/^/\t - /' + return 1 + fi +} + +# Check a release branch +check_release_branches() { + SUBSTRATE_BRANCH=$1 + POLKADOT_BRANCH=$2 + + check_release_branch_repo substrate $SUBSTRATE_BRANCH + ret_a1=$? + + ret_b1=0 + if [ $POLKADOT_BRANCH ]; then + check_release_branch_repo polkadot $POLKADOT_BRANCH + ret_b1=$? + fi + + STATUS=$(($ret_a1 + $ret_b1)) + + return $STATUS +} + +VERSION=$(get_version $BRANCH) +echo "[+] Target version: v$VERSION" + +case $REPO in + polkadot) + substrate=$(get_release_branch substrate $VERSION) + + check_release_branches $substrate + ;; + + cumulus) + polkadot=$(get_release_branch polkadot $VERSION) + substrate=$(get_release_branch substrate $VERSION) + + check_release_branches $substrate $polkadot + ;; + + *) + echo "REPO $REPO is not supported, exiting" + exit 1 + ;; +esac diff --git a/scripts/ci/run_benches_for_runtime.sh b/scripts/ci/run_benches_for_runtime.sh index b0aa3ed87624..8149195c82c4 100755 --- a/scripts/ci/run_benches_for_runtime.sh +++ b/scripts/ci/run_benches_for_runtime.sh @@ -1,54 +1,71 @@ #!/bin/bash -set -e - # Runs all benchmarks for all pallets, for a given runtime, provided by $1 # Should be run on a reference machine to gain accurate benchmarks # current reference machine: https://github.com/paritytech/substrate/pull/5848 runtime="$1" -echo "[+] Running all benchmarks for $runtime" +echo "[+] Compiling benchmarks..." +cargo build --profile production --locked --features=runtime-benchmarks + +# Load all pallet names in an array. +PALLETS=($( + ./target/production/polkadot benchmark pallet --list --chain="${runtime}-dev" |\ + tail -n+2 |\ + cut -d',' -f1 |\ + sort |\ + uniq +)) -cargo +nightly build --profile production --locked --features=runtime-benchmarks +echo "[+] Benchmarking ${#PALLETS[@]} pallets for runtime $runtime" -./target/production/polkadot benchmark pallet \ - --chain "${runtime}-dev" \ - --list |\ - tail -n+2 |\ - cut -d',' -f1 |\ - uniq > "${runtime}_pallets" +# Define the error file. +ERR_FILE="benchmarking_errors.txt" +# Delete the error file before each run. +rm -f $ERR_FILE -# For each pallet found in the previous command, run benches on each function -while read -r line; do - pallet="$(echo "$line" | cut -d' ' -f1)"; - echo "Runtime: $runtime. Pallet: $pallet"; - # '!' has the side effect of bypassing errexit / set -e - ! ./target/production/polkadot benchmark pallet \ +# Benchmark each pallet. +for PALLET in "${PALLETS[@]}"; do + echo "[+] Benchmarking $PALLET for $runtime"; + + OUTPUT=$( + ./target/production/polkadot benchmark pallet \ --chain="${runtime}-dev" \ --steps=50 \ --repeat=20 \ - --pallet="$pallet" \ + --pallet="$PALLET" \ --extrinsic="*" \ --execution=wasm \ --wasm-execution=compiled \ - --heap-pages=4096 \ --header=./file_header.txt \ - --output="./runtime/${runtime}/src/weights/${pallet/::/_}.rs" -done < "${runtime}_pallets" -rm "${runtime}_pallets" + --output="./runtime/${runtime}/src/weights/${PALLET/::/_}.rs" 2>&1 + ) + if [ $? -ne 0 ]; then + echo "$OUTPUT" >> "$ERR_FILE" + echo "[-] Failed to benchmark $PALLET. Error written to $ERR_FILE; continuing..." + fi +done -# Benchmark base weights -! ./target/production/polkadot benchmark overhead \ +# Update the block and extrinsic overhead weights. +echo "[+] Benchmarking block and extrinsic overheads..." +OUTPUT=$( + ./target/production/polkadot benchmark overhead \ --chain="${runtime}-dev" \ --execution=wasm \ --wasm-execution=compiled \ --weight-path="runtime/${runtime}/constants/src/weights/" \ --warmup=10 \ --repeat=100 +) +if [ $? -ne 0 ]; then + echo "$OUTPUT" >> "$ERR_FILE" + echo "[-] Failed to benchmark the block and extrinsic overheads. Error written to $ERR_FILE; continuing..." +fi - -# This true makes sure that $? is 0 instead of -# carrying over a failure which would otherwise cause -# the whole CI job to abort. -true +# Check if the error file exists. +if [ -f "$ERR_FILE" ]; then + echo "[-] Some benchmarks failed. See: $ERR_FILE" +else + echo "[+] All benchmarks passed." +fi diff --git a/statement-table/Cargo.toml b/statement-table/Cargo.toml index 0ec782074fb0..ab9c48abbc8e 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-statement-table" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/utils/generate-bags/Cargo.toml b/utils/generate-bags/Cargo.toml index c22580edacaa..662a4c691d09 100644 --- a/utils/generate-bags/Cargo.toml +++ b/utils/generate-bags/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-voter-bags" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/utils/remote-ext-tests/bags-list/Cargo.toml b/utils/remote-ext-tests/bags-list/Cargo.toml index 620620676b09..12d1bfff154b 100644 --- a/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/utils/remote-ext-tests/bags-list/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "remote-ext-tests-bags-list" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" diff --git a/utils/staking-miner/Cargo.lock b/utils/staking-miner/Cargo.lock index c2897535eb1b..b966feddb58f 100644 --- a/utils/staking-miner/Cargo.lock +++ b/utils/staking-miner/Cargo.lock @@ -1934,7 +1934,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polkadot-core-primitives" -version = "0.9.22" +version = "0.9.25" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -3681,7 +3681,7 @@ dependencies = [ [[package]] name = "staking-miner" -version = "0.9.22" +version = "0.9.25" dependencies = [ "anyhow", "assert_cmd", diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 463275727e01..24e5231614e3 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "staking-miner" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] edition = "2021" @@ -8,7 +8,7 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0" } clap = { version = "3.1", features = ["derive", "env"] } tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } -jsonrpsee = { version = "0.13.1", features = ["ws-client", "macros"] } +jsonrpsee = { version = "0.14.0", features = ["ws-client", "macros"] } log = "0.4.17" paste = "1.0.7" serde = "1.0.137" diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index a5c7792f0c40..5a515c9de296 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -46,7 +46,7 @@ use frame_support::traits::Get; use jsonrpsee::ws_client::{WsClient, WsClientBuilder}; use remote_externalities::{Builder, Mode, OnlineConfig}; use rpc::{RpcApiClient, SharedRpcClient}; -use sp_npos_elections::ExtendedBalance; +use sp_npos_elections::BalancingConfig; use sp_runtime::{traits::Block as BlockT, DeserializeOwned, Perbill}; use tracing_subscriber::{fmt, EnvFilter}; @@ -346,7 +346,7 @@ frame_support::parameter_types! { /// Number of balancing iterations for a solution algorithm. Set based on the [`Solvers`] CLI /// config. pub static BalanceIterations: usize = 10; - pub static Balancing: Option<(usize, ExtendedBalance)> = Some((BalanceIterations::get(), 0)); + pub static Balancing: Option = Some( BalancingConfig { iterations: BalanceIterations::get(), tolerance: 0 } ); } #[derive(Debug, Clone, Parser)] diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index ac7839cdcb29..5059da18067d 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "xcm" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "The basic XCM datastructures." edition = "2021" [dependencies] impl-trait-for-tuples = "0.2.2" -parity-scale-codec = { version = "3.1.2", default-features = false, features = [ "derive" ] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } derivative = {version = "2.2.0", default-features = false, features = [ "use_core" ] } log = { version = "0.4.17", default-features = false } xcm-procedural = { path = "procedural" } @@ -16,8 +17,11 @@ xcm-procedural = { path = "procedural" } [features] default = ["std"] wasm-api = [] -runtime-benchmarks = [] +runtime-benchmarks = [ + "sp-runtime/runtime-benchmarks", +] std = [ "parity-scale-codec/std", "scale-info/std", + "sp-runtime/std", ] diff --git a/xcm/pallet-xcm-benchmarks/Cargo.toml b/xcm/pallet-xcm-benchmarks/Cargo.toml index 03f483e4a570..828f6c7cae86 100644 --- a/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -2,14 +2,14 @@ name = "pallet-xcm-benchmarks" authors = ["Parity Technologies "] edition = "2021" -version = "0.9.22" +version = "0.9.25" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } frame-support = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } frame-system = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } sp-runtime = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } diff --git a/xcm/pallet-xcm/Cargo.toml b/xcm/pallet-xcm/Cargo.toml index a8f0d98403a5..e03de94df2bf 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -2,11 +2,11 @@ authors = ["Parity Technologies "] edition = "2021" name = "pallet-xcm" -version = "0.9.22" +version = "0.9.25" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.137", optional = true, features = ["derive"] } log = { version = "0.4.17", default-features = false } @@ -41,6 +41,5 @@ std = [ "xcm-executor/std", ] runtime-benchmarks = [ - "frame-system/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "frame-system/runtime-benchmarks" ] diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 07f78bb518a9..4959c440ff06 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -23,7 +23,7 @@ mod mock; #[cfg(test)] mod tests; -use codec::{Decode, Encode, EncodeLike}; +use codec::{Decode, Encode, EncodeLike, MaxEncodedLen}; use frame_support::traits::{Contains, EnsureOrigin, Get, OriginTrait}; use scale_info::TypeInfo; use sp_runtime::{ @@ -212,7 +212,7 @@ pub mod pallet { } #[pallet::origin] - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub enum Origin { /// It comes from somewhere in the XCM space wanting to transact. Xcm(MultiLocation), diff --git a/xcm/src/v0/junction.rs b/xcm/src/v0/junction.rs index 0c559ca5a136..67f17f464a37 100644 --- a/xcm/src/v0/junction.rs +++ b/xcm/src/v0/junction.rs @@ -16,17 +16,17 @@ //! Support data structures for `MultiLocation`, primarily the `Junction` datatype. -use alloc::vec::Vec; -use parity_scale_codec::{Decode, Encode}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; +use sp_runtime::{traits::ConstU32, WeakBoundedVec}; /// A global identifier of an account-bearing consensus system. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum NetworkId { /// Unidentified/any. Any, /// Some named network. - Named(Vec), + Named(WeakBoundedVec>), /// The Polkadot Relay chain Polkadot, /// Kusama. @@ -34,12 +34,12 @@ pub enum NetworkId { } /// An identifier of a pluralistic body. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum BodyId { /// The only body in its context. Unit, /// A named body. - Named(Vec), + Named(WeakBoundedVec>), /// An indexed body. Index(#[codec(compact)] u32), /// The unambiguous executive body (for Polkadot, this would be the Polkadot council). @@ -55,7 +55,7 @@ pub enum BodyId { } /// A part of a pluralistic body. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum BodyPart { /// The body's declaration, under whatever means it decides. Voice, @@ -102,7 +102,7 @@ impl BodyPart { /// A single item in a path to describe the relative location of a consensus system. /// /// Each item assumes a pre-existing location as its context and is defined in terms of it. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum Junction { /// The consensus system of which the context is a member and state-wise super-set. /// @@ -147,7 +147,7 @@ pub enum Junction { /// Usage will vary widely owing to its generality. /// /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(Vec), + GeneralKey(WeakBoundedVec>), /// The unambiguous child. /// /// Not currently used except as a fallback when deriving ancestry. diff --git a/xcm/src/v1/junction.rs b/xcm/src/v1/junction.rs index 6e0678f76c26..4ab485beca9f 100644 --- a/xcm/src/v1/junction.rs +++ b/xcm/src/v1/junction.rs @@ -18,14 +18,14 @@ use super::{BodyId, BodyPart, Junctions, MultiLocation, NetworkId}; use crate::v0::Junction as Junction0; -use alloc::vec::Vec; -use parity_scale_codec::{self, Decode, Encode}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; +use sp_runtime::{traits::ConstU32, WeakBoundedVec}; /// A single item in a path to describe the relative location of a consensus system. /// /// Each item assumes a pre-existing location as its context and is defined in terms of it. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum Junction { /// An indexed parachain belonging to and operated by the context. /// @@ -65,7 +65,7 @@ pub enum Junction { /// Usage will vary widely owing to its generality. /// /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(Vec), + GeneralKey(WeakBoundedVec>), /// The unambiguous child. /// /// Not currently used except as a fallback when deriving ancestry. diff --git a/xcm/src/v1/multilocation.rs b/xcm/src/v1/multilocation.rs index 073d37ba48ee..0c2b2da31698 100644 --- a/xcm/src/v1/multilocation.rs +++ b/xcm/src/v1/multilocation.rs @@ -18,7 +18,7 @@ use super::Junction; use core::{mem, result}; -use parity_scale_codec::{Decode, Encode}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; /// A relative path between state-bearing consensus systems. @@ -47,7 +47,7 @@ use scale_info::TypeInfo; /// that a value is strictly an interior location, in those cases, `Junctions` may be used. /// /// The `MultiLocation` value of `Null` simply refers to the interpreting consensus system. -#[derive(Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, MaxEncodedLen)] pub struct MultiLocation { /// The number of parent junctions at the beginning of this `MultiLocation`. pub parents: u8, @@ -425,7 +425,7 @@ const MAX_JUNCTIONS: usize = 8; /// /// Parent junctions cannot be constructed with this type. Refer to `MultiLocation` for /// instructions on constructing parent junctions. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub enum Junctions { /// The interpreting consensus system. Here, @@ -1011,7 +1011,6 @@ mod tests { #[test] fn conversion_from_other_types_works() { use crate::v0; - fn takes_multilocation>(_arg: Arg) {} takes_multilocation(Parent); @@ -1042,10 +1041,13 @@ mod tests { v0::MultiLocation::X3( v0::Junction::Parent, v0::Junction::Parent, - v0::Junction::GeneralKey(b"foo".to_vec()), + v0::Junction::GeneralKey(b"foo".to_vec().try_into().unwrap()), ) .try_into(), - Ok(MultiLocation { parents: 2, interior: X1(GeneralKey(b"foo".to_vec())) }), + Ok(MultiLocation { + parents: 2, + interior: X1(GeneralKey(b"foo".to_vec().try_into().unwrap())) + }), ); } } diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index 69779a3430dd..d5089e8ab059 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -3,11 +3,11 @@ authors = ["Parity Technologies "] edition = "2021" name = "xcm-builder" description = "Tools & types for building with XCM and its executor." -version = "0.9.22" +version = "0.9.25" [dependencies] parity-scale-codec = { version = "3.1.2", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -29,7 +29,10 @@ pallet-xcm = { path = "../pallet-xcm" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } [features] default = ["std"] -runtime-benchmarks = [] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks" +] std = [ "log/std", "parity-scale-codec/std", diff --git a/xcm/xcm-builder/src/weight.rs b/xcm/xcm-builder/src/weight.rs index 3d161dbf7a94..59f185c3ed07 100644 --- a/xcm/xcm-builder/src/weight.rs +++ b/xcm/xcm-builder/src/weight.rs @@ -16,7 +16,7 @@ use frame_support::{ traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT}, - weights::{constants::WEIGHT_PER_SECOND, GetDispatchInfo, Weight, WeightToFeePolynomial}, + weights::{constants::WEIGHT_PER_SECOND, GetDispatchInfo, Weight, WeightToFee as WeightToFeeT}, }; use parity_scale_codec::Decode; use sp_runtime::traits::{SaturatedConversion, Saturating, Zero}; @@ -241,7 +241,7 @@ impl, R: TakeRevenue> Drop for FixedRateOfFungible /// Weight trader which uses the `TransactionPayment` pallet to set the right price for weight and then /// places any weight bought into the right account. pub struct UsingComponents< - WeightToFee: WeightToFeePolynomial, + WeightToFee: WeightToFeeT, AssetId: Get, AccountId, Currency: CurrencyT, @@ -252,7 +252,7 @@ pub struct UsingComponents< PhantomData<(WeightToFee, AssetId, AccountId, Currency, OnUnbalanced)>, ); impl< - WeightToFee: WeightToFeePolynomial, + WeightToFee: WeightToFeeT, AssetId: Get, AccountId, Currency: CurrencyT, @@ -265,7 +265,7 @@ impl< fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { log::trace!(target: "xcm::weight", "UsingComponents::buy_weight weight: {:?}, payment: {:?}", weight, payment); - let amount = WeightToFee::calc(&weight); + let amount = WeightToFee::weight_to_fee(&weight); let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?; let required = (Concrete(AssetId::get()), u128_amount).into(); let unused = payment.checked_sub(required).map_err(|_| XcmError::TooExpensive)?; @@ -277,7 +277,7 @@ impl< fn refund_weight(&mut self, weight: Weight) -> Option { log::trace!(target: "xcm::weight", "UsingComponents::refund_weight weight: {:?}", weight); let weight = weight.min(self.0); - let amount = WeightToFee::calc(&weight); + let amount = WeightToFee::weight_to_fee(&weight); self.0 -= weight; self.1 = self.1.saturating_sub(amount); let amount: u128 = amount.saturated_into(); @@ -289,7 +289,7 @@ impl< } } impl< - WeightToFee: WeightToFeePolynomial, + WeightToFee: WeightToFeeT, AssetId: Get, AccountId, Currency: CurrencyT, diff --git a/xcm/xcm-executor/Cargo.toml b/xcm/xcm-executor/Cargo.toml index e68bf81602c4..ad4b7037426a 100644 --- a/xcm/xcm-executor/Cargo.toml +++ b/xcm/xcm-executor/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Parity Technologies "] edition = "2021" name = "xcm-executor" description = "An abstract and configurable XCM message executor." -version = "0.9.22" +version = "0.9.25" [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/xcm/xcm-executor/integration-tests/Cargo.toml b/xcm/xcm-executor/integration-tests/Cargo.toml index 1eec5806c653..d48898aae5ce 100644 --- a/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/xcm/xcm-executor/integration-tests/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Parity Technologies "] edition = "2021" name = "xcm-executor-integration-tests" description = "Integration tests for the XCM Executor" -version = "0.9.22" +version = "0.9.25" [dependencies] frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/xcm/xcm-simulator/Cargo.toml b/xcm/xcm-simulator/Cargo.toml index abf584bc1d71..722d190d921b 100644 --- a/xcm/xcm-simulator/Cargo.toml +++ b/xcm/xcm-simulator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xcm-simulator" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Test kit to simulate cross-chain message passing and XCM execution" edition = "2021" diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 4f7696a68213..00e33276923a 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "xcm-simulator-example" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } -scale-info = { version = "2.1.1", features = ["derive"] } +scale-info = { version = "2.1.2", features = ["derive"] } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 52955bfc8995..7815a8a53206 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xcm-simulator-fuzzer" -version = "0.9.22" +version = "0.9.25" authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." edition = "2021" @@ -8,7 +8,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } honggfuzz = "0.5.54" -scale-info = { version = "2.1.1", features = ["derive"] } +scale-info = { version = "2.1.2", features = ["derive"] } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" }