From dc21e6de95385c2275a71db0de415d269a3edb6e Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Mon, 17 Jan 2022 09:55:33 +0100 Subject: [PATCH 01/35] check_runtime workflow --- .github/workflows/build-artifacts.yml | 100 ++++++++ .github/workflows/check.yml | 2 +- .github/workflows/client-release.yml | 86 ------- .github/workflows/docker-release.yml | 45 ++++ .github/workflows/picashot.yml | 1 + .github/workflows/release-drafter.yml | 2 +- .github/workflows/runtime-check.yml | 42 +++- .maintain/check_runtime.sh | 128 ++++------- .maintain/client_release.sh | 20 ++ .maintain/common/lib.sh | 122 ++++++++-- .maintain/playbooks/picashot.yml | 2 +- .maintain/run_benchmarks.sh | 83 +++++++ .maintain/run_simnode.sh | 44 ++++ .maintain/runtime_release.sh | 43 ++++ Cargo.lock | 313 +++++++++++++------------- docker/Dockerfile | 9 +- frame/assets-registry/Cargo.toml | 2 +- frame/assets/Cargo.toml | 2 +- frame/bonded-finance/Cargo.toml | 2 +- frame/call-filter/Cargo.toml | 2 +- frame/composable-traits/Cargo.toml | 2 +- frame/crowdloan-rewards/Cargo.toml | 2 +- frame/currency-factory/Cargo.toml | 2 +- frame/curve-amm/Cargo.toml | 2 +- frame/dutch-auction/Cargo.toml | 3 +- frame/governance-registry/Cargo.toml | 2 +- frame/lending/Cargo.toml | 2 +- frame/liquidations/Cargo.toml | 2 +- frame/oracle/Cargo.toml | 2 +- frame/ping/Cargo.toml | 2 +- frame/transaction-fee/Cargo.toml | 2 +- frame/uniswap-v2/Cargo.toml | 2 +- frame/vault/Cargo.toml | 2 +- frame/vesting/Cargo.toml | 2 +- integration-tests/Cargo.toml | 2 +- node/src/res/picasso.json | 6 +- runtime/common/Cargo.toml | 2 +- runtime/composable/Cargo.toml | 2 +- runtime/dali/Cargo.toml | 9 +- runtime/picasso/Cargo.toml | 25 +- runtime/primitives/Cargo.toml | 2 +- rust-toolchain.toml | 5 - utils/price-feed/Cargo.toml | 2 +- 43 files changed, 725 insertions(+), 409 deletions(-) create mode 100644 .github/workflows/build-artifacts.yml delete mode 100644 .github/workflows/client-release.yml create mode 100644 .github/workflows/docker-release.yml mode change 100644 => 100755 .maintain/check_runtime.sh create mode 100755 .maintain/client_release.sh create mode 100755 .maintain/run_benchmarks.sh create mode 100755 .maintain/run_simnode.sh create mode 100755 .maintain/runtime_release.sh delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml new file mode 100644 index 00000000000..d2e749f02f1 --- /dev/null +++ b/.github/workflows/build-artifacts.yml @@ -0,0 +1,100 @@ +name: "Build Artifacts" + +on: + workflow_dispatch: + push: + tags: + - '*' + +env: + DOCKER_USER_OPTION: '$UID:$GID' + SCCACHE_GCS_BUCKET: 'composable-build-artefacts' + RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" + SCCACHE_GCS_RW_MODE: "READ_WRITE" + +jobs: + build-and-publish: + runs-on: + - self-hosted + - linux + - x64 + - sre + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + make version + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: 🔨 Build and Upload Composable Binary + working-directory: "./.maintain/" + id: runtime_release + run: | + ./client_release.sh + + - name: Build wasm with srtool + working-directory: "./.maintain/" + id: runtime_release + run: | + ./runtime_release.sh + + - name: Upload Compressed wasm # TODO only upload wasm that has changed + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.compressed.wasm + asset_name: picasso_runtime.compact.compressed.wasm + tag: ${{ github.ref }} + overwrite: true + + - name: Upload Binary on Release # TODO Only upload binary if client files have changed + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: target/release/composable + asset_name: composable + tag: ${{ github.ref }} + overwrite: true + + - name: Update Release Note + run: | + sed -i '1i # Code ' release.md + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + body_path: release.md + token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + + + dali-chacha-client-release: + needs: [build-and-publish] + runs-on: + - self-hosted + - linux + - X64 + - ansible-runner + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + + - name: Run ansible playbook + working-directory: "./.maintain/playbooks" + run: | + ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 30b3421baf7..bd123479fe7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,7 +7,7 @@ on: branches: - main - develop - - release/* + - releases push: branches: - main diff --git a/.github/workflows/client-release.yml b/.github/workflows/client-release.yml deleted file mode 100644 index 94787c6d180..00000000000 --- a/.github/workflows/client-release.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: "Community Release (Dali Chacha)" - -on: - push: - tags: - - '*' - branches: - - feature/add-cache-build - -env: - DOCKER_USER_OPTION: '$UID:$GID' - SCCACHE_GCS_BUCKET: 'composable-build-artefacts' - RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" - SCCACHE_GCS_RW_MODE: "READ_WRITE" - -jobs: - build-and-publish: - runs-on: - - self-hosted - - linux - - x64 - - sre - strategy: - fail-fast: true - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set env - run: | - echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV - make version - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: 🔨 Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --bins - - - name: Archive build targets - run: | - tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/ - tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/composable - tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz target/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm - tar -czvf parachain-utils-${RELEASE_VERSION}.tar.gz target/release/parachain-utils - gsutil cp *.tar.gz gs://composable-binaries/community-releases/${{ env.RELEASE_VERSION }}/ - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build Docker image - run: make containerize-release - - - name: Docker push - run: make push-release - - dali-chacha-client-release: - needs: [build-and-publish] - runs-on: - - self-hosted - - linux - - X64 - - ansible-runner - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set env - run: | - echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV - - - name: Run ansible playbook - working-directory: "./.maintain/playbooks" - run: | - ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' - diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 00000000000..da0b1de8498 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,45 @@ +name: "Docker Release" + +on: + workflow_dispatch: + push: + tags: + - '*' + +env: + DOCKER_USER_OPTION: '$UID:$GID' + SCCACHE_GCS_BUCKET: 'composable-build-artefacts' + RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" + SCCACHE_GCS_RW_MODE: "READ_WRITE" + +jobs: + build-and-publish: + runs-on: + - self-hosted + - linux + - x64 + - sre + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + make version + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build Docker image + run: make containerize-release + + - name: Docker push + run: make push-release + diff --git a/.github/workflows/picashot.yml b/.github/workflows/picashot.yml index bc6e60fccb1..d74c44b39ba 100644 --- a/.github/workflows/picashot.yml +++ b/.github/workflows/picashot.yml @@ -1,5 +1,6 @@ name: Check Runtime on: + workflow_dispatch: schedule: - cron: '0 0 * * *' jobs: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e2477eae05d..978ab894f75 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -3,7 +3,7 @@ on: push: branches: - main - - release/* + - releases jobs: update_release_draft: runs-on: ubuntu-latest diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 6e4d03a6d8d..4c220127341 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -2,15 +2,19 @@ name: Check Runtime on: push: branches: - - release-* + - releases - main pull_request: branches: - - release-* + - releases - main jobs: check-runtime: - runs-on: ubuntu-latest + runs-on: + - self-hosted + - linux + - x64 + - sre steps: - uses: actions/checkout@v2 with: @@ -18,5 +22,35 @@ jobs: - name: Check for runtime changes working-directory: "./.maintain/" + id: check_runtime run: | - sh check_runtime.sh + ./check_runtime.sh + + - name: Echo output + run: echo ${{ env.RUNTIME_CHECK }} + + - name: Run Simnode + if: "$${{ env.RUNTIME_CHECK }} == 1" + working-directory: "./.maintain/" + id: run_simnode + run: | + ./run_simnode.sh + + benchmark: + name: Benchmark + runs-on: + - self-hosted + - linux + - x64 + - bmark + steps: + - uses: actions/checkout@v2 + - name: Benchmark Test + if: "$${{ env.RUNTIME_CHECK }} == 1" + working-directory: "./.maintain/" + id: run_benchmarks + run: | + ./run_benchmarks.sh + + + diff --git a/.maintain/check_runtime.sh b/.maintain/check_runtime.sh old mode 100644 new mode 100755 index 99825fd73ad..a399e9b9811 --- a/.maintain/check_runtime.sh +++ b/.maintain/check_runtime.sh @@ -1,103 +1,51 @@ -#!/bin/sh +#!/bin/bash # -# -# check for any changes in the node/src/runtime, frame/* and primitives/sr_* trees. if +# check for any changes in the runtime/ and frame/*. if # there are any changes found, it should mark the PR breaksconsensus and # "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file # that alters the version. -set -e # fail on any error +#set -e # fail on any error #shellcheck source=../common/lib.sh . "$(dirname "${0}")/./common/lib.sh" -VERSIONS_FILE="runtime/picasso/src/lib.rs" - -boldprint () { printf "|\n| \033[1m%s\033[0m\n|\n" "${@}"; } -boldcat () { printf "|\n"; while read -r l; do printf "| \033[1m%s\033[0m\n" "${l}"; done; printf "|\n" ; } - - -boldprint "latest 10 commits of ${GITHUB_REF_NAME}" -git log --graph --oneline --decorate=short -n 10 - - -boldprint "check if the wasm sources changed" -if ! has_runtime_changes origin/main "${GITHUB_REF_NAME}" -then - boldcat <<-EOT - - no changes to the runtime source code detected - - EOT - - exit 0 -fi - - - -# check for spec_version updates: if the spec versions changed, then there is -# consensus-critical logic that has changed. the runtime wasm blobs must be -# rebuilt. - -add_spec_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r "s/^\+[[:space:]]+spec_version: +([0-9]+),$/\1/p")" -sub_spec_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r "s/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p")" - - - -if [ "${add_spec_version}" != "${sub_spec_version}" ] -then - - boldcat <<-EOT - - changes to the runtime sources and changes in the spec version. - - spec_version: ${sub_spec_version} -> ${add_spec_version} - - EOT - exit 0 - -else - # check for impl_version updates: if only the impl versions changed, we assume - # there is no consensus-critical logic that has changed. - - add_impl_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')" - sub_impl_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')" - - - # see if the impl version changed - if [ "${add_impl_version}" != "${sub_impl_version}" ] - then - boldcat <<-EOT - - changes to the runtime sources and changes in the impl version. - - impl_version: ${sub_impl_version} -> ${add_impl_version} - - EOT - exit 0 - fi - - - boldcat <<-EOT - - wasm source files changed but not the spec/impl version. If changes made do not alter logic, - just bump 'impl_version'. If they do change logic, bump 'spec_version'. - - source file directories: - - frame/* - - runtime/* - - versions file: ${VERSIONS_FILE} - - EOT -fi +LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) +GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) + +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "runtime/picasso/src/lib.rs,picasso,picasso" + "runtime/dali/src/lib.rs,dali-chachacha,dali" + # "runtime/composable/src/lib.rs,composable,composable" +) + + boldprint "latest 10 commits of ${GITHUB_REF_NAME}" + git log --graph --oneline --decorate=short -n 10 + + boldprint "make sure the main branch and release tag are available in shallow clones" + git fetch --depth="${GIT_DEPTH:-100}" origin main + git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" + git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD + git log -n1 "${LATEST_TAG_NAME}" + +simnode_check() { + VERSIONS_FILE="$1" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$3" && check_runtime "$VERSIONS_FILE" "$2" + then + boldprint "Wasm sources have changed" + echo "RUNTIME_CHECK=1" >> "$GITHUB_ENV" + fi +} + +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + boldprint "check if the wasm sources changed for $chain" + simnode_check $output $folder + done <<<"$i" +done # dropped through. there's something wrong; exit 1. - -exit 1 +exit 0 # vim: noexpandtab diff --git a/.maintain/client_release.sh b/.maintain/client_release.sh new file mode 100755 index 00000000000..b51daf43528 --- /dev/null +++ b/.maintain/client_release.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# check for any changes in the runtime/ and frame/*. if +# there are any changes found, it should mark the PR breaksconsensus and +# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file +# that alters the version. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +if has_client_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" +then + boldprint "Building new client binaries" + cargo build --release -p composable + tar -czvf composable-${{ RELEASE_VERSION }}.tar.gz target/release/composable + tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm + gsutil cp *.tar.gz gs://composable-binaries/community-releases/${{ RELEASE_VERSION }}/ +fi \ No newline at end of file diff --git a/.maintain/common/lib.sh b/.maintain/common/lib.sh index 9721ba3ec7a..42313e74a76 100644 --- a/.maintain/common/lib.sh +++ b/.maintain/common/lib.sh @@ -1,24 +1,32 @@ -#!/bin/sh +#!/bin/bash api_base="https://api.github.com/repos" +LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) +GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) # Function to take 2 git tags/commits and get any lines from commit messages # that contain something that looks like a PR reference: e.g., (#1234) -sanitised_git_logs(){ +sanitised_git_logs() { git --no-pager log --pretty=format:"%s" "$1...$2" | - # Only find messages referencing a PR - grep -E '\(#[0-9]+\)' | - # Strip any asterisks - sed 's/^* //g' | - # And add them all back - sed 's/^/* /g' + # Only find messages referencing a PR + grep -E '\(#[0-9]+\)' | + # Strip any asterisks + sed 's/^* //g' | + # And add them all back + sed 's/^/* /g' +} + +get_latest_release() { + curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api + grep '"tag_name":' | # Get tag line + sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value } # Returns the last published release on github # Note: we can't just use /latest because that ignores prereleases # repo: 'organization/repo' # Usage: last_github_release "$repo" -last_github_release(){ +last_github_release() { i=0 # Iterate over releases until we find the last release that's not just a draft while [ $i -lt 29 ]; do @@ -34,11 +42,12 @@ last_github_release(){ done } + # Checks whether a tag on github has been verified # repo: 'organization/repo' # tagver: 'v1.2.3' # Usage: check_tag $repo $tagver -check_tag () { +check_tag() { repo=$1 tagver=$2 tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver") @@ -57,12 +66,13 @@ check_tag () { fi } + # Checks whether a given PR has a given label. # repo: 'organization/repo' # pr_id: 12345 # label: B1-silent # Usage: has_label $repo $pr_id $label -has_label(){ +has_label() { repo="$1" pr_id="$2" label="$3" @@ -86,9 +96,9 @@ has_label(){ # Usage: structure_message $content $formatted_content (optional) structure_message() { if [ -z "$2" ]; then - body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' < /dev/null) + body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' ${add_spec_version} + + EOT + return 0 + + else + # check for impl_version updates: if only the impl versions changed, we assume + # there is no consensus-critical logic that has changed. + + add_impl_version="$(git diff "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" -- "${VERSIONS_FILE}" | + sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')" + sub_impl_version="$(git diff "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" -- "${VERSIONS_FILE}" | + sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')" + + # see if the impl version changed + if [ "${add_impl_version}" != "${sub_impl_version}" ]; then + boldcat <<-EOT + + changes to the runtime sources and changes in the impl version. + + impl_version: ${sub_impl_version} -> ${add_impl_version} + + EOT + return 0 + fi + + boldcat <<-EOT + + wasm source files changed but not the spec/impl version. If changes made do not alter logic, + just bump 'impl_version'. If they do change logic, bump 'spec_version'. + + source file directories: + - frame/* + - runtime/$2/* + + versions file: ${VERSIONS_FILE} + + EOT + return 1 + fi +} diff --git a/.maintain/playbooks/picashot.yml b/.maintain/playbooks/picashot.yml index 7b48b91752c..39c22bb04e4 100644 --- a/.maintain/playbooks/picashot.yml +++ b/.maintain/playbooks/picashot.yml @@ -11,7 +11,7 @@ HOST=$(echo $HOSTNAME) FILENAME=$HOST-$DATE.zip BACKUP_DIR="/var/lib/composable-data/chains" - GS_BUCKET="composable-picasso-data-sync" + GS_BUCKET="picasso-data-store" zip -r $FILENAME $BACKUP_DIR gsutil mv $FILENAME gs://$GS_BUCKET/ args: diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh new file mode 100755 index 00000000000..630c6d23183 --- /dev/null +++ b/.maintain/run_benchmarks.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# +# Runs benchmarks for runtimes whose files have changed. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) +GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) + +VERSIONS_FILES=( + "runtime/picasso/src/weights,picasso,picasso" + "runtime/dali/src/weights,dali-chachacha,dali" + "runtime/composable/src/weights,composable,composable" +) + +steps=50 +repeat=20 + +pallets=( + oracle + frame_system + timestamp + session + balances + indices + membership + treasury + scheduler + collective + democracy + collator_selection + utility + lending + dutch_auction +) + + boldprint "make sure the main branch and release tag are available in shallow clones" + git fetch --depth="${GIT_DEPTH:-100}" origin main + git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" + git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD + git log -n1 "${LATEST_TAG_NAME}" + + +/home/runner/.cargo/bin/rustup install nightly +/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly +/home/runner/.cargo/bin/cargo build --release -p composable --features=runtime-benchmarks + +run_benchmarks() { + OUTPUT=$1 + CHAIN=$2 + # shellcheck disable=SC2068 + boldprint "Running benchmarks for $CHAIN" + # shellcheck disable=SC2068 + for p in ${pallets[@]}; do + ./target/release/composable benchmark \ + --chain="$CHAIN" \ + --execution=wasm \ + --wasm-execution=compiled \ + --pallet="$p" \ + --extrinsic='*' \ + --steps=$steps \ + --repeat=$repeat \ + --raw \ + --output="$OUTPUT" + done + USERNAME=$(gcloud secrets versions access latest --secret=github-api-username) + PASSWORD=$(gcloud secrets versions access latest --secret=github-api-token) + git remote set-url origin https://$USERNAME:$PASSWORD@github.com/ComposableFi/composable.git + git add . + git commit -m "Updates weights for $CHAIN" + git push origin $GITHUB_REF_NAME +} + +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then + run_benchmarks $output $chain + fi + done <<<"$i" +done diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh new file mode 100755 index 00000000000..49a35e97870 --- /dev/null +++ b/.maintain/run_simnode.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Runs simnode for runtimes whose files have changed. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "picasso,picasso" + "dali-chachacha,dali" + # "composable,composable" # TODO: add simnode suppport for composable +) + +LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) +GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) + +/home/runner/.cargo/bin/rustup update nightly +/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly +/home/runner/.cargo/bin/cargo build --release -p simnode +YDATE=$(date -d yesterday +'%m-%d-%Y') + +run_simnode() { + CHAIN="$1" + boldprint "Running simnode for $CHAIN" + FILENAME=cl-1-$YDATE.zip + GS_BUCKET="$CHAIN-data-store" + sudo gsutil cp gs://$GS_BUCKET/"$FILENAME" . + sudo unzip -o "$FILENAME" -d /tmp/db + ./target/release/simnode --chain="$CHAIN" --base-path=/tmp/db/ --pruning=archive --execution=wasm +} + +# shellcheck disable=SC2039 +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r chain folder; do + boldprint "check if the wasm sources changed for $chain" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then + # shellcheck disable=SC2086 + run_simnode $chain + fi + done <<<"$i" +done diff --git a/.maintain/runtime_release.sh b/.maintain/runtime_release.sh new file mode 100755 index 00000000000..7db3831f3d2 --- /dev/null +++ b/.maintain/runtime_release.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# check for any changes in the runtime/ and frame/*. if +# there are any changes found, it should mark the PR breaksconsensus and +# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file +# that alters the version. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "runtime/picasso/src/lib.rs,picasso,picasso" + "runtime/dali/src/lib.rs,dali-chachacha,dali" + "runtime/composable/src/lib.rs,composable,composable" +) + +# Install the neccessary tools needed for building +cargo install --git https://github.com/chevdor/srtool-cli +cargo install --locked --git https://github.com/chevdor/subwasm --tag v0.16.1 + + +build_runtime () { + chain=$3 + # srtool for reproducible builds + srtool build --package "$chain"-runtime --profile release --runtime-dir ./runtime/"$chain" + # subwasm for runtime metadata + subwasm info ./runtime/"$chain"/target/srtool/release/wbuild/"$chain"-runtime/"$chain"_runtime.compact.wasm >> "$chain"-release.md +} + +# Check which runtimes have changed and build them +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + boldprint "check if the wasm sources changed for $chain" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder" + then + build_runtime $output $chain $folder + fi + done <<< "$i" +done + diff --git a/Cargo.lock b/Cargo.lock index aeebd7302f3..005277e1aa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -57,7 +57,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]] @@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -370,7 +370,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "sha2 0.9.8", + "sha2 0.9.9", ] [[package]] @@ -399,7 +399,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "futures-channel", "futures-core", "futures-io", @@ -444,7 +444,7 @@ checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -663,7 +663,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.9.8", + "sha2 0.9.9", "tungstenite 0.15.0", "url 2.2.2", ] @@ -806,7 +806,7 @@ 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]] @@ -1048,9 +1048,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "byte-slice-cast" @@ -1227,7 +1227,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -1236,7 +1236,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]] @@ -1276,9 +1276,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.1" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1121e32687f7f90b905d4775273305baa4f32cd418923e9b0fa726533221857" +checksum = "12e8611f9ae4e068fa3e56931fded356ff745e70987ff76924a6e0ab1c8ef2e3" dependencies = [ "atty", "bitflags", @@ -1293,15 +1293,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.0" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9" +checksum = "517358c28fcef6607bf6f76108e02afad7e82297d132a6b846dcc1fc3efcd153" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -1315,9 +1315,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.46" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" dependencies = [ "cc", ] @@ -1606,7 +1606,7 @@ dependencies = [ "hmac 0.10.1", "percent-encoding 2.1.0", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "time 0.2.27", "version_check 0.9.4", ] @@ -1798,12 +1798,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", ] [[package]] @@ -1814,17 +1814,17 @@ checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "lazy_static", "memoffset", "scopeguard", @@ -1843,9 +1843,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1863,7 +1863,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", ] @@ -1873,7 +1873,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -1883,7 +1883,7 @@ 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", ] @@ -1903,7 +1903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2166,7 +2166,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2431,7 +2431,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "strsim 0.10.0", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2442,7 +2442,7 @@ checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b" dependencies = [ "darling_core", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2478,7 +2478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2499,7 +2499,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2512,7 +2512,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "rustc_version 0.4.0", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2530,7 +2530,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]] @@ -2648,7 +2648,7 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2676,7 +2676,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] @@ -2701,10 +2701,10 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2730,7 +2730,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2741,7 +2741,7 @@ checksum = "4e58b112d5099aa0857c5d05f0eacab86406dd8c0f85fe5d320a13256d29ecf4" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2925,7 +2925,7 @@ dependencies = [ "log 0.4.14", "serde", "serde_urlencoded", - "sha2 0.9.8", + "sha2 0.9.9", "sp-core", "structopt", "subxt", @@ -3212,7 +3212,7 @@ dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3224,7 +3224,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3234,7 +3234,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3444,7 +3444,7 @@ checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3512,9 +3512,9 @@ 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 0.9.4", @@ -3625,9 +3625,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" +checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" dependencies = [ "bytes 1.1.0", "fnv", @@ -3644,9 +3644,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.1.6" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167fa173496c9eadd8749cca6f8339ac88e248f3ad2442791d0b743318a94fc0" +checksum = "2483bce82dd3ed52509d0117e4a30a488bd608be250ed7a0185301314239ed31" dependencies = [ "log 0.4.14", "pest", @@ -3714,6 +3714,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -3788,7 +3794,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", ] @@ -4092,7 +4098,7 @@ checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4103,9 +4109,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" dependencies = [ "autocfg 1.0.1", "hashbrown", @@ -4374,7 +4380,7 @@ dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4511,7 +4517,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4523,7 +4529,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4903,7 +4909,7 @@ dependencies = [ "rand 0.8.4", "ring", "rw-stream-sink", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "thiserror", "unsigned-varint 0.7.1", @@ -4974,7 +4980,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "regex", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "unsigned-varint 0.7.1", "wasm-timer", @@ -5015,7 +5021,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "uint", "unsigned-varint 0.7.1", @@ -5091,7 +5097,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "snow", "static_assertions", "x25519-dalek", @@ -5182,7 +5188,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "thiserror", "unsigned-varint 0.7.1", "void", @@ -5231,7 +5237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "072c290f727d39bdc4e9d6d1c847978693d25a673bd757813681e33e5f6c00c2" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -5335,7 +5341,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand 0.8.4", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "typenum", ] @@ -5580,9 +5586,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "fe3179b85e1fd8b14447cbebadb75e45a1002f541b925f0bfec366d56a81c56d" dependencies = [ "libc", ] @@ -5817,9 +5823,9 @@ dependencies = [ "blake2s_simd", "blake3", "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", + "sha2 0.9.9", "sha3", "unsigned-varint 0.5.1", ] @@ -5831,9 +5837,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", + "sha2 0.9.9", "unsigned-varint 0.7.1", ] @@ -5847,7 +5853,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] @@ -5915,7 +5921,7 @@ checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -6132,7 +6138,7 @@ checksum = "a15c83b586f00268c619c1cb3340ec1a6f59dd9ba1d9833a273a68e6d5cd8ffc" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -6151,9 +6157,9 @@ dependencies = [ [[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" @@ -7315,7 +7321,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -7660,7 +7666,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -7708,7 +7714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ "proc-macro2 1.0.36", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] @@ -7935,7 +7941,7 @@ dependencies = [ "pest_meta", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8062,7 +8068,7 @@ checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8073,7 +8079,7 @@ checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8826,7 +8832,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9258,7 +9264,7 @@ version = "0.1.0" dependencies = [ "binance", "chrono", - "clap 3.0.1", + "clap 3.0.7", "custom_derive", "enum_derive", "env_logger 0.9.0", @@ -9331,7 +9337,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "version_check 0.9.4", ] @@ -9452,7 +9458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ "bytes 1.1.0", - "heck", + "heck 0.3.3", "itertools", "lazy_static", "log 0.4.14", @@ -9475,7 +9481,7 @@ dependencies = [ "itertools", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9797,7 +9803,7 @@ checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "lazy_static", "num_cpus", ] @@ -9866,7 +9872,7 @@ checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9946,15 +9952,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4e0a76dc12a116108933f6301b95e83634e0c47b0afbed6abbaa0601e99258" +checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" dependencies = [ "base64 0.13.0", "bytes 1.1.0", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper 0.14.16", @@ -10395,7 +10402,7 @@ version = "4.0.0-dev" source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" dependencies = [ "impl-trait-for-tuples", - "memmap2 0.5.0", + "memmap2 0.5.2", "parity-scale-codec", "sc-chain-spec-derive", "sc-network", @@ -10414,7 +10421,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11233,7 +11240,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11311,7 +11318,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11474,7 +11481,7 @@ checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11577,9 +11584,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", @@ -11636,9 +11643,9 @@ dependencies = [ [[package]] name = "signal-hook-tokio" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c5d32165ff8b94e68e7b3bdecb1b082e958c22434b363482cfb89dcd6f3ff8" +checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e" dependencies = [ "futures-core", "libc", @@ -11648,9 +11655,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" [[package]] name = "simba" @@ -11774,7 +11781,7 @@ dependencies = [ "rand_core 0.6.3", "ring", "rustc_version 0.3.3", - "sha2 0.9.8", + "sha2 0.9.9", "subtle", "x25519-dalek", ] @@ -11842,7 +11849,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12043,7 +12050,7 @@ dependencies = [ "schnorrkel", "secrecy", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "sp-core-hashing", "sp-debug-derive", "sp-externalities", @@ -12067,7 +12074,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "blake2-rfc", "byteorder", - "sha2 0.9.8", + "sha2 0.9.9", "sp-std", "tiny-keccak", "twox-hash", @@ -12081,7 +12088,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "sp-core-hashing", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12100,7 +12107,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12229,7 +12236,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12310,7 +12317,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12493,7 +12500,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12515,9 +12522,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83f0afe7e571565ef9aae7b0e4fb30fcaec4ebb9aea2f00489b772782aa03a4" +checksum = "1230685dc82f8699110640244d361a7099c602f08bddc5c90765a5153b4881dc" dependencies = [ "Inflector", "proc-macro2 1.0.36", @@ -12570,7 +12577,7 @@ dependencies = [ "memchr", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12610,7 +12617,7 @@ dependencies = [ "quote 1.0.14", "serde", "serde_derive", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12626,7 +12633,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12664,11 +12671,11 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12686,10 +12693,10 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12701,7 +12708,7 @@ dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] @@ -12865,14 +12872,14 @@ dependencies = [ "async-trait", "darling", "frame-metadata", - "heck", + "heck 0.3.3", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", "scale-info", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12883,7 +12890,7 @@ dependencies = [ "async-trait", "darling", "frame-metadata", - "heck", + "heck 0.3.3", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -12891,7 +12898,7 @@ dependencies = [ "quote 1.0.14", "scale-info", "subxt-codegen", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12913,9 +12920,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb2e6da8ee5eb9a61068762a32fa9619cc591ceb055b3687f4cd4051ec2e06b" +checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", @@ -12930,7 +12937,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "unicode-xid 0.2.2", ] @@ -12948,13 +12955,13 @@ checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" [[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.4", "redox_syscall 0.2.10", "remove_dir_all", "winapi 0.3.9", @@ -13001,7 +13008,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13104,7 +13111,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "standback", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13119,7 +13126,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", @@ -13209,7 +13216,7 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13373,7 +13380,7 @@ checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13704,7 +13711,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", ] @@ -13916,7 +13923,7 @@ dependencies = [ "log 0.4.14", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "wasm-bindgen-shared", ] @@ -13950,7 +13957,7 @@ checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14063,7 +14070,7 @@ dependencies = [ "log 0.4.14", "rsix", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "toml", "winapi 0.3.9", "zstd", @@ -14473,7 +14480,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.13#7d8f dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -14507,24 +14514,24 @@ checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] [[package]] name = "zstd" -version = "0.9.1+zstd.1.5.1" +version = "0.9.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538b8347df9257b7fbce37677ef7535c00a3c7bf1f81023cc328ed7fe4b41de8" +checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "4.1.2+zstd.1.5.1" +version = "4.1.3+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4cfe2f6e6d35c5d27ecd9d256c4b6f7933c4895654917460ec56c29336cc1" +checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" dependencies = [ "libc", "zstd-sys", diff --git a/docker/Dockerfile b/docker/Dockerfile index fb443c9fe85..4a0fcee9977 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,16 +20,15 @@ LABEL description="Precompiled Docker image for Composable" \ image.documentation="https://github.com/ComposableFi/composable#readme" SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl "https://storage.googleapis.com/composable-binaries/community-releases/${VERSION}/composable-${VERSION}.tar.gz" | tar -xz - -RUN chmod +x target/release/composable && mv target/release/composable /usr/local/bin - -RUN useradd -m -u 1001 -U -s /bin/sh -d /composable composable && \ +RUN curl "https://storage.googleapis.com/composable-binaries/community-releases/${VERSION}/composable-${VERSION}.tar.gz" | tar -xz \ + chmod +x target/release/composable && mv target/release/composable /usr/local/bin \ + useradd -m -u 1001 -U -s /bin/sh -d /composable composable && \ mkdir -p /composable/.local/share/local_testnet && \ mkdir /data && \ chown -R composable:composable /data && \ chown -R composable:composable /composable/.local/share/local_testnet && \ ln -s /data /composable/.local/share/local_testnet + USER composable EXPOSE 30333 9933 9944 9615 diff --git a/frame/assets-registry/Cargo.toml b/frame/assets-registry/Cargo.toml index 12fb5feb14b..a4f1d109066 100644 --- a/frame/assets-registry/Cargo.toml +++ b/frame/assets-registry/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index a81b1c8ce36..5a933d365da 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/bonded-finance/Cargo.toml b/frame/bonded-finance/Cargo.toml index 5b38f6e4bc7..a103c6ab1d1 100644 --- a/frame/bonded-finance/Cargo.toml +++ b/frame/bonded-finance/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/call-filter/Cargo.toml b/frame/call-filter/Cargo.toml index 4ad49e6cb19..eb73435e785 100644 --- a/frame/call-filter/Cargo.toml +++ b/frame/call-filter/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [dependencies] serde = { version = "1.0.124", optional = true } diff --git a/frame/composable-traits/Cargo.toml b/frame/composable-traits/Cargo.toml index 50c7936ee1c..96f552d286d 100644 --- a/frame/composable-traits/Cargo.toml +++ b/frame/composable-traits/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/crowdloan-rewards/Cargo.toml b/frame/crowdloan-rewards/Cargo.toml index 89a7984825c..c9ac573167e 100644 --- a/frame/crowdloan-rewards/Cargo.toml +++ b/frame/crowdloan-rewards/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/currency-factory/Cargo.toml b/frame/currency-factory/Cargo.toml index 44542404a77..e0bea308917 100644 --- a/frame/currency-factory/Cargo.toml +++ b/frame/currency-factory/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/curve-amm/Cargo.toml b/frame/curve-amm/Cargo.toml index 09f9d4c18d6..971c34d3671 100644 --- a/frame/curve-amm/Cargo.toml +++ b/frame/curve-amm/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/dutch-auction/Cargo.toml b/frame/dutch-auction/Cargo.toml index f98a549fb44..5d8e4871299 100644 --- a/frame/dutch-auction/Cargo.toml +++ b/frame/dutch-auction/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -65,5 +65,4 @@ runtime-benchmarks = [ "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", ] diff --git a/frame/governance-registry/Cargo.toml b/frame/governance-registry/Cargo.toml index d9da42e056b..b871df12b97 100644 --- a/frame/governance-registry/Cargo.toml +++ b/frame/governance-registry/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/lending/Cargo.toml b/frame/lending/Cargo.toml index 56d6c75a725..b73946ec3ad 100644 --- a/frame/lending/Cargo.toml +++ b/frame/lending/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/liquidations/Cargo.toml b/frame/liquidations/Cargo.toml index 89a12c7efe5..24f422a5ba4 100644 --- a/frame/liquidations/Cargo.toml +++ b/frame/liquidations/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/oracle/Cargo.toml b/frame/oracle/Cargo.toml index 953dd708cdb..778724b1c96 100644 --- a/frame/oracle/Cargo.toml +++ b/frame/oracle/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/ping/Cargo.toml b/frame/ping/Cargo.toml index 170bb9c6813..94028b7baf2 100644 --- a/frame/ping/Cargo.toml +++ b/frame/ping/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + name = "pallet-ping" version = "0.1.0" diff --git a/frame/transaction-fee/Cargo.toml b/frame/transaction-fee/Cargo.toml index 4333f7a02a0..776276fc037 100644 --- a/frame/transaction-fee/Cargo.toml +++ b/frame/transaction-fee/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/uniswap-v2/Cargo.toml b/frame/uniswap-v2/Cargo.toml index 93aed2fc847..15926b1d827 100644 --- a/frame/uniswap-v2/Cargo.toml +++ b/frame/uniswap-v2/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/vault/Cargo.toml b/frame/vault/Cargo.toml index fb7d849ff3d..69889b22649 100644 --- a/frame/vault/Cargo.toml +++ b/frame/vault/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index 2807f9d0205..19487c20e18 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -5,7 +5,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [dependencies] scale-info = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 58cd6a274a9..1ce356507ab 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -2,7 +2,7 @@ name = "integration-tests" version = "0.1.0" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/node/src/res/picasso.json b/node/src/res/picasso.json index c7c90e07b75..57fd6b210f8 100644 --- a/node/src/res/picasso.json +++ b/node/src/res/picasso.json @@ -3,9 +3,9 @@ "id": "picasso", "chainType": "Live", "bootNodes": [ - "/dns/picasso-bn1.composable.finance/tcp/30334/p2p/12D3KooWJUwiZN4ePCwgbEM7AxJ4U2SaTrrgzkppFQxDmDhXXX2x", - "/dns/picasso-bn2.composable.finance/tcp/30334/p2p/12D3KooWD4M96HiuBUvhZZ8jmSzic4V6cWWvxFGPa7XAZnubmLtX", - "/dns/picasso-bn3.composable.finance/tcp/30334/p2p/12D3KooWASeF5JW1HGvpH46r9UzTBh77TfP4z8VPQ1RuyiKf34JN" + "/dns/picasso-bn1.composable.finance/tcp/30334/p2p/12D3KooWNh6vJ8ZypaXGJDQmxrDs8TC1HTNyPDSF9dfe1waFLaHD", + "/dns/picasso-bn2.composable.finance/tcp/30334/p2p/12D3KooWAKCft1b38awDNhCzV82Rb8qfRVyJv7E1pCEE95aoBzfs", + "/dns/picasso-bn3.composable.finance/tcp/30334/p2p/12D3KooWKTTnduPVwdmZS29AZaSSSTP6TXBv3FQ6r775bqC8o6gJ" ], "telemetryEndpoints": [ [ diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index eadb1ff28cd..54db6067563 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -3,7 +3,7 @@ name = "common" version = "0.8.30" authors = ["Composable Developers "] edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/composable/Cargo.toml b/runtime/composable/Cargo.toml index 669c0afd8c4..398f4f31e7a 100644 --- a/runtime/composable/Cargo.toml +++ b/runtime/composable/Cargo.toml @@ -2,7 +2,7 @@ name = "composable-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Composable, Polkadot Parachain Runtime Implementation" authors = ["Seun Lanlege "] diff --git a/runtime/dali/Cargo.toml b/runtime/dali/Cargo.toml index 9ec36dbff00..506953c14e8 100644 --- a/runtime/dali/Cargo.toml +++ b/runtime/dali/Cargo.toml @@ -2,7 +2,7 @@ name = "dali-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Dali, Testnet Parachain Runtime Implementation" authors = ["Seun Lanlege "] @@ -58,7 +58,7 @@ assets = { package = "pallet-assets", path = '../../frame/assets', default-featu crowdloan-rewards = { package = "pallet-crowdloan-rewards", path = '../../frame/crowdloan-rewards', default-features = false } bonded-finance = { package = "pallet-bonded-finance", path = "../../frame/bonded-finance", default-features = false } vesting = { package = "pallet-vesting", path = "../../frame/vesting", default-features = false } -dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false } + dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false } common = { path = "../common", default-features = false } primitives = { path = "../primitives", default-features = false } oracle = { package = "pallet-oracle", path = "../../frame/oracle", default-features = false } @@ -171,7 +171,8 @@ std = [ "composable-traits/std", "crowdloan-rewards/std", "bonded-finance/std", - "vesting/std" + "dutch-auction/std", + "vesting/std" ] runtime-benchmarks = [ "assets/runtime-benchmarks", @@ -193,7 +194,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "indices/runtime-benchmarks", "crowdloan-rewards/runtime-benchmarks", - "dutch-auction/runtime-benchmarks", "identity/runtime-benchmarks", "multisig/runtime-benchmarks", "membership/runtime-benchmarks", @@ -206,4 +206,5 @@ runtime-benchmarks = [ "vesting/runtime-benchmarks", "assets/runtime-benchmarks", "bonded-finance/runtime-benchmarks", + "dutch-auction/runtime-benchmarks", ] diff --git a/runtime/picasso/Cargo.toml b/runtime/picasso/Cargo.toml index 00968ab44d1..ba0ba0b09ff 100644 --- a/runtime/picasso/Cargo.toml +++ b/runtime/picasso/Cargo.toml @@ -2,7 +2,7 @@ name = "picasso-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Picasso, Kusama Parachain Runtime Implementation" authors = ["Seun Lanlege "] @@ -23,7 +23,6 @@ normal = [ "pallet-vault", "session-benchmarking", "vault", - "pallet-dutch-auction", ] [dependencies] @@ -172,12 +171,12 @@ std = [ "orml-xcm-support/std", "orml-unknown-tokens/std", "composable-traits/std", - "governance-registry/std", - "currency-factory/std", - "assets/std", - "vesting/std", - "bonded-finance/std", - "crowdloan-rewards/std", + "governance-registry/std", + "currency-factory/std", + "assets/std", + "vesting/std", + "bonded-finance/std", + "crowdloan-rewards/std", ] runtime-benchmarks = [ @@ -204,10 +203,10 @@ runtime-benchmarks = [ "collective/runtime-benchmarks", "democracy/runtime-benchmarks", "utility/runtime-benchmarks", - "crowdloan-rewards/runtime-benchmarks", - "currency-factory/runtime-benchmarks", - "assets/runtime-benchmarks", - "vesting/runtime-benchmarks", - "bonded-finance/runtime-benchmarks", + "crowdloan-rewards/runtime-benchmarks", + "currency-factory/runtime-benchmarks", + "assets/runtime-benchmarks", + "vesting/runtime-benchmarks", + "bonded-finance/runtime-benchmarks", ] diff --git a/runtime/primitives/Cargo.toml b/runtime/primitives/Cargo.toml index 1bdd57f05a3..ebf9ed231c2 100644 --- a/runtime/primitives/Cargo.toml +++ b/runtime/primitives/Cargo.toml @@ -3,7 +3,7 @@ name = "primitives" version = "0.1.0" authors = ["Composable Developers "] edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index e07af34e7d3..00000000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,5 +0,0 @@ -[toolchain] -channel = "nightly-2021-11-29" -components = [ "rustfmt", "rustc", "rust-std", "cargo", "clippy", "llvm-tools-preview"] -targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file diff --git a/utils/price-feed/Cargo.toml b/utils/price-feed/Cargo.toml index 4d1c922cbac..427f972fc35 100644 --- a/utils/price-feed/Cargo.toml +++ b/utils/price-feed/Cargo.toml @@ -2,7 +2,7 @@ name = "price-feed" version = "0.1.0" edition = "2021" -rust-version = "1.56" + [dependencies] enum_derive = "0.1.7" From 082c2a96d40ad5d977b1ee9a87fa748e49b70719 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Mon, 17 Jan 2022 10:02:01 +0100 Subject: [PATCH 02/35] check_runtime workflow --- .github/workflows/build-artifacts.yml | 100 ++++++++ .github/workflows/check.yml | 2 +- .github/workflows/client-release.yml | 86 ------- .github/workflows/docker-release.yml | 45 ++++ .github/workflows/picashot.yml | 1 + .github/workflows/release-drafter.yml | 2 +- .github/workflows/runtime-check.yml | 42 +++- .maintain/check_runtime.sh | 125 +++------- .maintain/client_release.sh | 20 ++ .maintain/common/lib.sh | 122 ++++++++-- .maintain/playbooks/picashot.yml | 2 +- .maintain/run_benchmarks.sh | 80 +++++++ .maintain/run_simnode.sh | 41 ++++ .maintain/runtime_release.sh | 43 ++++ Cargo.lock | 313 +++++++++++++------------- docker/Dockerfile | 9 +- frame/assets-registry/Cargo.toml | 2 +- frame/assets/Cargo.toml | 2 +- frame/bonded-finance/Cargo.toml | 2 +- frame/call-filter/Cargo.toml | 2 +- frame/composable-traits/Cargo.toml | 2 +- frame/crowdloan-rewards/Cargo.toml | 2 +- frame/currency-factory/Cargo.toml | 2 +- frame/curve-amm/Cargo.toml | 2 +- frame/dutch-auction/Cargo.toml | 3 +- frame/governance-registry/Cargo.toml | 2 +- frame/lending/Cargo.toml | 2 +- frame/liquidations/Cargo.toml | 2 +- frame/oracle/Cargo.toml | 2 +- frame/ping/Cargo.toml | 2 +- frame/transaction-fee/Cargo.toml | 2 +- frame/uniswap-v2/Cargo.toml | 2 +- frame/vault/Cargo.toml | 2 +- frame/vesting/Cargo.toml | 2 +- integration-tests/Cargo.toml | 2 +- node/src/res/picasso.json | 6 +- runtime/common/Cargo.toml | 2 +- runtime/composable/Cargo.toml | 2 +- runtime/dali/Cargo.toml | 9 +- runtime/picasso/Cargo.toml | 25 +- runtime/primitives/Cargo.toml | 2 +- rust-toolchain.toml | 5 - utils/price-feed/Cargo.toml | 2 +- 43 files changed, 716 insertions(+), 409 deletions(-) create mode 100644 .github/workflows/build-artifacts.yml delete mode 100644 .github/workflows/client-release.yml create mode 100644 .github/workflows/docker-release.yml mode change 100644 => 100755 .maintain/check_runtime.sh create mode 100755 .maintain/client_release.sh create mode 100755 .maintain/run_benchmarks.sh create mode 100755 .maintain/run_simnode.sh create mode 100755 .maintain/runtime_release.sh delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml new file mode 100644 index 00000000000..d2e749f02f1 --- /dev/null +++ b/.github/workflows/build-artifacts.yml @@ -0,0 +1,100 @@ +name: "Build Artifacts" + +on: + workflow_dispatch: + push: + tags: + - '*' + +env: + DOCKER_USER_OPTION: '$UID:$GID' + SCCACHE_GCS_BUCKET: 'composable-build-artefacts' + RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" + SCCACHE_GCS_RW_MODE: "READ_WRITE" + +jobs: + build-and-publish: + runs-on: + - self-hosted + - linux + - x64 + - sre + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + make version + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: 🔨 Build and Upload Composable Binary + working-directory: "./.maintain/" + id: runtime_release + run: | + ./client_release.sh + + - name: Build wasm with srtool + working-directory: "./.maintain/" + id: runtime_release + run: | + ./runtime_release.sh + + - name: Upload Compressed wasm # TODO only upload wasm that has changed + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.compressed.wasm + asset_name: picasso_runtime.compact.compressed.wasm + tag: ${{ github.ref }} + overwrite: true + + - name: Upload Binary on Release # TODO Only upload binary if client files have changed + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: target/release/composable + asset_name: composable + tag: ${{ github.ref }} + overwrite: true + + - name: Update Release Note + run: | + sed -i '1i # Code ' release.md + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + body_path: release.md + token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + + + dali-chacha-client-release: + needs: [build-and-publish] + runs-on: + - self-hosted + - linux + - X64 + - ansible-runner + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + + - name: Run ansible playbook + working-directory: "./.maintain/playbooks" + run: | + ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 30b3421baf7..bd123479fe7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,7 +7,7 @@ on: branches: - main - develop - - release/* + - releases push: branches: - main diff --git a/.github/workflows/client-release.yml b/.github/workflows/client-release.yml deleted file mode 100644 index 94787c6d180..00000000000 --- a/.github/workflows/client-release.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: "Community Release (Dali Chacha)" - -on: - push: - tags: - - '*' - branches: - - feature/add-cache-build - -env: - DOCKER_USER_OPTION: '$UID:$GID' - SCCACHE_GCS_BUCKET: 'composable-build-artefacts' - RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" - SCCACHE_GCS_RW_MODE: "READ_WRITE" - -jobs: - build-and-publish: - runs-on: - - self-hosted - - linux - - x64 - - sre - strategy: - fail-fast: true - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set env - run: | - echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV - make version - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: 🔨 Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --bins - - - name: Archive build targets - run: | - tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/ - tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/composable - tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz target/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm - tar -czvf parachain-utils-${RELEASE_VERSION}.tar.gz target/release/parachain-utils - gsutil cp *.tar.gz gs://composable-binaries/community-releases/${{ env.RELEASE_VERSION }}/ - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build Docker image - run: make containerize-release - - - name: Docker push - run: make push-release - - dali-chacha-client-release: - needs: [build-and-publish] - runs-on: - - self-hosted - - linux - - X64 - - ansible-runner - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set env - run: | - echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV - - - name: Run ansible playbook - working-directory: "./.maintain/playbooks" - run: | - ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' - diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 00000000000..da0b1de8498 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,45 @@ +name: "Docker Release" + +on: + workflow_dispatch: + push: + tags: + - '*' + +env: + DOCKER_USER_OPTION: '$UID:$GID' + SCCACHE_GCS_BUCKET: 'composable-build-artefacts' + RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache" + SCCACHE_GCS_RW_MODE: "READ_WRITE" + +jobs: + build-and-publish: + runs-on: + - self-hosted + - linux + - x64 + - sre + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: | + echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV + make version + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build Docker image + run: make containerize-release + + - name: Docker push + run: make push-release + diff --git a/.github/workflows/picashot.yml b/.github/workflows/picashot.yml index bc6e60fccb1..d74c44b39ba 100644 --- a/.github/workflows/picashot.yml +++ b/.github/workflows/picashot.yml @@ -1,5 +1,6 @@ name: Check Runtime on: + workflow_dispatch: schedule: - cron: '0 0 * * *' jobs: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e2477eae05d..978ab894f75 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -3,7 +3,7 @@ on: push: branches: - main - - release/* + - releases jobs: update_release_draft: runs-on: ubuntu-latest diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 6e4d03a6d8d..4c220127341 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -2,15 +2,19 @@ name: Check Runtime on: push: branches: - - release-* + - releases - main pull_request: branches: - - release-* + - releases - main jobs: check-runtime: - runs-on: ubuntu-latest + runs-on: + - self-hosted + - linux + - x64 + - sre steps: - uses: actions/checkout@v2 with: @@ -18,5 +22,35 @@ jobs: - name: Check for runtime changes working-directory: "./.maintain/" + id: check_runtime run: | - sh check_runtime.sh + ./check_runtime.sh + + - name: Echo output + run: echo ${{ env.RUNTIME_CHECK }} + + - name: Run Simnode + if: "$${{ env.RUNTIME_CHECK }} == 1" + working-directory: "./.maintain/" + id: run_simnode + run: | + ./run_simnode.sh + + benchmark: + name: Benchmark + runs-on: + - self-hosted + - linux + - x64 + - bmark + steps: + - uses: actions/checkout@v2 + - name: Benchmark Test + if: "$${{ env.RUNTIME_CHECK }} == 1" + working-directory: "./.maintain/" + id: run_benchmarks + run: | + ./run_benchmarks.sh + + + diff --git a/.maintain/check_runtime.sh b/.maintain/check_runtime.sh old mode 100644 new mode 100755 index 99825fd73ad..6d9b8907a9a --- a/.maintain/check_runtime.sh +++ b/.maintain/check_runtime.sh @@ -1,103 +1,48 @@ -#!/bin/sh +#!/bin/bash # -# -# check for any changes in the node/src/runtime, frame/* and primitives/sr_* trees. if +# check for any changes in the runtime/ and frame/*. if # there are any changes found, it should mark the PR breaksconsensus and # "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file # that alters the version. -set -e # fail on any error +#set -e # fail on any error #shellcheck source=../common/lib.sh . "$(dirname "${0}")/./common/lib.sh" -VERSIONS_FILE="runtime/picasso/src/lib.rs" - -boldprint () { printf "|\n| \033[1m%s\033[0m\n|\n" "${@}"; } -boldcat () { printf "|\n"; while read -r l; do printf "| \033[1m%s\033[0m\n" "${l}"; done; printf "|\n" ; } - - -boldprint "latest 10 commits of ${GITHUB_REF_NAME}" -git log --graph --oneline --decorate=short -n 10 - - -boldprint "check if the wasm sources changed" -if ! has_runtime_changes origin/main "${GITHUB_REF_NAME}" -then - boldcat <<-EOT - - no changes to the runtime source code detected - - EOT - - exit 0 -fi - - - -# check for spec_version updates: if the spec versions changed, then there is -# consensus-critical logic that has changed. the runtime wasm blobs must be -# rebuilt. - -add_spec_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r "s/^\+[[:space:]]+spec_version: +([0-9]+),$/\1/p")" -sub_spec_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r "s/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p")" - - - -if [ "${add_spec_version}" != "${sub_spec_version}" ] -then - - boldcat <<-EOT - - changes to the runtime sources and changes in the spec version. - - spec_version: ${sub_spec_version} -> ${add_spec_version} - - EOT - exit 0 - -else - # check for impl_version updates: if only the impl versions changed, we assume - # there is no consensus-critical logic that has changed. - - add_impl_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')" - sub_impl_version="$(git diff tags/release ${GITHUB_SHA} -- "${VERSIONS_FILE}" \ - | sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')" - - - # see if the impl version changed - if [ "${add_impl_version}" != "${sub_impl_version}" ] - then - boldcat <<-EOT - - changes to the runtime sources and changes in the impl version. - - impl_version: ${sub_impl_version} -> ${add_impl_version} - - EOT - exit 0 - fi - - - boldcat <<-EOT - - wasm source files changed but not the spec/impl version. If changes made do not alter logic, - just bump 'impl_version'. If they do change logic, bump 'spec_version'. - - source file directories: - - frame/* - - runtime/* - - versions file: ${VERSIONS_FILE} - - EOT -fi +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "runtime/picasso/src/lib.rs,picasso,picasso" + "runtime/dali/src/lib.rs,dali-chachacha,dali" + "runtime/composable/src/lib.rs,composable,composable" +) + + boldprint "latest 10 commits of ${GITHUB_REF_NAME}" + git log --graph --oneline --decorate=short -n 10 + + boldprint "make sure the main branch and release tag are available in shallow clones" + git fetch --depth="${GIT_DEPTH:-100}" origin main + git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" + git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD + git log -n1 "${LATEST_TAG_NAME}" + +simnode_check() { + VERSIONS_FILE="$1" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$3" && check_runtime "$VERSIONS_FILE" "$2" + then + boldprint "Wasm sources have changed" + echo "RUNTIME_CHECK=1" >> "$GITHUB_ENV" + fi +} + +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + boldprint "check if the wasm sources changed for $chain" + simnode_check $output $folder + done <<< "$i" +done # dropped through. there's something wrong; exit 1. - -exit 1 +exit 0 # vim: noexpandtab diff --git a/.maintain/client_release.sh b/.maintain/client_release.sh new file mode 100755 index 00000000000..b51daf43528 --- /dev/null +++ b/.maintain/client_release.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# check for any changes in the runtime/ and frame/*. if +# there are any changes found, it should mark the PR breaksconsensus and +# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file +# that alters the version. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +if has_client_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" +then + boldprint "Building new client binaries" + cargo build --release -p composable + tar -czvf composable-${{ RELEASE_VERSION }}.tar.gz target/release/composable + tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm + gsutil cp *.tar.gz gs://composable-binaries/community-releases/${{ RELEASE_VERSION }}/ +fi \ No newline at end of file diff --git a/.maintain/common/lib.sh b/.maintain/common/lib.sh index 9721ba3ec7a..2f4607703e1 100644 --- a/.maintain/common/lib.sh +++ b/.maintain/common/lib.sh @@ -1,24 +1,32 @@ -#!/bin/sh +#!/bin/bash api_base="https://api.github.com/repos" +GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) # Function to take 2 git tags/commits and get any lines from commit messages # that contain something that looks like a PR reference: e.g., (#1234) -sanitised_git_logs(){ +sanitised_git_logs() { git --no-pager log --pretty=format:"%s" "$1...$2" | - # Only find messages referencing a PR - grep -E '\(#[0-9]+\)' | - # Strip any asterisks - sed 's/^* //g' | - # And add them all back - sed 's/^/* /g' + # Only find messages referencing a PR + grep -E '\(#[0-9]+\)' | + # Strip any asterisks + sed 's/^* //g' | + # And add them all back + sed 's/^/* /g' } +get_latest_release() { + curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api + grep '"tag_name":' | # Get tag line + sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value +} +LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) + # Returns the last published release on github # Note: we can't just use /latest because that ignores prereleases # repo: 'organization/repo' # Usage: last_github_release "$repo" -last_github_release(){ +last_github_release() { i=0 # Iterate over releases until we find the last release that's not just a draft while [ $i -lt 29 ]; do @@ -34,11 +42,12 @@ last_github_release(){ done } + # Checks whether a tag on github has been verified # repo: 'organization/repo' # tagver: 'v1.2.3' # Usage: check_tag $repo $tagver -check_tag () { +check_tag() { repo=$1 tagver=$2 tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver") @@ -57,12 +66,13 @@ check_tag () { fi } + # Checks whether a given PR has a given label. # repo: 'organization/repo' # pr_id: 12345 # label: B1-silent # Usage: has_label $repo $pr_id $label -has_label(){ +has_label() { repo="$1" pr_id="$2" label="$3" @@ -86,9 +96,9 @@ has_label(){ # Usage: structure_message $content $formatted_content (optional) structure_message() { if [ -z "$2" ]; then - body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' < /dev/null) + body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' ${add_spec_version} + + EOT + return 0 + + else + # check for impl_version updates: if only the impl versions changed, we assume + # there is no consensus-critical logic that has changed. + + add_impl_version="$(git diff "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" -- "${VERSIONS_FILE}" | + sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')" + sub_impl_version="$(git diff "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" -- "${VERSIONS_FILE}" | + sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')" + + # see if the impl version changed + if [ "${add_impl_version}" != "${sub_impl_version}" ]; then + boldcat <<-EOT + + changes to the runtime sources and changes in the impl version. + + impl_version: ${sub_impl_version} -> ${add_impl_version} + + EOT + return 0 + fi + + boldcat <<-EOT + + wasm source files changed but not the spec/impl version. If changes made do not alter logic, + just bump 'impl_version'. If they do change logic, bump 'spec_version'. + + source file directories: + - frame/* + - runtime/$2/* + + versions file: ${VERSIONS_FILE} + + EOT + return 1 + fi +} diff --git a/.maintain/playbooks/picashot.yml b/.maintain/playbooks/picashot.yml index 7b48b91752c..39c22bb04e4 100644 --- a/.maintain/playbooks/picashot.yml +++ b/.maintain/playbooks/picashot.yml @@ -11,7 +11,7 @@ HOST=$(echo $HOSTNAME) FILENAME=$HOST-$DATE.zip BACKUP_DIR="/var/lib/composable-data/chains" - GS_BUCKET="composable-picasso-data-sync" + GS_BUCKET="picasso-data-store" zip -r $FILENAME $BACKUP_DIR gsutil mv $FILENAME gs://$GS_BUCKET/ args: diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh new file mode 100755 index 00000000000..3e8b6ede748 --- /dev/null +++ b/.maintain/run_benchmarks.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# +# Runs benchmarks for runtimes whose files have changed. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +VERSIONS_FILES=( + "runtime/picasso/src/weights,picasso,picasso" + "runtime/dali/src/weights,dali-chachacha,dali" + "runtime/composable/src/weights,composable,composable" +) + +steps=50 +repeat=20 + +pallets=( + oracle + frame_system + timestamp + session + balances + indices + membership + treasury + scheduler + collective + democracy + collator_selection + utility + lending + dutch_auction +) + + boldprint "make sure the main branch and release tag are available in shallow clones" + git fetch --depth="${GIT_DEPTH:-100}" origin main + git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" + git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD + git log -n1 "${LATEST_TAG_NAME}" + + +/home/runner/.cargo/bin/rustup install nightly +/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly +/home/runner/.cargo/bin/cargo build --release -p composable --features=runtime-benchmarks + +run_benchmarks() { + OUTPUT=$1 + CHAIN=$2 + # shellcheck disable=SC2068 + boldprint "Running benchmarks for $CHAIN" + # shellcheck disable=SC2068 + for p in ${pallets[@]}; do + ./target/release/composable benchmark \ + --chain="$CHAIN" \ + --execution=wasm \ + --wasm-execution=compiled \ + --pallet="$p" \ + --extrinsic='*' \ + --steps=$steps \ + --repeat=$repeat \ + --raw \ + --output="$OUTPUT" + done + USERNAME=$(gcloud secrets versions access latest --secret=github-api-username) + PASSWORD=$(gcloud secrets versions access latest --secret=github-api-token) + git remote set-url origin https://$USERNAME:$PASSWORD@github.com/ComposableFi/composable.git + git add . + git commit -m "Updates weights for $CHAIN" + git push origin $GITHUB_REF_NAME +} + +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then + run_benchmarks $output $chain + fi + done <<<"$i" +done diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh new file mode 100755 index 00000000000..79baef7f9c8 --- /dev/null +++ b/.maintain/run_simnode.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Runs simnode for runtimes whose files have changed. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "picasso,picasso" + "dali-chachacha,dali" + # "composable,composable" # TODO: add simnode suppport for composable +) + +/home/runner/.cargo/bin/rustup update nightly +/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly +/home/runner/.cargo/bin/cargo build --release -p simnode +YDATE=$(date -d yesterday +'%m-%d-%Y') + +run_simnode() { + CHAIN="$1" + boldprint "Running simnode for $CHAIN" + FILENAME=cl-1-$YDATE.zip + GS_BUCKET="$CHAIN-data-store" + sudo gsutil cp gs://$GS_BUCKET/"$FILENAME" . + sudo unzip -o "$FILENAME" -d /tmp/db + ./target/release/simnode --chain="$CHAIN" --base-path=/tmp/db/ --pruning=archive --execution=wasm +} + +# shellcheck disable=SC2039 +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r chain folder; do + boldprint "check if the wasm sources changed for $chain" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then + # shellcheck disable=SC2086 + run_simnode $chain + fi + done <<<"$i" +done diff --git a/.maintain/runtime_release.sh b/.maintain/runtime_release.sh new file mode 100755 index 00000000000..7db3831f3d2 --- /dev/null +++ b/.maintain/runtime_release.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# check for any changes in the runtime/ and frame/*. if +# there are any changes found, it should mark the PR breaksconsensus and +# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file +# that alters the version. + +#set -e # fail on any error + +#shellcheck source=../common/lib.sh +. "$(dirname "${0}")/./common/lib.sh" + +# shellcheck disable=SC2039 +VERSIONS_FILES=( + "runtime/picasso/src/lib.rs,picasso,picasso" + "runtime/dali/src/lib.rs,dali-chachacha,dali" + "runtime/composable/src/lib.rs,composable,composable" +) + +# Install the neccessary tools needed for building +cargo install --git https://github.com/chevdor/srtool-cli +cargo install --locked --git https://github.com/chevdor/subwasm --tag v0.16.1 + + +build_runtime () { + chain=$3 + # srtool for reproducible builds + srtool build --package "$chain"-runtime --profile release --runtime-dir ./runtime/"$chain" + # subwasm for runtime metadata + subwasm info ./runtime/"$chain"/target/srtool/release/wbuild/"$chain"-runtime/"$chain"_runtime.compact.wasm >> "$chain"-release.md +} + +# Check which runtimes have changed and build them +for i in "${VERSIONS_FILES[@]}"; do + while IFS=',' read -r output chain folder; do + boldprint "check if the wasm sources changed for $chain" + if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder" + then + build_runtime $output $chain $folder + fi + done <<< "$i" +done + diff --git a/Cargo.lock b/Cargo.lock index aeebd7302f3..005277e1aa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -57,7 +57,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]] @@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -370,7 +370,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "sha2 0.9.8", + "sha2 0.9.9", ] [[package]] @@ -399,7 +399,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "futures-channel", "futures-core", "futures-io", @@ -444,7 +444,7 @@ checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -663,7 +663,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.9.8", + "sha2 0.9.9", "tungstenite 0.15.0", "url 2.2.2", ] @@ -806,7 +806,7 @@ 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]] @@ -1048,9 +1048,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "byte-slice-cast" @@ -1227,7 +1227,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -1236,7 +1236,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]] @@ -1276,9 +1276,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.1" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1121e32687f7f90b905d4775273305baa4f32cd418923e9b0fa726533221857" +checksum = "12e8611f9ae4e068fa3e56931fded356ff745e70987ff76924a6e0ab1c8ef2e3" dependencies = [ "atty", "bitflags", @@ -1293,15 +1293,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.0" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9" +checksum = "517358c28fcef6607bf6f76108e02afad7e82297d132a6b846dcc1fc3efcd153" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -1315,9 +1315,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.46" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" dependencies = [ "cc", ] @@ -1606,7 +1606,7 @@ dependencies = [ "hmac 0.10.1", "percent-encoding 2.1.0", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "time 0.2.27", "version_check 0.9.4", ] @@ -1798,12 +1798,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", ] [[package]] @@ -1814,17 +1814,17 @@ checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "lazy_static", "memoffset", "scopeguard", @@ -1843,9 +1843,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1863,7 +1863,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", ] @@ -1873,7 +1873,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -1883,7 +1883,7 @@ 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", ] @@ -1903,7 +1903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2166,7 +2166,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2431,7 +2431,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "strsim 0.10.0", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2442,7 +2442,7 @@ checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b" dependencies = [ "darling_core", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2478,7 +2478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2499,7 +2499,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2512,7 +2512,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "rustc_version 0.4.0", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2530,7 +2530,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]] @@ -2648,7 +2648,7 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2676,7 +2676,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] @@ -2701,10 +2701,10 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2730,7 +2730,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2741,7 +2741,7 @@ checksum = "4e58b112d5099aa0857c5d05f0eacab86406dd8c0f85fe5d320a13256d29ecf4" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -2925,7 +2925,7 @@ dependencies = [ "log 0.4.14", "serde", "serde_urlencoded", - "sha2 0.9.8", + "sha2 0.9.9", "sp-core", "structopt", "subxt", @@ -3212,7 +3212,7 @@ dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3224,7 +3224,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3234,7 +3234,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3444,7 +3444,7 @@ checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -3512,9 +3512,9 @@ 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 0.9.4", @@ -3625,9 +3625,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" +checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" dependencies = [ "bytes 1.1.0", "fnv", @@ -3644,9 +3644,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.1.6" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167fa173496c9eadd8749cca6f8339ac88e248f3ad2442791d0b743318a94fc0" +checksum = "2483bce82dd3ed52509d0117e4a30a488bd608be250ed7a0185301314239ed31" dependencies = [ "log 0.4.14", "pest", @@ -3714,6 +3714,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -3788,7 +3794,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", ] @@ -4092,7 +4098,7 @@ checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4103,9 +4109,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" dependencies = [ "autocfg 1.0.1", "hashbrown", @@ -4374,7 +4380,7 @@ dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4511,7 +4517,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4523,7 +4529,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -4903,7 +4909,7 @@ dependencies = [ "rand 0.8.4", "ring", "rw-stream-sink", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "thiserror", "unsigned-varint 0.7.1", @@ -4974,7 +4980,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "regex", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "unsigned-varint 0.7.1", "wasm-timer", @@ -5015,7 +5021,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "sha2 0.9.8", + "sha2 0.9.9", "smallvec 1.7.0", "uint", "unsigned-varint 0.7.1", @@ -5091,7 +5097,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "snow", "static_assertions", "x25519-dalek", @@ -5182,7 +5188,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.4", - "sha2 0.9.8", + "sha2 0.9.9", "thiserror", "unsigned-varint 0.7.1", "void", @@ -5231,7 +5237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "072c290f727d39bdc4e9d6d1c847978693d25a673bd757813681e33e5f6c00c2" dependencies = [ "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -5335,7 +5341,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand 0.8.4", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "typenum", ] @@ -5580,9 +5586,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "fe3179b85e1fd8b14447cbebadb75e45a1002f541b925f0bfec366d56a81c56d" dependencies = [ "libc", ] @@ -5817,9 +5823,9 @@ dependencies = [ "blake2s_simd", "blake3", "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", + "sha2 0.9.9", "sha3", "unsigned-varint 0.5.1", ] @@ -5831,9 +5837,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", + "sha2 0.9.9", "unsigned-varint 0.7.1", ] @@ -5847,7 +5853,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] @@ -5915,7 +5921,7 @@ checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -6132,7 +6138,7 @@ checksum = "a15c83b586f00268c619c1cb3340ec1a6f59dd9ba1d9833a273a68e6d5cd8ffc" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -6151,9 +6157,9 @@ dependencies = [ [[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" @@ -7315,7 +7321,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -7660,7 +7666,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -7708,7 +7714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ "proc-macro2 1.0.36", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] @@ -7935,7 +7941,7 @@ dependencies = [ "pest_meta", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8062,7 +8068,7 @@ checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8073,7 +8079,7 @@ checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -8826,7 +8832,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9258,7 +9264,7 @@ version = "0.1.0" dependencies = [ "binance", "chrono", - "clap 3.0.1", + "clap 3.0.7", "custom_derive", "enum_derive", "env_logger 0.9.0", @@ -9331,7 +9337,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "version_check 0.9.4", ] @@ -9452,7 +9458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ "bytes 1.1.0", - "heck", + "heck 0.3.3", "itertools", "lazy_static", "log 0.4.14", @@ -9475,7 +9481,7 @@ dependencies = [ "itertools", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9797,7 +9803,7 @@ checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.6", "lazy_static", "num_cpus", ] @@ -9866,7 +9872,7 @@ checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -9946,15 +9952,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4e0a76dc12a116108933f6301b95e83634e0c47b0afbed6abbaa0601e99258" +checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" dependencies = [ "base64 0.13.0", "bytes 1.1.0", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper 0.14.16", @@ -10395,7 +10402,7 @@ version = "4.0.0-dev" source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" dependencies = [ "impl-trait-for-tuples", - "memmap2 0.5.0", + "memmap2 0.5.2", "parity-scale-codec", "sc-chain-spec-derive", "sc-network", @@ -10414,7 +10421,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11233,7 +11240,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11311,7 +11318,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11474,7 +11481,7 @@ checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -11577,9 +11584,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", @@ -11636,9 +11643,9 @@ dependencies = [ [[package]] name = "signal-hook-tokio" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c5d32165ff8b94e68e7b3bdecb1b082e958c22434b363482cfb89dcd6f3ff8" +checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e" dependencies = [ "futures-core", "libc", @@ -11648,9 +11655,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" [[package]] name = "simba" @@ -11774,7 +11781,7 @@ dependencies = [ "rand_core 0.6.3", "ring", "rustc_version 0.3.3", - "sha2 0.9.8", + "sha2 0.9.9", "subtle", "x25519-dalek", ] @@ -11842,7 +11849,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12043,7 +12050,7 @@ dependencies = [ "schnorrkel", "secrecy", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "sp-core-hashing", "sp-debug-derive", "sp-externalities", @@ -12067,7 +12074,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "blake2-rfc", "byteorder", - "sha2 0.9.8", + "sha2 0.9.9", "sp-std", "tiny-keccak", "twox-hash", @@ -12081,7 +12088,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "sp-core-hashing", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12100,7 +12107,7 @@ source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13# dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12229,7 +12236,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12310,7 +12317,7 @@ dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12493,7 +12500,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12515,9 +12522,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83f0afe7e571565ef9aae7b0e4fb30fcaec4ebb9aea2f00489b772782aa03a4" +checksum = "1230685dc82f8699110640244d361a7099c602f08bddc5c90765a5153b4881dc" dependencies = [ "Inflector", "proc-macro2 1.0.36", @@ -12570,7 +12577,7 @@ dependencies = [ "memchr", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12610,7 +12617,7 @@ dependencies = [ "quote 1.0.14", "serde", "serde_derive", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12626,7 +12633,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12664,11 +12671,11 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12686,10 +12693,10 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12701,7 +12708,7 @@ dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] @@ -12865,14 +12872,14 @@ dependencies = [ "async-trait", "darling", "frame-metadata", - "heck", + "heck 0.3.3", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2 1.0.36", "quote 1.0.14", "scale-info", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12883,7 +12890,7 @@ dependencies = [ "async-trait", "darling", "frame-metadata", - "heck", + "heck 0.3.3", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -12891,7 +12898,7 @@ dependencies = [ "quote 1.0.14", "scale-info", "subxt-codegen", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -12913,9 +12920,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb2e6da8ee5eb9a61068762a32fa9619cc591ceb055b3687f4cd4051ec2e06b" +checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", @@ -12930,7 +12937,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "unicode-xid 0.2.2", ] @@ -12948,13 +12955,13 @@ checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" [[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.4", "redox_syscall 0.2.10", "remove_dir_all", "winapi 0.3.9", @@ -13001,7 +13008,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13104,7 +13111,7 @@ dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", "standback", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13119,7 +13126,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", @@ -13209,7 +13216,7 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13373,7 +13380,7 @@ checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -13704,7 +13711,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", ] @@ -13916,7 +13923,7 @@ dependencies = [ "log 0.4.14", "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "wasm-bindgen-shared", ] @@ -13950,7 +13957,7 @@ checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14063,7 +14070,7 @@ dependencies = [ "log 0.4.14", "rsix", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "toml", "winapi 0.3.9", "zstd", @@ -14473,7 +14480,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.13#7d8f dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", ] [[package]] @@ -14507,24 +14514,24 @@ checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", - "syn 1.0.84", + "syn 1.0.85", "synstructure", ] [[package]] name = "zstd" -version = "0.9.1+zstd.1.5.1" +version = "0.9.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538b8347df9257b7fbce37677ef7535c00a3c7bf1f81023cc328ed7fe4b41de8" +checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "4.1.2+zstd.1.5.1" +version = "4.1.3+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4cfe2f6e6d35c5d27ecd9d256c4b6f7933c4895654917460ec56c29336cc1" +checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" dependencies = [ "libc", "zstd-sys", diff --git a/docker/Dockerfile b/docker/Dockerfile index fb443c9fe85..4a0fcee9977 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,16 +20,15 @@ LABEL description="Precompiled Docker image for Composable" \ image.documentation="https://github.com/ComposableFi/composable#readme" SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl "https://storage.googleapis.com/composable-binaries/community-releases/${VERSION}/composable-${VERSION}.tar.gz" | tar -xz - -RUN chmod +x target/release/composable && mv target/release/composable /usr/local/bin - -RUN useradd -m -u 1001 -U -s /bin/sh -d /composable composable && \ +RUN curl "https://storage.googleapis.com/composable-binaries/community-releases/${VERSION}/composable-${VERSION}.tar.gz" | tar -xz \ + chmod +x target/release/composable && mv target/release/composable /usr/local/bin \ + useradd -m -u 1001 -U -s /bin/sh -d /composable composable && \ mkdir -p /composable/.local/share/local_testnet && \ mkdir /data && \ chown -R composable:composable /data && \ chown -R composable:composable /composable/.local/share/local_testnet && \ ln -s /data /composable/.local/share/local_testnet + USER composable EXPOSE 30333 9933 9944 9615 diff --git a/frame/assets-registry/Cargo.toml b/frame/assets-registry/Cargo.toml index 12fb5feb14b..a4f1d109066 100644 --- a/frame/assets-registry/Cargo.toml +++ b/frame/assets-registry/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index a81b1c8ce36..5a933d365da 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/bonded-finance/Cargo.toml b/frame/bonded-finance/Cargo.toml index 5b38f6e4bc7..a103c6ab1d1 100644 --- a/frame/bonded-finance/Cargo.toml +++ b/frame/bonded-finance/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/call-filter/Cargo.toml b/frame/call-filter/Cargo.toml index 4ad49e6cb19..eb73435e785 100644 --- a/frame/call-filter/Cargo.toml +++ b/frame/call-filter/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [dependencies] serde = { version = "1.0.124", optional = true } diff --git a/frame/composable-traits/Cargo.toml b/frame/composable-traits/Cargo.toml index 50c7936ee1c..96f552d286d 100644 --- a/frame/composable-traits/Cargo.toml +++ b/frame/composable-traits/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/crowdloan-rewards/Cargo.toml b/frame/crowdloan-rewards/Cargo.toml index 89a7984825c..c9ac573167e 100644 --- a/frame/crowdloan-rewards/Cargo.toml +++ b/frame/crowdloan-rewards/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/currency-factory/Cargo.toml b/frame/currency-factory/Cargo.toml index 44542404a77..e0bea308917 100644 --- a/frame/currency-factory/Cargo.toml +++ b/frame/currency-factory/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/curve-amm/Cargo.toml b/frame/curve-amm/Cargo.toml index 09f9d4c18d6..971c34d3671 100644 --- a/frame/curve-amm/Cargo.toml +++ b/frame/curve-amm/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/dutch-auction/Cargo.toml b/frame/dutch-auction/Cargo.toml index f98a549fb44..5d8e4871299 100644 --- a/frame/dutch-auction/Cargo.toml +++ b/frame/dutch-auction/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -65,5 +65,4 @@ runtime-benchmarks = [ "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", ] diff --git a/frame/governance-registry/Cargo.toml b/frame/governance-registry/Cargo.toml index d9da42e056b..b871df12b97 100644 --- a/frame/governance-registry/Cargo.toml +++ b/frame/governance-registry/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/lending/Cargo.toml b/frame/lending/Cargo.toml index 56d6c75a725..b73946ec3ad 100644 --- a/frame/lending/Cargo.toml +++ b/frame/lending/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/liquidations/Cargo.toml b/frame/liquidations/Cargo.toml index 89a12c7efe5..24f422a5ba4 100644 --- a/frame/liquidations/Cargo.toml +++ b/frame/liquidations/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/oracle/Cargo.toml b/frame/oracle/Cargo.toml index 953dd708cdb..778724b1c96 100644 --- a/frame/oracle/Cargo.toml +++ b/frame/oracle/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/ping/Cargo.toml b/frame/ping/Cargo.toml index 170bb9c6813..94028b7baf2 100644 --- a/frame/ping/Cargo.toml +++ b/frame/ping/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + name = "pallet-ping" version = "0.1.0" diff --git a/frame/transaction-fee/Cargo.toml b/frame/transaction-fee/Cargo.toml index 4333f7a02a0..776276fc037 100644 --- a/frame/transaction-fee/Cargo.toml +++ b/frame/transaction-fee/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/uniswap-v2/Cargo.toml b/frame/uniswap-v2/Cargo.toml index 93aed2fc847..15926b1d827 100644 --- a/frame/uniswap-v2/Cargo.toml +++ b/frame/uniswap-v2/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/vault/Cargo.toml b/frame/vault/Cargo.toml index fb7d849ff3d..69889b22649 100644 --- a/frame/vault/Cargo.toml +++ b/frame/vault/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index 2807f9d0205..19487c20e18 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -5,7 +5,7 @@ version = "0.0.1" authors = ["Composable Developers"] homepage = "https://composable.finance" edition = "2021" -rust-version = "1.56" + [dependencies] scale-info = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 58cd6a274a9..1ce356507ab 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -2,7 +2,7 @@ name = "integration-tests" version = "0.1.0" edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/node/src/res/picasso.json b/node/src/res/picasso.json index c7c90e07b75..57fd6b210f8 100644 --- a/node/src/res/picasso.json +++ b/node/src/res/picasso.json @@ -3,9 +3,9 @@ "id": "picasso", "chainType": "Live", "bootNodes": [ - "/dns/picasso-bn1.composable.finance/tcp/30334/p2p/12D3KooWJUwiZN4ePCwgbEM7AxJ4U2SaTrrgzkppFQxDmDhXXX2x", - "/dns/picasso-bn2.composable.finance/tcp/30334/p2p/12D3KooWD4M96HiuBUvhZZ8jmSzic4V6cWWvxFGPa7XAZnubmLtX", - "/dns/picasso-bn3.composable.finance/tcp/30334/p2p/12D3KooWASeF5JW1HGvpH46r9UzTBh77TfP4z8VPQ1RuyiKf34JN" + "/dns/picasso-bn1.composable.finance/tcp/30334/p2p/12D3KooWNh6vJ8ZypaXGJDQmxrDs8TC1HTNyPDSF9dfe1waFLaHD", + "/dns/picasso-bn2.composable.finance/tcp/30334/p2p/12D3KooWAKCft1b38awDNhCzV82Rb8qfRVyJv7E1pCEE95aoBzfs", + "/dns/picasso-bn3.composable.finance/tcp/30334/p2p/12D3KooWKTTnduPVwdmZS29AZaSSSTP6TXBv3FQ6r775bqC8o6gJ" ], "telemetryEndpoints": [ [ diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index eadb1ff28cd..54db6067563 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -3,7 +3,7 @@ name = "common" version = "0.8.30" authors = ["Composable Developers "] edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/composable/Cargo.toml b/runtime/composable/Cargo.toml index 669c0afd8c4..398f4f31e7a 100644 --- a/runtime/composable/Cargo.toml +++ b/runtime/composable/Cargo.toml @@ -2,7 +2,7 @@ name = "composable-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Composable, Polkadot Parachain Runtime Implementation" authors = ["Seun Lanlege "] diff --git a/runtime/dali/Cargo.toml b/runtime/dali/Cargo.toml index 9ec36dbff00..506953c14e8 100644 --- a/runtime/dali/Cargo.toml +++ b/runtime/dali/Cargo.toml @@ -2,7 +2,7 @@ name = "dali-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Dali, Testnet Parachain Runtime Implementation" authors = ["Seun Lanlege "] @@ -58,7 +58,7 @@ assets = { package = "pallet-assets", path = '../../frame/assets', default-featu crowdloan-rewards = { package = "pallet-crowdloan-rewards", path = '../../frame/crowdloan-rewards', default-features = false } bonded-finance = { package = "pallet-bonded-finance", path = "../../frame/bonded-finance", default-features = false } vesting = { package = "pallet-vesting", path = "../../frame/vesting", default-features = false } -dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false } + dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false } common = { path = "../common", default-features = false } primitives = { path = "../primitives", default-features = false } oracle = { package = "pallet-oracle", path = "../../frame/oracle", default-features = false } @@ -171,7 +171,8 @@ std = [ "composable-traits/std", "crowdloan-rewards/std", "bonded-finance/std", - "vesting/std" + "dutch-auction/std", + "vesting/std" ] runtime-benchmarks = [ "assets/runtime-benchmarks", @@ -193,7 +194,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "indices/runtime-benchmarks", "crowdloan-rewards/runtime-benchmarks", - "dutch-auction/runtime-benchmarks", "identity/runtime-benchmarks", "multisig/runtime-benchmarks", "membership/runtime-benchmarks", @@ -206,4 +206,5 @@ runtime-benchmarks = [ "vesting/runtime-benchmarks", "assets/runtime-benchmarks", "bonded-finance/runtime-benchmarks", + "dutch-auction/runtime-benchmarks", ] diff --git a/runtime/picasso/Cargo.toml b/runtime/picasso/Cargo.toml index 00968ab44d1..ba0ba0b09ff 100644 --- a/runtime/picasso/Cargo.toml +++ b/runtime/picasso/Cargo.toml @@ -2,7 +2,7 @@ name = "picasso-runtime" version = "0.1.0" edition = "2021" -rust-version = "1.56" + description = "Picasso, Kusama Parachain Runtime Implementation" authors = ["Seun Lanlege "] @@ -23,7 +23,6 @@ normal = [ "pallet-vault", "session-benchmarking", "vault", - "pallet-dutch-auction", ] [dependencies] @@ -172,12 +171,12 @@ std = [ "orml-xcm-support/std", "orml-unknown-tokens/std", "composable-traits/std", - "governance-registry/std", - "currency-factory/std", - "assets/std", - "vesting/std", - "bonded-finance/std", - "crowdloan-rewards/std", + "governance-registry/std", + "currency-factory/std", + "assets/std", + "vesting/std", + "bonded-finance/std", + "crowdloan-rewards/std", ] runtime-benchmarks = [ @@ -204,10 +203,10 @@ runtime-benchmarks = [ "collective/runtime-benchmarks", "democracy/runtime-benchmarks", "utility/runtime-benchmarks", - "crowdloan-rewards/runtime-benchmarks", - "currency-factory/runtime-benchmarks", - "assets/runtime-benchmarks", - "vesting/runtime-benchmarks", - "bonded-finance/runtime-benchmarks", + "crowdloan-rewards/runtime-benchmarks", + "currency-factory/runtime-benchmarks", + "assets/runtime-benchmarks", + "vesting/runtime-benchmarks", + "bonded-finance/runtime-benchmarks", ] diff --git a/runtime/primitives/Cargo.toml b/runtime/primitives/Cargo.toml index 1bdd57f05a3..ebf9ed231c2 100644 --- a/runtime/primitives/Cargo.toml +++ b/runtime/primitives/Cargo.toml @@ -3,7 +3,7 @@ name = "primitives" version = "0.1.0" authors = ["Composable Developers "] edition = "2021" -rust-version = "1.56" + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index e07af34e7d3..00000000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,5 +0,0 @@ -[toolchain] -channel = "nightly-2021-11-29" -components = [ "rustfmt", "rustc", "rust-std", "cargo", "clippy", "llvm-tools-preview"] -targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file diff --git a/utils/price-feed/Cargo.toml b/utils/price-feed/Cargo.toml index 4d1c922cbac..427f972fc35 100644 --- a/utils/price-feed/Cargo.toml +++ b/utils/price-feed/Cargo.toml @@ -2,7 +2,7 @@ name = "price-feed" version = "0.1.0" edition = "2021" -rust-version = "1.56" + [dependencies] enum_derive = "0.1.7" From 0d27b9be6619639fbcd1dd158529618b95bf944a Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Mon, 17 Jan 2022 12:06:29 +0100 Subject: [PATCH 03/35] Updates weights for picasso-dev --- .maintain/run_benchmarks.sh | 12 +- node/src/command.rs | 41 ++- runtime/picasso/src/weights/balances.rs | 50 ++-- .../picasso/src/weights/collator_selection.rs | 91 +++++-- runtime/picasso/src/weights/collective.rs | 163 +++++++----- runtime/picasso/src/weights/democracy.rs | 243 ++++++++++++------ runtime/picasso/src/weights/frame_system.rs | 58 +++-- runtime/picasso/src/weights/indices.rs | 31 ++- runtime/picasso/src/weights/membership.rs | 96 ++++--- runtime/picasso/src/weights/scheduler.rs | 57 ++-- runtime/picasso/src/weights/timestamp.rs | 26 +- runtime/picasso/src/weights/treasury.rs | 43 ++-- runtime/picasso/src/weights/utility.rs | 23 +- 13 files changed, 591 insertions(+), 343 deletions(-) diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh index 3e8b6ede748..5cdf81a3f82 100755 --- a/.maintain/run_benchmarks.sh +++ b/.maintain/run_benchmarks.sh @@ -8,9 +8,9 @@ . "$(dirname "${0}")/./common/lib.sh" VERSIONS_FILES=( - "runtime/picasso/src/weights,picasso,picasso" - "runtime/dali/src/weights,dali-chachacha,dali" - "runtime/composable/src/weights,composable,composable" + "runtime/picasso/src/weights,picasso-dev,picasso" + "runtime/dali/src/weights,dali-dev,dali" + "runtime/composable/src/weights,composable-dev,composable" ) steps=50 @@ -41,9 +41,9 @@ pallets=( git log -n1 "${LATEST_TAG_NAME}" -/home/runner/.cargo/bin/rustup install nightly -/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly -/home/runner/.cargo/bin/cargo build --release -p composable --features=runtime-benchmarks +rustup install nightly +rustup target add wasm32-unknown-unknown --toolchain nightly +cargo build --release -p composable --features=runtime-benchmarks run_benchmarks() { OUTPUT=$1 diff --git a/node/src/command.rs b/node/src/command.rs index eea0854c081..82afb292d92 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -14,6 +14,10 @@ // 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. +#[cfg(feature = "composable")] +use crate::service::ComposableExecutor; +#[cfg(feature = "dali")] +use crate::service::DaliExecutor; use crate::{ chain_spec, @@ -99,8 +103,9 @@ impl SubstrateCli for Cli { "composable" | "composable-dev" => &composable_runtime::VERSION, // dali chains #[cfg(feature = "dali")] - "dali" | "dali-chachacha" | "dali-rococo" | "dali-westend" | "dali-dev" => - &dali_runtime::VERSION, + "dali" | "dali-chachacha" | "dali-rococo" | "dali-westend" | "dali-dev" => { + &dali_runtime::VERSION + } // picasso chains "picasso" | "picasso-dev" => &picasso_runtime::VERSION, _ => panic!("Unknown chain_id: {}", spec.id()), @@ -178,27 +183,27 @@ pub fn run() -> Result<()> { Some(Subcommand::BuildSpec(cmd)) => { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, + } Some(Subcommand::CheckBlock(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.2)) }) - }, + } Some(Subcommand::ExportBlocks(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, config.database)) }) - }, + } Some(Subcommand::ExportState(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, config.chain_spec)) }) - }, + } Some(Subcommand::ImportBlocks(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.2)) }) - }, + } Some(Subcommand::Key(cmd)) => cmd.run(&cli), Some(Subcommand::PurgeChain(cmd)) => { let runner = cli.create_runner(cmd)?; @@ -218,7 +223,7 @@ pub fn run() -> Result<()> { cmd.run(config, polkadot_config) }) - }, + } Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.1)) }), @@ -243,7 +248,7 @@ pub fn run() -> Result<()> { } Ok(()) - }, + } Some(Subcommand::ExportGenesisWasm(params)) => { let mut builder = sc_cli::LoggerBuilder::new(""); builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); @@ -264,17 +269,25 @@ pub fn run() -> Result<()> { } Ok(()) - }, - Some(Subcommand::Benchmark(cmd)) => + } + Some(Subcommand::Benchmark(cmd)) => { if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| match config.chain_spec.id() { + id if id.contains("picasso") => cmd.run::(config), + #[cfg(feature = "dali")] + id if id.contains("dali") => cmd.run::(config), + #[cfg(feature = "composable")] + id if id.contains("composable") => cmd.run::(config), + id => panic!("Unknown Id: {}", id), + }) } else { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." .into()) - }, + } + } None => { let runner = cli.create_runner(&cli.run.normalize())?; @@ -310,7 +323,7 @@ pub fn run() -> Result<()> { Ok(crate::service::start_node(config, polkadot_config, id).await?) }) - }, + } } } diff --git a/runtime/picasso/src/weights/balances.rs b/runtime/picasso/src/weights/balances.rs index cc8d784f857..684349274d0 100644 --- a/runtime/picasso/src/weights/balances.rs +++ b/runtime/picasso/src/weights/balances.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for balances + +//! Autogenerated weights for `balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -12,52 +13,61 @@ // --wasm-execution=compiled // --pallet=balances // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for balances. +/// Weight functions for `balances`. pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { + // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (139_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (50_000_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_keep_alive() -> Weight { - (81_000_000 as Weight) + (30_000_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 { - (47_000_000 as Weight) + (18_000_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 { - (54_000_000 as Weight) + (20_000_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:3 w:3) fn force_transfer() -> Weight { - (110_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (51_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (100_000_000 as Weight) + (38_000_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 { - (100_000_000 as Weight) + (16_000_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/picasso/src/weights/collator_selection.rs b/runtime/picasso/src/weights/collator_selection.rs index 8e7427027e1..5dcf23d50b1 100644 --- a/runtime/picasso/src/weights/collator_selection.rs +++ b/runtime/picasso/src/weights/collator_selection.rs @@ -1,52 +1,93 @@ + +//! Autogenerated weights for `collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 + +// Executed Command: +// ./target/release/composable +// benchmark +// --chain=picasso-dev +// --execution=wasm +// --wasm-execution=compiled +// --pallet=collator_selection +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --raw +// --output=runtime/picasso/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weights for pallet_collator_selection using the Substrate node and recommended hardware. +/// Weight functions for `collator_selection`. pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { - fn set_invulnerables(b: u32) -> Weight { - (18_563_000 as Weight) + // Storage: CollatorSelection Invulnerables (r:0 w:1) + fn set_invulnerables(b: u32, ) -> Weight { + (10_446_000 as Weight) // Standard Error: 0 - .saturating_add((68_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (9_000_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (9_000_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn register_as_candidate(c: u32) -> Weight { - (71_196_000 as Weight) - // Standard Error: 0 - .saturating_add((198_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn register_as_candidate(c: u32, ) -> Weight { + (28_791_000 as Weight) + // Standard Error: 1_000 + .saturating_add((199_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn leave_intent(c: u32) -> Weight { - (55_336_000 as Weight) - // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(c as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn leave_intent(c: u32, ) -> Weight { + (29_119_000 as Weight) + // Standard Error: 1_000 + .saturating_add((285_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: System Account (r:2 w:2) + // Storage: System BlockWeight (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (71_461_000 as Weight) + (39_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn new_session(r: u32, c: u32) -> Weight { + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) + // Storage: System Account (r:1 w:1) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_010_000 - .saturating_add((109_961_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_010_000 - .saturating_add((151_952_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) + // Standard Error: 3_816_000 + .saturating_add((17_455_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 3_816_000 + .saturating_add((99_363_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) } } diff --git a/runtime/picasso/src/weights/collective.rs b/runtime/picasso/src/weights/collective.rs index 6fc9ddebf28..c7de70c7432 100644 --- a/runtime/picasso/src/weights/collective.rs +++ b/runtime/picasso/src/weights/collective.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for collective + +//! Autogenerated weights for `collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,106 +16,142 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for collective. +/// Weight functions for `collective`. pub struct WeightInfo(PhantomData); impl collective::WeightInfo for WeightInfo { - fn set_members(m: u32, _n: u32, p: u32) -> Weight { + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Voting (r:100 w:100) + // Storage: Council Prime (r:0 w:1) + fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 63_000 - .saturating_add((25_207_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 63_000 - .saturating_add((33_546_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 23_000 + .saturating_add((14_100_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 23_000 + .saturating_add((39_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 23_000 + .saturating_add((17_219_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))) } - fn execute(b: u32, m: u32) -> Weight { - (30_323_000 as Weight) + // Storage: Council Members (r:1 w:0) + fn execute(b: u32, m: u32, ) -> Weight { + (13_423_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((127_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(1 as Weight)) } - fn propose_execute(b: u32, m: u32) -> Weight { - (38_575_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + fn propose_execute(b: u32, m: u32, ) -> Weight { + (15_493_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 3_000 - .saturating_add((254_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 0 + .saturating_add((152_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } - fn propose_proposed(b: u32, m: u32, p: u32) -> Weight { - (48_131_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + (21_091_000 as Weight) // Standard Error: 0 - .saturating_add((18_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 7_000 - .saturating_add((147_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((909_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((5_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((103_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((204_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)) } - fn vote(m: u32) -> Weight { - (75_974_000 as Weight) - // Standard Error: 4_000 - .saturating_add((370_000 as Weight).saturating_mul(m as Weight)) + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + fn vote(m: u32, ) -> Weight { + (20_391_000 as Weight) + // Standard Error: 3_000 + .saturating_add((193_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)) } - fn close_early_disapproved(m: u32, p: u32) -> Weight { - (63_575_000 as Weight) - // Standard Error: 5_000 - .saturating_add((293_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 5_000 - .saturating_add((761_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + (22_040_000 as Weight) + // Standard Error: 3_000 + .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 3_000 + .saturating_add((232_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)) } - fn close_early_approved(b: u32, m: u32, p: u32) -> Weight { - (86_824_000 as Weight) - // Standard Error: 0 - .saturating_add((12_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 8_000 - .saturating_add((321_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 8_000 - .saturating_add((860_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + fn close_early_approved(_b: u32, m: u32, p: u32, ) -> Weight { + (36_447_000 as Weight) + // Standard Error: 4_000 + .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 4_000 + .saturating_add((205_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)) } - fn close_disapproved(m: u32, p: u32) -> Weight { - (70_231_000 as Weight) - // Standard Error: 7_000 - .saturating_add((323_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 6_000 - .saturating_add((784_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_disapproved(m: u32, p: u32, ) -> Weight { + (27_113_000 as Weight) + // Standard Error: 3_000 + .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 3_000 + .saturating_add((205_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)) } - fn close_approved(b: u32, m: u32, p: u32) -> Weight { - (92_370_000 as Weight) - // Standard Error: 1_000 - .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 10_000 - .saturating_add((327_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 9_000 - .saturating_add((899_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + (28_889_000 as Weight) + // Standard Error: 0 + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 5_000 + .saturating_add((216_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 5_000 + .saturating_add((258_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)) } - fn disapprove_proposal(p: u32) -> Weight { - (35_489_000 as Weight) - // Standard Error: 4_000 - .saturating_add((830_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn disapprove_proposal(p: u32, ) -> Weight { + (14_384_000 as Weight) + // Standard Error: 2_000 + .saturating_add((215_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/picasso/src/weights/democracy.rs b/runtime/picasso/src/weights/democracy.rs index 0b528a6d67e..420423df60d 100644 --- a/runtime/picasso/src/weights/democracy.rs +++ b/runtime/picasso/src/weights/democracy.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for democracy + +//! Autogenerated weights for `democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,176 +16,248 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for democracy. +/// Weight functions for `democracy`. pub struct WeightInfo(PhantomData); impl democracy::WeightInfo for WeightInfo { + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (112_082_000 as Weight) + (33_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn second(s: u32) -> Weight { - (56_014_000 as Weight) - // Standard Error: 3_000 - .saturating_add((349_000 as Weight).saturating_mul(s as Weight)) + // Storage: Democracy DepositOf (r:1 w:1) + fn second(s: u32, ) -> Weight { + (22_005_000 as Weight) + // Standard Error: 2_000 + .saturating_add((113_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)) } - fn vote_new(r: u32) -> Weight { - (62_157_000 as Weight) - // Standard Error: 4_000 - .saturating_add((512_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new(r: u32, ) -> Weight { + (23_617_000 as Weight) + // Standard Error: 1_000 + .saturating_add((71_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)) } - fn vote_existing(r: u32) -> Weight { - (62_708_000 as Weight) - // Standard Error: 4_000 - .saturating_add((495_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing(r: u32, ) -> Weight { + (23_998_000 as Weight) + // Standard Error: 1_000 + .saturating_add((58_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 { - (38_669_000 as Weight) + (16_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn blacklist(p: u32) -> Weight { - (113_805_000 as Weight) - // Standard Error: 9_000 - .saturating_add((998_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn blacklist(p: u32, ) -> Weight { + (50_557_000 as Weight) + // Standard Error: 5_000 + .saturating_add((368_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn external_propose(v: u32) -> Weight { - (19_088_000 as Weight) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose(v: u32, ) -> Weight { + (7_880_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((74_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 { - (4_287_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (1_000_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (4_227_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (2_000_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 { - (38_917_000 as Weight) + (16_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn veto_external(v: u32) -> Weight { - (40_067_000 as Weight) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external(v: u32, ) -> Weight { + (16_709_000 as Weight) // Standard Error: 0 - .saturating_add((172_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((81_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)) } - fn cancel_proposal(p: u32) -> Weight { - (69_372_000 as Weight) - // Standard Error: 5_000 - .saturating_add((991_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn cancel_proposal(p: u32, ) -> Weight { + (36_925_000 as Weight) + // Standard Error: 3_000 + .saturating_add((330_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (23_073_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (10_000_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn cancel_queued(r: u32) -> Weight { - (36_184_000 as Weight) - // Standard Error: 32_000 - .saturating_add((6_334_000 as Weight).saturating_mul(r as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_queued(r: u32, ) -> Weight { + (18_209_000 as Weight) + // Standard Error: 2_000 + .saturating_add((727_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)) } - fn on_initialize_base(r: u32) -> Weight { - (0 as Weight) - // Standard Error: 44_000 - .saturating_add((8_834_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base(r: u32, ) -> Weight { + (2_036_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_491_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)) } - - fn on_initialize_base_with_launch_period(_r: u32) -> Weight { - (0 as Weight) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + (8_278_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_483_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)) } - - fn delegate(r: u32) -> Weight { - (67_447_000 as Weight) - // Standard Error: 64_000 - .saturating_add((11_600_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn delegate(r: u32, ) -> Weight { + (30_685_000 as Weight) + // Standard Error: 9_000 + .saturating_add((4_496_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } - fn undelegate(r: u32) -> Weight { - (37_144_000 as Weight) - // Standard Error: 36_000 - .saturating_add((10_896_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + fn undelegate(r: u32, ) -> Weight { + (17_433_000 as Weight) + // Standard Error: 7_000 + .saturating_add((4_307_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } + // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (4_006_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (1_000_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn note_preimage(b: u32) -> Weight { - (61_302_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_preimage(b: u32, ) -> Weight { + (22_721_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)) } - fn note_imminent_preimage(b: u32) -> Weight { - (39_217_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_imminent_preimage(b: u32, ) -> Weight { + (15_817_000 as Weight) // Standard Error: 0 - .saturating_add((3_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(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn reap_preimage(b: u32) -> Weight { - (53_786_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + // Storage: System Account (r:1 w:0) + fn reap_preimage(b: u32, ) -> Weight { + (22_250_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)) } - fn unlock_remove(r: u32) -> Weight { - (54_249_000 as Weight) - // Standard Error: 4_000 - .saturating_add((313_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_remove(r: u32, ) -> Weight { + (20_058_000 as Weight) + // Standard Error: 1_000 + .saturating_add((32_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)) } - fn unlock_set(r: u32) -> Weight { - (48_885_000 as Weight) - // Standard Error: 4_000 - .saturating_add((486_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_set(r: u32, ) -> Weight { + (18_958_000 as Weight) + // Standard Error: 1_000 + .saturating_add((69_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)) } - fn remove_vote(r: u32) -> Weight { - (25_483_000 as Weight) - // Standard Error: 3_000 - .saturating_add((508_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_vote(r: u32, ) -> Weight { + (10_402_000 as Weight) + // Standard Error: 1_000 + .saturating_add((65_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)) } - fn remove_other_vote(r: u32) -> Weight { - (26_969_000 as Weight) - // Standard Error: 3_000 - .saturating_add((289_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_other_vote(r: u32, ) -> Weight { + (10_572_000 as Weight) + // Standard Error: 1_000 + .saturating_add((65_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/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index 940dabf0cb2..abf6644d8ec 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for frame_system + +//! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -12,52 +13,55 @@ // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for frame_system. +/// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(_b: u32) -> Weight { - (1_381_000 as Weight) + fn remark(_b: u32, ) -> Weight { + (0 as Weight) } - fn remark_with_event(b: u32) -> Weight { + fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (3_000_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn set_changes_trie_config() -> Weight { - (15_000_000 as Weight) + (3_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn set_storage(i: u32) -> Weight { - (25_491_000 as Weight) - // Standard Error: 28_000 - .saturating_add((962_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn set_storage(i: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 0 + .saturating_add((493_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_storage(i: u32) -> Weight { - (23_657_000 as Weight) - // Standard Error: 55_000 - .saturating_add((676_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_storage(i: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 0 + .saturating_add((341_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_prefix(p: u32) -> Weight { - (13_414_000 as Weight) - // Standard Error: 77_000 - .saturating_add((1_634_000 as Weight).saturating_mul(p as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_prefix(p: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 1_000 + .saturating_add((792_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/picasso/src/weights/indices.rs b/runtime/picasso/src/weights/indices.rs index 912228be72d..215373416bc 100644 --- a/runtime/picasso/src/weights/indices.rs +++ b/runtime/picasso/src/weights/indices.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for indices + +//! Autogenerated weights for `indices` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,39 +16,47 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for indices. +/// Weight functions for `indices`. pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { + // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (160_634_000 as Weight) + (22_000_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 { - (192_936_000 as Weight) + (28_000_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 { - (161_780_000 as Weight) + (23_000_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 { - (163_771_000 as Weight) + (24_000_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 { - (150_461_000 as Weight) + (26_000_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/picasso/src/weights/membership.rs b/runtime/picasso/src/weights/membership.rs index d8e8bd9a20c..4a17e0a541d 100644 --- a/runtime/picasso/src/weights/membership.rs +++ b/runtime/picasso/src/weights/membership.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for membership + +//! Autogenerated weights for `membership` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,58 +16,93 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for membership. +/// Weight functions for `membership`. pub struct WeightInfo(PhantomData); impl membership::WeightInfo for WeightInfo { - fn add_member(m: u32) -> Weight { - (78_864_000 as Weight) - // Standard Error: 57_000 - .saturating_add((925_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn add_member(m: u32, ) -> Weight { + (14_950_000 as Weight) + // Standard Error: 1_000 + .saturating_add((84_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)) } - fn remove_member(m: u32) -> Weight { - (81_076_000 as Weight) - // Standard Error: 10_000 - .saturating_add((494_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn remove_member(m: u32, ) -> Weight { + (17_640_000 as Weight) + // Standard Error: 0 + .saturating_add((81_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)) } - fn swap_member(m: u32) -> Weight { - (84_930_000 as Weight) - // Standard Error: 16_000 - .saturating_add((612_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn swap_member(m: u32, ) -> Weight { + (17_524_000 as Weight) + // Standard Error: 0 + .saturating_add((89_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)) } - fn reset_member(m: u32) -> Weight { - (90_093_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_065_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn reset_member(m: u32, ) -> Weight { + (17_979_000 as Weight) + // Standard Error: 0 + .saturating_add((152_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)) } - fn change_key(m: u32) -> Weight { - (76_029_000 as Weight) - // Standard Error: 18_000 - .saturating_add((903_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn change_key(m: u32, ) -> Weight { + (18_339_000 as Weight) + // Standard Error: 0 + .saturating_add((87_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)) } - fn set_prime(_m: u32) -> Weight { - (57_245_000 as Weight) + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn set_prime(m: u32, ) -> Weight { + (4_424_000 as Weight) + // Standard Error: 0 + .saturating_add((75_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)) } - fn clear_prime(_m: u32) -> Weight { - (12_220_000 as Weight).saturating_add(T::DbWeight::get().writes(2 as Weight)) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn clear_prime(m: u32, ) -> Weight { + (1_658_000 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/picasso/src/weights/scheduler.rs b/runtime/picasso/src/weights/scheduler.rs index 52686e5d5d4..8485553276e 100644 --- a/runtime/picasso/src/weights/scheduler.rs +++ b/runtime/picasso/src/weights/scheduler.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for scheduler + +//! Autogenerated weights for `scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -12,45 +13,53 @@ // --wasm-execution=compiled // --pallet=scheduler // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for scheduler. +/// Weight functions for `scheduler`. pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { - fn schedule(s: u32) -> Weight { - (43_832_000 as Weight) - // Standard Error: 181_000 - .saturating_add((7_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule(s: u32, ) -> Weight { + (14_682_000 as Weight) + // Standard Error: 1_000 + .saturating_add((14_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)) } - fn cancel(s: u32) -> Weight { - (33_112_000 as Weight) - // Standard Error: 234_000 - .saturating_add((4_865_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + fn cancel(s: u32, ) -> Weight { + (13_922_000 as Weight) + // Standard Error: 2_000 + .saturating_add((589_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)) } - fn schedule_named(s: u32) -> Weight { - (45_294_000 as Weight) - // Standard Error: 23_000 - .saturating_add((221_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule_named(s: u32, ) -> Weight { + (18_226_000 as Weight) + // Standard Error: 2_000 + .saturating_add((32_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)) } - fn cancel_named(s: u32) -> Weight { - (38_311_000 as Weight) - // Standard Error: 95_000 - .saturating_add((4_575_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_named(s: u32, ) -> Weight { + (15_695_000 as Weight) + // Standard Error: 2_000 + .saturating_add((605_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/picasso/src/weights/timestamp.rs b/runtime/picasso/src/weights/timestamp.rs index d49e0618b50..f71d8e236f2 100644 --- a/runtime/picasso/src/weights/timestamp.rs +++ b/runtime/picasso/src/weights/timestamp.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for timestamp + +//! Autogenerated weights for `timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -12,26 +13,29 @@ // --wasm-execution=compiled // --pallet=timestamp // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for timestamp. +/// Weight functions for `timestamp`. pub struct WeightInfo(PhantomData); impl timestamp::WeightInfo for WeightInfo { + // Storage: Timestamp Now (r:1 w:1) + // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (18_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (7_000_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 { - (7_000_000 as Weight) + (2_000_000 as Weight) } } diff --git a/runtime/picasso/src/weights/treasury.rs b/runtime/picasso/src/weights/treasury.rs index 38a6f2a7ff1..f8538b7a6f2 100644 --- a/runtime/picasso/src/weights/treasury.rs +++ b/runtime/picasso/src/weights/treasury.rs @@ -1,7 +1,8 @@ -//! Autogenerated weights for treasury + +//! Autogenerated weights for `treasury` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,38 +16,48 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; -/// Weight functions for treasury. +/// Weight functions for `treasury`. pub struct WeightInfo(PhantomData); impl treasury::WeightInfo for WeightInfo { + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (213_896_000 as Weight) + (24_000_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:2 w:2) fn reject_proposal() -> Weight { - (357_257_000 as Weight) + (37_000_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn approve_proposal(p: u32) -> Weight { - (48_959_000 as Weight) - // Standard Error: 58_000 - .saturating_add((139_000 as Weight).saturating_mul(p as Weight)) + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + fn approve_proposal(p: u32, ) -> Weight { + (6_295_000 as Weight) + // Standard Error: 3_000 + .saturating_add((50_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)) } - fn on_initialize_proposals(p: u32) -> Weight { - (180_865_000 as Weight) - // Standard Error: 9_488_000 - .saturating_add((241_148_000 as Weight).saturating_mul(p as Weight)) + // Storage: System Account (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:1 w:1) + fn on_initialize_proposals(p: u32, ) -> Weight { + (26_962_000 as Weight) + // Standard Error: 65_000 + .saturating_add((36_906_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/picasso/src/weights/utility.rs b/runtime/picasso/src/weights/utility.rs index b136ab71700..44026650674 100644 --- a/runtime/picasso/src/weights/utility.rs +++ b/runtime/picasso/src/weights/utility.rs @@ -1,7 +1,8 @@ + //! Autogenerated weights for `utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-12-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -15,32 +16,32 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/picasso/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `utility`. pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (277_000 as Weight) - // Standard Error: 2_000 - .saturating_add((4_110_000 as Weight).saturating_mul(c as Weight)) + (7_954_000 as Weight) + // Standard Error: 9_000 + .saturating_add((3_659_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_000_000 as Weight) + (2_000_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 5_000 - .saturating_add((4_491_000 as Weight).saturating_mul(c as Weight)) + (26_086_000 as Weight) + // Standard Error: 8_000 + .saturating_add((3_831_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (10_000_000 as Weight) + (9_000_000 as Weight) } } From b6f7185d217320f383460caf5f33bc677d62ffbb Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 15:37:14 +0100 Subject: [PATCH 04/35] update benchmark script --- runtime/picasso/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/picasso/Cargo.toml b/runtime/picasso/Cargo.toml index ba0ba0b09ff..71e552f789e 100644 --- a/runtime/picasso/Cargo.toml +++ b/runtime/picasso/Cargo.toml @@ -27,7 +27,7 @@ normal = [ [dependencies] frame-system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } -support = { package = "frame-support", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } # primitives From c9c3f05cf19eea32505f747d925a60e3497b1958 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 15:37:40 +0100 Subject: [PATCH 05/35] update benchmark script --- .maintain/run_benchmarks.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh index cb9562f6b04..6c28d2f2fd7 100755 --- a/.maintain/run_benchmarks.sh +++ b/.maintain/run_benchmarks.sh @@ -7,12 +7,6 @@ #shellcheck source=../common/lib.sh . "$(dirname "${0}")/./common/lib.sh" -<<<<<<< HEAD -LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) -GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) - -======= ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 VERSIONS_FILES=( "runtime/picasso/src/weights,picasso-dev,picasso" "runtime/dali/src/weights,dali-dev,dali" @@ -47,13 +41,14 @@ pallets=( git log -n1 "${LATEST_TAG_NAME}" -rustup install nightly -rustup target add wasm32-unknown-unknown --toolchain nightly -cargo build --release -p composable --features=runtime-benchmarks +/home/runner/.cargo/bin/rustup install nightly +/home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly +/home/runner/.cargo/bin/cargo build --release -p composable --features=runtime-benchmarks run_benchmarks() { OUTPUT=$1 CHAIN=$2 + FOLDER=$3 # shellcheck disable=SC2068 boldprint "Running benchmarks for $CHAIN" # shellcheck disable=SC2068 @@ -69,18 +64,21 @@ run_benchmarks() { --raw \ --output="$OUTPUT" done + git config --global user.email "haroldsphinx@gmail.com" + git config --global user.name "haroldsphinx" USERNAME=$(gcloud secrets versions access latest --secret=github-api-username) PASSWORD=$(gcloud secrets versions access latest --secret=github-api-token) - git remote set-url origin https://$USERNAME:$PASSWORD@github.com/ComposableFi/composable.git - git add . + git remote set-url origin https://"$USERNAME":"$PASSWORD"@github.com/ComposableFi/composable.git + git add runtime/$FOLDER git commit -m "Updates weights for $CHAIN" git push origin $GITHUB_REF_NAME + # ToDO: Setup gpg signing and create a bot account for pushing } for i in "${VERSIONS_FILES[@]}"; do while IFS=',' read -r output chain folder; do if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then - run_benchmarks $output $chain + run_benchmarks $output $chain $folder fi done <<<"$i" done From 12cbdfbc3a4f51c77610819fa7b69fe34a98e414 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Mon, 17 Jan 2022 15:55:01 +0100 Subject: [PATCH 06/35] support -> frame_support --- runtime/composable/Cargo.toml | 6 +++--- runtime/composable/src/lib.rs | 8 ++++---- runtime/composable/src/weights/balances.rs | 2 +- runtime/composable/src/weights/collator_selection.rs | 2 +- runtime/composable/src/weights/collective.rs | 2 +- runtime/composable/src/weights/democracy.rs | 2 +- runtime/composable/src/weights/frame_system.rs | 2 +- runtime/composable/src/weights/indices.rs | 2 +- runtime/composable/src/weights/membership.rs | 2 +- runtime/composable/src/weights/scheduler.rs | 2 +- runtime/composable/src/weights/session.rs | 2 +- runtime/composable/src/weights/timestamp.rs | 2 +- runtime/composable/src/weights/tokens.rs | 4 ++-- runtime/composable/src/weights/treasury.rs | 2 +- runtime/composable/src/weights/utility.rs | 2 +- runtime/composable/src/xcmp.rs | 2 +- runtime/dali/Cargo.toml | 6 +++--- runtime/dali/src/lib.rs | 10 +++++----- runtime/dali/src/weights/balances.rs | 2 +- runtime/dali/src/weights/collator_selection.rs | 2 +- runtime/dali/src/weights/collective.rs | 2 +- runtime/dali/src/weights/crowdloan_rewards.rs | 3 +-- runtime/dali/src/weights/democracy.rs | 2 +- runtime/dali/src/weights/dutch_auction.rs | 2 +- runtime/dali/src/weights/frame_system.rs | 2 +- runtime/dali/src/weights/identity.rs | 3 +-- runtime/dali/src/weights/indices.rs | 2 +- runtime/dali/src/weights/membership.rs | 2 +- runtime/dali/src/weights/multisig.rs | 3 +-- runtime/dali/src/weights/oracle.rs | 2 +- runtime/dali/src/weights/scheduler.rs | 2 +- runtime/dali/src/weights/session.rs | 2 +- runtime/dali/src/weights/timestamp.rs | 2 +- runtime/dali/src/weights/tokens.rs | 4 ++-- runtime/dali/src/weights/treasury.rs | 2 +- runtime/dali/src/weights/utility.rs | 2 +- runtime/dali/src/weights/vault.rs | 2 +- runtime/dali/src/xcmp.rs | 12 ++++++------ runtime/picasso/Cargo.toml | 6 +++--- runtime/picasso/src/lib.rs | 8 ++++---- runtime/picasso/src/weights/crowdloan_rewards.rs | 3 +-- runtime/picasso/src/weights/frame_system.rs | 6 +++++- runtime/picasso/src/weights/identity.rs | 3 +-- runtime/picasso/src/weights/multisig.rs | 3 +-- runtime/picasso/src/weights/session.rs | 2 +- runtime/picasso/src/weights/tokens.rs | 4 ++-- runtime/picasso/src/xcmp.rs | 12 ++++++------ 47 files changed, 80 insertions(+), 82 deletions(-) diff --git a/runtime/composable/Cargo.toml b/runtime/composable/Cargo.toml index 398f4f31e7a..aefcf9e9b39 100644 --- a/runtime/composable/Cargo.toml +++ b/runtime/composable/Cargo.toml @@ -26,7 +26,7 @@ normal = [ [dependencies] frame-system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } -support = { package = "frame-support", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } # primitives @@ -127,7 +127,7 @@ std = [ "sp-block-builder/std", "sp-transaction-pool/std", "sp-inherents/std", - "support/std", + "frame-support/std", "executive/std", "frame-system/std", "utility/std", @@ -179,7 +179,7 @@ runtime-benchmarks = [ "assets/runtime-benchmarks", "balances/runtime-benchmarks", "benchmarking", - "support/runtime-benchmarks", + "frame-support/runtime-benchmarks", "system-benchmarking", "frame-system/runtime-benchmarks", "hex-literal", diff --git a/runtime/composable/src/lib.rs b/runtime/composable/src/lib.rs index b681e165e11..acbf07483e6 100644 --- a/runtime/composable/src/lib.rs +++ b/runtime/composable/src/lib.rs @@ -44,7 +44,7 @@ use sp_version::RuntimeVersion; use sp_runtime::traits::AccountIdConversion; // A few exports that help ease life for downstream crates. -pub use support::{ +pub use frame_support::{ construct_runtime, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ @@ -56,11 +56,11 @@ pub use support::{ }; use codec::Encode; +use frame_support::traits::EqualPrivilegeOnly; use frame_system as system; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; pub use sp_runtime::{FixedPointNumber, Perbill, Permill, Perquintill}; -use support::traits::EqualPrivilegeOnly; use system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, @@ -828,10 +828,10 @@ impl_runtime_apis! { impl benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, - Vec, + Vec, ) { use benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; - use support::traits::StorageInfoTrait; + use frame_support::traits::StorageInfoTrait; use system_benchmarking::Pallet as SystemBench; let mut list = Vec::::new(); diff --git a/runtime/composable/src/weights/balances.rs b/runtime/composable/src/weights/balances.rs index 6e6dd646fbd..0a840e8b5dd 100644 --- a/runtime/composable/src/weights/balances.rs +++ b/runtime/composable/src/weights/balances.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for balances. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/collator_selection.rs b/runtime/composable/src/weights/collator_selection.rs index 8e7427027e1..736b86e7358 100644 --- a/runtime/composable/src/weights/collator_selection.rs +++ b/runtime/composable/src/weights/collator_selection.rs @@ -1,8 +1,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weights for pallet_collator_selection using the Substrate node and recommended hardware. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/collective.rs b/runtime/composable/src/weights/collective.rs index 6fc9ddebf28..570752756f8 100644 --- a/runtime/composable/src/weights/collective.rs +++ b/runtime/composable/src/weights/collective.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for collective. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/democracy.rs b/runtime/composable/src/weights/democracy.rs index 0b528a6d67e..3aa7f08788a 100644 --- a/runtime/composable/src/weights/democracy.rs +++ b/runtime/composable/src/weights/democracy.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for democracy. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/frame_system.rs b/runtime/composable/src/weights/frame_system.rs index 940dabf0cb2..9a0ef72313f 100644 --- a/runtime/composable/src/weights/frame_system.rs +++ b/runtime/composable/src/weights/frame_system.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for frame_system. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/indices.rs b/runtime/composable/src/weights/indices.rs index 912228be72d..607ac3ff778 100644 --- a/runtime/composable/src/weights/indices.rs +++ b/runtime/composable/src/weights/indices.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for indices. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/membership.rs b/runtime/composable/src/weights/membership.rs index d8e8bd9a20c..6d7a8bbe8f3 100644 --- a/runtime/composable/src/weights/membership.rs +++ b/runtime/composable/src/weights/membership.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for membership. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/scheduler.rs b/runtime/composable/src/weights/scheduler.rs index 52686e5d5d4..a2b73407eca 100644 --- a/runtime/composable/src/weights/scheduler.rs +++ b/runtime/composable/src/weights/scheduler.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for scheduler. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/session.rs b/runtime/composable/src/weights/session.rs index 541224d3546..82593ab0aac 100644 --- a/runtime/composable/src/weights/session.rs +++ b/runtime/composable/src/weights/session.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for session. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/timestamp.rs b/runtime/composable/src/weights/timestamp.rs index d49e0618b50..d81519ebeda 100644 --- a/runtime/composable/src/weights/timestamp.rs +++ b/runtime/composable/src/weights/timestamp.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for timestamp. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/tokens.rs b/runtime/composable/src/weights/tokens.rs index 161320a6dd3..56806851601 100644 --- a/runtime/composable/src/weights/tokens.rs +++ b/runtime/composable/src/weights/tokens.rs @@ -2,11 +2,11 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use sp_std::marker::PhantomData; -use support::{ +use frame_support::{ traits::Get, weights::{constants::RocksDbWeight, Weight}, }; +use sp_std::marker::PhantomData; /// Default weights. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/treasury.rs b/runtime/composable/src/weights/treasury.rs index 38a6f2a7ff1..f39fb7548a1 100644 --- a/runtime/composable/src/weights/treasury.rs +++ b/runtime/composable/src/weights/treasury.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for treasury. pub struct WeightInfo(PhantomData); diff --git a/runtime/composable/src/weights/utility.rs b/runtime/composable/src/weights/utility.rs index bc0d63a7445..a461f873a03 100644 --- a/runtime/composable/src/weights/utility.rs +++ b/runtime/composable/src/weights/utility.rs @@ -1,8 +1,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { diff --git a/runtime/composable/src/xcmp.rs b/runtime/composable/src/xcmp.rs index 7b2ada08324..3763ef3fbb5 100644 --- a/runtime/composable/src/xcmp.rs +++ b/runtime/composable/src/xcmp.rs @@ -6,7 +6,7 @@ use super::*; // recursive dependency onto runtime use codec::{Decode, Encode}; use composable_traits::assets::{RemoteAssetRegistry, XcmAssetLocation}; use cumulus_primitives_core::ParaId; -use support::{ +use frame_support::{ construct_runtime, log, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ diff --git a/runtime/dali/Cargo.toml b/runtime/dali/Cargo.toml index 506953c14e8..2108e83a47d 100644 --- a/runtime/dali/Cargo.toml +++ b/runtime/dali/Cargo.toml @@ -14,7 +14,7 @@ normal = ["pallet-vault", "session-benchmarking", "assets-registry", "currency-f [dependencies] frame-system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } -support = { package = "frame-support", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } # primitives @@ -119,7 +119,7 @@ std = [ "sp-block-builder/std", "sp-transaction-pool/std", "sp-inherents/std", - "support/std", + "frame-support/std", "executive/std", "frame-system/std", "utility/std", @@ -178,7 +178,7 @@ runtime-benchmarks = [ "assets/runtime-benchmarks", "balances/runtime-benchmarks", "benchmarking", - "support/runtime-benchmarks", + "frame-support/runtime-benchmarks", "system-benchmarking", "frame-system/runtime-benchmarks", "hex-literal", diff --git a/runtime/dali/src/lib.rs b/runtime/dali/src/lib.rs index dd56d6e0c82..f3fdcd10242 100644 --- a/runtime/dali/src/lib.rs +++ b/runtime/dali/src/lib.rs @@ -43,7 +43,7 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. -pub use support::{ +pub use frame_support::{ construct_runtime, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ @@ -55,11 +55,11 @@ pub use support::{ }; use codec::Encode; +use frame_support::traits::EqualPrivilegeOnly; use frame_system as system; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; pub use sp_runtime::{FixedPointNumber, Perbill, Permill, Perquintill}; -use support::traits::EqualPrivilegeOnly; use system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, @@ -792,7 +792,7 @@ pub struct BaseCallFilter; impl Contains for BaseCallFilter { fn contains(call: &Call) -> bool { if call_filter::Pallet::::contains(call) { - return false + return false; } !matches!( call, @@ -1051,10 +1051,10 @@ impl_runtime_apis! { impl benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, - Vec, + Vec, ) { use benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; - use support::traits::StorageInfoTrait; + use frame_support::traits::StorageInfoTrait; use system_benchmarking::Pallet as SystemBench; let mut list = Vec::::new(); diff --git a/runtime/dali/src/weights/balances.rs b/runtime/dali/src/weights/balances.rs index 6e6dd646fbd..0a840e8b5dd 100644 --- a/runtime/dali/src/weights/balances.rs +++ b/runtime/dali/src/weights/balances.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for balances. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/collator_selection.rs b/runtime/dali/src/weights/collator_selection.rs index 8e7427027e1..736b86e7358 100644 --- a/runtime/dali/src/weights/collator_selection.rs +++ b/runtime/dali/src/weights/collator_selection.rs @@ -1,8 +1,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weights for pallet_collator_selection using the Substrate node and recommended hardware. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/collective.rs b/runtime/dali/src/weights/collective.rs index 6fc9ddebf28..570752756f8 100644 --- a/runtime/dali/src/weights/collective.rs +++ b/runtime/dali/src/weights/collective.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for collective. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/crowdloan_rewards.rs b/runtime/dali/src/weights/crowdloan_rewards.rs index d755d08a755..f3e846912d4 100644 --- a/runtime/dali/src/weights/crowdloan_rewards.rs +++ b/runtime/dali/src/weights/crowdloan_rewards.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `crowdloan_rewards` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -22,7 +21,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `crowdloan_rewards`. diff --git a/runtime/dali/src/weights/democracy.rs b/runtime/dali/src/weights/democracy.rs index 0b528a6d67e..3aa7f08788a 100644 --- a/runtime/dali/src/weights/democracy.rs +++ b/runtime/dali/src/weights/democracy.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for democracy. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/dutch_auction.rs b/runtime/dali/src/weights/dutch_auction.rs index 0008eec0644..49055412d43 100644 --- a/runtime/dali/src/weights/dutch_auction.rs +++ b/runtime/dali/src/weights/dutch_auction.rs @@ -22,7 +22,7 @@ #![allow(unused_imports)] use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; /// Weight functions for `dutch_auction`. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/frame_system.rs b/runtime/dali/src/weights/frame_system.rs index 940dabf0cb2..9a0ef72313f 100644 --- a/runtime/dali/src/weights/frame_system.rs +++ b/runtime/dali/src/weights/frame_system.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for frame_system. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/identity.rs b/runtime/dali/src/weights/identity.rs index ba2aac5bff3..e338838aae5 100644 --- a/runtime/dali/src/weights/identity.rs +++ b/runtime/dali/src/weights/identity.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -23,7 +22,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `identity`. diff --git a/runtime/dali/src/weights/indices.rs b/runtime/dali/src/weights/indices.rs index 912228be72d..607ac3ff778 100644 --- a/runtime/dali/src/weights/indices.rs +++ b/runtime/dali/src/weights/indices.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for indices. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/membership.rs b/runtime/dali/src/weights/membership.rs index d8e8bd9a20c..6d7a8bbe8f3 100644 --- a/runtime/dali/src/weights/membership.rs +++ b/runtime/dali/src/weights/membership.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for membership. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/multisig.rs b/runtime/dali/src/weights/multisig.rs index 2923b8248d1..0bee6ac7f84 100644 --- a/runtime/dali/src/weights/multisig.rs +++ b/runtime/dali/src/weights/multisig.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -23,7 +22,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `multisig`. diff --git a/runtime/dali/src/weights/oracle.rs b/runtime/dali/src/weights/oracle.rs index b646dc791ae..095ac7dc6ce 100644 --- a/runtime/dali/src/weights/oracle.rs +++ b/runtime/dali/src/weights/oracle.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for oracle. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/scheduler.rs b/runtime/dali/src/weights/scheduler.rs index 52686e5d5d4..a2b73407eca 100644 --- a/runtime/dali/src/weights/scheduler.rs +++ b/runtime/dali/src/weights/scheduler.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for scheduler. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/session.rs b/runtime/dali/src/weights/session.rs index 541224d3546..82593ab0aac 100644 --- a/runtime/dali/src/weights/session.rs +++ b/runtime/dali/src/weights/session.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for session. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/timestamp.rs b/runtime/dali/src/weights/timestamp.rs index d49e0618b50..d81519ebeda 100644 --- a/runtime/dali/src/weights/timestamp.rs +++ b/runtime/dali/src/weights/timestamp.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for timestamp. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/tokens.rs b/runtime/dali/src/weights/tokens.rs index 161320a6dd3..56806851601 100644 --- a/runtime/dali/src/weights/tokens.rs +++ b/runtime/dali/src/weights/tokens.rs @@ -2,11 +2,11 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use sp_std::marker::PhantomData; -use support::{ +use frame_support::{ traits::Get, weights::{constants::RocksDbWeight, Weight}, }; +use sp_std::marker::PhantomData; /// Default weights. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/treasury.rs b/runtime/dali/src/weights/treasury.rs index 38a6f2a7ff1..f39fb7548a1 100644 --- a/runtime/dali/src/weights/treasury.rs +++ b/runtime/dali/src/weights/treasury.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for treasury. pub struct WeightInfo(PhantomData); diff --git a/runtime/dali/src/weights/utility.rs b/runtime/dali/src/weights/utility.rs index b136ab71700..05cb43328bb 100644 --- a/runtime/dali/src/weights/utility.rs +++ b/runtime/dali/src/weights/utility.rs @@ -21,7 +21,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `utility`. diff --git a/runtime/dali/src/weights/vault.rs b/runtime/dali/src/weights/vault.rs index 7d518623b96..179cd304bdb 100644 --- a/runtime/dali/src/weights/vault.rs +++ b/runtime/dali/src/weights/vault.rs @@ -23,7 +23,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `vault`. diff --git a/runtime/dali/src/xcmp.rs b/runtime/dali/src/xcmp.rs index 6ea37eeb342..f64ab9ee588 100644 --- a/runtime/dali/src/xcmp.rs +++ b/runtime/dali/src/xcmp.rs @@ -7,7 +7,7 @@ use super::*; // recursive dependency onto runtime use codec::{Decode, Encode}; use composable_traits::assets::{RemoteAssetRegistry, XcmAssetLocation}; use cumulus_primitives_core::ParaId; -use support::{ +use frame_support::{ construct_runtime, log, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ @@ -210,7 +210,7 @@ impl sp_runtime::traits::Convert> for Currency ParachainInfo::parachain_id() ); None - }, + } CurrencyId::PICA => Some(MultiLocation::new( 1, X2(Parachain(ParachainInfo::parachain_id().into()), GeneralKey(id.encode())), @@ -228,7 +228,7 @@ impl sp_runtime::traits::Convert> for Currency ); None } - }, + } } } } @@ -250,13 +250,13 @@ impl Convert> for CurrencyIdConvert { _ => { log::error!("failed converting currency"); None - }, + } } } else { log::error!("failed converting currency"); None } - }, + } // delegate to asset-registry _ => { let result = ::location_to_asset( @@ -267,7 +267,7 @@ impl Convert> for CurrencyIdConvert { log::error!("failed converting currency"); } result - }, + } } } } diff --git a/runtime/picasso/Cargo.toml b/runtime/picasso/Cargo.toml index ba0ba0b09ff..fda5fc2386b 100644 --- a/runtime/picasso/Cargo.toml +++ b/runtime/picasso/Cargo.toml @@ -27,7 +27,7 @@ normal = [ [dependencies] frame-system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } -support = { package = "frame-support", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false } # primitives @@ -129,7 +129,7 @@ std = [ "sp-block-builder/std", "sp-transaction-pool/std", "sp-inherents/std", - "support/std", + "frame-support/std", "executive/std", "frame-system/std", "utility/std", @@ -182,7 +182,7 @@ std = [ runtime-benchmarks = [ "balances/runtime-benchmarks", "benchmarking", - "support/runtime-benchmarks", + "frame-support/runtime-benchmarks", "system-benchmarking", "frame-system/runtime-benchmarks", "hex-literal", diff --git a/runtime/picasso/src/lib.rs b/runtime/picasso/src/lib.rs index dda58be1c78..4df245358fa 100644 --- a/runtime/picasso/src/lib.rs +++ b/runtime/picasso/src/lib.rs @@ -44,7 +44,7 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. -pub use support::{ +pub use frame_support::{ construct_runtime, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ @@ -56,11 +56,11 @@ pub use support::{ }; use codec::Encode; +use frame_support::traits::EqualPrivilegeOnly; use frame_system as system; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; pub use sp_runtime::{FixedPointNumber, Perbill, Permill, Perquintill}; -use support::traits::EqualPrivilegeOnly; use system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, @@ -954,10 +954,10 @@ impl_runtime_apis! { impl benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, - Vec, + Vec, ) { use benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; - use support::traits::StorageInfoTrait; + use frame_support::traits::StorageInfoTrait; use system_benchmarking::Pallet as SystemBench; let mut list = Vec::::new(); diff --git a/runtime/picasso/src/weights/crowdloan_rewards.rs b/runtime/picasso/src/weights/crowdloan_rewards.rs index d755d08a755..f3e846912d4 100644 --- a/runtime/picasso/src/weights/crowdloan_rewards.rs +++ b/runtime/picasso/src/weights/crowdloan_rewards.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `crowdloan_rewards` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -22,7 +21,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `crowdloan_rewards`. diff --git a/runtime/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index abf6644d8ec..a7c20ec68f2 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -43,6 +42,11 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + + fn set_changes_trie_config() -> Weight { + (3_000_000 as Weight) + } + // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { (0 as Weight) diff --git a/runtime/picasso/src/weights/identity.rs b/runtime/picasso/src/weights/identity.rs index ba2aac5bff3..e338838aae5 100644 --- a/runtime/picasso/src/weights/identity.rs +++ b/runtime/picasso/src/weights/identity.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -23,7 +22,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `identity`. diff --git a/runtime/picasso/src/weights/multisig.rs b/runtime/picasso/src/weights/multisig.rs index 2923b8248d1..0bee6ac7f84 100644 --- a/runtime/picasso/src/weights/multisig.rs +++ b/runtime/picasso/src/weights/multisig.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -23,7 +22,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `multisig`. diff --git a/runtime/picasso/src/weights/session.rs b/runtime/picasso/src/weights/session.rs index 541224d3546..82593ab0aac 100644 --- a/runtime/picasso/src/weights/session.rs +++ b/runtime/picasso/src/weights/session.rs @@ -20,8 +20,8 @@ #![allow(unused_parens)] #![allow(unused_imports)] +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use support::{traits::Get, weights::Weight}; /// Weight functions for session. pub struct WeightInfo(PhantomData); diff --git a/runtime/picasso/src/weights/tokens.rs b/runtime/picasso/src/weights/tokens.rs index 161320a6dd3..56806851601 100644 --- a/runtime/picasso/src/weights/tokens.rs +++ b/runtime/picasso/src/weights/tokens.rs @@ -2,11 +2,11 @@ #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use sp_std::marker::PhantomData; -use support::{ +use frame_support::{ traits::Get, weights::{constants::RocksDbWeight, Weight}, }; +use sp_std::marker::PhantomData; /// Default weights. pub struct WeightInfo(PhantomData); diff --git a/runtime/picasso/src/xcmp.rs b/runtime/picasso/src/xcmp.rs index 4bf84fc7584..2e3483df45b 100644 --- a/runtime/picasso/src/xcmp.rs +++ b/runtime/picasso/src/xcmp.rs @@ -7,7 +7,7 @@ use super::*; // recursive dependency onto runtime use codec::{Decode, Encode}; use composable_traits::assets::{RemoteAssetRegistry, XcmAssetLocation}; use cumulus_primitives_core::ParaId; -use support::{ +use frame_support::{ construct_runtime, log, match_type, parameter_types, traits::{Contains, Everything, KeyOwnerProofSystem, Nothing, Randomness, StorageInfo}, weights::{ @@ -234,7 +234,7 @@ impl sp_runtime::traits::Convert> for Currency ParachainInfo::parachain_id() ); None - }, + } CurrencyId::PICA => Some(MultiLocation::new( 1, X2(Parachain(ParachainInfo::parachain_id().into()), GeneralKey(id.encode())), @@ -252,7 +252,7 @@ impl sp_runtime::traits::Convert> for Currency ); None } - }, + } } } } @@ -275,13 +275,13 @@ impl Convert> for CurrencyIdConvert { _ => { log::error!("failed converting currency"); None - }, + } } } else { log::error!("failed converting currency"); None } - }, + } // delegate to asset-registry _ => { let result = ::location_to_asset( @@ -292,7 +292,7 @@ impl Convert> for CurrencyIdConvert { log::error!("failed converting currency"); } result - }, + } } } } From 40ea0abb79731b195b0cb79287f8b3bb5fcfbb74 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 15:53:03 +0000 Subject: [PATCH 07/35] Updates weights for picasso-dev --- runtime/picasso/src/weights/balances.rs | 14 +-- .../picasso/src/weights/collator_selection.rs | 26 ++--- runtime/picasso/src/weights/collective.rs | 90 ++++++++-------- runtime/picasso/src/weights/democracy.rs | 100 +++++++++--------- runtime/picasso/src/weights/frame_system.rs | 26 +++-- runtime/picasso/src/weights/indices.rs | 10 +- runtime/picasso/src/weights/membership.rs | 30 +++--- runtime/picasso/src/weights/scheduler.rs | 24 ++--- runtime/picasso/src/weights/timestamp.rs | 4 +- runtime/picasso/src/weights/treasury.rs | 16 +-- runtime/picasso/src/weights/utility.rs | 14 +-- 11 files changed, 177 insertions(+), 177 deletions(-) diff --git a/runtime/picasso/src/weights/balances.rs b/runtime/picasso/src/weights/balances.rs index 684349274d0..b02756f8b8b 100644 --- a/runtime/picasso/src/weights/balances.rs +++ b/runtime/picasso/src/weights/balances.rs @@ -30,43 +30,43 @@ pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (50_000_000 as Weight) + (84_537_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_keep_alive() -> Weight { - (30_000_000 as Weight) + (50_729_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 { - (18_000_000 as Weight) + (29_372_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 { - (20_000_000 as Weight) + (35_073_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:3 w:3) fn force_transfer() -> Weight { - (51_000_000 as Weight) + (84_756_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (38_000_000 as Weight) + (61_858_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 { - (16_000_000 as Weight) + (26_842_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/picasso/src/weights/collator_selection.rs b/runtime/picasso/src/weights/collator_selection.rs index 5dcf23d50b1..aac8f8b6407 100644 --- a/runtime/picasso/src/weights/collator_selection.rs +++ b/runtime/picasso/src/weights/collator_selection.rs @@ -30,19 +30,19 @@ pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (10_446_000 as Weight) + (16_038_000 as Weight) // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((51_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (9_000_000 as Weight) + (16_405_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_000_000 as Weight) + (16_846_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -52,18 +52,18 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn register_as_candidate(c: u32, ) -> Weight { - (28_791_000 as Weight) + (88_677_000 as Weight) // Standard Error: 1_000 - .saturating_add((199_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((180_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn leave_intent(c: u32, ) -> Weight { - (29_119_000 as Weight) + (74_825_000 as Weight) // Standard Error: 1_000 - .saturating_add((285_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((257_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,7 +71,7 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (39_000_000 as Weight) + (61_296_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -82,10 +82,10 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 3_816_000 - .saturating_add((17_455_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 3_816_000 - .saturating_add((99_363_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 4_401_000 + .saturating_add((22_818_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_401_000 + .saturating_add((115_956_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/picasso/src/weights/collective.rs b/runtime/picasso/src/weights/collective.rs index c7de70c7432..a0d49c6d9f2 100644 --- a/runtime/picasso/src/weights/collective.rs +++ b/runtime/picasso/src/weights/collective.rs @@ -34,12 +34,12 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Prime (r:0 w:1) fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 23_000 - .saturating_add((14_100_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 23_000 - .saturating_add((39_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 23_000 - .saturating_add((17_219_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 7_000 + .saturating_add((17_638_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 7_000 + .saturating_add((85_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 7_000 + .saturating_add((22_484_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)) @@ -47,21 +47,21 @@ impl collective::WeightInfo for WeightInfo { } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (13_423_000 as Weight) + (21_656_000 as Weight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((75_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(1 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (15_493_000 as Weight) + (25_773_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)) // Standard Error: 0 - .saturating_add((152_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((180_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -70,22 +70,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (21_091_000 as Weight) + (34_376_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((103_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((204_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((417_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: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (20_391_000 as Weight) + (42_064_000 as Weight) // Standard Error: 3_000 - .saturating_add((193_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((201_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)) } @@ -94,11 +94,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (22_040_000 as Weight) - // Standard Error: 3_000 - .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 3_000 - .saturating_add((232_000 as Weight).saturating_mul(p as Weight)) + (45_524_000 as Weight) + // Standard Error: 2_000 + .saturating_add((165_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((340_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)) } @@ -106,12 +106,14 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) - fn close_early_approved(_b: u32, m: u32, p: u32, ) -> Weight { - (36_447_000 as Weight) - // Standard Error: 4_000 - .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 4_000 - .saturating_add((205_000 as Weight).saturating_mul(p as Weight)) + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + (50_007_000 as Weight) + // Standard Error: 0 + .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((201_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((426_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)) } @@ -121,11 +123,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (27_113_000 as Weight) - // Standard Error: 3_000 - .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 3_000 - .saturating_add((205_000 as Weight).saturating_mul(p as Weight)) + (49_187_000 as Weight) + // Standard Error: 2_000 + .saturating_add((178_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((343_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)) } @@ -135,13 +137,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (28_889_000 as Weight) + (53_715_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 5_000 - .saturating_add((216_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 5_000 - .saturating_add((258_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((206_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((424_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)) } @@ -149,9 +151,9 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (14_384_000 as Weight) - // Standard Error: 2_000 - .saturating_add((215_000 as Weight).saturating_mul(p as Weight)) + (25_800_000 as Weight) + // Standard Error: 1_000 + .saturating_add((420_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/picasso/src/weights/democracy.rs b/runtime/picasso/src/weights/democracy.rs index 420423df60d..a95f38458fc 100644 --- a/runtime/picasso/src/weights/democracy.rs +++ b/runtime/picasso/src/weights/democracy.rs @@ -33,15 +33,15 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (33_000_000 as Weight) + (71_656_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) fn second(s: u32, ) -> Weight { - (22_005_000 as Weight) - // Standard Error: 2_000 - .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) + (39_087_000 as Weight) + // Standard Error: 1_000 + .saturating_add((221_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)) } @@ -49,9 +49,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (23_617_000 as Weight) + (42_405_000 as Weight) // Standard Error: 1_000 - .saturating_add((71_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((220_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)) } @@ -59,16 +59,16 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (23_998_000 as Weight) + (42_173_000 as Weight) // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((229_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 { - (16_000_000 as Weight) + (25_973_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -79,45 +79,45 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn blacklist(p: u32, ) -> Weight { - (50_557_000 as Weight) - // Standard Error: 5_000 - .saturating_add((368_000 as Weight).saturating_mul(p as Weight)) + (87_456_000 as Weight) + // Standard Error: 6_000 + .saturating_add((564_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (7_880_000 as Weight) + (13_067_000 as Weight) // Standard Error: 0 - .saturating_add((74_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((89_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_000_000 as Weight) + (2_800_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (2_000_000 as Weight) + (2_668_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 { - (16_000_000 as Weight) + (27_176_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) fn veto_external(v: u32, ) -> Weight { - (16_709_000 as Weight) + (28_112_000 as Weight) // Standard Error: 0 - .saturating_add((81_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((113_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)) } @@ -125,23 +125,23 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn cancel_proposal(p: u32, ) -> Weight { - (36_925_000 as Weight) + (65_881_000 as Weight) // Standard Error: 3_000 - .saturating_add((330_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((508_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (10_000_000 as Weight) + (16_833_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) fn cancel_queued(r: u32, ) -> Weight { - (18_209_000 as Weight) + (31_955_000 as Weight) // Standard Error: 2_000 - .saturating_add((727_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_564_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)) } @@ -149,9 +149,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (2_036_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_491_000 as Weight).saturating_mul(r as Weight)) + (5_220_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_193_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)) @@ -163,9 +163,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (8_278_000 as Weight) - // Standard Error: 6_000 - .saturating_add((3_483_000 as Weight).saturating_mul(r as Weight)) + (13_231_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_191_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)) @@ -174,9 +174,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (30_685_000 as Weight) - // Standard Error: 9_000 - .saturating_add((4_496_000 as Weight).saturating_mul(r as Weight)) + (54_891_000 as Weight) + // Standard Error: 5_000 + .saturating_add((6_865_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)) @@ -185,9 +185,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (17_433_000 as Weight) - // Standard Error: 7_000 - .saturating_add((4_307_000 as Weight).saturating_mul(r as Weight)) + (25_278_000 as Weight) + // Standard Error: 6_000 + .saturating_add((6_884_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)) @@ -195,12 +195,12 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (1_000_000 as Weight) + (3_164_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (22_721_000 as Weight) + (41_356_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)) @@ -208,16 +208,16 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy Preimages (r:1 w:1) fn note_imminent_preimage(b: u32, ) -> Weight { - (15_817_000 as Weight) + (27_330_000 as Weight) // Standard Error: 0 - .saturating_add((1_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) fn reap_preimage(b: u32, ) -> Weight { - (22_250_000 as Weight) + (39_087_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)) @@ -227,9 +227,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (20_058_000 as Weight) + (36_423_000 as Weight) // Standard Error: 1_000 - .saturating_add((32_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(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -237,27 +237,27 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (18_958_000 as Weight) + (34_682_000 as Weight) // Standard Error: 1_000 - .saturating_add((69_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((200_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) fn remove_vote(r: u32, ) -> Weight { - (10_402_000 as Weight) + (19_557_000 as Weight) // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((188_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) fn remove_other_vote(r: u32, ) -> Weight { - (10_572_000 as Weight) - // Standard Error: 1_000 - .saturating_add((65_000 as Weight).saturating_mul(r as Weight)) + (19_834_000 as Weight) + // Standard Error: 2_000 + .saturating_add((192_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/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index a7c20ec68f2..32e4c7f7dec 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -1,3 +1,4 @@ + //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -27,45 +28,42 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(_b: u32, ) -> Weight { + fn remark(b: u32, ) -> Weight { (0 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (3_000_000 as Weight) + (5_095_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - - fn set_changes_trie_config() -> Weight { - (3_000_000 as Weight) - } - // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((493_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((841_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) fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((341_000 as Weight).saturating_mul(i as Weight)) + (747_000 as Weight) + // Standard Error: 1_000 + .saturating_add((554_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) fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_000 - .saturating_add((792_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 0 + .saturating_add((894_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/picasso/src/weights/indices.rs b/runtime/picasso/src/weights/indices.rs index 215373416bc..d8ef391c520 100644 --- a/runtime/picasso/src/weights/indices.rs +++ b/runtime/picasso/src/weights/indices.rs @@ -30,33 +30,33 @@ pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (22_000_000 as Weight) + (38_207_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 { - (28_000_000 as Weight) + (46_027_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 { - (23_000_000 as Weight) + (38_944_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 { - (24_000_000 as Weight) + (39_844_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 { - (26_000_000 as Weight) + (44_316_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/picasso/src/weights/membership.rs b/runtime/picasso/src/weights/membership.rs index 4a17e0a541d..3d464126d7d 100644 --- a/runtime/picasso/src/weights/membership.rs +++ b/runtime/picasso/src/weights/membership.rs @@ -33,9 +33,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (14_950_000 as Weight) - // Standard Error: 1_000 - .saturating_add((84_000 as Weight).saturating_mul(m as Weight)) + (24_425_000 as Weight) + // Standard Error: 2_000 + .saturating_add((125_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)) } @@ -45,9 +45,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (17_640_000 as Weight) + (29_189_000 as Weight) // Standard Error: 0 - .saturating_add((81_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((111_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)) } @@ -57,9 +57,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (17_524_000 as Weight) + (29_308_000 as Weight) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((127_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)) } @@ -69,9 +69,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (17_979_000 as Weight) + (29_938_000 as Weight) // Standard Error: 0 - .saturating_add((152_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((265_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)) } @@ -81,9 +81,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (18_339_000 as Weight) + (30_915_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((124_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)) } @@ -91,18 +91,18 @@ impl membership::WeightInfo for WeightInfo { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (4_424_000 as Weight) + (7_860_000 as Weight) // Standard Error: 0 - .saturating_add((75_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((90_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: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (1_658_000 as Weight) + (3_220_000 as Weight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/picasso/src/weights/scheduler.rs b/runtime/picasso/src/weights/scheduler.rs index 8485553276e..cc75a8cc243 100644 --- a/runtime/picasso/src/weights/scheduler.rs +++ b/runtime/picasso/src/weights/scheduler.rs @@ -30,36 +30,36 @@ pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (14_682_000 as Weight) - // Standard Error: 1_000 - .saturating_add((14_000 as Weight).saturating_mul(s as Weight)) + (27_124_000 as Weight) + // Standard Error: 3_000 + .saturating_add((94_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) fn cancel(s: u32, ) -> Weight { - (13_922_000 as Weight) - // Standard Error: 2_000 - .saturating_add((589_000 as Weight).saturating_mul(s as Weight)) + (23_760_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_359_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) fn schedule_named(s: u32, ) -> Weight { - (18_226_000 as Weight) - // Standard Error: 2_000 - .saturating_add((32_000 as Weight).saturating_mul(s as Weight)) + (30_349_000 as Weight) + // Standard Error: 1_000 + .saturating_add((138_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) fn cancel_named(s: u32, ) -> Weight { - (15_695_000 as Weight) - // Standard Error: 2_000 - .saturating_add((605_000 as Weight).saturating_mul(s as Weight)) + (26_851_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_370_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/picasso/src/weights/timestamp.rs b/runtime/picasso/src/weights/timestamp.rs index f71d8e236f2..b232387d725 100644 --- a/runtime/picasso/src/weights/timestamp.rs +++ b/runtime/picasso/src/weights/timestamp.rs @@ -31,11 +31,11 @@ impl timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (7_000_000 as Weight) + (10_455_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_000_000 as Weight) + (4_608_000 as Weight) } } diff --git a/runtime/picasso/src/weights/treasury.rs b/runtime/picasso/src/weights/treasury.rs index f8538b7a6f2..33ae92d540b 100644 --- a/runtime/picasso/src/weights/treasury.rs +++ b/runtime/picasso/src/weights/treasury.rs @@ -31,23 +31,23 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (24_000_000 as Weight) + (39_734_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:2 w:2) fn reject_proposal() -> Weight { - (37_000_000 as Weight) + (61_236_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (6_295_000 as Weight) - // Standard Error: 3_000 - .saturating_add((50_000 as Weight).saturating_mul(p as Weight)) + (11_843_000 as Weight) + // Standard Error: 2_000 + .saturating_add((171_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)) } @@ -55,9 +55,9 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:1 w:1) fn on_initialize_proposals(p: u32, ) -> Weight { - (26_962_000 as Weight) - // Standard Error: 65_000 - .saturating_add((36_906_000 as Weight).saturating_mul(p as Weight)) + (58_606_000 as Weight) + // Standard Error: 48_000 + .saturating_add((59_350_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/picasso/src/weights/utility.rs b/runtime/picasso/src/weights/utility.rs index 44026650674..d48ba2ca3bd 100644 --- a/runtime/picasso/src/weights/utility.rs +++ b/runtime/picasso/src/weights/utility.rs @@ -29,19 +29,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (7_954_000 as Weight) - // Standard Error: 9_000 - .saturating_add((3_659_000 as Weight).saturating_mul(c as Weight)) + (31_280_000 as Weight) + // Standard Error: 2_000 + .saturating_add((6_290_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (2_000_000 as Weight) + (4_079_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (26_086_000 as Weight) + (5_989_000 as Weight) // Standard Error: 8_000 - .saturating_add((3_831_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((6_905_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (9_000_000 as Weight) + (16_485_000 as Weight) } } From 232c90eda12f1a631dd16386caebc9357ecbef28 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 16:45:19 +0000 Subject: [PATCH 08/35] Updates weights for dali-dev --- runtime/dali/src/weights/balances.rs | 52 ++-- .../dali/src/weights/collator_selection.rs | 89 +++++-- runtime/dali/src/weights/collective.rs | 177 ++++++++----- runtime/dali/src/weights/democracy.rs | 245 ++++++++++++------ runtime/dali/src/weights/frame_system.rs | 64 ++--- runtime/dali/src/weights/indices.rs | 33 ++- runtime/dali/src/weights/membership.rs | 98 ++++--- runtime/dali/src/weights/scheduler.rs | 59 +++-- runtime/dali/src/weights/timestamp.rs | 28 +- runtime/dali/src/weights/treasury.rs | 45 ++-- runtime/dali/src/weights/utility.rs | 29 ++- 11 files changed, 584 insertions(+), 335 deletions(-) diff --git a/runtime/dali/src/weights/balances.rs b/runtime/dali/src/weights/balances.rs index 0a840e8b5dd..d4b5db539b7 100644 --- a/runtime/dali/src/weights/balances.rs +++ b/runtime/dali/src/weights/balances.rs @@ -1,63 +1,73 @@ -//! Autogenerated weights for balances + +//! Autogenerated weights for `balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=balances // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for balances. +/// Weight functions for `balances`. pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { + // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (139_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (152_964_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_keep_alive() -> Weight { - (81_000_000 as Weight) + (91_881_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 { - (47_000_000 as Weight) + (52_410_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 { - (54_000_000 as Weight) + (60_521_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:3 w:3) fn force_transfer() -> Weight { - (110_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (154_512_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (100_000_000 as Weight) + (101_355_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 { - (0 as Weight) + (46_238_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/dali/src/weights/collator_selection.rs b/runtime/dali/src/weights/collator_selection.rs index 736b86e7358..5fc89b2b848 100644 --- a/runtime/dali/src/weights/collator_selection.rs +++ b/runtime/dali/src/weights/collator_selection.rs @@ -1,52 +1,93 @@ + +//! Autogenerated weights for `collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 + +// Executed Command: +// ./target/release/composable +// benchmark +// --chain=dali-dev +// --execution=wasm +// --wasm-execution=compiled +// --pallet=collator_selection +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --raw +// --output=runtime/dali/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weights for pallet_collator_selection using the Substrate node and recommended hardware. +/// Weight functions for `collator_selection`. pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { - fn set_invulnerables(b: u32) -> Weight { - (18_563_000 as Weight) + // Storage: CollatorSelection Invulnerables (r:0 w:1) + fn set_invulnerables(b: u32, ) -> Weight { + (16_525_000 as Weight) // Standard Error: 0 - .saturating_add((68_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((39_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (14_782_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (15_403_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn register_as_candidate(c: u32) -> Weight { - (71_196_000 as Weight) - // Standard Error: 0 - .saturating_add((198_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn register_as_candidate(c: u32, ) -> Weight { + (83_642_000 as Weight) + // Standard Error: 1_000 + .saturating_add((187_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn leave_intent(c: u32) -> Weight { - (55_336_000 as Weight) - // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(c as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn leave_intent(c: u32, ) -> Weight { + (77_557_000 as Weight) + // Standard Error: 1_000 + .saturating_add((254_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: System Account (r:2 w:2) + // Storage: System BlockWeight (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (71_461_000 as Weight) + (63_263_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn new_session(r: u32, c: u32) -> Weight { + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) + // Storage: System Account (r:1 w:1) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_010_000 - .saturating_add((109_961_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_010_000 - .saturating_add((151_952_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) + // Standard Error: 4_321_000 + .saturating_add((22_465_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_321_000 + .saturating_add((113_966_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) } } diff --git a/runtime/dali/src/weights/collective.rs b/runtime/dali/src/weights/collective.rs index 570752756f8..217ac34989f 100644 --- a/runtime/dali/src/weights/collective.rs +++ b/runtime/dali/src/weights/collective.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for collective + +//! Autogenerated weights for `collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=collective @@ -15,106 +16,148 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for collective. +/// Weight functions for `collective`. pub struct WeightInfo(PhantomData); impl collective::WeightInfo for WeightInfo { - fn set_members(m: u32, _n: u32, p: u32) -> Weight { + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Voting (r:100 w:100) + // Storage: Council Prime (r:0 w:1) + fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 63_000 - .saturating_add((25_207_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 63_000 - .saturating_add((33_546_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 7_000 + .saturating_add((15_379_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 7_000 + .saturating_add((184_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 7_000 + .saturating_add((20_259_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))) } - fn execute(b: u32, m: u32) -> Weight { - (30_323_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: CallFilter DisabledCalls (r:1 w:0) + fn execute(b: u32, m: u32, ) -> Weight { + (25_762_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((127_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) } - fn propose_execute(b: u32, m: u32) -> Weight { - (38_575_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + // Storage: CallFilter DisabledCalls (r:1 w:0) + fn propose_execute(b: u32, m: u32, ) -> Weight { + (29_708_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 3_000 - .saturating_add((254_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 0 + .saturating_add((170_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) } - fn propose_proposed(b: u32, m: u32, p: u32) -> Weight { - (48_131_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + (34_022_000 as Weight) // Standard Error: 0 - .saturating_add((18_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 7_000 - .saturating_add((147_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((909_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((104_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((402_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)) } - fn vote(m: u32) -> Weight { - (75_974_000 as Weight) - // Standard Error: 4_000 - .saturating_add((370_000 as Weight).saturating_mul(m as Weight)) + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + fn vote(m: u32, ) -> Weight { + (41_694_000 as Weight) + // Standard Error: 3_000 + .saturating_add((204_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)) } - fn close_early_disapproved(m: u32, p: u32) -> Weight { - (63_575_000 as Weight) - // Standard Error: 5_000 - .saturating_add((293_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 5_000 - .saturating_add((761_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + (43_131_000 as Weight) + // Standard Error: 2_000 + .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((343_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)) } - fn close_early_approved(b: u32, m: u32, p: u32) -> Weight { - (86_824_000 as Weight) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: CallFilter DisabledCalls (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + (55_473_000 as Weight) // Standard Error: 0 - .saturating_add((12_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 8_000 - .saturating_add((321_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 8_000 - .saturating_add((860_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((198_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((421_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)) } - fn close_disapproved(m: u32, p: u32) -> Weight { - (70_231_000 as Weight) - // Standard Error: 7_000 - .saturating_add((323_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 6_000 - .saturating_add((784_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_disapproved(m: u32, p: u32, ) -> Weight { + (45_933_000 as Weight) + // Standard Error: 1_000 + .saturating_add((195_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((349_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)) } - fn close_approved(b: u32, m: u32, p: u32) -> Weight { - (92_370_000 as Weight) - // Standard Error: 1_000 - .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 10_000 - .saturating_add((327_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 9_000 - .saturating_add((899_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: CallFilter DisabledCalls (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + (54_757_000 as Weight) + // Standard Error: 0 + .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((217_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((436_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn disapprove_proposal(p: u32) -> Weight { - (35_489_000 as Weight) - // Standard Error: 4_000 - .saturating_add((830_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn disapprove_proposal(p: u32, ) -> Weight { + (26_155_000 as Weight) + // Standard Error: 1_000 + .saturating_add((395_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/dali/src/weights/democracy.rs b/runtime/dali/src/weights/democracy.rs index 3aa7f08788a..d739cecdc68 100644 --- a/runtime/dali/src/weights/democracy.rs +++ b/runtime/dali/src/weights/democracy.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for democracy + +//! Autogenerated weights for `democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=democracy @@ -15,176 +16,248 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for democracy. +/// Weight functions for `democracy`. pub struct WeightInfo(PhantomData); impl democracy::WeightInfo for WeightInfo { + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (112_082_000 as Weight) + (72_511_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn second(s: u32) -> Weight { - (56_014_000 as Weight) - // Standard Error: 3_000 - .saturating_add((349_000 as Weight).saturating_mul(s as Weight)) + // Storage: Democracy DepositOf (r:1 w:1) + fn second(s: u32, ) -> Weight { + (38_333_000 as Weight) + // Standard Error: 1_000 + .saturating_add((243_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)) } - fn vote_new(r: u32) -> Weight { - (62_157_000 as Weight) - // Standard Error: 4_000 - .saturating_add((512_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new(r: u32, ) -> Weight { + (42_720_000 as Weight) + // Standard Error: 1_000 + .saturating_add((209_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)) } - fn vote_existing(r: u32) -> Weight { - (62_708_000 as Weight) - // Standard Error: 4_000 - .saturating_add((495_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing(r: u32, ) -> Weight { + (42_341_000 as Weight) + // Standard Error: 1_000 + .saturating_add((214_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 { - (38_669_000 as Weight) + (26_547_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn blacklist(p: u32) -> Weight { - (113_805_000 as Weight) - // Standard Error: 9_000 - .saturating_add((998_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn blacklist(p: u32, ) -> Weight { + (88_823_000 as Weight) + // Standard Error: 6_000 + .saturating_add((545_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn external_propose(v: u32) -> Weight { - (19_088_000 as Weight) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose(v: u32, ) -> Weight { + (14_591_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((77_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 { - (4_287_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (2_814_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (4_227_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (2_786_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 { - (38_917_000 as Weight) + (27_149_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn veto_external(v: u32) -> Weight { - (40_067_000 as Weight) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external(v: u32, ) -> Weight { + (28_257_000 as Weight) // Standard Error: 0 - .saturating_add((172_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((112_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)) } - fn cancel_proposal(p: u32) -> Weight { - (69_372_000 as Weight) - // Standard Error: 5_000 - .saturating_add((991_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn cancel_proposal(p: u32, ) -> Weight { + (64_501_000 as Weight) + // Standard Error: 2_000 + .saturating_add((524_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (23_073_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (17_105_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn cancel_queued(r: u32) -> Weight { - (36_184_000 as Weight) - // Standard Error: 32_000 - .saturating_add((6_334_000 as Weight).saturating_mul(r as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_queued(r: u32, ) -> Weight { + (29_326_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_645_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)) } - fn on_initialize_base(r: u32) -> Weight { - (0 as Weight) - // Standard Error: 44_000 - .saturating_add((8_834_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base(r: u32, ) -> Weight { + (6_889_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_212_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)) } - - fn on_initialize_base_with_launch_period(_r: u32) -> Weight { - (0 as Weight) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + (14_236_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_230_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)) } - - fn delegate(r: u32) -> Weight { - (67_447_000 as Weight) - // Standard Error: 64_000 - .saturating_add((11_600_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn delegate(r: u32, ) -> Weight { + (55_901_000 as Weight) + // Standard Error: 5_000 + .saturating_add((6_870_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } - fn undelegate(r: u32) -> Weight { - (37_144_000 as Weight) - // Standard Error: 36_000 - .saturating_add((10_896_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + fn undelegate(r: u32, ) -> Weight { + (25_847_000 as Weight) + // Standard Error: 5_000 + .saturating_add((6_922_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } + // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (4_006_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (3_043_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn note_preimage(b: u32) -> Weight { - (61_302_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_preimage(b: u32, ) -> Weight { + (41_587_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)) } - fn note_imminent_preimage(b: u32) -> Weight { - (39_217_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_imminent_preimage(b: u32, ) -> Weight { + (27_444_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)) } - fn reap_preimage(b: u32) -> Weight { - (53_786_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + // Storage: System Account (r:1 w:0) + fn reap_preimage(b: u32, ) -> Weight { + (39_917_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)) } - fn unlock_remove(r: u32) -> Weight { - (54_249_000 as Weight) - // Standard Error: 4_000 - .saturating_add((313_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_remove(r: u32, ) -> Weight { + (36_489_000 as Weight) + // Standard Error: 1_000 + .saturating_add((119_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)) } - fn unlock_set(r: u32) -> Weight { - (48_885_000 as Weight) - // Standard Error: 4_000 - .saturating_add((486_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_set(r: u32, ) -> Weight { + (34_517_000 as Weight) + // Standard Error: 1_000 + .saturating_add((201_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)) } - fn remove_vote(r: u32) -> Weight { - (25_483_000 as Weight) - // Standard Error: 3_000 - .saturating_add((508_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_vote(r: u32, ) -> Weight { + (19_404_000 as Weight) + // Standard Error: 1_000 + .saturating_add((205_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)) } - fn remove_other_vote(r: u32) -> Weight { - (26_969_000 as Weight) - // Standard Error: 3_000 - .saturating_add((289_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_other_vote(r: u32, ) -> Weight { + (19_842_000 as Weight) + // Standard Error: 1_000 + .saturating_add((196_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/dali/src/weights/frame_system.rs b/runtime/dali/src/weights/frame_system.rs index 9a0ef72313f..c6c2c5f69e7 100644 --- a/runtime/dali/src/weights/frame_system.rs +++ b/runtime/dali/src/weights/frame_system.rs @@ -1,63 +1,69 @@ -//! Autogenerated weights for frame_system + +//! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for frame_system. +/// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(_b: u32) -> Weight { - (1_381_000 as Weight) - } - fn remark_with_event(b: u32) -> Weight { + fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } - fn set_heap_pages() -> Weight { - (3_000_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + fn remark_with_event(b: u32, ) -> Weight { + (10_000_000 as Weight) + // Standard Error: 0 + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) } - fn set_changes_trie_config() -> Weight { - (15_000_000 as Weight) + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + (9_513_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn set_storage(i: u32) -> Weight { - (25_491_000 as Weight) - // Standard Error: 28_000 - .saturating_add((962_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn set_storage(i: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 8_000 + .saturating_add((1_613_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_storage(i: u32) -> Weight { - (23_657_000 as Weight) - // Standard Error: 55_000 - .saturating_add((676_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_storage(i: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 10_000 + .saturating_add((1_036_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_prefix(p: u32) -> Weight { - (13_414_000 as Weight) - // Standard Error: 77_000 - .saturating_add((1_634_000 as Weight).saturating_mul(p as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_prefix(p: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 8_000 + .saturating_add((1_692_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/dali/src/weights/indices.rs b/runtime/dali/src/weights/indices.rs index 607ac3ff778..3652f1bb982 100644 --- a/runtime/dali/src/weights/indices.rs +++ b/runtime/dali/src/weights/indices.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for indices + +//! Autogenerated weights for `indices` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=indices @@ -15,39 +16,47 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for indices. +/// Weight functions for `indices`. pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { + // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (160_634_000 as Weight) + (59_093_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 { - (192_936_000 as Weight) + (69_859_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 { - (161_780_000 as Weight) + (59_893_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 { - (163_771_000 as Weight) + (73_709_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 { - (150_461_000 as Weight) + (79_668_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/dali/src/weights/membership.rs b/runtime/dali/src/weights/membership.rs index 6d7a8bbe8f3..5355b9aeb99 100644 --- a/runtime/dali/src/weights/membership.rs +++ b/runtime/dali/src/weights/membership.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for membership + +//! Autogenerated weights for `membership` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=membership @@ -15,58 +16,93 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for membership. +/// Weight functions for `membership`. pub struct WeightInfo(PhantomData); impl membership::WeightInfo for WeightInfo { - fn add_member(m: u32) -> Weight { - (78_864_000 as Weight) - // Standard Error: 57_000 - .saturating_add((925_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn add_member(m: u32, ) -> Weight { + (23_969_000 as Weight) + // Standard Error: 2_000 + .saturating_add((121_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)) } - fn remove_member(m: u32) -> Weight { - (81_076_000 as Weight) - // Standard Error: 10_000 - .saturating_add((494_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn remove_member(m: u32, ) -> Weight { + (29_691_000 as Weight) + // Standard Error: 2_000 + .saturating_add((99_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)) } - fn swap_member(m: u32) -> Weight { - (84_930_000 as Weight) - // Standard Error: 16_000 - .saturating_add((612_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn swap_member(m: u32, ) -> Weight { + (29_373_000 as Weight) + // Standard Error: 0 + .saturating_add((121_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)) } - fn reset_member(m: u32) -> Weight { - (90_093_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_065_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn reset_member(m: u32, ) -> Weight { + (29_869_000 as Weight) + // Standard Error: 1_000 + .saturating_add((254_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)) } - fn change_key(m: u32) -> Weight { - (76_029_000 as Weight) - // Standard Error: 18_000 - .saturating_add((903_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn change_key(m: u32, ) -> Weight { + (30_841_000 as Weight) + // Standard Error: 0 + .saturating_add((121_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)) } - fn set_prime(_m: u32) -> Weight { - (57_245_000 as Weight) + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn set_prime(m: u32, ) -> Weight { + (8_042_000 as Weight) + // Standard Error: 0 + .saturating_add((86_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)) } - fn clear_prime(_m: u32) -> Weight { - (12_220_000 as Weight).saturating_add(T::DbWeight::get().writes(2 as Weight)) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn clear_prime(m: u32, ) -> Weight { + (3_050_000 as Weight) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/dali/src/weights/scheduler.rs b/runtime/dali/src/weights/scheduler.rs index a2b73407eca..729b9e0d37d 100644 --- a/runtime/dali/src/weights/scheduler.rs +++ b/runtime/dali/src/weights/scheduler.rs @@ -1,56 +1,65 @@ -//! Autogenerated weights for scheduler + +//! Autogenerated weights for `scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=scheduler // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for scheduler. +/// Weight functions for `scheduler`. pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { - fn schedule(s: u32) -> Weight { - (43_832_000 as Weight) - // Standard Error: 181_000 - .saturating_add((7_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule(s: u32, ) -> Weight { + (26_199_000 as Weight) + // Standard Error: 1_000 + .saturating_add((120_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)) } - fn cancel(s: u32) -> Weight { - (33_112_000 as Weight) - // Standard Error: 234_000 - .saturating_add((4_865_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + fn cancel(s: u32, ) -> Weight { + (25_191_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_288_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)) } - fn schedule_named(s: u32) -> Weight { - (45_294_000 as Weight) - // Standard Error: 23_000 - .saturating_add((221_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule_named(s: u32, ) -> Weight { + (32_405_000 as Weight) + // Standard Error: 2_000 + .saturating_add((135_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)) } - fn cancel_named(s: u32) -> Weight { - (38_311_000 as Weight) - // Standard Error: 95_000 - .saturating_add((4_575_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_named(s: u32, ) -> Weight { + (28_338_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_320_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/dali/src/weights/timestamp.rs b/runtime/dali/src/weights/timestamp.rs index d81519ebeda..b4ea0b9e6ac 100644 --- a/runtime/dali/src/weights/timestamp.rs +++ b/runtime/dali/src/weights/timestamp.rs @@ -1,37 +1,41 @@ -//! Autogenerated weights for timestamp + +//! Autogenerated weights for `timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=timestamp // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for timestamp. +/// Weight functions for `timestamp`. pub struct WeightInfo(PhantomData); impl timestamp::WeightInfo for WeightInfo { + // Storage: Timestamp Now (r:1 w:1) + // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (18_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (14_439_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 { - (7_000_000 as Weight) + (9_129_000 as Weight) } } diff --git a/runtime/dali/src/weights/treasury.rs b/runtime/dali/src/weights/treasury.rs index f39fb7548a1..ae71f67b16c 100644 --- a/runtime/dali/src/weights/treasury.rs +++ b/runtime/dali/src/weights/treasury.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for treasury + +//! Autogenerated weights for `treasury` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=treasury @@ -15,38 +16,48 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for treasury. +/// Weight functions for `treasury`. pub struct WeightInfo(PhantomData); impl treasury::WeightInfo for WeightInfo { + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (213_896_000 as Weight) + (41_183_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:2 w:2) fn reject_proposal() -> Weight { - (357_257_000 as Weight) + (62_115_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn approve_proposal(p: u32) -> Weight { - (48_959_000 as Weight) - // Standard Error: 58_000 - .saturating_add((139_000 as Weight).saturating_mul(p as Weight)) + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + fn approve_proposal(p: u32, ) -> Weight { + (12_423_000 as Weight) + // Standard Error: 2_000 + .saturating_add((176_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)) } - fn on_initialize_proposals(p: u32) -> Weight { - (180_865_000 as Weight) - // Standard Error: 9_488_000 - .saturating_add((241_148_000 as Weight).saturating_mul(p as Weight)) + // Storage: System Account (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:1 w:1) + fn on_initialize_proposals(p: u32, ) -> Weight { + (57_679_000 as Weight) + // Standard Error: 31_000 + .saturating_add((59_852_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/dali/src/weights/utility.rs b/runtime/dali/src/weights/utility.rs index 05cb43328bb..03fac1590e2 100644 --- a/runtime/dali/src/weights/utility.rs +++ b/runtime/dali/src/weights/utility.rs @@ -1,13 +1,14 @@ + //! Autogenerated weights for `utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-12-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=dali-dev // --execution=wasm // --wasm-execution=compiled // --pallet=utility @@ -15,7 +16,7 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/dali/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -27,20 +28,26 @@ use sp_std::marker::PhantomData; /// Weight functions for `utility`. pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { + // Storage: CallFilter DisabledCalls (r:1 w:0) fn batch(c: u32, ) -> Weight { - (277_000 as Weight) - // Standard Error: 2_000 - .saturating_add((4_110_000 as Weight).saturating_mul(c as Weight)) + (9_262_000 as Weight) + // Standard Error: 8_000 + .saturating_add((8_483_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) } + // Storage: CallFilter DisabledCalls (r:1 w:0) fn as_derivative() -> Weight { - (3_000_000 as Weight) + (8_023_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) } + // Storage: CallFilter DisabledCalls (r:1 w:0) fn batch_all(c: u32, ) -> Weight { - (0 as Weight) + (18_054_000 as Weight) // Standard Error: 5_000 - .saturating_add((4_491_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((8_954_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn dispatch_as() -> Weight { - (10_000_000 as Weight) + (15_985_000 as Weight) } } From 6df9d9a652a06e8a5c010041b0103ca2817bef63 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 19:22:28 +0100 Subject: [PATCH 09/35] fix conflict --- Cargo.lock | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d54a444a62..bf1f8af9384 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4924,11 +4924,7 @@ dependencies = [ "ring", "rw-stream-sink", "sha2 0.9.9", -<<<<<<< HEAD - "smallvec 1.7.0", -======= "smallvec 1.8.0", ->>>>>>> 696789dd5ce8065548eb66f3a0227ffb27503efa "thiserror", "unsigned-varint 0.7.1", "void", @@ -4999,11 +4995,7 @@ dependencies = [ "rand 0.7.3", "regex", "sha2 0.9.9", -<<<<<<< HEAD - "smallvec 1.7.0", -======= "smallvec 1.8.0", ->>>>>>> 696789dd5ce8065548eb66f3a0227ffb27503efa "unsigned-varint 0.7.1", "wasm-timer", ] From 4f3a207452f8d6ea6b486c7a71f96317ebb990e7 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 19:23:48 +0100 Subject: [PATCH 10/35] Add cargo.lock --- Cargo.lock | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf1f8af9384..f65bf0f2bff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5036,11 +5036,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "sha2 0.9.9", -<<<<<<< HEAD - "smallvec 1.7.0", -======= "smallvec 1.8.0", ->>>>>>> 696789dd5ce8065548eb66f3a0227ffb27503efa "uint", "unsigned-varint 0.7.1", "void", From 520f6f4ef4b0b168ff92a7c5bd1a5e70acf97507 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 19:25:23 +0100 Subject: [PATCH 11/35] fix runtime.sh --- .maintain/check_runtime.sh | 14 -------------- .maintain/run_simnode.sh | 6 ------ 2 files changed, 20 deletions(-) diff --git a/.maintain/check_runtime.sh b/.maintain/check_runtime.sh index 26fc02b8b2f..6d9b8907a9a 100755 --- a/.maintain/check_runtime.sh +++ b/.maintain/check_runtime.sh @@ -10,21 +10,11 @@ #shellcheck source=../common/lib.sh . "$(dirname "${0}")/./common/lib.sh" -<<<<<<< HEAD -LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) -GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) - -======= ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 # shellcheck disable=SC2039 VERSIONS_FILES=( "runtime/picasso/src/lib.rs,picasso,picasso" "runtime/dali/src/lib.rs,dali-chachacha,dali" -<<<<<<< HEAD - # "runtime/composable/src/lib.rs,composable,composable" -======= "runtime/composable/src/lib.rs,composable,composable" ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 ) boldprint "latest 10 commits of ${GITHUB_REF_NAME}" @@ -49,11 +39,7 @@ for i in "${VERSIONS_FILES[@]}"; do while IFS=',' read -r output chain folder; do boldprint "check if the wasm sources changed for $chain" simnode_check $output $folder -<<<<<<< HEAD - done <<<"$i" -======= done <<< "$i" ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 done # dropped through. there's something wrong; exit 1. diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh index e61be90a531..79baef7f9c8 100755 --- a/.maintain/run_simnode.sh +++ b/.maintain/run_simnode.sh @@ -14,12 +14,6 @@ VERSIONS_FILES=( # "composable,composable" # TODO: add simnode suppport for composable ) -<<<<<<< HEAD -LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) -GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) - -======= ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 /home/runner/.cargo/bin/rustup update nightly /home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly /home/runner/.cargo/bin/cargo build --release -p simnode From 14c14097881df5770e381298bcad830483193cc6 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Mon, 17 Jan 2022 19:43:22 +0100 Subject: [PATCH 12/35] replace boldprint with echo --- .maintain/check_runtime.sh | 8 ++++---- .maintain/common/lib.sh | 13 ------------- .maintain/run_benchmarks.sh | 4 ++-- .maintain/run_simnode.sh | 4 ++-- .maintain/runtime_release.sh | 2 +- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.maintain/check_runtime.sh b/.maintain/check_runtime.sh index 6d9b8907a9a..6a8332ba2a1 100755 --- a/.maintain/check_runtime.sh +++ b/.maintain/check_runtime.sh @@ -17,10 +17,10 @@ VERSIONS_FILES=( "runtime/composable/src/lib.rs,composable,composable" ) - boldprint "latest 10 commits of ${GITHUB_REF_NAME}" + echo "latest 10 commits of ${GITHUB_REF_NAME}" git log --graph --oneline --decorate=short -n 10 - boldprint "make sure the main branch and release tag are available in shallow clones" + echo "make sure the main branch and release tag are available in shallow clones" git fetch --depth="${GIT_DEPTH:-100}" origin main git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD @@ -30,14 +30,14 @@ simnode_check() { VERSIONS_FILE="$1" if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$3" && check_runtime "$VERSIONS_FILE" "$2" then - boldprint "Wasm sources have changed" + echo "Wasm sources have changed" echo "RUNTIME_CHECK=1" >> "$GITHUB_ENV" fi } for i in "${VERSIONS_FILES[@]}"; do while IFS=',' read -r output chain folder; do - boldprint "check if the wasm sources changed for $chain" + echo "check if the wasm sources changed for $chain" simnode_check $output $folder done <<< "$i" done diff --git a/.maintain/common/lib.sh b/.maintain/common/lib.sh index ae4b6b4aadc..2f4607703e1 100644 --- a/.maintain/common/lib.sh +++ b/.maintain/common/lib.sh @@ -1,10 +1,6 @@ #!/bin/bash api_base="https://api.github.com/repos" -<<<<<<< HEAD -LATEST_TAG_NAME=$(get_latest_release ComposableFi/composable) -======= ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 GITHUB_REF_NAME=$(git rev-parse --abbrev-ref HEAD) # Function to take 2 git tags/commits and get any lines from commit messages @@ -17,15 +13,6 @@ sanitised_git_logs() { sed 's/^* //g' | # And add them all back sed 's/^/* /g' -<<<<<<< HEAD -} - -get_latest_release() { - curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api - grep '"tag_name":' | # Get tag line - sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value -======= ->>>>>>> 082c2a96d40ad5d977b1ee9a87fa748e49b70719 } get_latest_release() { diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh index 6c28d2f2fd7..5ca1e682be9 100755 --- a/.maintain/run_benchmarks.sh +++ b/.maintain/run_benchmarks.sh @@ -34,7 +34,7 @@ pallets=( dutch_auction ) - boldprint "make sure the main branch and release tag are available in shallow clones" + echo "make sure the main branch and release tag are available in shallow clones" git fetch --depth="${GIT_DEPTH:-100}" origin main git fetch --depth="${GIT_DEPTH:-100}" origin "${LATEST_TAG_NAME}" git tag -f "${LATEST_TAG_NAME}" FETCH_HEAD @@ -50,7 +50,7 @@ run_benchmarks() { CHAIN=$2 FOLDER=$3 # shellcheck disable=SC2068 - boldprint "Running benchmarks for $CHAIN" + echo "Running benchmarks for $CHAIN" # shellcheck disable=SC2068 for p in ${pallets[@]}; do ./target/release/composable benchmark \ diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh index 79baef7f9c8..03d6a21cfc0 100755 --- a/.maintain/run_simnode.sh +++ b/.maintain/run_simnode.sh @@ -21,7 +21,7 @@ YDATE=$(date -d yesterday +'%m-%d-%Y') run_simnode() { CHAIN="$1" - boldprint "Running simnode for $CHAIN" + echo "Running simnode for $CHAIN" FILENAME=cl-1-$YDATE.zip GS_BUCKET="$CHAIN-data-store" sudo gsutil cp gs://$GS_BUCKET/"$FILENAME" . @@ -32,7 +32,7 @@ run_simnode() { # shellcheck disable=SC2039 for i in "${VERSIONS_FILES[@]}"; do while IFS=',' read -r chain folder; do - boldprint "check if the wasm sources changed for $chain" + echo "check if the wasm sources changed for $chain" if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder"; then # shellcheck disable=SC2086 run_simnode $chain diff --git a/.maintain/runtime_release.sh b/.maintain/runtime_release.sh index 7db3831f3d2..461262f8008 100755 --- a/.maintain/runtime_release.sh +++ b/.maintain/runtime_release.sh @@ -33,7 +33,7 @@ build_runtime () { # Check which runtimes have changed and build them for i in "${VERSIONS_FILES[@]}"; do while IFS=',' read -r output chain folder; do - boldprint "check if the wasm sources changed for $chain" + echo "check if the wasm sources changed for $chain" if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder" then build_runtime $output $chain $folder From 98248194f9f2eae4402633e7ffc7776a7a24e032 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 08:44:50 +0100 Subject: [PATCH 13/35] adds set_changes_trie_config to weights --- runtime/picasso/src/weights/frame_system.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index 32e4c7f7dec..28d953c7b44 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -45,6 +44,11 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + + fn set_changes_trie_config() -> Weight { + (0 as Weight) + } + // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { (0 as Weight) From 5282a5bc87334c83861738c5b23e67f308a9af02 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 09:28:48 +0100 Subject: [PATCH 14/35] adds set_changes_trie_config to weights --- runtime/dali/src/weights/frame_system.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/dali/src/weights/frame_system.rs b/runtime/dali/src/weights/frame_system.rs index c6c2c5f69e7..7ceb8b28cc1 100644 --- a/runtime/dali/src/weights/frame_system.rs +++ b/runtime/dali/src/weights/frame_system.rs @@ -1,4 +1,3 @@ - //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev @@ -45,6 +44,11 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + + fn set_changes_trie_config() -> Weight { + (0 as Weight) + } + // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { (0 as Weight) From 83bf7ec4f994e76fa0561f4d4cd47a03ad686478 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 09:29:01 +0000 Subject: [PATCH 15/35] Updates weights for picasso-dev --- runtime/picasso/src/weights/balances.rs | 16 ++-- .../picasso/src/weights/collator_selection.rs | 30 +++--- runtime/picasso/src/weights/collective.rs | 70 +++++++------- runtime/picasso/src/weights/democracy.rs | 96 +++++++++---------- runtime/picasso/src/weights/frame_system.rs | 22 ++--- runtime/picasso/src/weights/indices.rs | 12 +-- runtime/picasso/src/weights/membership.rs | 28 +++--- runtime/picasso/src/weights/scheduler.rs | 22 ++--- runtime/picasso/src/weights/timestamp.rs | 6 +- runtime/picasso/src/weights/treasury.rs | 16 ++-- runtime/picasso/src/weights/utility.rs | 16 ++-- 11 files changed, 164 insertions(+), 170 deletions(-) diff --git a/runtime/picasso/src/weights/balances.rs b/runtime/picasso/src/weights/balances.rs index b02756f8b8b..14996ea3372 100644 --- a/runtime/picasso/src/weights/balances.rs +++ b/runtime/picasso/src/weights/balances.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,43 +30,43 @@ pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (84_537_000 as Weight) + (83_352_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_keep_alive() -> Weight { - (50_729_000 as Weight) + (49_829_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 { - (29_372_000 as Weight) + (29_127_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 { - (35_073_000 as Weight) + (34_431_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:3 w:3) fn force_transfer() -> Weight { - (84_756_000 as Weight) + (84_016_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (61_858_000 as Weight) + (61_155_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 { - (26_842_000 as Weight) + (26_604_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/picasso/src/weights/collator_selection.rs b/runtime/picasso/src/weights/collator_selection.rs index aac8f8b6407..3c95ac3057d 100644 --- a/runtime/picasso/src/weights/collator_selection.rs +++ b/runtime/picasso/src/weights/collator_selection.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,19 +30,19 @@ pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (16_038_000 as Weight) + (16_563_000 as Weight) // Standard Error: 0 - .saturating_add((51_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((37_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (16_405_000 as Weight) + (14_698_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (16_846_000 as Weight) + (15_297_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -52,18 +52,18 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn register_as_candidate(c: u32, ) -> Weight { - (88_677_000 as Weight) + (90_330_000 as Weight) // Standard Error: 1_000 - .saturating_add((180_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((155_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn leave_intent(c: u32, ) -> Weight { - (74_825_000 as Weight) - // Standard Error: 1_000 - .saturating_add((257_000 as Weight).saturating_mul(c as Weight)) + (88_053_000 as Weight) + // Standard Error: 2_000 + .saturating_add((218_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,7 +71,7 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (61_296_000 as Weight) + (61_932_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -82,10 +82,10 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 4_401_000 - .saturating_add((22_818_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 4_401_000 - .saturating_add((115_956_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 4_252_000 + .saturating_add((22_668_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_252_000 + .saturating_add((112_210_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/picasso/src/weights/collective.rs b/runtime/picasso/src/weights/collective.rs index a0d49c6d9f2..9d375a7efdc 100644 --- a/runtime/picasso/src/weights/collective.rs +++ b/runtime/picasso/src/weights/collective.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -34,12 +34,12 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Prime (r:0 w:1) fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 7_000 - .saturating_add((17_638_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((85_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 7_000 - .saturating_add((22_484_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 13_000 + .saturating_add((15_545_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 13_000 + .saturating_add((140_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 13_000 + .saturating_add((20_616_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)) @@ -47,21 +47,21 @@ impl collective::WeightInfo for WeightInfo { } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (21_656_000 as Weight) + (21_436_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)) // Standard Error: 0 - .saturating_add((92_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (25_773_000 as Weight) + (25_820_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((180_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((172_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -70,22 +70,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (34_376_000 as Weight) + (35_527_000 as Weight) // Standard Error: 0 .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((417_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((98_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((412_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: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (42_064_000 as Weight) + (41_793_000 as Weight) // Standard Error: 3_000 - .saturating_add((201_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((207_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)) } @@ -94,11 +94,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (45_524_000 as Weight) + (43_768_000 as Weight) // Standard Error: 2_000 - .saturating_add((165_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((185_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((340_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((343_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)) } @@ -107,13 +107,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (50_007_000 as Weight) + (53_395_000 as Weight) // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((201_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((184_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((426_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((412_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)) } @@ -123,11 +123,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (49_187_000 as Weight) + (49_962_000 as Weight) // Standard Error: 2_000 - .saturating_add((178_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((343_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((331_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)) } @@ -137,13 +137,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (53_715_000 as Weight) + (56_519_000 as Weight) // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((206_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((424_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((410_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)) } @@ -151,9 +151,9 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (25_800_000 as Weight) + (26_708_000 as Weight) // Standard Error: 1_000 - .saturating_add((420_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((400_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/picasso/src/weights/democracy.rs b/runtime/picasso/src/weights/democracy.rs index a95f38458fc..178dc788fd2 100644 --- a/runtime/picasso/src/weights/democracy.rs +++ b/runtime/picasso/src/weights/democracy.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -33,15 +33,15 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (71_656_000 as Weight) + (76_538_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) fn second(s: u32, ) -> Weight { - (39_087_000 as Weight) + (40_030_000 as Weight) // Standard Error: 1_000 - .saturating_add((221_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((234_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)) } @@ -49,9 +49,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (42_405_000 as Weight) + (43_952_000 as Weight) // Standard Error: 1_000 - .saturating_add((220_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((232_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)) } @@ -59,16 +59,16 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (42_173_000 as Weight) + (44_209_000 as Weight) // Standard Error: 1_000 - .saturating_add((229_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((215_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 { - (25_973_000 as Weight) + (26_775_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -79,45 +79,45 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn blacklist(p: u32, ) -> Weight { - (87_456_000 as Weight) + (90_734_000 as Weight) // Standard Error: 6_000 - .saturating_add((564_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((563_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (13_067_000 as Weight) + (13_218_000 as Weight) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((86_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 { - (2_800_000 as Weight) + (2_769_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (2_668_000 as Weight) + (2_801_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 { - (27_176_000 as Weight) + (27_754_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) fn veto_external(v: u32, ) -> Weight { - (28_112_000 as Weight) + (28_935_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((108_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)) } @@ -125,23 +125,23 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn cancel_proposal(p: u32, ) -> Weight { - (65_881_000 as Weight) - // Standard Error: 3_000 + (67_466_000 as Weight) + // Standard Error: 2_000 .saturating_add((508_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (16_833_000 as Weight) + (17_274_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) fn cancel_queued(r: u32, ) -> Weight { - (31_955_000 as Weight) + (31_608_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_564_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_326_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)) } @@ -149,9 +149,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (5_220_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_193_000 as Weight).saturating_mul(r as Weight)) + (6_375_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_258_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)) @@ -163,9 +163,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (13_231_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_191_000 as Weight).saturating_mul(r as Weight)) + (13_957_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_282_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)) @@ -174,9 +174,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (54_891_000 as Weight) - // Standard Error: 5_000 - .saturating_add((6_865_000 as Weight).saturating_mul(r as Weight)) + (57_459_000 as Weight) + // Standard Error: 4_000 + .saturating_add((7_069_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)) @@ -185,9 +185,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (25_278_000 as Weight) - // Standard Error: 6_000 - .saturating_add((6_884_000 as Weight).saturating_mul(r as Weight)) + (27_609_000 as Weight) + // Standard Error: 4_000 + .saturating_add((7_061_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)) @@ -195,12 +195,12 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (3_164_000 as Weight) + (3_181_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (41_356_000 as Weight) + (43_355_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)) @@ -208,7 +208,7 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy Preimages (r:1 w:1) fn note_imminent_preimage(b: u32, ) -> Weight { - (27_330_000 as Weight) + (28_152_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)) @@ -217,7 +217,7 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) fn reap_preimage(b: u32, ) -> Weight { - (39_087_000 as Weight) + (40_517_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)) @@ -227,9 +227,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (36_423_000 as Weight) + (37_941_000 as Weight) // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((111_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)) } @@ -237,27 +237,27 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (34_682_000 as Weight) + (35_595_000 as Weight) // Standard Error: 1_000 - .saturating_add((200_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((204_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) fn remove_vote(r: u32, ) -> Weight { - (19_557_000 as Weight) + (20_209_000 as Weight) // Standard Error: 1_000 - .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((184_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) fn remove_other_vote(r: u32, ) -> Weight { - (19_834_000 as Weight) - // Standard Error: 2_000 - .saturating_add((192_000 as Weight).saturating_mul(r as Weight)) + (20_161_000 as Weight) + // Standard Error: 1_000 + .saturating_add((196_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/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index 28d953c7b44..fbfcbeb6570 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -1,7 +1,8 @@ + //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -27,10 +28,8 @@ use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(b: u32, ) -> Weight { + fn remark(_b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } fn remark_with_event(b: u32, ) -> Weight { (0 as Weight) @@ -40,25 +39,20 @@ 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 { - (5_095_000 as Weight) + (5_411_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - - fn set_changes_trie_config() -> Weight { - (0 as Weight) - } - // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((841_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((848_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) fn kill_storage(i: u32, ) -> Weight { - (747_000 as Weight) + (4_514_000 as Weight) // Standard Error: 1_000 .saturating_add((554_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) @@ -66,8 +60,8 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 0 - .saturating_add((894_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 1_000 + .saturating_add((903_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/picasso/src/weights/indices.rs b/runtime/picasso/src/weights/indices.rs index d8ef391c520..e1dcb2b8c56 100644 --- a/runtime/picasso/src/weights/indices.rs +++ b/runtime/picasso/src/weights/indices.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,33 +30,33 @@ pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (38_207_000 as Weight) + (38_042_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 { - (46_027_000 as Weight) + (46_435_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 { - (38_944_000 as Weight) + (38_522_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 { - (39_844_000 as Weight) + (39_630_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 { - (44_316_000 as Weight) + (44_328_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/picasso/src/weights/membership.rs b/runtime/picasso/src/weights/membership.rs index 3d464126d7d..050f05e6e96 100644 --- a/runtime/picasso/src/weights/membership.rs +++ b/runtime/picasso/src/weights/membership.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -33,9 +33,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (24_425_000 as Weight) - // Standard Error: 2_000 - .saturating_add((125_000 as Weight).saturating_mul(m as Weight)) + (23_648_000 as Weight) + // Standard Error: 1_000 + .saturating_add((121_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)) } @@ -45,7 +45,7 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (29_189_000 as Weight) + (28_629_000 as Weight) // Standard Error: 0 .saturating_add((111_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -57,9 +57,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (29_308_000 as Weight) + (28_697_000 as Weight) // Standard Error: 0 - .saturating_add((127_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((123_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)) } @@ -69,9 +69,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (29_938_000 as Weight) + (29_525_000 as Weight) // Standard Error: 0 - .saturating_add((265_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((255_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)) } @@ -81,9 +81,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (30_915_000 as Weight) + (30_331_000 as Weight) // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((119_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)) } @@ -91,16 +91,16 @@ impl membership::WeightInfo for WeightInfo { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (7_860_000 as Weight) + (7_693_000 as Weight) // Standard Error: 0 - .saturating_add((90_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((88_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: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (3_220_000 as Weight) + (3_216_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/picasso/src/weights/scheduler.rs b/runtime/picasso/src/weights/scheduler.rs index cc75a8cc243..0ed79a742e9 100644 --- a/runtime/picasso/src/weights/scheduler.rs +++ b/runtime/picasso/src/weights/scheduler.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,36 +30,36 @@ pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (27_124_000 as Weight) - // Standard Error: 3_000 - .saturating_add((94_000 as Weight).saturating_mul(s as Weight)) + (25_000_000 as Weight) + // Standard Error: 1_000 + .saturating_add((129_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) fn cancel(s: u32, ) -> Weight { - (23_760_000 as Weight) - // Standard Error: 3_000 - .saturating_add((1_359_000 as Weight).saturating_mul(s as Weight)) + (24_083_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_101_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) fn schedule_named(s: u32, ) -> Weight { - (30_349_000 as Weight) + (30_928_000 as Weight) // Standard Error: 1_000 - .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((140_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) fn cancel_named(s: u32, ) -> Weight { - (26_851_000 as Weight) + (27_493_000 as Weight) // Standard Error: 3_000 - .saturating_add((1_370_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_107_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/picasso/src/weights/timestamp.rs b/runtime/picasso/src/weights/timestamp.rs index b232387d725..3c365dcfdf8 100644 --- a/runtime/picasso/src/weights/timestamp.rs +++ b/runtime/picasso/src/weights/timestamp.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -31,11 +31,11 @@ impl timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (10_455_000 as Weight) + (10_149_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 { - (4_608_000 as Weight) + (4_611_000 as Weight) } } diff --git a/runtime/picasso/src/weights/treasury.rs b/runtime/picasso/src/weights/treasury.rs index 33ae92d540b..85640bc8699 100644 --- a/runtime/picasso/src/weights/treasury.rs +++ b/runtime/picasso/src/weights/treasury.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -31,23 +31,23 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (39_734_000 as Weight) + (40_931_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:2 w:2) fn reject_proposal() -> Weight { - (61_236_000 as Weight) + (61_348_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (11_843_000 as Weight) + (11_944_000 as Weight) // Standard Error: 2_000 - .saturating_add((171_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((187_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)) } @@ -55,9 +55,9 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:1 w:1) fn on_initialize_proposals(p: u32, ) -> Weight { - (58_606_000 as Weight) - // Standard Error: 48_000 - .saturating_add((59_350_000 as Weight).saturating_mul(p as Weight)) + (55_414_000 as Weight) + // Standard Error: 39_000 + .saturating_add((60_262_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/picasso/src/weights/utility.rs b/runtime/picasso/src/weights/utility.rs index d48ba2ca3bd..fef09f70b4a 100644 --- a/runtime/picasso/src/weights/utility.rs +++ b/runtime/picasso/src/weights/utility.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -29,19 +29,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (31_280_000 as Weight) + (22_380_000 as Weight) // Standard Error: 2_000 - .saturating_add((6_290_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((5_841_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (4_079_000 as Weight) + (3_700_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (5_989_000 as Weight) - // Standard Error: 8_000 - .saturating_add((6_905_000 as Weight).saturating_mul(c as Weight)) + (22_398_000 as Weight) + // Standard Error: 2_000 + .saturating_add((6_316_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (16_485_000 as Weight) + (15_749_000 as Weight) } } From 383bc436523faefe439f594e369fc0c545a18959 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 11:59:54 +0100 Subject: [PATCH 16/35] hotpatch substrate --- Cargo.lock | 314 ++++++++++++++++++++++++++--------------------------- 1 file changed, 157 insertions(+), 157 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f65bf0f2bff..05655644377 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -581,7 +581,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "beefy-primitives", "fnv", @@ -609,7 +609,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -629,12 +629,12 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -3085,7 +3085,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", ] @@ -3103,7 +3103,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -3123,7 +3123,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "Inflector", "chrono", @@ -3149,7 +3149,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -3163,7 +3163,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -3191,7 +3191,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "bitflags", "frame-metadata", @@ -3220,7 +3220,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -3232,7 +3232,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -3244,7 +3244,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", @@ -3254,7 +3254,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "log 0.4.14", @@ -3271,7 +3271,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -3286,7 +3286,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "sp-api", @@ -3295,7 +3295,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "sp-api", @@ -6361,7 +6361,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -6377,7 +6377,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -6393,7 +6393,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -6408,7 +6408,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6432,7 +6432,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6452,7 +6452,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6467,7 +6467,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "beefy-primitives", "frame-support", @@ -6483,7 +6483,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -6532,7 +6532,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6649,7 +6649,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6756,7 +6756,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6801,7 +6801,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6843,7 +6843,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6876,7 +6876,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6899,7 +6899,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6915,7 +6915,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -6935,7 +6935,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7004,7 +7004,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7021,7 +7021,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -7039,7 +7039,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7055,7 +7055,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -7072,7 +7072,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7087,7 +7087,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7101,7 +7101,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7118,7 +7118,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7197,7 +7197,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7212,7 +7212,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7226,7 +7226,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7240,7 +7240,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7277,7 +7277,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7293,7 +7293,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7307,7 +7307,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7330,7 +7330,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", @@ -7341,7 +7341,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "sp-arithmetic", @@ -7350,7 +7350,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7364,7 +7364,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7382,7 +7382,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7421,7 +7421,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-support", "frame-system", @@ -7438,7 +7438,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -7455,7 +7455,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7466,7 +7466,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7510,7 +7510,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -7571,7 +7571,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-benchmarking", "frame-support", @@ -9941,7 +9941,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "env_logger 0.9.0", "jsonrpsee 0.4.1", @@ -10336,7 +10336,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "sp-core", @@ -10347,7 +10347,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -10374,7 +10374,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "futures-timer 3.0.2", @@ -10397,7 +10397,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10413,7 +10413,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.2", @@ -10430,7 +10430,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", @@ -10441,7 +10441,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "chrono", "fdlimit", @@ -10479,7 +10479,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "fnv", "futures 0.3.19", @@ -10507,7 +10507,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "hash-db", "kvdb", @@ -10532,7 +10532,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "futures 0.3.19", @@ -10556,7 +10556,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -10585,7 +10585,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -10628,7 +10628,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "derive_more", "futures 0.3.19", @@ -10652,7 +10652,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10665,7 +10665,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "assert_matches", "async-trait", @@ -10701,7 +10701,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "futures 0.3.19", @@ -10727,7 +10727,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "sc-client-api", "sp-authorship", @@ -10738,7 +10738,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "lazy_static", "libsecp256k1", @@ -10765,7 +10765,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "derive_more", "environmental", @@ -10783,7 +10783,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "parity-scale-codec", @@ -10799,7 +10799,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "cfg-if 1.0.0", "libc", @@ -10817,7 +10817,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -10854,7 +10854,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "derive_more", "finality-grandpa", @@ -10878,7 +10878,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "ansi_term", "futures 0.3.19", @@ -10895,7 +10895,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -10910,7 +10910,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-std", "async-trait", @@ -10961,7 +10961,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "futures-timer 3.0.2", @@ -10977,7 +10977,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "bytes 1.1.0", "fnv", @@ -11005,7 +11005,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "libp2p", @@ -11018,7 +11018,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "substrate-prometheus-endpoint", @@ -11027,7 +11027,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "hash-db", @@ -11058,7 +11058,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "jsonrpc-core", @@ -11083,7 +11083,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "jsonrpc-core", @@ -11100,7 +11100,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "directories", @@ -11164,7 +11164,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "parity-scale-codec", @@ -11178,7 +11178,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -11200,7 +11200,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "chrono", "futures 0.3.19", @@ -11218,7 +11218,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "ansi_term", "atty", @@ -11249,7 +11249,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", @@ -11260,7 +11260,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "intervalier", @@ -11287,7 +11287,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "derive_more", "futures 0.3.19", @@ -11301,7 +11301,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "futures-timer 3.0.2", @@ -11840,7 +11840,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "hash-db", "log 0.4.14", @@ -11857,7 +11857,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -11869,7 +11869,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -11882,7 +11882,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "integer-sqrt", "num-traits", @@ -11897,7 +11897,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -11910,7 +11910,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "parity-scale-codec", @@ -11922,7 +11922,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "sp-api", @@ -11934,7 +11934,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "log 0.4.14", @@ -11952,7 +11952,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "futures 0.3.19", @@ -11971,7 +11971,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "parity-scale-codec", @@ -11989,7 +11989,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "merlin", @@ -12012,7 +12012,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -12024,7 +12024,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -12036,7 +12036,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "base58", "bitflags", @@ -12084,7 +12084,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "blake2-rfc", "byteorder", @@ -12097,7 +12097,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", @@ -12108,7 +12108,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -12117,7 +12117,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.14", @@ -12127,7 +12127,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "environmental", "parity-scale-codec", @@ -12138,7 +12138,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "finality-grandpa", "log 0.4.14", @@ -12156,7 +12156,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -12170,7 +12170,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "futures 0.3.19", "hash-db", @@ -12194,7 +12194,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "lazy_static", "sp-core", @@ -12205,7 +12205,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "derive_more", @@ -12222,7 +12222,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "zstd", ] @@ -12230,7 +12230,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -12245,7 +12245,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.36", @@ -12256,7 +12256,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "sp-api", "sp-core", @@ -12266,7 +12266,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "backtrace", "lazy_static", @@ -12276,7 +12276,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "rustc-hash", "serde", @@ -12286,7 +12286,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "either", "hash256-std-hasher", @@ -12308,7 +12308,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -12325,7 +12325,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -12337,7 +12337,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "serde", "serde_json", @@ -12346,7 +12346,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -12360,7 +12360,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "scale-info", @@ -12371,7 +12371,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "hash-db", "log 0.4.14", @@ -12394,12 +12394,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12412,7 +12412,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "log 0.4.14", "sp-core", @@ -12425,7 +12425,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -12441,7 +12441,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "sp-std", @@ -12453,7 +12453,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "sp-api", "sp-runtime", @@ -12462,7 +12462,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-trait", "log 0.4.14", @@ -12478,7 +12478,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "hash-db", "memory-db", @@ -12493,7 +12493,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12509,7 +12509,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "parity-scale-codec", "proc-macro2 1.0.36", @@ -12520,7 +12520,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -12729,7 +12729,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "platforms", ] @@ -12737,7 +12737,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.19", @@ -12759,7 +12759,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "async-std", "derive_more", @@ -12826,7 +12826,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "ansi_term", "build-helper", @@ -13540,7 +13540,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#1681b1e8a82d7189b1fe32fe054a421a0cb96c0c" +source = "git+https://github.com/composableFi/substrate?branch=polkadot-v0.9.13#375db2b94b52da8420ceebcd77b4896aff960413" dependencies = [ "jsonrpsee 0.4.1", "log 0.4.14", From 802515c93732bdf1da0c04156fffc69542a72ec5 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 12:19:49 +0100 Subject: [PATCH 17/35] fmt & clippy --- frame/assets-registry/src/lib.rs | 33 +++++++------ frame/assets/src/lib.rs | 52 ++++++++++---------- frame/bonded-finance/src/lib.rs | 27 ++++++----- frame/call-filter/src/lib.rs | 4 +- frame/composable-support/src/lib.rs | 4 +- frame/composable-traits/src/lib.rs | 4 +- frame/composable-traits/src/rate_model.rs | 2 +- frame/crowdloan-rewards/src/lib.rs | 35 ++++++++------ frame/currency-factory/src/lib.rs | 8 +-- frame/curve-amm/src/lib.rs | 38 +++++++-------- frame/democracy/src/lib.rs | 59 ++++++++++++----------- frame/dutch-auction/src/lib.rs | 8 +-- frame/governance-registry/src/lib.rs | 6 +-- frame/lending/src/lib.rs | 58 +++++++++++----------- frame/lending/src/mocks/oracle.rs | 4 +- frame/liquidations/src/lib.rs | 4 +- frame/oracle/src/lib.rs | 43 ++++++++--------- frame/ping/src/lib.rs | 12 ++--- frame/privilege/src/lib.rs | 16 +++--- frame/transaction-fee/src/lib.rs | 28 +++++------ frame/uniswap-v2/src/lib.rs | 10 ++-- frame/vault/src/lib.rs | 24 ++++----- frame/vault/src/mocks/currency_factory.rs | 2 +- frame/vesting/src/lib.rs | 8 +-- node/src/command.rs | 28 +++++------ node/src/lib.rs | 4 +- runtime/common/src/lib.rs | 4 +- runtime/composable/src/lib.rs | 4 +- runtime/dali/src/lib.rs | 4 +- runtime/dali/src/xcmp.rs | 10 ++-- runtime/picasso/src/lib.rs | 6 +-- runtime/picasso/src/xcmp.rs | 10 ++-- runtime/primitives/src/lib.rs | 4 +- 33 files changed, 285 insertions(+), 278 deletions(-) diff --git a/frame/assets-registry/src/lib.rs b/frame/assets-registry/src/lib.rs index a1c7e5d60c5..8c3652cd76f 100644 --- a/frame/assets-registry/src/lib.rs +++ b/frame/assets-registry/src/lib.rs @@ -9,8 +9,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -80,14 +80,14 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn local_admin)] /// Local admin account - #[allow(clippy::disallowed_type)] // LocalAdminOnEmpty provides a default value, so ValueQuery is ok here. + #[allow(clippy::disallowed_types)] // LocalAdminOnEmpty provides a default value, so ValueQuery is ok here. pub type LocalAdmin = StorageValue<_, T::AccountId, ValueQuery, LocalAdminOnEmpty>; #[pallet::storage] #[pallet::getter(fn foreign_admin)] /// Foreign admin account - #[allow(clippy::disallowed_type)] // ForeignAdminOnEmpty provides a default value, so ValueQuery is ok here. + #[allow(clippy::disallowed_types)] // ForeignAdminOnEmpty provides a default value, so ValueQuery is ok here. pub type ForeignAdmin = StorageValue<_, T::AccountId, ValueQuery, ForeignAdminOnEmpty>; @@ -273,7 +273,7 @@ pub mod pallet { let local_admin = >::get(); let foreign_admin = >::get(); match current_candidate_status { - None => + None => { if who == local_admin { >::insert( (local_asset_id, foreign_asset_id), @@ -284,17 +284,20 @@ pub mod pallet { (local_asset_id, foreign_asset_id), CandidateStatus::ForeignAdminApproved, ); - }, - Some(CandidateStatus::LocalAdminApproved) => + } + } + Some(CandidateStatus::LocalAdminApproved) => { if who == foreign_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - }, - Some(CandidateStatus::ForeignAdminApproved) => + } + } + Some(CandidateStatus::ForeignAdminApproved) => { if who == local_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - }, + } + } }; Ok(().into()) } @@ -305,8 +308,9 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, LocalAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => - Ok(who.clone()), + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { + Ok(who.clone()) + } (r, _) => Err(T::Origin::from(r)), }) } @@ -323,8 +327,9 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, ForeignAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => - Ok(who.clone()), + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { + Ok(who.clone()) + } (r, _) => Err(T::Origin::from(r)), }) } diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 0b339ef8ca6..1c8ef1b8ad4 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -52,8 +52,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -343,7 +343,7 @@ pub mod pallet { asset_id: &T::AssetId, ) -> Result<(), DispatchError> { if T::AdminOrigin::ensure_origin(origin.clone()).is_ok() { - return Ok(()) + return Ok(()); } match origin.into() { @@ -353,7 +353,7 @@ pub mod pallet { Ok(SignedRawOrigin::Signed(acc)) if acc == account => Ok(()), _ => Err(Error::::BadOrigin.into()), } - }, + } Ok(frame_system::RawOrigin::Root) => Ok(()), _ => Err(Error::::BadOrigin.into()), } @@ -740,14 +740,14 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_balance(who, amount) + return <::NativeCurrency>::set_balance(who, amount); } <::MultiCurrency>::set_balance(asset, who, amount) } fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_total_issuance(amount) + return <::NativeCurrency>::set_total_issuance(amount); } <::MultiCurrency>::set_total_issuance(asset, amount) } @@ -758,7 +758,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance(who, amount) + return <::NativeCurrency>::decrease_balance(who, amount); } <::MultiCurrency>::decrease_balance(asset, who, amount) } @@ -769,7 +769,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance_at_most(who, amount) + return <::NativeCurrency>::decrease_balance_at_most(who, amount); } <::MultiCurrency>::decrease_balance_at_most(asset, who, amount) } @@ -780,7 +780,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance(who, amount) + return <::NativeCurrency>::increase_balance(who, amount); } <::MultiCurrency>::increase_balance(asset, who, amount) } @@ -791,7 +791,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance_at_most(who, amount) + return <::NativeCurrency>::increase_balance_at_most(who, amount); } <::MultiCurrency>::increase_balance_at_most(asset, who, amount) } @@ -814,7 +814,7 @@ pub mod pallet { if asset == T::NativeAssetId::get() { return <::NativeCurrency>::transfer( source, dest, amount, keep_alive, - ) + ); } <::MultiCurrency>::transfer(asset, source, dest, amount, keep_alive) } @@ -839,7 +839,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::hold(who, amount) + return <::NativeCurrency>::hold(who, amount); } <::MultiCurrency>::hold(asset, who, amount) } @@ -851,7 +851,7 @@ pub mod pallet { best_effort: bool, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::release(who, amount, best_effort) + return <::NativeCurrency>::release(who, amount, best_effort); } <::MultiCurrency>::release(asset, who, amount, best_effort) } @@ -871,7 +871,7 @@ pub mod pallet { amount, best_effort, on_hold, - ) + ); } <::MultiCurrency>::transfer_held( asset, @@ -899,7 +899,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::mint_into(who, amount) + return <::NativeCurrency>::mint_into(who, amount); } <::MultiCurrency>::mint_into(asset, who, amount) } @@ -909,7 +909,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::burn_from(who, amount) + return <::NativeCurrency>::burn_from(who, amount); } <::MultiCurrency>::burn_from(asset, who, amount) } @@ -920,7 +920,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::slash(who, amount) + return <::NativeCurrency>::slash(who, amount); } <::MultiCurrency>::slash(asset, who, amount) } @@ -931,7 +931,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::teleport(source, dest, amount) + return <::NativeCurrency>::teleport(source, dest, amount); } <::MultiCurrency>::teleport(asset, source, dest, amount) } @@ -949,21 +949,21 @@ pub mod pallet { fn total_issuance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::total_issuance() + return <::NativeCurrency>::total_issuance(); } <::MultiCurrency>::total_issuance(asset) } fn minimum_balance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::minimum_balance() + return <::NativeCurrency>::minimum_balance(); } <::MultiCurrency>::minimum_balance(asset) } fn balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance(who) + return <::NativeCurrency>::balance(who); } <::MultiCurrency>::balance(asset, who) } @@ -974,7 +974,7 @@ pub mod pallet { keep_alive: bool, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::reducible_balance(who, keep_alive) + return <::NativeCurrency>::reducible_balance(who, keep_alive); } <::MultiCurrency>::reducible_balance(asset, who, keep_alive) } @@ -985,7 +985,7 @@ pub mod pallet { amount: Self::Balance, ) -> DepositConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_deposit(who, amount) + return <::NativeCurrency>::can_deposit(who, amount); } <::MultiCurrency>::can_deposit(asset, who, amount) } @@ -996,7 +996,7 @@ pub mod pallet { amount: Self::Balance, ) -> WithdrawConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_withdraw(who, amount) + return <::NativeCurrency>::can_withdraw(who, amount); } <::MultiCurrency>::can_withdraw(asset, who, amount) } @@ -1011,14 +1011,14 @@ pub mod pallet { { fn balance_on_hold(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance_on_hold(who) + return <::NativeCurrency>::balance_on_hold(who); } <::MultiCurrency>::balance_on_hold(asset, who) } fn can_hold(asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance) -> bool { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_hold(who, amount) + return <::NativeCurrency>::can_hold(who, amount); } <::MultiCurrency>::can_hold(asset, who, amount) } diff --git a/frame/bonded-finance/src/lib.rs b/frame/bonded-finance/src/lib.rs index 1eaf68fefd8..b2d1bb99573 100644 --- a/frame/bonded-finance/src/lib.rs +++ b/frame/bonded-finance/src/lib.rs @@ -1,14 +1,14 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) -)] // allow in tests#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +)] // allow in tests#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -176,7 +176,7 @@ pub mod pallet { #[pallet::getter(fn bond_offer_count)] // `BondOfferOnEmpty` explicitly defines the behaviour when empty, so `ValueQuery` is // allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type BondOfferCount = StorageValue<_, T::BondOfferId, ValueQuery, BondOfferOnEmpty>; @@ -235,12 +235,13 @@ pub mod pallet { let (issuer, offer) = Self::get_offer(offer_id)?; match (ensure_signed(origin.clone()), T::AdminOrigin::ensure_origin(origin)) { // Continue on admin origin - (_, Ok(_)) => {}, + (_, Ok(_)) => {} // Only issuer is allowed - (Ok(account), _) => + (Ok(account), _) => { if issuer != account { - return Err(DispatchError::BadOrigin) - }, + return Err(DispatchError::BadOrigin); + } + } _ => return Err(DispatchError::BadOrigin), }; let offer_account = Self::account_id(offer_id); @@ -310,8 +311,8 @@ pub mod pallet { Error::::OfferCompleted ); ensure!( - nb_of_bonds > BalanceOf::::zero() && - nb_of_bonds <= offer.nb_of_bonds, + nb_of_bonds > BalanceOf::::zero() + && nb_of_bonds <= offer.nb_of_bonds, Error::::InvalidNumberOfBonds ); // NOTE(hussein-aitlahcen): can't overflow, subsumed by `offer.valid()` in @@ -352,12 +353,12 @@ pub mod pallet { per_period: value, }, )?; - }, + } BondDuration::Infinite => { // NOTE(hussein-aitlahcen): in the case of an inifite duration for // the offer, the liquidity is never returned to the bonder, meaning // that the protocol is now owning the funds. - }, + } } // NOTE(hussein-aitlahcen): can't overflow as checked to be < // offer.nb_of_bonds prior to this @@ -384,7 +385,7 @@ pub mod pallet { new_bond_event(); } Ok(reward_share) - }, + } } }) } diff --git a/frame/call-filter/src/lib.rs b/frame/call-filter/src/lib.rs index 76c335f4c71..7d562581c90 100644 --- a/frame/call-filter/src/lib.rs +++ b/frame/call-filter/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-support/src/lib.rs b/frame/composable-support/src/lib.rs index eae93b38985..45acedfa809 100644 --- a/frame/composable-support/src/lib.rs +++ b/frame/composable-support/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-traits/src/lib.rs b/frame/composable-traits/src/lib.rs index 348fe7fae4e..e4180a5a7ad 100644 --- a/frame/composable-traits/src/lib.rs +++ b/frame/composable-traits/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-traits/src/rate_model.rs b/frame/composable-traits/src/rate_model.rs index 47b299ff91b..dfa7944f071 100644 --- a/frame/composable-traits/src/rate_model.rs +++ b/frame/composable-traits/src/rate_model.rs @@ -85,7 +85,7 @@ pub enum InterestRateModel { impl Default for InterestRateModel { // unwrap is used with known parameters, and unit tested right below. - #[allow(clippy::disallowed_method)] + #[allow(clippy::disallowed_methods)] fn default() -> Self { Self::new_jump_model( Rate::saturating_from_rational(2, 100), diff --git a/frame/crowdloan-rewards/src/lib.rs b/frame/crowdloan-rewards/src/lib.rs index b74c466e55d..b9f8abef1cb 100644 --- a/frame/crowdloan-rewards/src/lib.rs +++ b/frame/crowdloan-rewards/src/lib.rs @@ -18,14 +18,14 @@ Reference for proof mechanism: https://github.com/paritytech/polkadot/blob/maste #![cfg_attr( not(test), warn( - clippy::disallowed_method, + clippy::disallowed_methods, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -173,21 +173,21 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn total_rewards)] // Absence of total rewards is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type TotalRewards = StorageValue<_, T::Balance, ValueQuery>; /// The rewards claimed so far. #[pallet::storage] #[pallet::getter(fn claimed_rewards)] // Absence of claimed rewards is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type ClaimedRewards = StorageValue<_, T::Balance, ValueQuery>; /// The total number of contributors. #[pallet::storage] #[pallet::getter(fn total_contributors)] // Absence of total contributors is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type TotalContributors = StorageValue<_, u32, ValueQuery>; /// The block at which the users are able to claim their rewards. @@ -350,10 +350,10 @@ pub mod pallet { // The user should have claimed the upfront payment + the vested // amount until this window point. let vested_reward = reward.total - upfront_payment; - upfront_payment + - (vested_reward - .saturating_mul(T::Convert::convert(vesting_window)) / - T::Convert::convert(reward.vesting_period)) + upfront_payment + + (vested_reward + .saturating_mul(T::Convert::convert(vesting_window)) + / T::Convert::convert(reward.vesting_period)) } }; let available_to_claim = should_have_claimed - reward.claimed; @@ -387,7 +387,7 @@ pub mod pallet { ethereum_recover(prefix, &reward_account_encoded, ð_proof) .ok_or(Error::::InvalidProof)?; Result::<_, DispatchError>::Ok(RemoteAccount::Ethereum(ethereum_address)) - }, + } Proof::RelayChain(relay_account, relay_proof) => { ensure!( verify_relay( @@ -399,7 +399,7 @@ pub mod pallet { Error::::InvalidProof ); Ok(RemoteAccount::RelayChain(relay_account)) - }, + } }?; Ok(remote_account) } @@ -452,7 +452,8 @@ pub mod pallet { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { if let Call::associate { reward_account, proof } = call { if Associations::::get(reward_account).is_some() { - return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8).into() + return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8) + .into(); } let remote_account = get_remote_account::(proof.clone(), reward_account, T::Prefix::get()) @@ -463,12 +464,14 @@ pub mod pallet { })?; match Rewards::::get(remote_account.clone()) { None => InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(reward) if reward.total.is_zero() => - InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(_) => + Some(reward) if reward.total.is_zero() => { + InvalidTransaction::Custom(ValidityError::NoReward as u8).into() + } + Some(_) => { ValidTransaction::with_tag_prefix("CrowdloanRewardsAssociationCheck") .and_provides(remote_account) - .build(), + .build() + } } } else { Err(InvalidTransaction::Call.into()) diff --git a/frame/currency-factory/src/lib.rs b/frame/currency-factory/src/lib.rs index 5d52b4aa32a..0cd16700fd3 100644 --- a/frame/currency-factory/src/lib.rs +++ b/frame/currency-factory/src/lib.rs @@ -1,15 +1,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -71,7 +71,7 @@ pub mod pallet { #[pallet::getter(fn currency_latest)] // Absense of a set `CurrencyCounter` means we default to `T::DynamicCurrencyIdInitial`, so // `ValueQuery` is allowed - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type CurrencyCounter = StorageValue<_, T::DynamicCurrencyId, ValueQuery, T::DynamicCurrencyIdInitial>; diff --git a/frame/curve-amm/src/lib.rs b/frame/curve-amm/src/lib.rs index 710ef62c449..02f0ead1490 100644 --- a/frame/curve-amm/src/lib.rs +++ b/frame/curve-amm/src/lib.rs @@ -1,15 +1,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -120,7 +120,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_count)] // Absence of pool count is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolCount = StorageValue<_, T::PoolId, ValueQuery>; /// Existing pools @@ -139,7 +139,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_asset_balance)] // Absence of pool asset balance is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolAssetBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -154,7 +154,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_asset_total_balance)] // Absence of pool asset balance is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolAssetTotalBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -866,7 +866,7 @@ pub mod pallet { let n = FixedU128::saturating_from_integer(u128::try_from(xp_f.len()).ok()?); let sum = xp_f.iter().try_fold(zero, |s, x| s.checked_add(x))?; if sum == zero { - return Some(zero) + return Some(zero); } let mut d = sum; @@ -889,10 +889,10 @@ pub mod pallet { if d > d_prev { if d.checked_sub(&d_prev)? <= prec { - return Some(d) + return Some(d); } } else if d_prev.checked_sub(&d)? <= prec { - return Some(d) + return Some(d); } } None @@ -928,14 +928,14 @@ pub mod pallet { // Same coin if i == j { - return None + return None; } // j above n if j >= xp_f.len() { - return None + return None; } if i >= xp_f.len() { - return None + return None; } let d_f = Self::get_d(xp_f, ann_f)?; let mut c = d_f; @@ -951,7 +951,7 @@ pub mod pallet { } else if k != j { x_k = *xp_k; } else { - continue + continue; } // s = s + x_k s = s.checked_add(&x_k)?; @@ -981,10 +981,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y) + return Some(y); } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y) + return Some(y); } } @@ -1016,7 +1016,7 @@ pub mod pallet { let n = FixedU128::try_from(xp_f.len() as u128).ok()?; if i >= xp_f.len() { - return None + return None; } let mut c = d_f; @@ -1024,7 +1024,7 @@ pub mod pallet { for (k, xp_k) in xp_f.iter().enumerate() { if k == i { - continue + continue; } let x = xp_k; @@ -1050,10 +1050,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y) + return Some(y); } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y) + return Some(y); } } diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 84354c051d5..8aebe2c50e6 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -155,8 +155,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -455,7 +455,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn public_props)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PublicProps = StorageValue< _, Vec<(PropIndex, ProposalId, T::AccountId)>, @@ -486,7 +486,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn referendum_count)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type ReferendumCount = StorageValue<_, ReferendumIndex, ValueQuery>; /// The lowest referendum index representing an unbaked referendum. Equal to @@ -494,7 +494,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn lowest_unbaked)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type LowestUnbaked = StorageValue<_, ReferendumIndex, ValueQuery>; /// Information concerning any given referendum. @@ -516,7 +516,7 @@ pub mod pallet { /// user-controlled data. #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type VotingOf = StorageMap< _, Twox64Concat, @@ -539,7 +539,7 @@ pub mod pallet { // (council). https://github.com/paritytech/substrate/issues/5322 #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type LastTabledWasExternal = StorageValue<_, bool, ValueQuery>; /// The referendum to be tabled whenever it would be valid to table an external proposal. @@ -563,7 +563,7 @@ pub mod pallet { /// Record of all proposals that have been subject to emergency cancellation. #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type Cancellations = StorageMap<_, Identity, ProposalId, bool, ValueQuery>; @@ -983,7 +983,7 @@ pub mod pallet { if let Some((e_proposal_id, _)) = >::get() { ensure!(id == e_proposal_id, Error::::ProposalMissing); } else { - return Err(Error::::NoProposal.into()) + return Err(Error::::NoProposal.into()); } let mut existing_vetoers = @@ -1220,8 +1220,9 @@ pub mod pallet { let (provider, deposit, since, expiry) = >::get(&id) .and_then(|m| match m { - PreimageStatus::Available { provider, deposit, since, expiry, .. } => - Some((provider, deposit, since, expiry)), + PreimageStatus::Available { provider, deposit, since, expiry, .. } => { + Some((provider, deposit, since, expiry)) + } _ => None, }) .ok_or(Error::::PreimageMissing)?; @@ -1546,14 +1547,14 @@ impl Pallet { status.tally.reduce(approve, *delegations); } votes[i].1 = vote; - }, + } Err(i) => { ensure!( votes.len() as u32 <= T::MaxVotes::get(), Error::::MaxVotesReached ); votes.insert(i, (ref_index, vote)); - }, + } } // Shouldn't be possible to fail, but we handle it gracefully. status.tally.add(vote).ok_or(ArithmeticError::Overflow)?; @@ -1600,7 +1601,7 @@ impl Pallet { status.tally.reduce(approve, *delegations); } ReferendumInfoOf::::insert(ref_index, ReferendumInfo::Ongoing(status)); - }, + } Some(ReferendumInfo::Finished { end, approved }) => { if let Some((lock_periods, balance)) = vote.1.locked_if(approved) { let unlock_at = end + T::VoteLockingPeriod::get() * lock_periods.into(); @@ -1613,8 +1614,8 @@ impl Pallet { prior.accumulate(unlock_at, balance) } } - }, - None => {}, // Referendum was cancelled. + } + None => {} // Referendum was cancelled. } votes.remove(i); } @@ -1634,7 +1635,7 @@ impl Pallet { // We don't support second level delegating, so we don't need to do anything more. *delegations = delegations.saturating_add(amount); 1 - }, + } Voting::Direct { votes, delegations, .. } => { *delegations = delegations.saturating_add(amount); for &(ref_index, account_vote) in votes.iter() { @@ -1647,7 +1648,7 @@ impl Pallet { } } votes.len() as u32 - }, + } }) } @@ -1662,7 +1663,7 @@ impl Pallet { // We don't support second level delegating, so we don't need to do anything more. *delegations = delegations.saturating_sub(amount); 1 - }, + } Voting::Direct { votes, delegations, .. } => { *delegations = delegations.saturating_sub(amount); for &(ref_index, account_vote) in votes.iter() { @@ -1675,7 +1676,7 @@ impl Pallet { } } votes.len() as u32 - }, + } }) } @@ -1716,12 +1717,12 @@ impl Pallet { conviction.votes(balance), ); voting.set_common(delegations, prior); - }, + } Voting::Direct { votes, delegations, prior } => { // here we just ensure that we're currently idling with no votes recorded. ensure!(votes.is_empty(), Error::::VotesExist); voting.set_common(delegations, prior); - }, + } } let votes = Self::increase_upstream_delegation( &target, @@ -1759,7 +1760,7 @@ impl Pallet { voting.set_common(delegations, prior); Ok(votes) - }, + } Voting::Direct { .. } => Err(Error::::NotDelegating.into()), } }, @@ -1982,8 +1983,8 @@ impl Pallet { // of unbaked referendum is bounded by this number. In case those number have changed in a // runtime upgrade the formula should be adjusted but the bound should still be sensible. >::mutate(|ref_index| { - while *ref_index < last && - Self::referendum_info(*ref_index) + while *ref_index < last + && Self::referendum_info(*ref_index) .map_or(true, |info| matches!(info, ReferendumInfo::Finished { .. })) { *ref_index += 1 @@ -2022,7 +2023,7 @@ impl Pallet { _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); Err(Error::::NotImminent.into()) - }, + } } } @@ -2053,8 +2054,8 @@ impl Pallet { Ok(0) => return Err(Error::::PreimageMissing.into()), _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); - return Err(Error::::PreimageMissing.into()) - }, + return Err(Error::::PreimageMissing.into()); + } } // Decode the length of the vector. @@ -2138,6 +2139,6 @@ fn decode_compact_u32_at(key: &[u8]) -> Option { sp_runtime::print("Failed to decode compact u32 at:"); sp_runtime::print(key); None - }, + } } } diff --git a/frame/dutch-auction/src/lib.rs b/frame/dutch-auction/src/lib.rs index 1d5edeb82e8..c355999babd 100644 --- a/frame/dutch-auction/src/lib.rs +++ b/frame/dutch-auction/src/lib.rs @@ -23,15 +23,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -172,7 +172,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn orders_index)] - #[allow(clippy::disallowed_type)] // OrderIdOnEmpty provides a default value + #[allow(clippy::disallowed_types)] // OrderIdOnEmpty provides a default value pub type OrdersIndex = StorageValue<_, T::OrderId, ValueQuery, OrderIdOnEmpty>; #[pallet::storage] diff --git a/frame/governance-registry/src/lib.rs b/frame/governance-registry/src/lib.rs index 59451716419..ba6eb64cd0d 100644 --- a/frame/governance-registry/src/lib.rs +++ b/frame/governance-registry/src/lib.rs @@ -5,15 +5,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] pub use pallet::*; diff --git a/frame/lending/src/lib.rs b/frame/lending/src/lib.rs index 1e8962ff822..6135490ab9b 100644 --- a/frame/lending/src/lib.rs +++ b/frame/lending/src/lib.rs @@ -2,8 +2,8 @@ #![cfg_attr( not(any(test, feature = "runtime-benchmarks")), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -297,17 +297,17 @@ pub mod pallet { let one_read = T::DbWeight::get().reads(1); weight += u64::from(call_counters.now) * ::WeightInfo::now(); weight += u64::from(call_counters.read_markets) * one_read; - weight += u64::from(call_counters.accrue_interest) * - ::WeightInfo::accrue_interest(); + weight += u64::from(call_counters.accrue_interest) + * ::WeightInfo::accrue_interest(); weight += u64::from(call_counters.account_id) * ::WeightInfo::account_id(); - weight += u64::from(call_counters.available_funds) * - ::WeightInfo::available_funds(); - weight += u64::from(call_counters.handle_withdrawable) * - ::WeightInfo::handle_withdrawable(); - weight += u64::from(call_counters.handle_depositable) * - ::WeightInfo::handle_depositable(); - weight += u64::from(call_counters.handle_must_liquidate) * - ::WeightInfo::handle_must_liquidate(); + weight += u64::from(call_counters.available_funds) + * ::WeightInfo::available_funds(); + weight += u64::from(call_counters.handle_withdrawable) + * ::WeightInfo::handle_withdrawable(); + weight += u64::from(call_counters.handle_depositable) + * ::WeightInfo::handle_depositable(); + weight += u64::from(call_counters.handle_must_liquidate) + * ::WeightInfo::handle_must_liquidate(); // TODO: move following loop to OCW for (market_id, account, _) in DebtIndex::::iter() { @@ -324,7 +324,7 @@ pub mod pallet { let signer = Signer::::AuthorityId>::all_accounts(); if !signer.can_sign() { log::warn!("No signer"); - return + return; } for (market_id, account, _) in DebtIndex::::iter() { let results = signer.send_signed_transaction(|_account| { @@ -418,7 +418,7 @@ pub mod pallet { /// Lending instances counter #[pallet::storage] #[pallet::getter(fn lending_count)] - #[allow(clippy::disallowed_type)] // MarketIndex implements Default, so ValueQuery is ok here. + #[allow(clippy::disallowed_types)] // MarketIndex implements Default, so ValueQuery is ok here. pub type LendingCount = StorageValue<_, MarketIndex, ValueQuery>; /// Indexed lending instances @@ -435,7 +435,7 @@ pub mod pallet { /// Debt token allows to simplify some debt management and implementation of features #[pallet::storage] #[pallet::getter(fn debt_currencies)] - #[allow(clippy::disallowed_type)] // AssetId implements default, so ValueQuery is ok here. + #[allow(clippy::disallowed_types)] // AssetId implements default, so ValueQuery is ok here. pub type DebtMarkets = StorageMap<_, Twox64Concat, MarketIndex, ::AssetId, ValueQuery>; @@ -468,7 +468,7 @@ pub mod pallet { /// market borrow index #[pallet::storage] #[pallet::getter(fn borrow_index)] - #[allow(clippy::disallowed_type)] // MarketIndex implements default, so ValueQuery is ok here. + #[allow(clippy::disallowed_types)] // MarketIndex implements default, so ValueQuery is ok here. pub type BorrowIndex = StorageMap<_, Twox64Concat, MarketIndex, Ratio, ValueQuery>; /// (Market, Account) -> Collateral @@ -487,7 +487,7 @@ pub mod pallet { /// The timestamp of the previous block or defaults to timestamp at genesis. #[pallet::storage] #[pallet::getter(fn last_block_timestamp)] - #[allow(clippy::disallowed_type)] // Timestamp default is 0, which is valid in this context. + #[allow(clippy::disallowed_types)] // Timestamp default is 0, which is valid in this context. pub type LastBlockTimestamp = StorageValue<_, Timestamp, ValueQuery>; #[pallet::genesis_config] @@ -872,15 +872,15 @@ pub mod pallet { FundsAvailability::Withdrawable(balance) => { Self::handle_withdrawable(&config, &market_account, balance)?; call_counters.handle_withdrawable += 1; - }, + } FundsAvailability::Depositable(balance) => { Self::handle_depositable(&config, &market_account, balance)?; call_counters.handle_depositable += 1; - }, + } FundsAvailability::MustLiquidate => { Self::handle_must_liquidate(&config, &market_account)?; call_counters.handle_must_liquidate += 1; - }, + } } call_counters.available_funds += 1; @@ -989,8 +989,8 @@ pub mod pallet { let existing_borrow_share = Percent::from_rational(existing_borrow_amount, total_borrow_amount); let new_borrow_share = Percent::from_rational(amount_to_borrow, total_borrow_amount); - Ok((market_index * new_borrow_share.into()) + - (account_interest_index * existing_borrow_share.into())) + Ok((market_index * new_borrow_share.into()) + + (account_interest_index * existing_borrow_share.into())) } fn can_borrow( @@ -1004,7 +1004,7 @@ pub mod pallet { let latest_borrow_timestamp = BorrowTimestamp::::get(market_id, debt_owner); if let Some(time) = latest_borrow_timestamp { if time >= Self::last_block_timestamp() { - return Err(Error::::InvalidTimestampOnBorrowRequest.into()) + return Err(Error::::InvalidTimestampOnBorrowRequest.into()); } } @@ -1362,7 +1362,7 @@ pub mod pallet { )?; Ok(balance.map(Into::into)) - }, + } // no active borrow on market for given account None => Ok(Some(BorrowAmountOf::::zero())), } @@ -1424,8 +1424,8 @@ pub mod pallet { ); ensure!( - ::Currency::can_deposit(market.collateral, &market_account, amount) == - DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, &market_account, amount) + == DepositConsequence::Success, Error::::TransferFailed ); @@ -1483,8 +1483,8 @@ pub mod pallet { let market_account = Self::account_id(market_id); ensure!( - ::Currency::can_deposit(market.collateral, account, amount) == - DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, account, amount) + == DepositConsequence::Success, Error::::TransferFailed ); ensure!( @@ -1523,7 +1523,7 @@ pub mod pallet { account_interest_index: Ratio, ) -> Result, DispatchError> { if principal.is_zero() { - return Ok(None) + return Ok(None); } let principal: LiftedFixedBalance = principal.into(); let balance = principal diff --git a/frame/lending/src/mocks/oracle.rs b/frame/lending/src/mocks/oracle.rs index a277ccb3d5b..ab5492f6fc3 100644 --- a/frame/lending/src/mocks/oracle.rs +++ b/frame/lending/src/mocks/oracle.rs @@ -28,7 +28,7 @@ pub mod pallet { #[pallet::getter(fn btc_value)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type BTCValue = StorageValue<_, u128, ValueQuery>; impl Pallet { @@ -93,7 +93,7 @@ pub mod pallet { .checked_mul_int(price) .ok_or(DispatchError::Arithmetic(ArithmeticError::Overflow))?; Ok(Price { price: derived, block }) - }, + } } } diff --git a/frame/liquidations/src/lib.rs b/frame/liquidations/src/lib.rs index 4a27db5b8a5..b0df43eb8ec 100644 --- a/frame/liquidations/src/lib.rs +++ b/frame/liquidations/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/oracle/src/lib.rs b/frame/oracle/src/lib.rs index d39cebd890f..17d6da829d1 100644 --- a/frame/oracle/src/lib.rs +++ b/frame/oracle/src/lib.rs @@ -2,15 +2,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::too_many_arguments)] pub use pallet::*; @@ -186,7 +186,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn assets_count)] - #[allow(clippy::disallowed_type)] // Default asset count of 0 is valid in this context + #[allow(clippy::disallowed_types)] // Default asset count of 0 is valid in this context /// Total amount of assets pub type AssetsCount = StorageValue<_, u32, ValueQuery>; @@ -225,7 +225,7 @@ pub mod pallet { // REVIEW: (benluelo) I think there's probably a better way to use this with an OptionQuery, // instead of checking against defaults. /// Price for an asset and blocknumber asset was updated at - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type Prices = StorageMap< _, Blake2_128Concat, @@ -236,7 +236,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn price_history)] - #[allow(clippy::disallowed_type)] // default history for an asset is an empty list, which is valid in this context. + #[allow(clippy::disallowed_types)] // default history for an asset is an empty list, which is valid in this context. /// Price for an asset and blocknumber asset was updated at pub type PriceHistory = StorageMap< _, @@ -248,7 +248,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pre_prices)] - #[allow(clippy::disallowed_type)] // default history for an asset is an empty list, which is valid in this context. + #[allow(clippy::disallowed_types)] // default history for an asset is an empty list, which is valid in this context. /// Temporary prices before aggregated pub type PrePrices = StorageMap< _, @@ -262,7 +262,7 @@ pub mod pallet { #[pallet::getter(fn asset_info)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] /// Information about asset, including precision threshold and max/min answers pub type AssetsInfo = StorageMap< _, @@ -538,10 +538,9 @@ pub mod pallet { let author_stake = OracleStake::::get(&who).unwrap_or_else(Zero::zero); ensure!(Self::is_requested(&asset_id), Error::::PriceNotRequested); ensure!( - author_stake >= - T::MinStake::get().saturating_add( - Self::answer_in_transit(&who).unwrap_or_else(Zero::zero) - ), + author_stake + >= T::MinStake::get() + .saturating_add(Self::answer_in_transit(&who).unwrap_or_else(Zero::zero)), Error::::NotEnoughStake ); @@ -556,10 +555,10 @@ pub mod pallet { // because current_prices.len() limited by u32 // (type of AssetsInfo::::get(asset_id).max_answers). if current_prices.len() as u32 >= asset_info.max_answers { - return Err(Error::::MaxPrices.into()) + return Err(Error::::MaxPrices.into()); } if current_prices.iter().any(|candidate| candidate.who == who) { - return Err(Error::::AlreadySubmitted.into()) + return Err(Error::::AlreadySubmitted.into()); } current_prices.push(set_price); Ok(()) @@ -744,7 +743,7 @@ pub mod pallet { Self::remove_price_in_transit(asset_id, &pre_price.who); let fresh_prices = pre_prices.split_off(index); (pre_prices, fresh_prices) - }, + } None => (pre_prices, vec![]), }; @@ -770,7 +769,7 @@ pub mod pallet { prices: &[PrePrice], ) -> Option { if prices.is_empty() { - return None + return None; } let mut numbers: Vec = @@ -865,7 +864,7 @@ pub mod pallet { log::info!("no signer"); return Err( "No local accounts available. Consider adding one via `author_insertKey` RPC.", - ) + ); } // checks to make sure key from keystore has not already submitted price let prices = PrePrices::::get(*price_id); @@ -879,12 +878,12 @@ pub mod pallet { if prices.len() as u32 >= Self::asset_info(price_id).max_answers { log::info!("Max answers reached"); - return Err("Max answers reached") + return Err("Max answers reached"); } if prices.into_iter().any(|price| price.who == address) { log::info!("Tx already submitted"); - return Err("Tx already submitted") + return Err("Tx already submitted"); } // Make an external HTTP request to fetch the current price. // Note this call will block until response is received. @@ -942,7 +941,7 @@ pub mod pallet { // Let's check the status code before we proceed to reading the response. if response.code != 200 { log::warn!("Unexpected status code: {}", response.code); - return Err(http::Error::Unknown) + return Err(http::Error::Unknown); } let body = response.body().collect::>(); @@ -958,7 +957,7 @@ pub mod pallet { None => { log::warn!("Unable to extract price from the response: {:?}", body_str); Err(http::Error::Unknown) - }, + } }?; log::warn!("Got price: {} cents", price); @@ -976,7 +975,7 @@ pub mod pallet { JsonValue::Number(number) => number, _ => return None, } - }, + } _ => return None, }; Some(price.integer as u64) diff --git a/frame/ping/src/lib.rs b/frame/ping/src/lib.rs index 8f126acf941..61182c4f727 100644 --- a/frame/ping/src/lib.rs +++ b/frame/ping/src/lib.rs @@ -19,8 +19,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -67,13 +67,13 @@ pub mod pallet { /// The target parachains to ping. #[pallet::storage] // Targets is an empty Vec by default, which causes the pallet not to ping any targets. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub(super) type Targets = StorageValue<_, Vec<(ParaId, Vec)>, ValueQuery>; /// The total number of pings sent. #[pallet::storage] // Absence of PingCount is equivalent to 0, so ValueQuery is valid here. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub(super) type PingCount = StorageValue<_, u32, ValueQuery>; /// The sent pings. @@ -120,10 +120,10 @@ pub mod pallet { Ok(()) => { Pings::::insert(seq, n); Self::deposit_event(Event::PingSent(para, seq, payload)); - }, + } Err(e) => { Self::deposit_event(Event::ErrorSendingPing(e, para, seq, payload)); - }, + } } } } diff --git a/frame/privilege/src/lib.rs b/frame/privilege/src/lib.rs index 65dfaec38bd..96b6039effa 100644 --- a/frame/privilege/src/lib.rs +++ b/frame/privilege/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -106,7 +106,7 @@ pub mod pallet { #[pallet::getter(fn account_privileges)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type AccountPrivileges = StorageMap<_, Blake2_128Concat, AccountIdOf, Privilege, ValueQuery>; @@ -114,7 +114,7 @@ pub mod pallet { #[pallet::getter(fn group_privileges)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type GroupPrivileges = StorageMap<_, Blake2_128Concat, T::GroupId, Privilege, ValueQuery>; @@ -122,7 +122,7 @@ pub mod pallet { #[pallet::getter(fn group_members)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type GroupMembers = StorageMap<_, Blake2_128Concat, T::GroupId, PrivilegedGroupSet>, ValueQuery>; @@ -130,14 +130,14 @@ pub mod pallet { #[pallet::getter(fn group_id_last)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type GroupId = StorageValue<_, T::GroupId, ValueQuery>; #[pallet::storage] #[pallet::getter(fn group_count)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type GroupCount = StorageValue<_, u32, ValueQuery>; impl InspectPrivilege for Pallet { @@ -261,7 +261,7 @@ pub mod pallet { account_id: *account_id, }); Ok(()) - }, + } } }) } diff --git a/frame/transaction-fee/src/lib.rs b/frame/transaction-fee/src/lib.rs index 454fb0cfa03..60faa2d607f 100644 --- a/frame/transaction-fee/src/lib.rs +++ b/frame/transaction-fee/src/lib.rs @@ -6,8 +6,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -133,7 +133,7 @@ pub mod pallet { #[pallet::getter(fn next_fee_multiplier)] // `NextFeeMultiplierOnEmpty` explicitly defines what happens on empty, so `ValueQuery` is // allowed. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type NextFeeMultiplier = StorageValue<_, Multiplier, ValueQuery, NextFeeMultiplierOnEmpty>; @@ -146,15 +146,15 @@ pub mod pallet { } // `integrity_test` is allowed to panic. - #[allow(clippy::disallowed_method, clippy::expect_used)] + #[allow(clippy::disallowed_methods, clippy::expect_used)] fn integrity_test() { // given weight == u64, we build multipliers from `diff` of two weight values, which can // at most be maximum block weight. Make sure that this can fit in a multiplier without // loss. use sp_std::convert::TryInto; assert!( - ::max_value() >= - Multiplier::checked_from_integer( + ::max_value() + >= Multiplier::checked_from_integer( T::BlockWeights::get() .max_block .try_into() @@ -168,8 +168,8 @@ pub mod pallet { // that if we collapse to minimum, the trend will be positive with a weight value // which is 1% more than the target. let min_value = T::FeeMultiplierUpdate::min(); - let mut target = T::FeeMultiplierUpdate::target() * - T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( + let mut target = T::FeeMultiplierUpdate::target() + * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( "Setting `max_total` for `Normal` dispatch class is not compatible with \ `transaction-payment` pallet.", ); @@ -177,7 +177,7 @@ pub mod pallet { let addition = target / 100; if addition == 0 { // this is most likely because in a test setup we set everything to (). - return + return; } target += addition; @@ -343,8 +343,8 @@ where let total_native = T::NativeCurrency::total_balance(who); // check native balance if is enough - let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native && - T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( + let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native + && T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( false, |new_free_balance| { T::NativeCurrency::ensure_can_withdraw(who, fee, reason, new_free_balance) @@ -367,11 +367,11 @@ where amount, *slippage, )?; - }, + } // user didn't specify some asset to pay and they dont have enough native tokens to pay (None, false) => return Err(DispatchError::Other("Not enough tokens")), // they have enough native tokens to pay. - _ => {}, + _ => {} } Ok(()) @@ -432,7 +432,7 @@ where // Only mess with balances if fee is not zero. if fee.is_zero() { - return Ok((fee, None)) + return Ok((fee, None)); } let reason = if tip.is_zero() { diff --git a/frame/uniswap-v2/src/lib.rs b/frame/uniswap-v2/src/lib.rs index c520d9776ac..4127d7b5753 100644 --- a/frame/uniswap-v2/src/lib.rs +++ b/frame/uniswap-v2/src/lib.rs @@ -2,8 +2,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, // TODO: enable me after this crate is stablized. todo macros are still denied in the release pipeline, but for // regular development allowed. // clippy::indexing_slicing, @@ -123,7 +123,7 @@ pub mod pallet { /// Current number of pools (also ID for the next created pool) #[pallet::storage] #[pallet::getter(fn pool_count)] - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolCount = StorageValue<_, T::PoolId, ValueQuery, PoolCountOnEmpty>; #[pallet::type_value] @@ -149,7 +149,7 @@ pub mod pallet { /// Balance of asset for given pool excluding admin_fee #[pallet::storage] #[pallet::getter(fn pool_asset_balance)] - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolAssetBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -169,7 +169,7 @@ pub mod pallet { /// Balance of asset for given pool including admin_fee #[pallet::storage] #[pallet::getter(fn pool_asset_total_balance)] - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type PoolAssetTotalBalance = StorageDoubleMap< _, Blake2_128Concat, diff --git a/frame/vault/src/lib.rs b/frame/vault/src/lib.rs index b26e1ec932f..579bcb58135 100644 --- a/frame/vault/src/lib.rs +++ b/frame/vault/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -282,7 +282,7 @@ pub mod pallet { /// Cleaned up vaults do not decrement the counter. #[pallet::storage] #[pallet::getter(fn vault_count)] - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type VaultCount = StorageValue<_, T::VaultId, ValueQuery>; /// Info for each specific vaults. @@ -302,7 +302,7 @@ pub mod pallet { #[pallet::getter(fn capital_structure)] // Bit questionable to have this be ValueQuery, as technically that makes it difficult to // determine if a strategy is connected to a vault vs not having an allocation at all. - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type CapitalStructure = StorageDoubleMap< _, Blake2_128Concat, @@ -501,7 +501,7 @@ pub mod pallet { let reward = T::NativeCurrency::reducible_balance(account, false); T::NativeCurrency::transfer(account, &reward_address, reward, false)?; Ok(().into()) - }, + } Verdict::Charge { remaining, payable } => { vault.deposit = Deposit::Rent { amount: remaining, at: current_block }; // If this transfer call fails due to the vaults account not being kept @@ -515,7 +515,7 @@ pub mod pallet { true, )?; Ok(().into()) - }, + } } }) } @@ -565,7 +565,7 @@ pub mod pallet { >::block_number(), vault.deposit, ) { - return Err(Error::::TombstoneDurationNotExceeded.into()) + return Err(Error::::TombstoneDurationNotExceeded.into()); } else { let deletion_reward_account = &Self::deletion_reward_account(dest); let reward = @@ -833,8 +833,8 @@ pub mod pallet { let vault_aum = Self::assets_under_management(vault_id)?; if vault_aum.is_zero() { ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, amount) == - DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, amount) + == DepositConsequence::Success, Error::::MintFailed ); @@ -864,8 +864,8 @@ pub mod pallet { ensure!(lp > T::Balance::zero(), Error::::InsufficientCreationDeposit); ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, lp) == - DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, lp) + == DepositConsequence::Success, Error::::MintFailed ); @@ -1025,7 +1025,7 @@ pub mod pallet { } else { Ok(FundsAvailability::Withdrawable(max_allowed - balance)) } - }, + } (_, _) => Ok(FundsAvailability::MustLiquidate), } } diff --git a/frame/vault/src/mocks/currency_factory.rs b/frame/vault/src/mocks/currency_factory.rs index 148af9eb420..a31e477184b 100644 --- a/frame/vault/src/mocks/currency_factory.rs +++ b/frame/vault/src/mocks/currency_factory.rs @@ -69,7 +69,7 @@ pub mod pallet { #[pallet::getter(fn vault_count)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type CurrencyCounter = StorageValue<_, u32, ValueQuery>; #[pallet::call] diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index 7ee819ba083..a61451e82cf 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -29,8 +29,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -148,7 +148,7 @@ pub mod module { #[pallet::getter(fn vesting_schedules)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_type)] + #[allow(clippy::disallowed_types)] pub type VestingSchedules = StorageDoubleMap< _, Blake2_128Concat, @@ -348,7 +348,7 @@ impl Pallet { if bounded_schedules.len().is_zero() { >::remove(who, asset); T::Currency::remove_lock(VESTING_LOCK_ID, asset, who)?; - return Ok(()) + return Ok(()); } let total_amount = diff --git a/node/src/command.rs b/node/src/command.rs index 82afb292d92..666de25cfa9 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -103,9 +103,8 @@ impl SubstrateCli for Cli { "composable" | "composable-dev" => &composable_runtime::VERSION, // dali chains #[cfg(feature = "dali")] - "dali" | "dali-chachacha" | "dali-rococo" | "dali-westend" | "dali-dev" => { - &dali_runtime::VERSION - } + "dali" | "dali-chachacha" | "dali-rococo" | "dali-westend" | "dali-dev" => + &dali_runtime::VERSION, // picasso chains "picasso" | "picasso-dev" => &picasso_runtime::VERSION, _ => panic!("Unknown chain_id: {}", spec.id()), @@ -183,27 +182,27 @@ pub fn run() -> Result<()> { Some(Subcommand::BuildSpec(cmd)) => { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - } + }, Some(Subcommand::CheckBlock(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.2)) }) - } + }, Some(Subcommand::ExportBlocks(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, config.database)) }) - } + }, Some(Subcommand::ExportState(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, config.chain_spec)) }) - } + }, Some(Subcommand::ImportBlocks(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.2)) }) - } + }, Some(Subcommand::Key(cmd)) => cmd.run(&cli), Some(Subcommand::PurgeChain(cmd)) => { let runner = cli.create_runner(cmd)?; @@ -223,7 +222,7 @@ pub fn run() -> Result<()> { cmd.run(config, polkadot_config) }) - } + }, Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.0, components.1)) }), @@ -248,7 +247,7 @@ pub fn run() -> Result<()> { } Ok(()) - } + }, Some(Subcommand::ExportGenesisWasm(params)) => { let mut builder = sc_cli::LoggerBuilder::new(""); builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); @@ -269,8 +268,8 @@ pub fn run() -> Result<()> { } Ok(()) - } - Some(Subcommand::Benchmark(cmd)) => { + }, + Some(Subcommand::Benchmark(cmd)) => if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; @@ -286,8 +285,7 @@ pub fn run() -> Result<()> { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." .into()) - } - } + }, None => { let runner = cli.create_runner(&cli.run.normalize())?; @@ -323,7 +321,7 @@ pub fn run() -> Result<()> { Ok(crate::service::start_node(config, polkadot_config, id).await?) }) - } + }, } } diff --git a/node/src/lib.rs b/node/src/lib.rs index 1193059c965..46da77a9a0d 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -1,5 +1,5 @@ -#![cfg_attr(not(test), warn(clippy::disallowed_method, clippy::indexing_slicing))] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![cfg_attr(not(test), warn(clippy::disallowed_methods, clippy::indexing_slicing))] // allow in tests +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] pub mod chain_spec; pub mod cli; diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index f15b2df134e..fe60e964f6c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/runtime/composable/src/lib.rs b/runtime/composable/src/lib.rs index acbf07483e6..886335f7812 100644 --- a/runtime/composable/src/lib.rs +++ b/runtime/composable/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/runtime/dali/src/lib.rs b/runtime/dali/src/lib.rs index f3fdcd10242..2d3ca35be1d 100644 --- a/runtime/dali/src/lib.rs +++ b/runtime/dali/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/runtime/dali/src/xcmp.rs b/runtime/dali/src/xcmp.rs index f64ab9ee588..e2297a1564b 100644 --- a/runtime/dali/src/xcmp.rs +++ b/runtime/dali/src/xcmp.rs @@ -210,7 +210,7 @@ impl sp_runtime::traits::Convert> for Currency ParachainInfo::parachain_id() ); None - } + }, CurrencyId::PICA => Some(MultiLocation::new( 1, X2(Parachain(ParachainInfo::parachain_id().into()), GeneralKey(id.encode())), @@ -228,7 +228,7 @@ impl sp_runtime::traits::Convert> for Currency ); None } - } + }, } } } @@ -250,13 +250,13 @@ impl Convert> for CurrencyIdConvert { _ => { log::error!("failed converting currency"); None - } + }, } } else { log::error!("failed converting currency"); None } - } + }, // delegate to asset-registry _ => { let result = ::location_to_asset( @@ -267,7 +267,7 @@ impl Convert> for CurrencyIdConvert { log::error!("failed converting currency"); } result - } + }, } } } diff --git a/runtime/picasso/src/lib.rs b/runtime/picasso/src/lib.rs index 4df245358fa..38e57358405 100644 --- a/runtime/picasso/src/lib.rs +++ b/runtime/picasso/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, - clippy::disallowed_type, + clippy::disallowed_methods, + clippy::disallowed_types, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -10,7 +10,7 @@ // clippy::panic ) )] -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] diff --git a/runtime/picasso/src/xcmp.rs b/runtime/picasso/src/xcmp.rs index 2e3483df45b..c5e0690e6fc 100644 --- a/runtime/picasso/src/xcmp.rs +++ b/runtime/picasso/src/xcmp.rs @@ -234,7 +234,7 @@ impl sp_runtime::traits::Convert> for Currency ParachainInfo::parachain_id() ); None - } + }, CurrencyId::PICA => Some(MultiLocation::new( 1, X2(Parachain(ParachainInfo::parachain_id().into()), GeneralKey(id.encode())), @@ -252,7 +252,7 @@ impl sp_runtime::traits::Convert> for Currency ); None } - } + }, } } } @@ -275,13 +275,13 @@ impl Convert> for CurrencyIdConvert { _ => { log::error!("failed converting currency"); None - } + }, } } else { log::error!("failed converting currency"); None } - } + }, // delegate to asset-registry _ => { let result = ::location_to_asset( @@ -292,7 +292,7 @@ impl Convert> for CurrencyIdConvert { log::error!("failed converting currency"); } result - } + }, } } } diff --git a/runtime/primitives/src/lib.rs b/runtime/primitives/src/lib.rs index 626b47b62be..fe455389da4 100644 --- a/runtime/primitives/src/lib.rs +++ b/runtime/primitives/src/lib.rs @@ -1,14 +1,14 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_method, + clippy::disallowed_methods, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] #![cfg_attr(not(feature = "std"), no_std)] pub mod currency; From 7df74dbc13c4b779125a13f046aefac73976106b Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 12:38:56 +0000 Subject: [PATCH 18/35] Updates weights for picasso-dev --- runtime/picasso/src/weights/balances.rs | 14 +-- .../picasso/src/weights/collator_selection.rs | 26 ++--- runtime/picasso/src/weights/collective.rs | 68 ++++++------- runtime/picasso/src/weights/democracy.rs | 96 +++++++++---------- runtime/picasso/src/weights/frame_system.rs | 12 +-- runtime/picasso/src/weights/indices.rs | 10 +- runtime/picasso/src/weights/membership.rs | 30 +++--- runtime/picasso/src/weights/scheduler.rs | 18 ++-- runtime/picasso/src/weights/timestamp.rs | 4 +- runtime/picasso/src/weights/treasury.rs | 14 +-- runtime/picasso/src/weights/utility.rs | 16 ++-- 11 files changed, 154 insertions(+), 154 deletions(-) diff --git a/runtime/picasso/src/weights/balances.rs b/runtime/picasso/src/weights/balances.rs index 14996ea3372..021b6bc942c 100644 --- a/runtime/picasso/src/weights/balances.rs +++ b/runtime/picasso/src/weights/balances.rs @@ -30,43 +30,43 @@ pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (83_352_000 as Weight) + (85_649_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_keep_alive() -> Weight { - (49_829_000 as Weight) + (52_142_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 { - (29_127_000 as Weight) + (30_267_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 { - (34_431_000 as Weight) + (35_831_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:3 w:3) fn force_transfer() -> Weight { - (84_016_000 as Weight) + (85_803_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (61_155_000 as Weight) + (63_021_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 { - (26_604_000 as Weight) + (27_374_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/picasso/src/weights/collator_selection.rs b/runtime/picasso/src/weights/collator_selection.rs index 3c95ac3057d..bb0f3b061df 100644 --- a/runtime/picasso/src/weights/collator_selection.rs +++ b/runtime/picasso/src/weights/collator_selection.rs @@ -30,19 +30,19 @@ pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (16_563_000 as Weight) + (16_784_000 as Weight) // Standard Error: 0 .saturating_add((37_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (14_698_000 as Weight) + (14_691_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (15_297_000 as Weight) + (15_446_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -52,18 +52,18 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn register_as_candidate(c: u32, ) -> Weight { - (90_330_000 as Weight) + (90_019_000 as Weight) // Standard Error: 1_000 - .saturating_add((155_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((158_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn leave_intent(c: u32, ) -> Weight { - (88_053_000 as Weight) - // Standard Error: 2_000 - .saturating_add((218_000 as Weight).saturating_mul(c as Weight)) + (80_560_000 as Weight) + // Standard Error: 1_000 + .saturating_add((229_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,7 +71,7 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (61_932_000 as Weight) + (67_646_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -82,10 +82,10 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 4_252_000 - .saturating_add((22_668_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 4_252_000 - .saturating_add((112_210_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 4_247_000 + .saturating_add((22_276_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_247_000 + .saturating_add((112_079_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/picasso/src/weights/collective.rs b/runtime/picasso/src/weights/collective.rs index 9d375a7efdc..d53cfe88dd2 100644 --- a/runtime/picasso/src/weights/collective.rs +++ b/runtime/picasso/src/weights/collective.rs @@ -34,12 +34,12 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Prime (r:0 w:1) fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 13_000 - .saturating_add((15_545_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 13_000 - .saturating_add((140_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 13_000 - .saturating_add((20_616_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 15_000 + .saturating_add((17_343_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 15_000 + .saturating_add((102_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 15_000 + .saturating_add((22_296_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)) @@ -47,21 +47,21 @@ impl collective::WeightInfo for WeightInfo { } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (21_436_000 as Weight) + (21_793_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)) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (25_820_000 as Weight) + (26_094_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)) // Standard Error: 0 - .saturating_add((172_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -70,22 +70,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (35_527_000 as Weight) + (34_549_000 as Weight) // Standard Error: 0 - .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((98_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((100_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((412_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((420_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: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (41_793_000 as Weight) + (43_268_000 as Weight) // Standard Error: 3_000 - .saturating_add((207_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((189_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)) } @@ -94,11 +94,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (43_768_000 as Weight) + (43_446_000 as Weight) // Standard Error: 2_000 - .saturating_add((185_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((207_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((343_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((350_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)) } @@ -107,13 +107,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (53_395_000 as Weight) + (50_375_000 as Weight) // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((184_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((220_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((412_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((417_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)) } @@ -123,11 +123,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (49_962_000 as Weight) + (49_563_000 as Weight) // Standard Error: 2_000 - .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((197_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((331_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((342_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)) } @@ -137,13 +137,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (56_519_000 as Weight) + (54_372_000 as Weight) // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((199_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((226_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((410_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((416_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)) } @@ -151,9 +151,9 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (26_708_000 as Weight) + (27_026_000 as Weight) // Standard Error: 1_000 - .saturating_add((400_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((411_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/picasso/src/weights/democracy.rs b/runtime/picasso/src/weights/democracy.rs index 178dc788fd2..a80160ce474 100644 --- a/runtime/picasso/src/weights/democracy.rs +++ b/runtime/picasso/src/weights/democracy.rs @@ -33,15 +33,15 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (76_538_000 as Weight) + (75_709_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) fn second(s: u32, ) -> Weight { - (40_030_000 as Weight) + (39_037_000 as Weight) // Standard Error: 1_000 - .saturating_add((234_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((244_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)) } @@ -49,9 +49,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (43_952_000 as Weight) - // Standard Error: 1_000 - .saturating_add((232_000 as Weight).saturating_mul(r as Weight)) + (43_061_000 as Weight) + // Standard Error: 0 + .saturating_add((234_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)) } @@ -59,16 +59,16 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (44_209_000 as Weight) - // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(r as Weight)) + (43_740_000 as Weight) + // Standard Error: 2_000 + .saturating_add((207_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 { - (26_775_000 as Weight) + (26_414_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -79,45 +79,45 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn blacklist(p: u32, ) -> Weight { - (90_734_000 as Weight) + (89_177_000 as Weight) // Standard Error: 6_000 - .saturating_add((563_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((557_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (13_218_000 as Weight) + (13_260_000 as Weight) // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((88_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 { - (2_769_000 as Weight) + (2_744_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (2_801_000 as Weight) + (2_661_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 { - (27_754_000 as Weight) + (27_397_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) fn veto_external(v: u32, ) -> Weight { - (28_935_000 as Weight) - // Standard Error: 0 - .saturating_add((108_000 as Weight).saturating_mul(v as Weight)) + (28_896_000 as Weight) + // Standard Error: 1_000 + .saturating_add((106_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)) } @@ -125,23 +125,23 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn cancel_proposal(p: u32, ) -> Weight { - (67_466_000 as Weight) + (66_398_000 as Weight) // Standard Error: 2_000 - .saturating_add((508_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((491_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (17_274_000 as Weight) + (17_000_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) fn cancel_queued(r: u32, ) -> Weight { - (31_608_000 as Weight) + (30_669_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_326_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_334_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)) } @@ -149,9 +149,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (6_375_000 as Weight) - // Standard Error: 4_000 - .saturating_add((5_258_000 as Weight).saturating_mul(r as Weight)) + (7_103_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_217_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)) @@ -163,9 +163,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (13_957_000 as Weight) - // Standard Error: 4_000 - .saturating_add((5_282_000 as Weight).saturating_mul(r as Weight)) + (14_447_000 as Weight) + // Standard Error: 3_000 + .saturating_add((5_234_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)) @@ -174,9 +174,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (57_459_000 as Weight) + (58_201_000 as Weight) // Standard Error: 4_000 - .saturating_add((7_069_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((6_908_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)) @@ -185,9 +185,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (27_609_000 as Weight) + (27_429_000 as Weight) // Standard Error: 4_000 - .saturating_add((7_061_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((6_936_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)) @@ -195,12 +195,12 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (3_181_000 as Weight) + (3_174_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (43_355_000 as Weight) + (41_760_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)) @@ -208,7 +208,7 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy Preimages (r:1 w:1) fn note_imminent_preimage(b: u32, ) -> Weight { - (28_152_000 as Weight) + (27_730_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)) @@ -217,7 +217,7 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) fn reap_preimage(b: u32, ) -> Weight { - (40_517_000 as Weight) + (39_896_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)) @@ -227,9 +227,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (37_941_000 as Weight) + (37_205_000 as Weight) // Standard Error: 1_000 - .saturating_add((111_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((116_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)) } @@ -237,27 +237,27 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (35_595_000 as Weight) + (35_341_000 as Weight) // Standard Error: 1_000 - .saturating_add((204_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((194_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) fn remove_vote(r: u32, ) -> Weight { - (20_209_000 as Weight) - // Standard Error: 1_000 - .saturating_add((184_000 as Weight).saturating_mul(r as Weight)) + (20_107_000 as Weight) + // Standard Error: 2_000 + .saturating_add((180_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) fn remove_other_vote(r: u32, ) -> Weight { - (20_161_000 as Weight) + (19_971_000 as Weight) // Standard Error: 1_000 - .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((189_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/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index fbfcbeb6570..eafec030b95 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -39,7 +39,7 @@ 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 { - (5_411_000 as Weight) + (5_223_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -47,21 +47,21 @@ impl frame_system::WeightInfo for WeightInfo { fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((848_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((837_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) fn kill_storage(i: u32, ) -> Weight { - (4_514_000 as Weight) + (138_000 as Weight) // Standard Error: 1_000 - .saturating_add((554_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((560_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) fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + (269_000 as Weight) // Standard Error: 1_000 - .saturating_add((903_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((907_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/picasso/src/weights/indices.rs b/runtime/picasso/src/weights/indices.rs index e1dcb2b8c56..bd0b7ace914 100644 --- a/runtime/picasso/src/weights/indices.rs +++ b/runtime/picasso/src/weights/indices.rs @@ -30,33 +30,33 @@ pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (38_042_000 as Weight) + (39_070_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 { - (46_435_000 as Weight) + (46_669_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 { - (38_522_000 as Weight) + (39_065_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 { - (39_630_000 as Weight) + (40_511_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 { - (44_328_000 as Weight) + (44_482_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/picasso/src/weights/membership.rs b/runtime/picasso/src/weights/membership.rs index 050f05e6e96..cbf91da9afc 100644 --- a/runtime/picasso/src/weights/membership.rs +++ b/runtime/picasso/src/weights/membership.rs @@ -33,9 +33,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (23_648_000 as Weight) + (23_934_000 as Weight) // Standard Error: 1_000 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((123_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)) } @@ -45,9 +45,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (28_629_000 as Weight) + (28_936_000 as Weight) // Standard Error: 0 - .saturating_add((111_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((114_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)) } @@ -57,9 +57,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (28_697_000 as Weight) + (29_276_000 as Weight) // Standard Error: 0 - .saturating_add((123_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((124_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)) } @@ -69,9 +69,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (29_525_000 as Weight) - // Standard Error: 0 - .saturating_add((255_000 as Weight).saturating_mul(m as Weight)) + (29_937_000 as Weight) + // Standard Error: 1_000 + .saturating_add((253_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)) } @@ -81,9 +81,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (30_331_000 as Weight) + (30_960_000 as Weight) // Standard Error: 0 - .saturating_add((119_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((122_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)) } @@ -91,18 +91,18 @@ impl membership::WeightInfo for WeightInfo { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (7_693_000 as Weight) + (7_798_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((96_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: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (3_216_000 as Weight) + (3_178_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/picasso/src/weights/scheduler.rs b/runtime/picasso/src/weights/scheduler.rs index 0ed79a742e9..72529bc53a2 100644 --- a/runtime/picasso/src/weights/scheduler.rs +++ b/runtime/picasso/src/weights/scheduler.rs @@ -30,36 +30,36 @@ pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (25_000_000 as Weight) + (25_117_000 as Weight) // Standard Error: 1_000 - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((134_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) fn cancel(s: u32, ) -> Weight { - (24_083_000 as Weight) + (24_294_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_113_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) fn schedule_named(s: u32, ) -> Weight { - (30_928_000 as Weight) + (31_210_000 as Weight) // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((137_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) fn cancel_named(s: u32, ) -> Weight { - (27_493_000 as Weight) - // Standard Error: 3_000 - .saturating_add((1_107_000 as Weight).saturating_mul(s as Weight)) + (28_072_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_110_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/picasso/src/weights/timestamp.rs b/runtime/picasso/src/weights/timestamp.rs index 3c365dcfdf8..699adc7cb29 100644 --- a/runtime/picasso/src/weights/timestamp.rs +++ b/runtime/picasso/src/weights/timestamp.rs @@ -31,11 +31,11 @@ impl timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (10_149_000 as Weight) + (10_297_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 { - (4_611_000 as Weight) + (4_714_000 as Weight) } } diff --git a/runtime/picasso/src/weights/treasury.rs b/runtime/picasso/src/weights/treasury.rs index 85640bc8699..04938bf8af6 100644 --- a/runtime/picasso/src/weights/treasury.rs +++ b/runtime/picasso/src/weights/treasury.rs @@ -31,23 +31,23 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (40_931_000 as Weight) + (40_605_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:2 w:2) fn reject_proposal() -> Weight { - (61_348_000 as Weight) + (62_187_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (11_944_000 as Weight) + (12_294_000 as Weight) // Standard Error: 2_000 - .saturating_add((187_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((179_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)) } @@ -55,9 +55,9 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:1 w:1) fn on_initialize_proposals(p: u32, ) -> Weight { - (55_414_000 as Weight) - // Standard Error: 39_000 - .saturating_add((60_262_000 as Weight).saturating_mul(p as Weight)) + (58_416_000 as Weight) + // Standard Error: 37_000 + .saturating_add((60_764_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/picasso/src/weights/utility.rs b/runtime/picasso/src/weights/utility.rs index fef09f70b4a..3a5974229e8 100644 --- a/runtime/picasso/src/weights/utility.rs +++ b/runtime/picasso/src/weights/utility.rs @@ -29,19 +29,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (22_380_000 as Weight) - // Standard Error: 2_000 - .saturating_add((5_841_000 as Weight).saturating_mul(c as Weight)) + (33_503_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_812_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_700_000 as Weight) + (3_674_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (22_398_000 as Weight) - // Standard Error: 2_000 - .saturating_add((6_316_000 as Weight).saturating_mul(c as Weight)) + (27_157_000 as Weight) + // Standard Error: 1_000 + .saturating_add((6_355_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (15_749_000 as Weight) + (16_002_000 as Weight) } } From f70bdbd8e3a52510e0d1fdc6e604292947075096 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 13:40:37 +0100 Subject: [PATCH 19/35] Update simnode script --- .maintain/run_simnode.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh index 03d6a21cfc0..e7670ed37d1 100755 --- a/.maintain/run_simnode.sh +++ b/.maintain/run_simnode.sh @@ -17,6 +17,7 @@ VERSIONS_FILES=( /home/runner/.cargo/bin/rustup update nightly /home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly /home/runner/.cargo/bin/cargo build --release -p simnode +sudo chown -R runner:runner target/release/simnode && sudo chmod +x target/release/simnode YDATE=$(date -d yesterday +'%m-%d-%Y') run_simnode() { From c75cfe61e93ab8a1739c4d23569bced517ec56e1 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 14:20:57 +0100 Subject: [PATCH 20/35] Update github workflow --- .github/workflows/runtime-check.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 4c220127341..9c25397d325 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -21,20 +21,18 @@ jobs: fetch-depth: 0 - name: Check for runtime changes - working-directory: "./.maintain/" id: check_runtime run: | - ./check_runtime.sh + .maintain/check_runtime.sh - name: Echo output run: echo ${{ env.RUNTIME_CHECK }} - name: Run Simnode if: "$${{ env.RUNTIME_CHECK }} == 1" - working-directory: "./.maintain/" id: run_simnode run: | - ./run_simnode.sh + .maintain/check_runtime.sh benchmark: name: Benchmark @@ -47,10 +45,9 @@ jobs: - uses: actions/checkout@v2 - name: Benchmark Test if: "$${{ env.RUNTIME_CHECK }} == 1" - working-directory: "./.maintain/" id: run_benchmarks run: | - ./run_benchmarks.sh + .maintain/run_benchmarks.sh From 993e15de08ace8c1465c2fd7a0e2b73eb44194da Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 14:22:43 +0100 Subject: [PATCH 21/35] Update github workflow --- .github/workflows/runtime-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 9c25397d325..4605c0ddbb7 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -32,7 +32,7 @@ jobs: if: "$${{ env.RUNTIME_CHECK }} == 1" id: run_simnode run: | - .maintain/check_runtime.sh + .maintain/run_sminode.sh benchmark: name: Benchmark From fa0e0e8cbf5d5c79e257f801dee88d8b13d9dd01 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 13:35:54 +0000 Subject: [PATCH 22/35] Updates weights for dali-dev --- runtime/dali/src/weights/balances.rs | 16 ++-- .../dali/src/weights/collator_selection.rs | 30 +++--- runtime/dali/src/weights/collective.rs | 74 ++++++++------- runtime/dali/src/weights/democracy.rs | 92 +++++++++---------- runtime/dali/src/weights/frame_system.rs | 26 +++--- runtime/dali/src/weights/indices.rs | 12 +-- runtime/dali/src/weights/membership.rs | 44 ++++----- runtime/dali/src/weights/scheduler.rs | 26 +++--- runtime/dali/src/weights/timestamp.rs | 6 +- runtime/dali/src/weights/treasury.rs | 18 ++-- runtime/dali/src/weights/utility.rs | 16 ++-- 11 files changed, 177 insertions(+), 183 deletions(-) diff --git a/runtime/dali/src/weights/balances.rs b/runtime/dali/src/weights/balances.rs index d4b5db539b7..300e77dac17 100644 --- a/runtime/dali/src/weights/balances.rs +++ b/runtime/dali/src/weights/balances.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -30,43 +30,43 @@ pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (152_964_000 as Weight) + (160_436_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_keep_alive() -> Weight { - (91_881_000 as Weight) + (95_923_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 { - (52_410_000 as Weight) + (55_369_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 { - (60_521_000 as Weight) + (68_956_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:3 w:3) fn force_transfer() -> Weight { - (154_512_000 as Weight) + (163_390_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (101_355_000 as Weight) + (115_415_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 { - (46_238_000 as Weight) + (51_043_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/dali/src/weights/collator_selection.rs b/runtime/dali/src/weights/collator_selection.rs index 5fc89b2b848..46459b6f76c 100644 --- a/runtime/dali/src/weights/collator_selection.rs +++ b/runtime/dali/src/weights/collator_selection.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -30,19 +30,19 @@ pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (16_525_000 as Weight) + (17_720_000 as Weight) // Standard Error: 0 - .saturating_add((39_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((41_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (14_782_000 as Weight) + (15_958_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (15_403_000 as Weight) + (16_528_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -52,18 +52,18 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn register_as_candidate(c: u32, ) -> Weight { - (83_642_000 as Weight) + (87_409_000 as Weight) // Standard Error: 1_000 - .saturating_add((187_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((176_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn leave_intent(c: u32, ) -> Weight { - (77_557_000 as Weight) - // Standard Error: 1_000 - .saturating_add((254_000 as Weight).saturating_mul(c as Weight)) + (5_665_000 as Weight) + // Standard Error: 12_000 + .saturating_add((499_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,7 +71,7 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (63_263_000 as Weight) + (109_858_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -82,10 +82,10 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 4_321_000 - .saturating_add((22_465_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 4_321_000 - .saturating_add((113_966_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 4_362_000 + .saturating_add((10_263_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_362_000 + .saturating_add((114_349_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/dali/src/weights/collective.rs b/runtime/dali/src/weights/collective.rs index 217ac34989f..ade46bf478f 100644 --- a/runtime/dali/src/weights/collective.rs +++ b/runtime/dali/src/weights/collective.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -32,14 +32,12 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:0) // Storage: Council Voting (r:100 w:100) // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 7_000 - .saturating_add((15_379_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((184_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 7_000 - .saturating_add((20_259_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 147_000 + .saturating_add((15_753_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 147_000 + .saturating_add((21_061_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)) @@ -48,22 +46,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Members (r:1 w:0) // Storage: CallFilter DisabledCalls (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (25_762_000 as Weight) + (26_304_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)) // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) // Storage: CallFilter DisabledCalls (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (29_708_000 as Weight) + (30_572_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)) // Standard Error: 0 - .saturating_add((170_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((174_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -72,22 +70,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (34_022_000 as Weight) + (34_775_000 as Weight) // Standard Error: 0 .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((104_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((402_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((423_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: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (41_694_000 as Weight) - // Standard Error: 3_000 - .saturating_add((204_000 as Weight).saturating_mul(m as Weight)) + (43_971_000 as Weight) + // Standard Error: 2_000 + .saturating_add((189_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)) } @@ -96,11 +94,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (43_131_000 as Weight) + (45_223_000 as Weight) // Standard Error: 2_000 - .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((183_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((343_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((347_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)) } @@ -110,13 +108,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: CallFilter DisabledCalls (r:1 w:0) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (55_473_000 as Weight) + (58_316_000 as Weight) // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((198_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((197_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((421_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((426_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)) } @@ -126,11 +124,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (45_933_000 as Weight) - // Standard Error: 1_000 - .saturating_add((195_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((349_000 as Weight).saturating_mul(p as Weight)) + (50_752_000 as Weight) + // Standard Error: 2_000 + .saturating_add((178_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((339_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)) } @@ -141,13 +139,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: CallFilter DisabledCalls (r:1 w:0) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (54_757_000 as Weight) + (63_225_000 as Weight) // Standard Error: 0 - .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((217_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((436_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((427_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -155,9 +153,9 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (26_155_000 as Weight) + (27_181_000 as Weight) // Standard Error: 1_000 - .saturating_add((395_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((408_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/dali/src/weights/democracy.rs b/runtime/dali/src/weights/democracy.rs index d739cecdc68..79253495cfb 100644 --- a/runtime/dali/src/weights/democracy.rs +++ b/runtime/dali/src/weights/democracy.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -33,15 +33,15 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (72_511_000 as Weight) + (78_147_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) fn second(s: u32, ) -> Weight { - (38_333_000 as Weight) + (40_901_000 as Weight) // Standard Error: 1_000 - .saturating_add((243_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((247_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)) } @@ -49,9 +49,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (42_720_000 as Weight) + (44_497_000 as Weight) // Standard Error: 1_000 - .saturating_add((209_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((237_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)) } @@ -59,16 +59,16 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (42_341_000 as Weight) + (44_328_000 as Weight) // Standard Error: 1_000 - .saturating_add((214_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((224_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 { - (26_547_000 as Weight) + (27_961_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -79,45 +79,45 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn blacklist(p: u32, ) -> Weight { - (88_823_000 as Weight) + (95_296_000 as Weight) // Standard Error: 6_000 - .saturating_add((545_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((566_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (14_591_000 as Weight) + (13_838_000 as Weight) // Standard Error: 0 - .saturating_add((77_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((88_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 { - (2_814_000 as Weight) + (2_993_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (2_786_000 as Weight) + (2_876_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 { - (27_149_000 as Weight) + (29_139_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) fn veto_external(v: u32, ) -> Weight { - (28_257_000 as Weight) + (30_300_000 as Weight) // Standard Error: 0 - .saturating_add((112_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((115_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)) } @@ -125,23 +125,23 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn cancel_proposal(p: u32, ) -> Weight { - (64_501_000 as Weight) + (70_582_000 as Weight) // Standard Error: 2_000 - .saturating_add((524_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((499_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (17_105_000 as Weight) + (18_194_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) fn cancel_queued(r: u32, ) -> Weight { - (29_326_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_645_000 as Weight).saturating_mul(r as Weight)) + (31_439_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_990_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)) } @@ -149,9 +149,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (6_889_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_212_000 as Weight).saturating_mul(r as Weight)) + (6_091_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_373_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)) @@ -163,9 +163,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (14_236_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_230_000 as Weight).saturating_mul(r as Weight)) + (14_522_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_383_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)) @@ -174,9 +174,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (55_901_000 as Weight) + (60_787_000 as Weight) // Standard Error: 5_000 - .saturating_add((6_870_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_105_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)) @@ -185,9 +185,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (25_847_000 as Weight) + (28_718_000 as Weight) // Standard Error: 5_000 - .saturating_add((6_922_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_101_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)) @@ -195,20 +195,20 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (3_043_000 as Weight) + (3_294_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (41_587_000 as Weight) + (44_503_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) fn note_imminent_preimage(b: u32, ) -> Weight { - (27_444_000 as Weight) + (30_171_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)) @@ -217,7 +217,7 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) fn reap_preimage(b: u32, ) -> Weight { - (39_917_000 as Weight) + (41_252_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)) @@ -227,7 +227,7 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (36_489_000 as Weight) + (38_156_000 as Weight) // Standard Error: 1_000 .saturating_add((119_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -237,27 +237,27 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (34_517_000 as Weight) + (36_213_000 as Weight) // Standard Error: 1_000 - .saturating_add((201_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((209_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) fn remove_vote(r: u32, ) -> Weight { - (19_404_000 as Weight) + (20_612_000 as Weight) // Standard Error: 1_000 - .saturating_add((205_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((201_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) fn remove_other_vote(r: u32, ) -> Weight { - (19_842_000 as Weight) + (20_752_000 as Weight) // Standard Error: 1_000 - .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((203_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/dali/src/weights/frame_system.rs b/runtime/dali/src/weights/frame_system.rs index 7ceb8b28cc1..5ef4c87e683 100644 --- a/runtime/dali/src/weights/frame_system.rs +++ b/runtime/dali/src/weights/frame_system.rs @@ -1,7 +1,8 @@ + //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -33,41 +34,36 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } fn remark_with_event(b: u32, ) -> Weight { - (10_000_000 as Weight) + (0 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (9_513_000 as Weight) + (5_224_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - - fn set_changes_trie_config() -> Weight { - (0 as Weight) - } - // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 8_000 - .saturating_add((1_613_000 as Weight).saturating_mul(i as Weight)) + (94_631_000 as Weight) + // Standard Error: 27_000 + .saturating_add((1_016_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) fn kill_storage(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 10_000 - .saturating_add((1_036_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 16_000 + .saturating_add((1_112_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) fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 8_000 - .saturating_add((1_692_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 16_000 + .saturating_add((1_829_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/dali/src/weights/indices.rs b/runtime/dali/src/weights/indices.rs index 3652f1bb982..d91878670a3 100644 --- a/runtime/dali/src/weights/indices.rs +++ b/runtime/dali/src/weights/indices.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -30,33 +30,33 @@ pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (59_093_000 as Weight) + (67_998_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 { - (69_859_000 as Weight) + (82_134_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 { - (59_893_000 as Weight) + (72_248_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 { - (73_709_000 as Weight) + (45_055_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 { - (79_668_000 as Weight) + (82_402_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/dali/src/weights/membership.rs b/runtime/dali/src/weights/membership.rs index 5355b9aeb99..c89cce501e4 100644 --- a/runtime/dali/src/weights/membership.rs +++ b/runtime/dali/src/weights/membership.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -33,9 +33,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (23_969_000 as Weight) - // Standard Error: 2_000 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (41_977_000 as Weight) + // Standard Error: 10_000 + .saturating_add((257_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)) } @@ -45,9 +45,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (29_691_000 as Weight) - // Standard Error: 2_000 - .saturating_add((99_000 as Weight).saturating_mul(m as Weight)) + (57_502_000 as Weight) + // Standard Error: 9_000 + .saturating_add((113_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)) } @@ -57,9 +57,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (29_373_000 as Weight) - // Standard Error: 0 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (53_945_000 as Weight) + // Standard Error: 6_000 + .saturating_add((212_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)) } @@ -69,9 +69,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (29_869_000 as Weight) - // Standard Error: 1_000 - .saturating_add((254_000 as Weight).saturating_mul(m as Weight)) + (57_806_000 as Weight) + // Standard Error: 16_000 + .saturating_add((132_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)) } @@ -81,9 +81,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (30_841_000 as Weight) - // Standard Error: 0 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (40_024_000 as Weight) + // Standard Error: 12_000 + .saturating_add((444_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)) } @@ -91,18 +91,18 @@ impl membership::WeightInfo for WeightInfo { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (8_042_000 as Weight) - // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(m as Weight)) + (12_745_000 as Weight) + // Standard Error: 5_000 + .saturating_add((73_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: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (3_050_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) + (3_127_000 as Weight) + // Standard Error: 1_000 + .saturating_add((44_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/dali/src/weights/scheduler.rs b/runtime/dali/src/weights/scheduler.rs index 729b9e0d37d..ec7eadb3c6c 100644 --- a/runtime/dali/src/weights/scheduler.rs +++ b/runtime/dali/src/weights/scheduler.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -30,36 +30,36 @@ pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (26_199_000 as Weight) - // Standard Error: 1_000 - .saturating_add((120_000 as Weight).saturating_mul(s as Weight)) + (26_133_000 as Weight) + // Standard Error: 3_000 + .saturating_add((121_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) fn cancel(s: u32, ) -> Weight { - (25_191_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_288_000 as Weight).saturating_mul(s as Weight)) + (25_861_000 as Weight) + // Standard Error: 26_000 + .saturating_add((1_700_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) fn schedule_named(s: u32, ) -> Weight { - (32_405_000 as Weight) - // Standard Error: 2_000 - .saturating_add((135_000 as Weight).saturating_mul(s as Weight)) + (31_526_000 as Weight) + // Standard Error: 1_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: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_named(s: u32, ) -> Weight { - (28_338_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_320_000 as Weight).saturating_mul(s as Weight)) + (26_934_000 as Weight) + // Standard Error: 6_000 + .saturating_add((1_733_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/dali/src/weights/timestamp.rs b/runtime/dali/src/weights/timestamp.rs index b4ea0b9e6ac..f8ba18938d6 100644 --- a/runtime/dali/src/weights/timestamp.rs +++ b/runtime/dali/src/weights/timestamp.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -31,11 +31,11 @@ impl timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (14_439_000 as Weight) + (18_977_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 { - (9_129_000 as Weight) + (8_350_000 as Weight) } } diff --git a/runtime/dali/src/weights/treasury.rs b/runtime/dali/src/weights/treasury.rs index ae71f67b16c..f893b42bcba 100644 --- a/runtime/dali/src/weights/treasury.rs +++ b/runtime/dali/src/weights/treasury.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -31,23 +31,23 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (41_183_000 as Weight) + (67_339_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:2 w:2) fn reject_proposal() -> Weight { - (62_115_000 as Weight) + (89_248_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (12_423_000 as Weight) - // Standard Error: 2_000 - .saturating_add((176_000 as Weight).saturating_mul(p as Weight)) + (15_617_000 as Weight) + // Standard Error: 50_000 + .saturating_add((297_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)) } @@ -55,9 +55,9 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:1 w:1) fn on_initialize_proposals(p: u32, ) -> Weight { - (57_679_000 as Weight) - // Standard Error: 31_000 - .saturating_add((59_852_000 as Weight).saturating_mul(p as Weight)) + (50_253_000 as Weight) + // Standard Error: 1_061_000 + .saturating_add((65_655_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/dali/src/weights/utility.rs b/runtime/dali/src/weights/utility.rs index 03fac1590e2..ec86559933e 100644 --- a/runtime/dali/src/weights/utility.rs +++ b/runtime/dali/src/weights/utility.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dali-dev"), DB CACHE: 128 // Executed Command: @@ -30,24 +30,24 @@ pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { // Storage: CallFilter DisabledCalls (r:1 w:0) fn batch(c: u32, ) -> Weight { - (9_262_000 as Weight) - // Standard Error: 8_000 - .saturating_add((8_483_000 as Weight).saturating_mul(c as Weight)) + (31_182_000 as Weight) + // Standard Error: 2_000 + .saturating_add((9_073_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: CallFilter DisabledCalls (r:1 w:0) fn as_derivative() -> Weight { - (8_023_000 as Weight) + (8_550_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: CallFilter DisabledCalls (r:1 w:0) fn batch_all(c: u32, ) -> Weight { - (18_054_000 as Weight) + (15_732_000 as Weight) // Standard Error: 5_000 - .saturating_add((8_954_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((9_666_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn dispatch_as() -> Weight { - (15_985_000 as Weight) + (17_050_000 as Weight) } } From f9e9717a03521ca23db3ffb4c180968a606bdf70 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 14:36:21 +0100 Subject: [PATCH 23/35] Update github workflow --- .github/workflows/runtime-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 4605c0ddbb7..117ada604c1 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -32,7 +32,7 @@ jobs: if: "$${{ env.RUNTIME_CHECK }} == 1" id: run_simnode run: | - .maintain/run_sminode.sh + .maintain/run_simnode.sh benchmark: name: Benchmark From 2beccf5b8408c83c80fa64fa385703476c4703da Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 14:54:09 +0100 Subject: [PATCH 24/35] Update github workflow --- .maintain/run_simnode.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.maintain/run_simnode.sh b/.maintain/run_simnode.sh index e7670ed37d1..a4dde9334cc 100755 --- a/.maintain/run_simnode.sh +++ b/.maintain/run_simnode.sh @@ -18,6 +18,7 @@ VERSIONS_FILES=( /home/runner/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain nightly /home/runner/.cargo/bin/cargo build --release -p simnode sudo chown -R runner:runner target/release/simnode && sudo chmod +x target/release/simnode +sudo chown -R runner:runner /tmp/db YDATE=$(date -d yesterday +'%m-%d-%Y') run_simnode() { From 56d10926836c4b997eb7b1e7cfea45104b20cf6d Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 14:30:47 +0000 Subject: [PATCH 25/35] Updates weights for composable-dev --- runtime/composable/src/weights/balances.rs | 52 ++-- .../src/weights/collator_selection.rs | 89 +++++-- runtime/composable/src/weights/collective.rs | 163 +++++++----- runtime/composable/src/weights/democracy.rs | 245 ++++++++++++------ .../composable/src/weights/frame_system.rs | 64 ++--- runtime/composable/src/weights/indices.rs | 33 ++- runtime/composable/src/weights/membership.rs | 96 ++++--- runtime/composable/src/weights/scheduler.rs | 59 +++-- runtime/composable/src/weights/timestamp.rs | 28 +- runtime/composable/src/weights/treasury.rs | 45 ++-- runtime/composable/src/weights/utility.rs | 42 ++- 11 files changed, 588 insertions(+), 328 deletions(-) diff --git a/runtime/composable/src/weights/balances.rs b/runtime/composable/src/weights/balances.rs index 0a840e8b5dd..effdccc6e5a 100644 --- a/runtime/composable/src/weights/balances.rs +++ b/runtime/composable/src/weights/balances.rs @@ -1,63 +1,73 @@ -//! Autogenerated weights for balances + +//! Autogenerated weights for `balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=balances // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for balances. +/// Weight functions for `balances`. pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { + // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (139_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (84_077_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_keep_alive() -> Weight { - (81_000_000 as Weight) + (49_893_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 { - (47_000_000 as Weight) + (28_200_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 { - (54_000_000 as Weight) + (34_293_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:3 w:3) fn force_transfer() -> Weight { - (110_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (84_155_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (100_000_000 as Weight) + (61_279_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 { - (0 as Weight) + (26_083_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/composable/src/weights/collator_selection.rs b/runtime/composable/src/weights/collator_selection.rs index 736b86e7358..734a112334b 100644 --- a/runtime/composable/src/weights/collator_selection.rs +++ b/runtime/composable/src/weights/collator_selection.rs @@ -1,52 +1,93 @@ + +//! Autogenerated weights for `collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 + +// Executed Command: +// ./target/release/composable +// benchmark +// --chain=composable-dev +// --execution=wasm +// --wasm-execution=compiled +// --pallet=collator_selection +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --raw +// --output=runtime/composable/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weights for pallet_collator_selection using the Substrate node and recommended hardware. +/// Weight functions for `collator_selection`. pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { - fn set_invulnerables(b: u32) -> Weight { - (18_563_000 as Weight) + // Storage: CollatorSelection Invulnerables (r:0 w:1) + fn set_invulnerables(b: u32, ) -> Weight { + (15_646_000 as Weight) // Standard Error: 0 - .saturating_add((68_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((40_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (13_953_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (14_437_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn register_as_candidate(c: u32) -> Weight { - (71_196_000 as Weight) - // Standard Error: 0 - .saturating_add((198_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn register_as_candidate(c: u32, ) -> Weight { + (89_736_000 as Weight) + // Standard Error: 1_000 + .saturating_add((173_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn leave_intent(c: u32) -> Weight { - (55_336_000 as Weight) - // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(c as Weight)) + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn leave_intent(c: u32, ) -> Weight { + (81_766_000 as Weight) + // Standard Error: 1_000 + .saturating_add((240_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: System Account (r:2 w:2) + // Storage: System BlockWeight (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (71_461_000 as Weight) + (61_512_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn new_session(r: u32, c: u32) -> Weight { + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1) + // Storage: System Account (r:1 w:1) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: System BlockWeight (r:1 w:1) + fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_010_000 - .saturating_add((109_961_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_010_000 - .saturating_add((151_952_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) + // Standard Error: 4_493_000 + .saturating_add((22_945_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_493_000 + .saturating_add((118_123_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) } } diff --git a/runtime/composable/src/weights/collective.rs b/runtime/composable/src/weights/collective.rs index 570752756f8..9558ace3227 100644 --- a/runtime/composable/src/weights/collective.rs +++ b/runtime/composable/src/weights/collective.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for collective + +//! Autogenerated weights for `collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=collective @@ -15,106 +16,144 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for collective. +/// Weight functions for `collective`. pub struct WeightInfo(PhantomData); impl collective::WeightInfo for WeightInfo { - fn set_members(m: u32, _n: u32, p: u32) -> Weight { + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Voting (r:100 w:100) + // Storage: Council Prime (r:0 w:1) + fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 63_000 - .saturating_add((25_207_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 63_000 - .saturating_add((33_546_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 209_000 + .saturating_add((11_995_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 209_000 + .saturating_add((179_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 209_000 + .saturating_add((23_116_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))) } - fn execute(b: u32, m: u32) -> Weight { - (30_323_000 as Weight) + // Storage: Council Members (r:1 w:0) + fn execute(b: u32, m: u32, ) -> Weight { + (20_657_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((127_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((93_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } - fn propose_execute(b: u32, m: u32) -> Weight { - (38_575_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + fn propose_execute(b: u32, m: u32, ) -> Weight { + (25_129_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 3_000 - .saturating_add((254_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 0 + .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } - fn propose_proposed(b: u32, m: u32, p: u32) -> Weight { - (48_131_000 as Weight) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + (34_266_000 as Weight) // Standard Error: 0 - .saturating_add((18_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 7_000 - .saturating_add((147_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 7_000 - .saturating_add((909_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((10_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((105_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((425_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)) } - fn vote(m: u32) -> Weight { - (75_974_000 as Weight) - // Standard Error: 4_000 - .saturating_add((370_000 as Weight).saturating_mul(m as Weight)) + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + fn vote(m: u32, ) -> Weight { + (42_847_000 as Weight) + // Standard Error: 3_000 + .saturating_add((198_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)) } - fn close_early_disapproved(m: u32, p: u32) -> Weight { - (63_575_000 as Weight) - // Standard Error: 5_000 - .saturating_add((293_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 5_000 - .saturating_add((761_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + (42_813_000 as Weight) + // Standard Error: 2_000 + .saturating_add((189_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((356_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)) } - fn close_early_approved(b: u32, m: u32, p: u32) -> Weight { - (86_824_000 as Weight) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + (51_855_000 as Weight) // Standard Error: 0 - .saturating_add((12_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 8_000 - .saturating_add((321_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 8_000 - .saturating_add((860_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((195_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((424_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)) } - fn close_disapproved(m: u32, p: u32) -> Weight { - (70_231_000 as Weight) - // Standard Error: 7_000 - .saturating_add((323_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 6_000 - .saturating_add((784_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn close_disapproved(m: u32, p: u32, ) -> Weight { + (48_871_000 as Weight) + // Standard Error: 2_000 + .saturating_add((181_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((349_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)) } - fn close_approved(b: u32, m: u32, p: u32) -> Weight { - (92_370_000 as Weight) - // Standard Error: 1_000 - .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 10_000 - .saturating_add((327_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 9_000 - .saturating_add((899_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + (54_571_000 as Weight) + // Standard Error: 0 + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 2_000 + .saturating_add((207_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((418_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)) } - fn disapprove_proposal(p: u32) -> Weight { - (35_489_000 as Weight) - // Standard Error: 4_000 - .saturating_add((830_000 as Weight).saturating_mul(p as Weight)) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + fn disapprove_proposal(p: u32, ) -> Weight { + (25_921_000 as Weight) + // Standard Error: 1_000 + .saturating_add((412_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/composable/src/weights/democracy.rs b/runtime/composable/src/weights/democracy.rs index 3aa7f08788a..afc2f6a013f 100644 --- a/runtime/composable/src/weights/democracy.rs +++ b/runtime/composable/src/weights/democracy.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for democracy + +//! Autogenerated weights for `democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=democracy @@ -15,176 +16,248 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for democracy. +/// Weight functions for `democracy`. pub struct WeightInfo(PhantomData); impl democracy::WeightInfo for WeightInfo { + // Storage: Democracy PublicPropCount (r:1 w:1) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (112_082_000 as Weight) + (74_909_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn second(s: u32) -> Weight { - (56_014_000 as Weight) - // Standard Error: 3_000 - .saturating_add((349_000 as Weight).saturating_mul(s as Weight)) + // Storage: Democracy DepositOf (r:1 w:1) + fn second(s: u32, ) -> Weight { + (38_710_000 as Weight) + // Standard Error: 1_000 + .saturating_add((240_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)) } - fn vote_new(r: u32) -> Weight { - (62_157_000 as Weight) - // Standard Error: 4_000 - .saturating_add((512_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_new(r: u32, ) -> Weight { + (43_131_000 as Weight) + // Standard Error: 1_000 + .saturating_add((246_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)) } - fn vote_existing(r: u32) -> Weight { - (62_708_000 as Weight) - // Standard Error: 4_000 - .saturating_add((495_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn vote_existing(r: u32, ) -> Weight { + (43_407_000 as Weight) + // Standard Error: 1_000 + .saturating_add((225_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 { - (38_669_000 as Weight) + (25_856_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn blacklist(p: u32) -> Weight { - (113_805_000 as Weight) - // Standard Error: 9_000 - .saturating_add((998_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy Blacklist (r:0 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn blacklist(p: u32, ) -> Weight { + (89_295_000 as Weight) + // Standard Error: 6_000 + .saturating_add((566_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn external_propose(v: u32) -> Weight { - (19_088_000 as Weight) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:0) + fn external_propose(v: u32, ) -> Weight { + (13_453_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((91_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 { - (4_287_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (2_844_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (4_227_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (2_886_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 { - (38_917_000 as Weight) + (26_634_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn veto_external(v: u32) -> Weight { - (40_067_000 as Weight) - // Standard Error: 0 - .saturating_add((172_000 as Weight).saturating_mul(v as Weight)) + // Storage: Democracy NextExternal (r:1 w:1) + // Storage: Democracy Blacklist (r:1 w:1) + fn veto_external(v: u32, ) -> Weight { + (29_471_000 as Weight) + // Standard Error: 2_000 + .saturating_add((113_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)) } - fn cancel_proposal(p: u32) -> Weight { - (69_372_000 as Weight) - // Standard Error: 5_000 - .saturating_add((991_000 as Weight).saturating_mul(p as Weight)) + // Storage: Democracy PublicProps (r:1 w:1) + // Storage: Democracy DepositOf (r:1 w:1) + // Storage: System Account (r:2 w:2) + fn cancel_proposal(p: u32, ) -> Weight { + (65_565_000 as Weight) + // Standard Error: 2_000 + .saturating_add((518_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (23_073_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (16_176_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn cancel_queued(r: u32) -> Weight { - (36_184_000 as Weight) - // Standard Error: 32_000 - .saturating_add((6_334_000 as Weight).saturating_mul(r as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_queued(r: u32, ) -> Weight { + (30_608_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_570_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)) } - fn on_initialize_base(r: u32) -> Weight { - (0 as Weight) - // Standard Error: 44_000 - .saturating_add((8_834_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base(r: u32, ) -> Weight { + (5_773_000 as Weight) + // Standard Error: 5_000 + .saturating_add((5_338_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)) } - - fn on_initialize_base_with_launch_period(_r: u32) -> Weight { - (0 as Weight) + // Storage: Democracy LowestUnbaked (r:1 w:1) + // Storage: Democracy ReferendumCount (r:1 w:0) + // Storage: Democracy LastTabledWasExternal (r:1 w:0) + // Storage: Democracy NextExternal (r:1 w:0) + // Storage: Democracy PublicProps (r:1 w:0) + // Storage: Democracy ReferendumInfoOf (r:1 w:0) + fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { + (14_026_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_334_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)) } - - fn delegate(r: u32) -> Weight { - (67_447_000 as Weight) - // Standard Error: 64_000 - .saturating_add((11_600_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:3 w:3) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + fn delegate(r: u32, ) -> Weight { + (57_660_000 as Weight) + // Standard Error: 4_000 + .saturating_add((7_064_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } - fn undelegate(r: u32) -> Weight { - (37_144_000 as Weight) - // Standard Error: 36_000 - .saturating_add((10_896_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:2 w:2) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + fn undelegate(r: u32, ) -> Weight { + (26_308_000 as Weight) + // Standard Error: 6_000 + .saturating_add((7_096_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)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } + // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (4_006_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + (3_131_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn note_preimage(b: u32) -> Weight { - (61_302_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_preimage(b: u32, ) -> Weight { + (42_010_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)) } - fn note_imminent_preimage(b: u32) -> Weight { - (39_217_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + fn note_imminent_preimage(b: u32, ) -> Weight { + (27_462_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)) } - fn reap_preimage(b: u32) -> Weight { - (53_786_000 as Weight) + // Storage: Democracy Preimages (r:1 w:1) + // Storage: System Account (r:1 w:0) + fn reap_preimage(b: u32, ) -> Weight { + (39_771_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)) } - fn unlock_remove(r: u32) -> Weight { - (54_249_000 as Weight) - // Standard Error: 4_000 - .saturating_add((313_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_remove(r: u32, ) -> Weight { + (37_208_000 as Weight) + // Standard Error: 1_000 + .saturating_add((114_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)) } - fn unlock_set(r: u32) -> Weight { - (48_885_000 as Weight) - // Standard Error: 4_000 - .saturating_add((486_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy VotingOf (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn unlock_set(r: u32, ) -> Weight { + (36_216_000 as Weight) + // Standard Error: 2_000 + .saturating_add((191_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)) } - fn remove_vote(r: u32) -> Weight { - (25_483_000 as Weight) - // Standard Error: 3_000 - .saturating_add((508_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_vote(r: u32, ) -> Weight { + (20_278_000 as Weight) + // Standard Error: 1_000 + .saturating_add((193_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)) } - fn remove_other_vote(r: u32) -> Weight { - (26_969_000 as Weight) - // Standard Error: 3_000 - .saturating_add((289_000 as Weight).saturating_mul(r as Weight)) + // Storage: Democracy ReferendumInfoOf (r:1 w:1) + // Storage: Democracy VotingOf (r:1 w:1) + fn remove_other_vote(r: u32, ) -> Weight { + (20_174_000 as Weight) + // Standard Error: 2_000 + .saturating_add((193_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/composable/src/weights/frame_system.rs b/runtime/composable/src/weights/frame_system.rs index 9a0ef72313f..6fbe3abd35d 100644 --- a/runtime/composable/src/weights/frame_system.rs +++ b/runtime/composable/src/weights/frame_system.rs @@ -1,63 +1,69 @@ -//! Autogenerated weights for frame_system + +//! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for frame_system. +/// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { - fn remark(_b: u32) -> Weight { - (1_381_000 as Weight) - } - fn remark_with_event(b: u32) -> Weight { + fn remark(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) } - fn set_heap_pages() -> Weight { - (3_000_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + fn remark_with_event(b: u32, ) -> Weight { + (17_383_000 as Weight) + // Standard Error: 0 + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) } - fn set_changes_trie_config() -> Weight { - (15_000_000 as Weight) + // Storage: System Digest (r:1 w:1) + // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + fn set_heap_pages() -> Weight { + (5_140_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn set_storage(i: u32) -> Weight { - (25_491_000 as Weight) - // Standard Error: 28_000 - .saturating_add((962_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn set_storage(i: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 0 + .saturating_add((845_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_storage(i: u32) -> Weight { - (23_657_000 as Weight) - // Standard Error: 55_000 - .saturating_add((676_000 as Weight).saturating_mul(i as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_storage(i: u32, ) -> Weight { + (508_000 as Weight) + // Standard Error: 1_000 + .saturating_add((556_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } - fn kill_prefix(p: u32) -> Weight { - (13_414_000 as Weight) - // Standard Error: 77_000 - .saturating_add((1_634_000 as Weight).saturating_mul(p as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn kill_prefix(p: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 1_000 + .saturating_add((898_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/composable/src/weights/indices.rs b/runtime/composable/src/weights/indices.rs index 607ac3ff778..64fe48b69c4 100644 --- a/runtime/composable/src/weights/indices.rs +++ b/runtime/composable/src/weights/indices.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for indices + +//! Autogenerated weights for `indices` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=indices @@ -15,39 +16,47 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for indices. +/// Weight functions for `indices`. pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { + // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (160_634_000 as Weight) + (37_831_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 { - (192_936_000 as Weight) + (45_343_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 { - (161_780_000 as Weight) + (38_017_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 { - (163_771_000 as Weight) + (39_059_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 { - (150_461_000 as Weight) + (43_452_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/composable/src/weights/membership.rs b/runtime/composable/src/weights/membership.rs index 6d7a8bbe8f3..cacb84958c4 100644 --- a/runtime/composable/src/weights/membership.rs +++ b/runtime/composable/src/weights/membership.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for membership + +//! Autogenerated weights for `membership` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=membership @@ -15,58 +16,93 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for membership. +/// Weight functions for `membership`. pub struct WeightInfo(PhantomData); impl membership::WeightInfo for WeightInfo { - fn add_member(m: u32) -> Weight { - (78_864_000 as Weight) - // Standard Error: 57_000 - .saturating_add((925_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn add_member(m: u32, ) -> Weight { + (22_951_000 as Weight) + // Standard Error: 1_000 + .saturating_add((123_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)) } - fn remove_member(m: u32) -> Weight { - (81_076_000 as Weight) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn remove_member(m: u32, ) -> Weight { + (29_232_000 as Weight) // Standard Error: 10_000 - .saturating_add((494_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((412_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)) } - fn swap_member(m: u32) -> Weight { - (84_930_000 as Weight) - // Standard Error: 16_000 - .saturating_add((612_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn swap_member(m: u32, ) -> Weight { + (43_962_000 as Weight) + // Standard Error: 7_000 + .saturating_add((261_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)) } - fn reset_member(m: u32) -> Weight { - (90_093_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_065_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:0) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn reset_member(m: u32, ) -> Weight { + (50_808_000 as Weight) + // Standard Error: 7_000 + .saturating_add((436_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)) } - fn change_key(m: u32) -> Weight { - (76_029_000 as Weight) - // Standard Error: 18_000 - .saturating_add((903_000 as Weight).saturating_mul(m as Weight)) + // Storage: CouncilMembership Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: CouncilMembership Prime (r:1 w:1) + // Storage: Council Members (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn change_key(m: u32, ) -> Weight { + (49_406_000 as Weight) + // Standard Error: 6_000 + .saturating_add((231_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)) } - fn set_prime(_m: u32) -> Weight { - (57_245_000 as Weight) + // Storage: CouncilMembership Members (r:1 w:0) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn set_prime(m: u32, ) -> Weight { + (11_766_000 as Weight) + // Standard Error: 4_000 + .saturating_add((148_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)) } - fn clear_prime(_m: u32) -> Weight { - (12_220_000 as Weight).saturating_add(T::DbWeight::get().writes(2 as Weight)) + // Storage: CouncilMembership Prime (r:0 w:1) + // Storage: Council Prime (r:0 w:1) + fn clear_prime(m: u32, ) -> Weight { + (5_433_000 as Weight) + // Standard Error: 0 + .saturating_add((7_000 as Weight).saturating_mul(m as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/composable/src/weights/scheduler.rs b/runtime/composable/src/weights/scheduler.rs index a2b73407eca..192fd7a90ab 100644 --- a/runtime/composable/src/weights/scheduler.rs +++ b/runtime/composable/src/weights/scheduler.rs @@ -1,56 +1,65 @@ -//! Autogenerated weights for scheduler + +//! Autogenerated weights for `scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-24, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=scheduler // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for scheduler. +/// Weight functions for `scheduler`. pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { - fn schedule(s: u32) -> Weight { - (43_832_000 as Weight) - // Standard Error: 181_000 - .saturating_add((7_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule(s: u32, ) -> Weight { + (49_690_000 as Weight) + // Standard Error: 19_000 + .saturating_add((252_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)) } - fn cancel(s: u32) -> Weight { - (33_112_000 as Weight) - // Standard Error: 234_000 - .saturating_add((4_865_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Lookup (r:0 w:1) + fn cancel(s: u32, ) -> Weight { + (45_839_000 as Weight) + // Standard Error: 34_000 + .saturating_add((2_023_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)) } - fn schedule_named(s: u32) -> Weight { - (45_294_000 as Weight) - // Standard Error: 23_000 - .saturating_add((221_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn schedule_named(s: u32, ) -> Weight { + (52_119_000 as Weight) + // Standard Error: 26_000 + .saturating_add((249_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)) } - fn cancel_named(s: u32) -> Weight { - (38_311_000 as Weight) - // Standard Error: 95_000 - .saturating_add((4_575_000 as Weight).saturating_mul(s as Weight)) + // Storage: Scheduler Lookup (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:1) + fn cancel_named(s: u32, ) -> Weight { + (44_031_000 as Weight) + // Standard Error: 32_000 + .saturating_add((2_483_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/composable/src/weights/timestamp.rs b/runtime/composable/src/weights/timestamp.rs index d81519ebeda..bea80e21db2 100644 --- a/runtime/composable/src/weights/timestamp.rs +++ b/runtime/composable/src/weights/timestamp.rs @@ -1,37 +1,41 @@ -//! Autogenerated weights for timestamp + +//! Autogenerated weights for `timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-22, STEPS: `[5, ]`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=timestamp // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for timestamp. +/// Weight functions for `timestamp`. pub struct WeightInfo(PhantomData); impl timestamp::WeightInfo for WeightInfo { + // Storage: Timestamp Now (r:1 w:1) + // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (18_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (10_133_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 { - (7_000_000 as Weight) + (4_673_000 as Weight) } } diff --git a/runtime/composable/src/weights/treasury.rs b/runtime/composable/src/weights/treasury.rs index f39fb7548a1..142187c0af6 100644 --- a/runtime/composable/src/weights/treasury.rs +++ b/runtime/composable/src/weights/treasury.rs @@ -1,13 +1,14 @@ -//! Autogenerated weights for treasury + +//! Autogenerated weights for `treasury` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 // Executed Command: // ./target/release/composable // benchmark -// --chain=picasso-dev +// --chain=composable-dev // --execution=wasm // --wasm-execution=compiled // --pallet=treasury @@ -15,38 +16,48 @@ // --steps=50 // --repeat=20 // --raw -// --output=./runtime/picasso/src/weights +// --output=runtime/composable/src/weights +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions for treasury. +/// Weight functions for `treasury`. pub struct WeightInfo(PhantomData); impl treasury::WeightInfo for WeightInfo { + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (213_896_000 as Weight) + (71_832_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:2 w:2) fn reject_proposal() -> Weight { - (357_257_000 as Weight) + (99_792_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn approve_proposal(p: u32) -> Weight { - (48_959_000 as Weight) - // Standard Error: 58_000 - .saturating_add((139_000 as Weight).saturating_mul(p as Weight)) + // Storage: Treasury Proposals (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + fn approve_proposal(p: u32, ) -> Weight { + (20_117_000 as Weight) + // Standard Error: 21_000 + .saturating_add((851_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)) } - fn on_initialize_proposals(p: u32) -> Weight { - (180_865_000 as Weight) - // Standard Error: 9_488_000 - .saturating_add((241_148_000 as Weight).saturating_mul(p as Weight)) + // Storage: System Account (r:1 w:0) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:1 w:1) + fn on_initialize_proposals(p: u32, ) -> Weight { + (181_391_000 as Weight) + // Standard Error: 2_226_000 + .saturating_add((65_079_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/composable/src/weights/utility.rs b/runtime/composable/src/weights/utility.rs index a461f873a03..e3a1b4c7a6b 100644 --- a/runtime/composable/src/weights/utility.rs +++ b/runtime/composable/src/weights/utility.rs @@ -1,25 +1,47 @@ + +//! Autogenerated weights for `utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("composable-dev"), DB CACHE: 128 + +// Executed Command: +// ./target/release/composable +// benchmark +// --chain=composable-dev +// --execution=wasm +// --wasm-execution=compiled +// --pallet=utility +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --raw +// --output=runtime/composable/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; +/// Weight functions for `utility`. pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { - fn batch(c: u32) -> Weight { - (14_618_000 as Weight) - // Standard Error: 0 - .saturating_add((610_000 as Weight).saturating_mul(c as Weight)) + fn batch(c: u32, ) -> Weight { + (28_696_000 as Weight) + // Standard Error: 2_000 + .saturating_add((6_008_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_175_000 as Weight) + (3_987_000 as Weight) } - fn batch_all(c: u32) -> Weight { - (14_561_000 as Weight) - // Standard Error: 0 - .saturating_add((1_013_000 as Weight).saturating_mul(c as Weight)) + fn batch_all(c: u32, ) -> Weight { + (17_207_000 as Weight) + // Standard Error: 5_000 + .saturating_add((6_603_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (10_000_000 as Weight) + (14_969_000 as Weight) } } From b532cffcf61fac43c5018d794cb822d2f5715696 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 16:48:42 +0100 Subject: [PATCH 26/35] Add condition to ignore check_runtime on draft PR --- .github/workflows/runtime-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index 117ada604c1..d1aca0532ff 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -15,6 +15,7 @@ jobs: - linux - x64 - sre + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v2 with: @@ -41,6 +42,7 @@ jobs: - linux - x64 - bmark + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v2 - name: Benchmark Test From 857cd2fffde25748ccd22b729c53203168f71ae2 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 16:53:47 +0100 Subject: [PATCH 27/35] fmt --- frame/composable-traits/src/rate_model.rs | 56 ++++++++++++----------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/frame/composable-traits/src/rate_model.rs b/frame/composable-traits/src/rate_model.rs index dfa7944f071..38b4b125c44 100644 --- a/frame/composable-traits/src/rate_model.rs +++ b/frame/composable-traits/src/rate_model.rs @@ -53,7 +53,7 @@ pub fn calc_utilization_ratio( borrows: LiftedFixedBalance, ) -> Result { if borrows.is_zero() { - return Ok(Percent::zero()) + return Ok(Percent::zero()); } let total = cash.safe_add(&borrows)?; @@ -157,10 +157,12 @@ impl InterestRate for InterestRateModel { match self { Self::Jump(jump) => jump.get_borrow_rate(utilization), Self::Curve(curve) => curve.get_borrow_rate(utilization), - Self::DynamicPIDController(dynamic_pid_model) => - dynamic_pid_model.get_borrow_rate(utilization), - Self::DoubleExponent(double_exponents_model) => - double_exponents_model.get_borrow_rate(utilization), + Self::DynamicPIDController(dynamic_pid_model) => { + dynamic_pid_model.get_borrow_rate(utilization) + } + Self::DoubleExponent(double_exponents_model) => { + double_exponents_model.get_borrow_rate(utilization) + } } } } @@ -195,11 +197,11 @@ impl JumpModel { ) -> Option { let model = Self { base_rate, jump_rate, full_rate, target_utilization }; - if model.base_rate <= Self::MAX_BASE_RATE && - model.jump_rate <= Self::MAX_JUMP_RATE && - model.full_rate <= Self::MAX_FULL_RATE && - model.base_rate <= model.jump_rate && - model.jump_rate <= model.full_rate + if model.base_rate <= Self::MAX_BASE_RATE + && model.jump_rate <= Self::MAX_JUMP_RATE + && model.full_rate <= Self::MAX_FULL_RATE + && model.base_rate <= model.jump_rate + && model.jump_rate <= model.full_rate { Some(model) } else { @@ -221,7 +223,7 @@ impl InterestRate for JumpModel { .checked_div(&self.target_utilization.into())? .checked_add(&self.base_rate)?, ) - }, + } Ordering::Equal => Some(self.jump_rate), Ordering::Greater => { // (utilization - target_utilization)*(full_rate - jump_rate) / ( 1 - @@ -235,7 +237,7 @@ impl InterestRate for JumpModel { .checked_div(&available.into())? .checked_add(&self.jump_rate)?, ) - }, + } } } } @@ -306,8 +308,8 @@ impl DynamicPIDControllerModel { utilization_ratio: FixedU128, ) -> Result { // compute error term `et = uo - ut` - let et: i128 = self.uo.into_inner().try_into().unwrap_or(0_i128) - - utilization_ratio.into_inner().try_into().unwrap_or(0_i128); + let et: i128 = self.uo.into_inner().try_into().unwrap_or(0_i128) + - utilization_ratio.into_inner().try_into().unwrap_or(0_i128); let et: FixedI128 = FixedI128::from_inner(et); // compute proportional term `pt = kp * et` let pt = self.kp.checked_mul(&et).ok_or(ArithmeticError::Overflow)?; @@ -363,7 +365,7 @@ impl InterestRate for DynamicPIDControllerModel { // const NINE: usize = 9; let utilization: Rate = utilization.into(); if let Ok(interest_rate) = Self::get_output_utilization_ratio(self, utilization) { - return Some(interest_rate) + return Some(interest_rate); } None } @@ -389,7 +391,7 @@ impl DoubleExponentModel { pub fn new_model(coefficients: [u8; 16]) -> Option { let sum_of_coefficients = coefficients.iter().fold(0_u16, |acc, &c| acc + c as u16); if sum_of_coefficients == EXPECTED_COEFFICIENTS_SUM { - return Some(DoubleExponentModel { coefficients }) + return Some(DoubleExponentModel { coefficients }); } None } @@ -496,9 +498,9 @@ mod tests { let excess_util = utilization.saturating_sub(target_utilization); assert_eq!( borrow_rate, - (jump_model.full_rate - jump_model.jump_rate).saturating_mul(excess_util.into()) / - FixedU128::saturating_from_rational(20, 100) + - normal_rate, + (jump_model.full_rate - jump_model.jump_rate).saturating_mul(excess_util.into()) + / FixedU128::saturating_from_rational(20, 100) + + normal_rate, ); } @@ -548,10 +550,10 @@ mod tests { // collection alternative to define arbitrary and proptest attributes with filtering // overall cardinality is small, so should work well // here we have one liner, not sure why in code we have many lines.... - base <= jump && - jump <= full && base <= &JumpModel::MAX_BASE_RATE && - jump <= &JumpModel::MAX_JUMP_RATE && - full <= &JumpModel::MAX_FULL_RATE + base <= jump + && jump <= full && base <= &JumpModel::MAX_BASE_RATE + && jump <= &JumpModel::MAX_JUMP_RATE + && full <= &JumpModel::MAX_FULL_RATE }) .prop_map(|(base_rate, jump_percentage, full_percentage, target_utilization)| { JumpModelStrategy { @@ -593,15 +595,15 @@ mod tests { let x2 = 75; let y1 = jump_model.get_borrow_rate(Percent::from_percent(x1)).unwrap(); let y2 = jump_model.get_borrow_rate(Percent::from_percent(x2)).unwrap(); - let s1 = (y2 - y1) / - (FixedU128::saturating_from_integer(x2) - FixedU128::saturating_from_integer(x1)); + let s1 = (y2 - y1) + / (FixedU128::saturating_from_integer(x2) - FixedU128::saturating_from_integer(x1)); let x1 = 81; let x2 = 86; let y1 = jump_model.get_borrow_rate(Percent::from_percent(x1)).unwrap(); let y2 = jump_model.get_borrow_rate(Percent::from_percent(x2)).unwrap(); - let s2 = (y2 - y1) / - (FixedU128::saturating_from_integer(x2) - FixedU128::saturating_from_integer(x1)); + let s2 = (y2 - y1) + / (FixedU128::saturating_from_integer(x2) - FixedU128::saturating_from_integer(x1)); assert!(s1 < s2, "slope after target is growing faster") } From 7d936cd6fa8ccbf1998369c998d45c65c8cd9a1e Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Tue, 18 Jan 2022 16:57:04 +0100 Subject: [PATCH 28/35] adds +nighly to checks --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bd123479fe7..1d742bbe53f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -62,7 +62,7 @@ jobs: node-version: 14.x - name: Cargo fmt run: | - /home/runner/.cargo/bin/cargo fmt -- --check + /home/runner/.cargo/bin/cargo +nightly fmt -- --check - name: Hadolint env: HADOLINT_VERSION: v2.8.0 @@ -93,7 +93,7 @@ jobs: exit $total_exit_code - name: Cargo clippy run: | - /home/runner/.cargo/bin/cargo clippy -- -D warnings + /home/runner/.cargo/bin/cargo +nightly clippy -- -D warnings - name: Cargo udeps env: UDEPS_VERSION: v0.1.24 From 3bccd8ccb9382cc849949b994d22107a458e7d3e Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Tue, 18 Jan 2022 19:45:54 +0100 Subject: [PATCH 29/35] add git pull --- .maintain/run_benchmarks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh index 5ca1e682be9..30bcbfffc0a 100755 --- a/.maintain/run_benchmarks.sh +++ b/.maintain/run_benchmarks.sh @@ -69,6 +69,7 @@ run_benchmarks() { USERNAME=$(gcloud secrets versions access latest --secret=github-api-username) PASSWORD=$(gcloud secrets versions access latest --secret=github-api-token) git remote set-url origin https://"$USERNAME":"$PASSWORD"@github.com/ComposableFi/composable.git + git pull origin $GITHUB_REF_NAME git add runtime/$FOLDER git commit -m "Updates weights for $CHAIN" git push origin $GITHUB_REF_NAME From e8191598b2fe59c046cfb9aac74b2de7c091231d Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Wed, 19 Jan 2022 00:13:32 +0100 Subject: [PATCH 30/35] Finalizing cleanup --- .github/workflows/build-artifacts.yml | 42 +++++--- .github/workflows/check.yml | 14 ++- .github/workflows/runtime-check.yml | 9 +- .maintain/client_release.sh | 11 ++- .maintain/playbooks/client-upgrade.yml | 84 ++++++++-------- .maintain/playbooks/gcp.yaml | 36 +++---- .maintain/playbooks/runtime-upgrade.yml | 122 ++++++++++++------------ .maintain/runtime_release.sh | 11 ++- 8 files changed, 176 insertions(+), 153 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index d2e749f02f1..f41f9a52ef5 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -3,6 +3,8 @@ name: "Build Artifacts" on: workflow_dispatch: push: + branches: + - fix-release tags: - '*' @@ -36,25 +38,44 @@ jobs: toolchain: stable - name: 🔨 Build and Upload Composable Binary - working-directory: "./.maintain/" - id: runtime_release + id: client_release run: | - ./client_release.sh + .maintain/client_release.sh - name: Build wasm with srtool - working-directory: "./.maintain/" id: runtime_release run: | - ./runtime_release.sh + .maintain/runtime_release.sh - - name: Upload Compressed wasm # TODO only upload wasm that has changed + - name: Upload Compact Picasso wasm # TODO only upload wasm that has changed uses: svenstaro/upload-release-action@v2 + if: "$${{ env.picasso-wasm }} == 1" with: repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} - file: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.compressed.wasm + file: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm asset_name: picasso_runtime.compact.compressed.wasm tag: ${{ github.ref }} overwrite: true + + - name: Upload Compact Dali wasm # TODO only upload wasm that has changed + uses: svenstaro/upload-release-action@v2 + if: "$${{ env.dali-wasm }} == 1" + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: ./runtime/dali/target/srtool/release/wbuild/dali-runtime/dali_runtime.compact.wasm + asset_name: dali_runtime.compact.compressed.wasm + tag: ${{ github.ref }} + overwrite: true + + - name: Upload Compact Composable wasm # TODO only upload wasm that has changed + uses: svenstaro/upload-release-action@v2 + if: "$${{ env.composable-wasm }} == 1" + with: + repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }} + file: ./runtime/picasso/target/srtool/release/wbuild/composable-runtime/composable_runtime.compact.wasm + asset_name: composable_runtime.compact.compressed.wasm + tag: ${{ github.ref }} + overwrite: true - name: Upload Binary on Release # TODO Only upload binary if client files have changed uses: svenstaro/upload-release-action@v2 @@ -66,8 +87,7 @@ jobs: overwrite: true - name: Update Release Note - run: | - sed -i '1i # Code ' release.md + run: sed -i '1i # Code ' release.md - name: Release uses: softprops/action-gh-release@v1 @@ -95,6 +115,4 @@ jobs: echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV - name: Run ansible playbook - working-directory: "./.maintain/playbooks" - run: | - ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' + run: ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bd123479fe7..d560e5e74e9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -53,6 +53,8 @@ jobs: steps: - uses: actions/checkout@v2 - run: | + /home/runner/.cargo/bin/rustup install nightly-2021-11-29 + /home/runner/.cargo/bin/rustup target add --toolchain=nightly-2021-11-29 wasm32-unknown-unknown /home/runner/.cargo/bin/rustup show /home/runner/.cargo/bin/rustup override unset /home/runner/.cargo/bin/rustup show @@ -62,7 +64,7 @@ jobs: node-version: 14.x - name: Cargo fmt run: | - /home/runner/.cargo/bin/cargo fmt -- --check + /home/runner/.cargo/bin/cargo +nightly-2021-11-29 fmt -- --check - name: Hadolint env: HADOLINT_VERSION: v2.8.0 @@ -93,7 +95,7 @@ jobs: exit $total_exit_code - name: Cargo clippy run: | - /home/runner/.cargo/bin/cargo clippy -- -D warnings + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 clippy -- -D warnings - name: Cargo udeps env: UDEPS_VERSION: v0.1.24 @@ -102,8 +104,8 @@ jobs: tar xzf "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" cp "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu/cargo-udeps" ~/.cargo/bin/ rm -r "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu" - cargo udeps --version - SKIP_WASM_BUILD=1 cargo udeps --workspace --all-features + /home/runner/.cargo/bin/cargo +nightly-2021-11-29 udeps --version + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 udeps --workspace --all-features continue-on-error: true # Often this turns gives false positives, due to the different ways that Substrate uses features. test: name: Unit Test @@ -118,7 +120,9 @@ jobs: run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Run Test (with coverage) run: | - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --lcov --output-path lcov.info + /home/runner/.cargo/bin/rustup install nightly-2021-11-29 + /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain=nightly-2021-11-29 + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 llvm-cov --workspace --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/runtime-check.yml b/.github/workflows/runtime-check.yml index d1aca0532ff..96d1e758692 100644 --- a/.github/workflows/runtime-check.yml +++ b/.github/workflows/runtime-check.yml @@ -23,8 +23,7 @@ jobs: - name: Check for runtime changes id: check_runtime - run: | - .maintain/check_runtime.sh + run: .maintain/check_runtime.sh - name: Echo output run: echo ${{ env.RUNTIME_CHECK }} @@ -32,8 +31,7 @@ jobs: - name: Run Simnode if: "$${{ env.RUNTIME_CHECK }} == 1" id: run_simnode - run: | - .maintain/run_simnode.sh + run: .maintain/run_simnode.sh benchmark: name: Benchmark @@ -48,8 +46,7 @@ jobs: - name: Benchmark Test if: "$${{ env.RUNTIME_CHECK }} == 1" id: run_benchmarks - run: | - .maintain/run_benchmarks.sh + run: .maintain/run_benchmarks.sh diff --git a/.maintain/client_release.sh b/.maintain/client_release.sh index b51daf43528..2d7fe4e3492 100755 --- a/.maintain/client_release.sh +++ b/.maintain/client_release.sh @@ -10,11 +10,14 @@ #shellcheck source=../common/lib.sh . "$(dirname "${0}")/./common/lib.sh" +RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 ) + + if has_client_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" then boldprint "Building new client binaries" cargo build --release -p composable - tar -czvf composable-${{ RELEASE_VERSION }}.tar.gz target/release/composable - tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm - gsutil cp *.tar.gz gs://composable-binaries/community-releases/${{ RELEASE_VERSION }}/ -fi \ No newline at end of file + tar -czvf composable-"${RELEASE_VERSION}".tar.gz target/release/composable + tar -czvf picasso_runtime.compact.wasm-"${RELEASE_VERSION}".tar.gz runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm + gsutil cp *.tar.gz gs://composable-binaries/community-releases/"${RELEASE_VERSION}"/ +fi diff --git a/.maintain/playbooks/client-upgrade.yml b/.maintain/playbooks/client-upgrade.yml index 09afc8e8ca3..eeb76c2b8c5 100644 --- a/.maintain/playbooks/client-upgrade.yml +++ b/.maintain/playbooks/client-upgrade.yml @@ -1,44 +1,44 @@ --- - - hosts: all - vars: - release_version: "{{ lookup('env','RELEASE_VERSION') }}" - tasks: - - name: Stop Composable service - become: true - command: supervisorctl stop composable - - - name: Download composable binary {{ release_version }} - become: yes - get_url: - url: https://storage.googleapis.com/composable-binaries/community-releases/{{ release_version }}/composable-{{ release_version }}.tar.gz - dest: ~/ - mode: "+x" +- hosts: all + vars: + release_version: "{{ lookup('env','RELEASE_VERSION') }}" + tasks: + - name: Stop Composable service + become: true + command: supervisorctl stop composable + + - name: Download composable binary {{ release_version }} + become: yes + get_url: + url: https://storage.googleapis.com/composable-binaries/community-releases/{{ release_version }}/composable-{{ release_version }}.tar.gz + dest: ~/ + mode: "+x" + + + - name: Unpack Composable Bonary file + become: yes + unarchive: + src: ~/composable-{{ release_version }}.tar.gz + dest: ~/ + remote_src: yes - - - name: Unpack Composable Bonary file - become: yes - unarchive: - src: ~/composable-{{ release_version }}.tar.gz - dest: ~/ - remote_src: yes - - - - name: Move composable binary to /usr/local/bin/composable - become: yes - command: mv ~/target/release/composable /usr/bin/composable - - - name: Change Composable file permission - become: yes - file: - path: /usr/bin/composable - owner: "composable" - group: "composable" - - - name: Check Version - become: yes - command: composable --version - - - - name: Start Composable service - become: true - command: supervisorctl start composable + + - name: Move composable binary to /usr/local/bin/composable + become: yes + command: mv ~/target/release/composable /usr/bin/composable + + - name: Change Composable file permission + become: yes + file: + path: /usr/bin/composable + owner: "composable" + group: "composable" + + - name: Check Version + become: yes + command: composable --version + + + - name: Start Composable service + become: true + command: supervisorctl start composable diff --git a/.maintain/playbooks/gcp.yaml b/.maintain/playbooks/gcp.yaml index 7f7ce90470b..fdfded539f6 100644 --- a/.maintain/playbooks/gcp.yaml +++ b/.maintain/playbooks/gcp.yaml @@ -1,19 +1,19 @@ --- - plugin: gcp_compute - projects: - - composable-ops-5568 - hostname: - - name - keyed_groups: - - key: labels - groups: - collator-node: "collator' in (labels|list)" - bootnode: "'bootnode' in (labels|list)" - validator-node: "'validator' in (labels|list)" - rpc-node: "'rpc' in (labels|list)" - testnode: "testnode' in (labels|list)" - filters: [] - auth_kind: serviceaccount - service_account_file: /opt/ansible/inventory/new.json - vars: - - ansible_python_interpreter: /usr/bin/python3 +plugin: gcp_compute +projects: + - composable-ops-5568 +hostname: + - name +keyed_groups: + - key: labels +groups: + collator-node: "collator' in (labels|list)" + bootnode: "'bootnode' in (labels|list)" + validator-node: "'validator' in (labels|list)" + rpc-node: "'rpc' in (labels|list)" + testnode: "testnode' in (labels|list)" +filters: [] +auth_kind: serviceaccount +service_account_file: /opt/ansible/inventory/new.json +vars: + - ansible_python_interpreter: /usr/bin/python3 diff --git a/.maintain/playbooks/runtime-upgrade.yml b/.maintain/playbooks/runtime-upgrade.yml index 25304b0cd3a..9984dda4fa6 100644 --- a/.maintain/playbooks/runtime-upgrade.yml +++ b/.maintain/playbooks/runtime-upgrade.yml @@ -1,64 +1,64 @@ --- - - hosts: all - vars: - chain: "{{ lookup('env','CHAIN') }}" - release_version: "{{ lookup('env','RELEASE_VERSION') }}" - root_key: "{{ lookup('env','ROOT_KEY') }}" - tasks: - - name: Stop Composable service - become: true - command: supervisorctl stop composable +- hosts: all + vars: + chain: "{{ lookup('env','CHAIN') }}" + release_version: "{{ lookup('env','RELEASE_VERSION') }}" + root_key: "{{ lookup('env','ROOT_KEY') }}" + tasks: + - name: Stop Composable service + become: true + command: supervisorctl stop composable + + - name: Download WASM runtime {{ release_version }} + become: yes + get_url: + url: https://storage.googleapis.com/composable-binaries/community-releases/{{ chain }}/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz + dest: ~/ + mode: "+x" - - name: Download WASM runtime {{ release_version }} - become: yes - get_url: - url: https://storage.googleapis.com/composable-binaries/community-releases/{{ chain }}/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz - dest: ~/ - mode: "+x" - - - name: Download Parachain utils {{ release_version }} - become: yes - get_url: - url: https://storage.googleapis.com/composable-binaries/community-releases/{{ chain }}/parachain-utils-{{ release_version }}.tar.gz - dest: ~/ - mode: "+x" - - - name: Unpack WASM runtime file - become: yes - unarchive: - src: ~/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz - dest: ~/ - remote_src: yes + - name: Download Parachain utils {{ release_version }} + become: yes + get_url: + url: https://storage.googleapis.com/composable-binaries/community-releases/{{ chain }}/parachain-utils-{{ release_version }}.tar.gz + dest: ~/ + mode: "+x" - - name: Unpack WASM runtime file - become: yes - unarchive: - src: ~/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz - dest: ~/ - remote_src: yes - - - name: Unpack Parachain utils - become: yes - unarchive: - src: ~/parachain-utils-{{ release_version }}.tar.gz - dest: ~/ - remote_src: yes - - - name: Move parachain-utils binary to /usr/local/bin/ - become: yes - command: mv ~/target/release/parachain-utils /usr/bin/parachain-utils - - - name: Change Parachain utils file permission - become: yes - file: - path: /usr/bin/parachain-utils - owner: "composable" - group: "composable" - - - name: Runtime Upgrade - become: yes - command: parachain-utils upgrade-runtime --path ~/target/release/picasso_runtime.compact.wasm - - - name: Start Composable service - become: true - command: supervisorctl start composable + - name: Unpack WASM runtime file + become: yes + unarchive: + src: ~/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz + dest: ~/ + remote_src: yes + + - name: Unpack WASM runtime file + become: yes + unarchive: + src: ~/picasso_runtime.compact.wasm-{{ release_version }}.tar.gz + dest: ~/ + remote_src: yes + + - name: Unpack Parachain utils + become: yes + unarchive: + src: ~/parachain-utils-{{ release_version }}.tar.gz + dest: ~/ + remote_src: yes + + - name: Move parachain-utils binary to /usr/local/bin/ + become: yes + command: mv ~/target/release/parachain-utils /usr/bin/parachain-utils + + - name: Change Parachain utils file permission + become: yes + file: + path: /usr/bin/parachain-utils + owner: "composable" + group: "composable" + + - name: Runtime Upgrade + become: yes + command: parachain-utils upgrade-runtime --path ~/target/release/picasso_runtime.compact.wasm + + - name: Start Composable service + become: true + command: supervisorctl start composable diff --git a/.maintain/runtime_release.sh b/.maintain/runtime_release.sh index 461262f8008..6328a93a405 100755 --- a/.maintain/runtime_release.sh +++ b/.maintain/runtime_release.sh @@ -13,8 +13,8 @@ # shellcheck disable=SC2039 VERSIONS_FILES=( "runtime/picasso/src/lib.rs,picasso,picasso" - "runtime/dali/src/lib.rs,dali-chachacha,dali" - "runtime/composable/src/lib.rs,composable,composable" + # "runtime/dali/src/lib.rs,dali-chachacha,dali" + # "runtime/composable/src/lib.rs,composable,composable" ) # Install the neccessary tools needed for building @@ -25,9 +25,10 @@ cargo install --locked --git https://github.com/chevdor/subwasm --tag v0.16.1 build_runtime () { chain=$3 # srtool for reproducible builds - srtool build --package "$chain"-runtime --profile release --runtime-dir ./runtime/"$chain" + srtool build --package "$chain"-runtime --profile release --runtime-dir runtime/"$chain" # subwasm for runtime metadata - subwasm info ./runtime/"$chain"/target/srtool/release/wbuild/"$chain"-runtime/"$chain"_runtime.compact.wasm >> "$chain"-release.md + echo "# $chain Runtime " >> release.md + subwasm info ./runtime/"$chain"/target/srtool/release/wbuild/"$chain"-runtime/"$chain"_runtime.compact.wasm >> release.md } # Check which runtimes have changed and build them @@ -37,7 +38,7 @@ for i in "${VERSIONS_FILES[@]}"; do if has_runtime_changes "${LATEST_TAG_NAME}" "${GITHUB_REF_NAME}" "$folder" then build_runtime $output $chain $folder + echo "$chain-wasm=1" >> "$GITHUB_ENV" fi done <<< "$i" done - From 07cbce58639463dc4fac0d5ec8e0ad4afe1efcd2 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Wed, 19 Jan 2022 04:51:27 +0100 Subject: [PATCH 31/35] Finalizing cleanup --- .github/workflows/picashot.yml | 13 +++++++++++++ .maintain/run_benchmarks.sh | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/picashot.yml b/.github/workflows/picashot.yml index d74c44b39ba..97d860d765b 100644 --- a/.github/workflows/picashot.yml +++ b/.github/workflows/picashot.yml @@ -17,3 +17,16 @@ jobs: run: | ansible-playbook -l _mainnet_collator_yes picashot.yml -i picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3' + dalishot: + runs-on: + - self-hosted + - linux + - X64 + - ansible-runner + + steps: + - name: Run ansible playbook + working-directory: "./.maintain/playbooks" + run: | + ansible-playbook -l _collator_node_yes picashot.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3' + diff --git a/.maintain/run_benchmarks.sh b/.maintain/run_benchmarks.sh index 30bcbfffc0a..754fc847acc 100755 --- a/.maintain/run_benchmarks.sh +++ b/.maintain/run_benchmarks.sh @@ -69,10 +69,10 @@ run_benchmarks() { USERNAME=$(gcloud secrets versions access latest --secret=github-api-username) PASSWORD=$(gcloud secrets versions access latest --secret=github-api-token) git remote set-url origin https://"$USERNAME":"$PASSWORD"@github.com/ComposableFi/composable.git - git pull origin $GITHUB_REF_NAME - git add runtime/$FOLDER + git pull origin "$GITHUB_REF_NAME" + git add runtime/"$FOLDER" git commit -m "Updates weights for $CHAIN" - git push origin $GITHUB_REF_NAME + git push origin "$GITHUB_REF_NAME" # ToDO: Setup gpg signing and create a bot account for pushing } From d1e53aeb99e6178fece546212751a11fdf87ee80 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Wed, 19 Jan 2022 08:16:45 +0100 Subject: [PATCH 32/35] fmt fixes --- frame/assets-registry/src/lib.rs | 25 +++++++--------- frame/assets/src/lib.rs | 48 +++++++++++++++--------------- frame/bonded-finance/src/lib.rs | 19 ++++++------ frame/crowdloan-rewards/src/lib.rs | 25 +++++++--------- frame/curve-amm/src/lib.rs | 26 ++++++++-------- frame/democracy/src/lib.rs | 43 +++++++++++++------------- frame/lending/src/lib.rs | 46 ++++++++++++++-------------- frame/lending/src/mocks/oracle.rs | 2 +- frame/oracle/src/lib.rs | 27 +++++++++-------- frame/ping/src/lib.rs | 4 +-- frame/privilege/src/lib.rs | 2 +- frame/transaction-fee/src/lib.rs | 20 ++++++------- frame/vault/src/lib.rs | 16 +++++----- frame/vesting/src/lib.rs | 2 +- runtime/dali/src/lib.rs | 2 +- 15 files changed, 149 insertions(+), 158 deletions(-) diff --git a/frame/assets-registry/src/lib.rs b/frame/assets-registry/src/lib.rs index 8c3652cd76f..b3b8a5c072f 100644 --- a/frame/assets-registry/src/lib.rs +++ b/frame/assets-registry/src/lib.rs @@ -273,7 +273,7 @@ pub mod pallet { let local_admin = >::get(); let foreign_admin = >::get(); match current_candidate_status { - None => { + None => if who == local_admin { >::insert( (local_asset_id, foreign_asset_id), @@ -284,20 +284,17 @@ pub mod pallet { (local_asset_id, foreign_asset_id), CandidateStatus::ForeignAdminApproved, ); - } - } - Some(CandidateStatus::LocalAdminApproved) => { + }, + Some(CandidateStatus::LocalAdminApproved) => if who == foreign_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - } - } - Some(CandidateStatus::ForeignAdminApproved) => { + }, + Some(CandidateStatus::ForeignAdminApproved) => if who == local_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - } - } + }, }; Ok(().into()) } @@ -308,9 +305,8 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, LocalAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { - Ok(who.clone()) - } + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => + Ok(who.clone()), (r, _) => Err(T::Origin::from(r)), }) } @@ -327,9 +323,8 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, ForeignAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { - Ok(who.clone()) - } + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => + Ok(who.clone()), (r, _) => Err(T::Origin::from(r)), }) } diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 1c8ef1b8ad4..a5da86fe128 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -343,7 +343,7 @@ pub mod pallet { asset_id: &T::AssetId, ) -> Result<(), DispatchError> { if T::AdminOrigin::ensure_origin(origin.clone()).is_ok() { - return Ok(()); + return Ok(()) } match origin.into() { @@ -353,7 +353,7 @@ pub mod pallet { Ok(SignedRawOrigin::Signed(acc)) if acc == account => Ok(()), _ => Err(Error::::BadOrigin.into()), } - } + }, Ok(frame_system::RawOrigin::Root) => Ok(()), _ => Err(Error::::BadOrigin.into()), } @@ -740,14 +740,14 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_balance(who, amount); + return <::NativeCurrency>::set_balance(who, amount) } <::MultiCurrency>::set_balance(asset, who, amount) } fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_total_issuance(amount); + return <::NativeCurrency>::set_total_issuance(amount) } <::MultiCurrency>::set_total_issuance(asset, amount) } @@ -758,7 +758,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance(who, amount); + return <::NativeCurrency>::decrease_balance(who, amount) } <::MultiCurrency>::decrease_balance(asset, who, amount) } @@ -769,7 +769,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance_at_most(who, amount); + return <::NativeCurrency>::decrease_balance_at_most(who, amount) } <::MultiCurrency>::decrease_balance_at_most(asset, who, amount) } @@ -780,7 +780,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance(who, amount); + return <::NativeCurrency>::increase_balance(who, amount) } <::MultiCurrency>::increase_balance(asset, who, amount) } @@ -791,7 +791,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance_at_most(who, amount); + return <::NativeCurrency>::increase_balance_at_most(who, amount) } <::MultiCurrency>::increase_balance_at_most(asset, who, amount) } @@ -814,7 +814,7 @@ pub mod pallet { if asset == T::NativeAssetId::get() { return <::NativeCurrency>::transfer( source, dest, amount, keep_alive, - ); + ) } <::MultiCurrency>::transfer(asset, source, dest, amount, keep_alive) } @@ -839,7 +839,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::hold(who, amount); + return <::NativeCurrency>::hold(who, amount) } <::MultiCurrency>::hold(asset, who, amount) } @@ -851,7 +851,7 @@ pub mod pallet { best_effort: bool, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::release(who, amount, best_effort); + return <::NativeCurrency>::release(who, amount, best_effort) } <::MultiCurrency>::release(asset, who, amount, best_effort) } @@ -871,7 +871,7 @@ pub mod pallet { amount, best_effort, on_hold, - ); + ) } <::MultiCurrency>::transfer_held( asset, @@ -899,7 +899,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::mint_into(who, amount); + return <::NativeCurrency>::mint_into(who, amount) } <::MultiCurrency>::mint_into(asset, who, amount) } @@ -909,7 +909,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::burn_from(who, amount); + return <::NativeCurrency>::burn_from(who, amount) } <::MultiCurrency>::burn_from(asset, who, amount) } @@ -920,7 +920,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::slash(who, amount); + return <::NativeCurrency>::slash(who, amount) } <::MultiCurrency>::slash(asset, who, amount) } @@ -931,7 +931,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::teleport(source, dest, amount); + return <::NativeCurrency>::teleport(source, dest, amount) } <::MultiCurrency>::teleport(asset, source, dest, amount) } @@ -949,21 +949,21 @@ pub mod pallet { fn total_issuance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::total_issuance(); + return <::NativeCurrency>::total_issuance() } <::MultiCurrency>::total_issuance(asset) } fn minimum_balance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::minimum_balance(); + return <::NativeCurrency>::minimum_balance() } <::MultiCurrency>::minimum_balance(asset) } fn balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance(who); + return <::NativeCurrency>::balance(who) } <::MultiCurrency>::balance(asset, who) } @@ -974,7 +974,7 @@ pub mod pallet { keep_alive: bool, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::reducible_balance(who, keep_alive); + return <::NativeCurrency>::reducible_balance(who, keep_alive) } <::MultiCurrency>::reducible_balance(asset, who, keep_alive) } @@ -985,7 +985,7 @@ pub mod pallet { amount: Self::Balance, ) -> DepositConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_deposit(who, amount); + return <::NativeCurrency>::can_deposit(who, amount) } <::MultiCurrency>::can_deposit(asset, who, amount) } @@ -996,7 +996,7 @@ pub mod pallet { amount: Self::Balance, ) -> WithdrawConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_withdraw(who, amount); + return <::NativeCurrency>::can_withdraw(who, amount) } <::MultiCurrency>::can_withdraw(asset, who, amount) } @@ -1011,14 +1011,14 @@ pub mod pallet { { fn balance_on_hold(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance_on_hold(who); + return <::NativeCurrency>::balance_on_hold(who) } <::MultiCurrency>::balance_on_hold(asset, who) } fn can_hold(asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance) -> bool { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_hold(who, amount); + return <::NativeCurrency>::can_hold(who, amount) } <::MultiCurrency>::can_hold(asset, who, amount) } diff --git a/frame/bonded-finance/src/lib.rs b/frame/bonded-finance/src/lib.rs index b2d1bb99573..0d2af17fb65 100644 --- a/frame/bonded-finance/src/lib.rs +++ b/frame/bonded-finance/src/lib.rs @@ -235,13 +235,12 @@ pub mod pallet { let (issuer, offer) = Self::get_offer(offer_id)?; match (ensure_signed(origin.clone()), T::AdminOrigin::ensure_origin(origin)) { // Continue on admin origin - (_, Ok(_)) => {} + (_, Ok(_)) => {}, // Only issuer is allowed - (Ok(account), _) => { + (Ok(account), _) => if issuer != account { - return Err(DispatchError::BadOrigin); - } - } + return Err(DispatchError::BadOrigin) + }, _ => return Err(DispatchError::BadOrigin), }; let offer_account = Self::account_id(offer_id); @@ -311,8 +310,8 @@ pub mod pallet { Error::::OfferCompleted ); ensure!( - nb_of_bonds > BalanceOf::::zero() - && nb_of_bonds <= offer.nb_of_bonds, + nb_of_bonds > BalanceOf::::zero() && + nb_of_bonds <= offer.nb_of_bonds, Error::::InvalidNumberOfBonds ); // NOTE(hussein-aitlahcen): can't overflow, subsumed by `offer.valid()` in @@ -353,12 +352,12 @@ pub mod pallet { per_period: value, }, )?; - } + }, BondDuration::Infinite => { // NOTE(hussein-aitlahcen): in the case of an inifite duration for // the offer, the liquidity is never returned to the bonder, meaning // that the protocol is now owning the funds. - } + }, } // NOTE(hussein-aitlahcen): can't overflow as checked to be < // offer.nb_of_bonds prior to this @@ -385,7 +384,7 @@ pub mod pallet { new_bond_event(); } Ok(reward_share) - } + }, } }) } diff --git a/frame/crowdloan-rewards/src/lib.rs b/frame/crowdloan-rewards/src/lib.rs index b9f8abef1cb..b9f3ec47063 100644 --- a/frame/crowdloan-rewards/src/lib.rs +++ b/frame/crowdloan-rewards/src/lib.rs @@ -350,10 +350,10 @@ pub mod pallet { // The user should have claimed the upfront payment + the vested // amount until this window point. let vested_reward = reward.total - upfront_payment; - upfront_payment - + (vested_reward - .saturating_mul(T::Convert::convert(vesting_window)) - / T::Convert::convert(reward.vesting_period)) + upfront_payment + + (vested_reward + .saturating_mul(T::Convert::convert(vesting_window)) / + T::Convert::convert(reward.vesting_period)) } }; let available_to_claim = should_have_claimed - reward.claimed; @@ -387,7 +387,7 @@ pub mod pallet { ethereum_recover(prefix, &reward_account_encoded, ð_proof) .ok_or(Error::::InvalidProof)?; Result::<_, DispatchError>::Ok(RemoteAccount::Ethereum(ethereum_address)) - } + }, Proof::RelayChain(relay_account, relay_proof) => { ensure!( verify_relay( @@ -399,7 +399,7 @@ pub mod pallet { Error::::InvalidProof ); Ok(RemoteAccount::RelayChain(relay_account)) - } + }, }?; Ok(remote_account) } @@ -452,8 +452,7 @@ pub mod pallet { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { if let Call::associate { reward_account, proof } = call { if Associations::::get(reward_account).is_some() { - return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8) - .into(); + return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8).into() } let remote_account = get_remote_account::(proof.clone(), reward_account, T::Prefix::get()) @@ -464,14 +463,12 @@ pub mod pallet { })?; match Rewards::::get(remote_account.clone()) { None => InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(reward) if reward.total.is_zero() => { - InvalidTransaction::Custom(ValidityError::NoReward as u8).into() - } - Some(_) => { + Some(reward) if reward.total.is_zero() => + InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), + Some(_) => ValidTransaction::with_tag_prefix("CrowdloanRewardsAssociationCheck") .and_provides(remote_account) - .build() - } + .build(), } } else { Err(InvalidTransaction::Call.into()) diff --git a/frame/curve-amm/src/lib.rs b/frame/curve-amm/src/lib.rs index 02f0ead1490..a271495f753 100644 --- a/frame/curve-amm/src/lib.rs +++ b/frame/curve-amm/src/lib.rs @@ -866,7 +866,7 @@ pub mod pallet { let n = FixedU128::saturating_from_integer(u128::try_from(xp_f.len()).ok()?); let sum = xp_f.iter().try_fold(zero, |s, x| s.checked_add(x))?; if sum == zero { - return Some(zero); + return Some(zero) } let mut d = sum; @@ -889,10 +889,10 @@ pub mod pallet { if d > d_prev { if d.checked_sub(&d_prev)? <= prec { - return Some(d); + return Some(d) } } else if d_prev.checked_sub(&d)? <= prec { - return Some(d); + return Some(d) } } None @@ -928,14 +928,14 @@ pub mod pallet { // Same coin if i == j { - return None; + return None } // j above n if j >= xp_f.len() { - return None; + return None } if i >= xp_f.len() { - return None; + return None } let d_f = Self::get_d(xp_f, ann_f)?; let mut c = d_f; @@ -951,7 +951,7 @@ pub mod pallet { } else if k != j { x_k = *xp_k; } else { - continue; + continue } // s = s + x_k s = s.checked_add(&x_k)?; @@ -981,10 +981,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y); + return Some(y) } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y); + return Some(y) } } @@ -1016,7 +1016,7 @@ pub mod pallet { let n = FixedU128::try_from(xp_f.len() as u128).ok()?; if i >= xp_f.len() { - return None; + return None } let mut c = d_f; @@ -1024,7 +1024,7 @@ pub mod pallet { for (k, xp_k) in xp_f.iter().enumerate() { if k == i { - continue; + continue } let x = xp_k; @@ -1050,10 +1050,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y); + return Some(y) } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y); + return Some(y) } } diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 8aebe2c50e6..82190b1b52c 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -983,7 +983,7 @@ pub mod pallet { if let Some((e_proposal_id, _)) = >::get() { ensure!(id == e_proposal_id, Error::::ProposalMissing); } else { - return Err(Error::::NoProposal.into()); + return Err(Error::::NoProposal.into()) } let mut existing_vetoers = @@ -1220,9 +1220,8 @@ pub mod pallet { let (provider, deposit, since, expiry) = >::get(&id) .and_then(|m| match m { - PreimageStatus::Available { provider, deposit, since, expiry, .. } => { - Some((provider, deposit, since, expiry)) - } + PreimageStatus::Available { provider, deposit, since, expiry, .. } => + Some((provider, deposit, since, expiry)), _ => None, }) .ok_or(Error::::PreimageMissing)?; @@ -1547,14 +1546,14 @@ impl Pallet { status.tally.reduce(approve, *delegations); } votes[i].1 = vote; - } + }, Err(i) => { ensure!( votes.len() as u32 <= T::MaxVotes::get(), Error::::MaxVotesReached ); votes.insert(i, (ref_index, vote)); - } + }, } // Shouldn't be possible to fail, but we handle it gracefully. status.tally.add(vote).ok_or(ArithmeticError::Overflow)?; @@ -1601,7 +1600,7 @@ impl Pallet { status.tally.reduce(approve, *delegations); } ReferendumInfoOf::::insert(ref_index, ReferendumInfo::Ongoing(status)); - } + }, Some(ReferendumInfo::Finished { end, approved }) => { if let Some((lock_periods, balance)) = vote.1.locked_if(approved) { let unlock_at = end + T::VoteLockingPeriod::get() * lock_periods.into(); @@ -1614,8 +1613,8 @@ impl Pallet { prior.accumulate(unlock_at, balance) } } - } - None => {} // Referendum was cancelled. + }, + None => {}, // Referendum was cancelled. } votes.remove(i); } @@ -1635,7 +1634,7 @@ impl Pallet { // We don't support second level delegating, so we don't need to do anything more. *delegations = delegations.saturating_add(amount); 1 - } + }, Voting::Direct { votes, delegations, .. } => { *delegations = delegations.saturating_add(amount); for &(ref_index, account_vote) in votes.iter() { @@ -1648,7 +1647,7 @@ impl Pallet { } } votes.len() as u32 - } + }, }) } @@ -1663,7 +1662,7 @@ impl Pallet { // We don't support second level delegating, so we don't need to do anything more. *delegations = delegations.saturating_sub(amount); 1 - } + }, Voting::Direct { votes, delegations, .. } => { *delegations = delegations.saturating_sub(amount); for &(ref_index, account_vote) in votes.iter() { @@ -1676,7 +1675,7 @@ impl Pallet { } } votes.len() as u32 - } + }, }) } @@ -1717,12 +1716,12 @@ impl Pallet { conviction.votes(balance), ); voting.set_common(delegations, prior); - } + }, Voting::Direct { votes, delegations, prior } => { // here we just ensure that we're currently idling with no votes recorded. ensure!(votes.is_empty(), Error::::VotesExist); voting.set_common(delegations, prior); - } + }, } let votes = Self::increase_upstream_delegation( &target, @@ -1760,7 +1759,7 @@ impl Pallet { voting.set_common(delegations, prior); Ok(votes) - } + }, Voting::Direct { .. } => Err(Error::::NotDelegating.into()), } }, @@ -1983,8 +1982,8 @@ impl Pallet { // of unbaked referendum is bounded by this number. In case those number have changed in a // runtime upgrade the formula should be adjusted but the bound should still be sensible. >::mutate(|ref_index| { - while *ref_index < last - && Self::referendum_info(*ref_index) + while *ref_index < last && + Self::referendum_info(*ref_index) .map_or(true, |info| matches!(info, ReferendumInfo::Finished { .. })) { *ref_index += 1 @@ -2023,7 +2022,7 @@ impl Pallet { _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); Err(Error::::NotImminent.into()) - } + }, } } @@ -2054,8 +2053,8 @@ impl Pallet { Ok(0) => return Err(Error::::PreimageMissing.into()), _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); - return Err(Error::::PreimageMissing.into()); - } + return Err(Error::::PreimageMissing.into()) + }, } // Decode the length of the vector. @@ -2139,6 +2138,6 @@ fn decode_compact_u32_at(key: &[u8]) -> Option { sp_runtime::print("Failed to decode compact u32 at:"); sp_runtime::print(key); None - } + }, } } diff --git a/frame/lending/src/lib.rs b/frame/lending/src/lib.rs index 6135490ab9b..f8749bc86f3 100644 --- a/frame/lending/src/lib.rs +++ b/frame/lending/src/lib.rs @@ -297,17 +297,17 @@ pub mod pallet { let one_read = T::DbWeight::get().reads(1); weight += u64::from(call_counters.now) * ::WeightInfo::now(); weight += u64::from(call_counters.read_markets) * one_read; - weight += u64::from(call_counters.accrue_interest) - * ::WeightInfo::accrue_interest(); + weight += u64::from(call_counters.accrue_interest) * + ::WeightInfo::accrue_interest(); weight += u64::from(call_counters.account_id) * ::WeightInfo::account_id(); - weight += u64::from(call_counters.available_funds) - * ::WeightInfo::available_funds(); - weight += u64::from(call_counters.handle_withdrawable) - * ::WeightInfo::handle_withdrawable(); - weight += u64::from(call_counters.handle_depositable) - * ::WeightInfo::handle_depositable(); - weight += u64::from(call_counters.handle_must_liquidate) - * ::WeightInfo::handle_must_liquidate(); + weight += u64::from(call_counters.available_funds) * + ::WeightInfo::available_funds(); + weight += u64::from(call_counters.handle_withdrawable) * + ::WeightInfo::handle_withdrawable(); + weight += u64::from(call_counters.handle_depositable) * + ::WeightInfo::handle_depositable(); + weight += u64::from(call_counters.handle_must_liquidate) * + ::WeightInfo::handle_must_liquidate(); // TODO: move following loop to OCW for (market_id, account, _) in DebtIndex::::iter() { @@ -324,7 +324,7 @@ pub mod pallet { let signer = Signer::::AuthorityId>::all_accounts(); if !signer.can_sign() { log::warn!("No signer"); - return; + return } for (market_id, account, _) in DebtIndex::::iter() { let results = signer.send_signed_transaction(|_account| { @@ -872,15 +872,15 @@ pub mod pallet { FundsAvailability::Withdrawable(balance) => { Self::handle_withdrawable(&config, &market_account, balance)?; call_counters.handle_withdrawable += 1; - } + }, FundsAvailability::Depositable(balance) => { Self::handle_depositable(&config, &market_account, balance)?; call_counters.handle_depositable += 1; - } + }, FundsAvailability::MustLiquidate => { Self::handle_must_liquidate(&config, &market_account)?; call_counters.handle_must_liquidate += 1; - } + }, } call_counters.available_funds += 1; @@ -989,8 +989,8 @@ pub mod pallet { let existing_borrow_share = Percent::from_rational(existing_borrow_amount, total_borrow_amount); let new_borrow_share = Percent::from_rational(amount_to_borrow, total_borrow_amount); - Ok((market_index * new_borrow_share.into()) - + (account_interest_index * existing_borrow_share.into())) + Ok((market_index * new_borrow_share.into()) + + (account_interest_index * existing_borrow_share.into())) } fn can_borrow( @@ -1004,7 +1004,7 @@ pub mod pallet { let latest_borrow_timestamp = BorrowTimestamp::::get(market_id, debt_owner); if let Some(time) = latest_borrow_timestamp { if time >= Self::last_block_timestamp() { - return Err(Error::::InvalidTimestampOnBorrowRequest.into()); + return Err(Error::::InvalidTimestampOnBorrowRequest.into()) } } @@ -1362,7 +1362,7 @@ pub mod pallet { )?; Ok(balance.map(Into::into)) - } + }, // no active borrow on market for given account None => Ok(Some(BorrowAmountOf::::zero())), } @@ -1424,8 +1424,8 @@ pub mod pallet { ); ensure!( - ::Currency::can_deposit(market.collateral, &market_account, amount) - == DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, &market_account, amount) == + DepositConsequence::Success, Error::::TransferFailed ); @@ -1483,8 +1483,8 @@ pub mod pallet { let market_account = Self::account_id(market_id); ensure!( - ::Currency::can_deposit(market.collateral, account, amount) - == DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, account, amount) == + DepositConsequence::Success, Error::::TransferFailed ); ensure!( @@ -1523,7 +1523,7 @@ pub mod pallet { account_interest_index: Ratio, ) -> Result, DispatchError> { if principal.is_zero() { - return Ok(None); + return Ok(None) } let principal: LiftedFixedBalance = principal.into(); let balance = principal diff --git a/frame/lending/src/mocks/oracle.rs b/frame/lending/src/mocks/oracle.rs index ab5492f6fc3..bfeb62dc297 100644 --- a/frame/lending/src/mocks/oracle.rs +++ b/frame/lending/src/mocks/oracle.rs @@ -93,7 +93,7 @@ pub mod pallet { .checked_mul_int(price) .ok_or(DispatchError::Arithmetic(ArithmeticError::Overflow))?; Ok(Price { price: derived, block }) - } + }, } } diff --git a/frame/oracle/src/lib.rs b/frame/oracle/src/lib.rs index 17d6da829d1..2c175790730 100644 --- a/frame/oracle/src/lib.rs +++ b/frame/oracle/src/lib.rs @@ -538,9 +538,10 @@ pub mod pallet { let author_stake = OracleStake::::get(&who).unwrap_or_else(Zero::zero); ensure!(Self::is_requested(&asset_id), Error::::PriceNotRequested); ensure!( - author_stake - >= T::MinStake::get() - .saturating_add(Self::answer_in_transit(&who).unwrap_or_else(Zero::zero)), + author_stake >= + T::MinStake::get().saturating_add( + Self::answer_in_transit(&who).unwrap_or_else(Zero::zero) + ), Error::::NotEnoughStake ); @@ -555,10 +556,10 @@ pub mod pallet { // because current_prices.len() limited by u32 // (type of AssetsInfo::::get(asset_id).max_answers). if current_prices.len() as u32 >= asset_info.max_answers { - return Err(Error::::MaxPrices.into()); + return Err(Error::::MaxPrices.into()) } if current_prices.iter().any(|candidate| candidate.who == who) { - return Err(Error::::AlreadySubmitted.into()); + return Err(Error::::AlreadySubmitted.into()) } current_prices.push(set_price); Ok(()) @@ -743,7 +744,7 @@ pub mod pallet { Self::remove_price_in_transit(asset_id, &pre_price.who); let fresh_prices = pre_prices.split_off(index); (pre_prices, fresh_prices) - } + }, None => (pre_prices, vec![]), }; @@ -769,7 +770,7 @@ pub mod pallet { prices: &[PrePrice], ) -> Option { if prices.is_empty() { - return None; + return None } let mut numbers: Vec = @@ -864,7 +865,7 @@ pub mod pallet { log::info!("no signer"); return Err( "No local accounts available. Consider adding one via `author_insertKey` RPC.", - ); + ) } // checks to make sure key from keystore has not already submitted price let prices = PrePrices::::get(*price_id); @@ -878,12 +879,12 @@ pub mod pallet { if prices.len() as u32 >= Self::asset_info(price_id).max_answers { log::info!("Max answers reached"); - return Err("Max answers reached"); + return Err("Max answers reached") } if prices.into_iter().any(|price| price.who == address) { log::info!("Tx already submitted"); - return Err("Tx already submitted"); + return Err("Tx already submitted") } // Make an external HTTP request to fetch the current price. // Note this call will block until response is received. @@ -941,7 +942,7 @@ pub mod pallet { // Let's check the status code before we proceed to reading the response. if response.code != 200 { log::warn!("Unexpected status code: {}", response.code); - return Err(http::Error::Unknown); + return Err(http::Error::Unknown) } let body = response.body().collect::>(); @@ -957,7 +958,7 @@ pub mod pallet { None => { log::warn!("Unable to extract price from the response: {:?}", body_str); Err(http::Error::Unknown) - } + }, }?; log::warn!("Got price: {} cents", price); @@ -975,7 +976,7 @@ pub mod pallet { JsonValue::Number(number) => number, _ => return None, } - } + }, _ => return None, }; Some(price.integer as u64) diff --git a/frame/ping/src/lib.rs b/frame/ping/src/lib.rs index 61182c4f727..a894569cc06 100644 --- a/frame/ping/src/lib.rs +++ b/frame/ping/src/lib.rs @@ -120,10 +120,10 @@ pub mod pallet { Ok(()) => { Pings::::insert(seq, n); Self::deposit_event(Event::PingSent(para, seq, payload)); - } + }, Err(e) => { Self::deposit_event(Event::ErrorSendingPing(e, para, seq, payload)); - } + }, } } } diff --git a/frame/privilege/src/lib.rs b/frame/privilege/src/lib.rs index 96b6039effa..e53672fbb2a 100644 --- a/frame/privilege/src/lib.rs +++ b/frame/privilege/src/lib.rs @@ -261,7 +261,7 @@ pub mod pallet { account_id: *account_id, }); Ok(()) - } + }, } }) } diff --git a/frame/transaction-fee/src/lib.rs b/frame/transaction-fee/src/lib.rs index 60faa2d607f..99c5c345d0b 100644 --- a/frame/transaction-fee/src/lib.rs +++ b/frame/transaction-fee/src/lib.rs @@ -153,8 +153,8 @@ pub mod pallet { // loss. use sp_std::convert::TryInto; assert!( - ::max_value() - >= Multiplier::checked_from_integer( + ::max_value() >= + Multiplier::checked_from_integer( T::BlockWeights::get() .max_block .try_into() @@ -168,8 +168,8 @@ pub mod pallet { // that if we collapse to minimum, the trend will be positive with a weight value // which is 1% more than the target. let min_value = T::FeeMultiplierUpdate::min(); - let mut target = T::FeeMultiplierUpdate::target() - * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( + let mut target = T::FeeMultiplierUpdate::target() * + T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( "Setting `max_total` for `Normal` dispatch class is not compatible with \ `transaction-payment` pallet.", ); @@ -177,7 +177,7 @@ pub mod pallet { let addition = target / 100; if addition == 0 { // this is most likely because in a test setup we set everything to (). - return; + return } target += addition; @@ -343,8 +343,8 @@ where let total_native = T::NativeCurrency::total_balance(who); // check native balance if is enough - let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native - && T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( + let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native && + T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( false, |new_free_balance| { T::NativeCurrency::ensure_can_withdraw(who, fee, reason, new_free_balance) @@ -367,11 +367,11 @@ where amount, *slippage, )?; - } + }, // user didn't specify some asset to pay and they dont have enough native tokens to pay (None, false) => return Err(DispatchError::Other("Not enough tokens")), // they have enough native tokens to pay. - _ => {} + _ => {}, } Ok(()) @@ -432,7 +432,7 @@ where // Only mess with balances if fee is not zero. if fee.is_zero() { - return Ok((fee, None)); + return Ok((fee, None)) } let reason = if tip.is_zero() { diff --git a/frame/vault/src/lib.rs b/frame/vault/src/lib.rs index 579bcb58135..1cc7bb4888b 100644 --- a/frame/vault/src/lib.rs +++ b/frame/vault/src/lib.rs @@ -501,7 +501,7 @@ pub mod pallet { let reward = T::NativeCurrency::reducible_balance(account, false); T::NativeCurrency::transfer(account, &reward_address, reward, false)?; Ok(().into()) - } + }, Verdict::Charge { remaining, payable } => { vault.deposit = Deposit::Rent { amount: remaining, at: current_block }; // If this transfer call fails due to the vaults account not being kept @@ -515,7 +515,7 @@ pub mod pallet { true, )?; Ok(().into()) - } + }, } }) } @@ -565,7 +565,7 @@ pub mod pallet { >::block_number(), vault.deposit, ) { - return Err(Error::::TombstoneDurationNotExceeded.into()); + return Err(Error::::TombstoneDurationNotExceeded.into()) } else { let deletion_reward_account = &Self::deletion_reward_account(dest); let reward = @@ -833,8 +833,8 @@ pub mod pallet { let vault_aum = Self::assets_under_management(vault_id)?; if vault_aum.is_zero() { ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, amount) - == DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, amount) == + DepositConsequence::Success, Error::::MintFailed ); @@ -864,8 +864,8 @@ pub mod pallet { ensure!(lp > T::Balance::zero(), Error::::InsufficientCreationDeposit); ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, lp) - == DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, lp) == + DepositConsequence::Success, Error::::MintFailed ); @@ -1025,7 +1025,7 @@ pub mod pallet { } else { Ok(FundsAvailability::Withdrawable(max_allowed - balance)) } - } + }, (_, _) => Ok(FundsAvailability::MustLiquidate), } } diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index a61451e82cf..e041597e60d 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -348,7 +348,7 @@ impl Pallet { if bounded_schedules.len().is_zero() { >::remove(who, asset); T::Currency::remove_lock(VESTING_LOCK_ID, asset, who)?; - return Ok(()); + return Ok(()) } let total_amount = diff --git a/runtime/dali/src/lib.rs b/runtime/dali/src/lib.rs index 2d3ca35be1d..a0345bbb3f8 100644 --- a/runtime/dali/src/lib.rs +++ b/runtime/dali/src/lib.rs @@ -792,7 +792,7 @@ pub struct BaseCallFilter; impl Contains for BaseCallFilter { fn contains(call: &Call) -> bool { if call_filter::Pallet::::contains(call) { - return false; + return false } !matches!( call, From 59d1466d70295fb4757d5918874cc47ce058be6c Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Wed, 19 Jan 2022 08:20:31 +0100 Subject: [PATCH 33/35] clippy fixes --- frame/assets-registry/src/lib.rs | 33 ++++++++------- frame/assets/src/lib.rs | 50 +++++++++++------------ frame/bonded-finance/src/lib.rs | 19 +++++---- frame/call-filter/src/lib.rs | 4 +- frame/composable-support/src/lib.rs | 4 +- frame/composable-traits/src/lib.rs | 4 +- frame/composable-traits/src/rate_model.rs | 10 ++--- frame/crowdloan-rewards/src/lib.rs | 31 +++++++------- frame/currency-factory/src/lib.rs | 8 ++-- frame/curve-amm/src/lib.rs | 38 ++++++++--------- frame/democracy/src/lib.rs | 29 ++++++------- frame/dutch-auction/src/lib.rs | 8 ++-- frame/governance-registry/src/lib.rs | 6 +-- frame/lending/src/lib.rs | 50 +++++++++++------------ frame/lending/src/mocks/oracle.rs | 2 +- frame/liquidations/src/lib.rs | 4 +- frame/oracle/src/lib.rs | 37 ++++++++--------- frame/ping/src/lib.rs | 8 ++-- frame/privilege/src/lib.rs | 14 +++---- frame/transaction-fee/src/lib.rs | 24 +++++------ frame/uniswap-v2/src/lib.rs | 10 ++--- frame/vault/src/lib.rs | 18 ++++---- frame/vault/src/mocks/currency_factory.rs | 2 +- frame/vesting/src/lib.rs | 8 ++-- node/src/lib.rs | 4 +- runtime/common/src/lib.rs | 4 +- runtime/composable/src/lib.rs | 4 +- runtime/dali/src/lib.rs | 6 +-- runtime/picasso/src/lib.rs | 6 +-- runtime/primitives/src/lib.rs | 4 +- 30 files changed, 229 insertions(+), 220 deletions(-) diff --git a/frame/assets-registry/src/lib.rs b/frame/assets-registry/src/lib.rs index b3b8a5c072f..5cc69ac3531 100644 --- a/frame/assets-registry/src/lib.rs +++ b/frame/assets-registry/src/lib.rs @@ -9,8 +9,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -80,14 +80,14 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn local_admin)] /// Local admin account - #[allow(clippy::disallowed_types)] // LocalAdminOnEmpty provides a default value, so ValueQuery is ok here. + #[allow(clippy::disallowed_type)] // LocalAdminOnEmpty provides a default value, so ValueQuery is ok here. pub type LocalAdmin = StorageValue<_, T::AccountId, ValueQuery, LocalAdminOnEmpty>; #[pallet::storage] #[pallet::getter(fn foreign_admin)] /// Foreign admin account - #[allow(clippy::disallowed_types)] // ForeignAdminOnEmpty provides a default value, so ValueQuery is ok here. + #[allow(clippy::disallowed_type)] // ForeignAdminOnEmpty provides a default value, so ValueQuery is ok here. pub type ForeignAdmin = StorageValue<_, T::AccountId, ValueQuery, ForeignAdminOnEmpty>; @@ -273,7 +273,7 @@ pub mod pallet { let local_admin = >::get(); let foreign_admin = >::get(); match current_candidate_status { - None => + None => { if who == local_admin { >::insert( (local_asset_id, foreign_asset_id), @@ -284,17 +284,20 @@ pub mod pallet { (local_asset_id, foreign_asset_id), CandidateStatus::ForeignAdminApproved, ); - }, - Some(CandidateStatus::LocalAdminApproved) => + } + }, + Some(CandidateStatus::LocalAdminApproved) => { if who == foreign_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - }, - Some(CandidateStatus::ForeignAdminApproved) => + } + }, + Some(CandidateStatus::ForeignAdminApproved) => { if who == local_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - }, + } + }, }; Ok(().into()) } @@ -305,8 +308,9 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, LocalAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => - Ok(who.clone()), + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { + Ok(who.clone()) + }, (r, _) => Err(T::Origin::from(r)), }) } @@ -323,8 +327,9 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, ForeignAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => - Ok(who.clone()), + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { + Ok(who.clone()) + }, (r, _) => Err(T::Origin::from(r)), }) } diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index a5da86fe128..67ccba1a78a 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -52,8 +52,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -343,7 +343,7 @@ pub mod pallet { asset_id: &T::AssetId, ) -> Result<(), DispatchError> { if T::AdminOrigin::ensure_origin(origin.clone()).is_ok() { - return Ok(()) + return Ok(()); } match origin.into() { @@ -740,14 +740,14 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_balance(who, amount) + return <::NativeCurrency>::set_balance(who, amount); } <::MultiCurrency>::set_balance(asset, who, amount) } fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_total_issuance(amount) + return <::NativeCurrency>::set_total_issuance(amount); } <::MultiCurrency>::set_total_issuance(asset, amount) } @@ -758,7 +758,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance(who, amount) + return <::NativeCurrency>::decrease_balance(who, amount); } <::MultiCurrency>::decrease_balance(asset, who, amount) } @@ -769,7 +769,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance_at_most(who, amount) + return <::NativeCurrency>::decrease_balance_at_most(who, amount); } <::MultiCurrency>::decrease_balance_at_most(asset, who, amount) } @@ -780,7 +780,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance(who, amount) + return <::NativeCurrency>::increase_balance(who, amount); } <::MultiCurrency>::increase_balance(asset, who, amount) } @@ -791,7 +791,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance_at_most(who, amount) + return <::NativeCurrency>::increase_balance_at_most(who, amount); } <::MultiCurrency>::increase_balance_at_most(asset, who, amount) } @@ -814,7 +814,7 @@ pub mod pallet { if asset == T::NativeAssetId::get() { return <::NativeCurrency>::transfer( source, dest, amount, keep_alive, - ) + ); } <::MultiCurrency>::transfer(asset, source, dest, amount, keep_alive) } @@ -839,7 +839,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::hold(who, amount) + return <::NativeCurrency>::hold(who, amount); } <::MultiCurrency>::hold(asset, who, amount) } @@ -851,7 +851,7 @@ pub mod pallet { best_effort: bool, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::release(who, amount, best_effort) + return <::NativeCurrency>::release(who, amount, best_effort); } <::MultiCurrency>::release(asset, who, amount, best_effort) } @@ -871,7 +871,7 @@ pub mod pallet { amount, best_effort, on_hold, - ) + ); } <::MultiCurrency>::transfer_held( asset, @@ -899,7 +899,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::mint_into(who, amount) + return <::NativeCurrency>::mint_into(who, amount); } <::MultiCurrency>::mint_into(asset, who, amount) } @@ -909,7 +909,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::burn_from(who, amount) + return <::NativeCurrency>::burn_from(who, amount); } <::MultiCurrency>::burn_from(asset, who, amount) } @@ -920,7 +920,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::slash(who, amount) + return <::NativeCurrency>::slash(who, amount); } <::MultiCurrency>::slash(asset, who, amount) } @@ -931,7 +931,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::teleport(source, dest, amount) + return <::NativeCurrency>::teleport(source, dest, amount); } <::MultiCurrency>::teleport(asset, source, dest, amount) } @@ -949,21 +949,21 @@ pub mod pallet { fn total_issuance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::total_issuance() + return <::NativeCurrency>::total_issuance(); } <::MultiCurrency>::total_issuance(asset) } fn minimum_balance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::minimum_balance() + return <::NativeCurrency>::minimum_balance(); } <::MultiCurrency>::minimum_balance(asset) } fn balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance(who) + return <::NativeCurrency>::balance(who); } <::MultiCurrency>::balance(asset, who) } @@ -974,7 +974,7 @@ pub mod pallet { keep_alive: bool, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::reducible_balance(who, keep_alive) + return <::NativeCurrency>::reducible_balance(who, keep_alive); } <::MultiCurrency>::reducible_balance(asset, who, keep_alive) } @@ -985,7 +985,7 @@ pub mod pallet { amount: Self::Balance, ) -> DepositConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_deposit(who, amount) + return <::NativeCurrency>::can_deposit(who, amount); } <::MultiCurrency>::can_deposit(asset, who, amount) } @@ -996,7 +996,7 @@ pub mod pallet { amount: Self::Balance, ) -> WithdrawConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_withdraw(who, amount) + return <::NativeCurrency>::can_withdraw(who, amount); } <::MultiCurrency>::can_withdraw(asset, who, amount) } @@ -1011,14 +1011,14 @@ pub mod pallet { { fn balance_on_hold(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance_on_hold(who) + return <::NativeCurrency>::balance_on_hold(who); } <::MultiCurrency>::balance_on_hold(asset, who) } fn can_hold(asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance) -> bool { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_hold(who, amount) + return <::NativeCurrency>::can_hold(who, amount); } <::MultiCurrency>::can_hold(asset, who, amount) } diff --git a/frame/bonded-finance/src/lib.rs b/frame/bonded-finance/src/lib.rs index 0d2af17fb65..b2880db5521 100644 --- a/frame/bonded-finance/src/lib.rs +++ b/frame/bonded-finance/src/lib.rs @@ -1,14 +1,14 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) -)] // allow in tests#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +)] // allow in tests#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -176,7 +176,7 @@ pub mod pallet { #[pallet::getter(fn bond_offer_count)] // `BondOfferOnEmpty` explicitly defines the behaviour when empty, so `ValueQuery` is // allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type BondOfferCount = StorageValue<_, T::BondOfferId, ValueQuery, BondOfferOnEmpty>; @@ -237,10 +237,11 @@ pub mod pallet { // Continue on admin origin (_, Ok(_)) => {}, // Only issuer is allowed - (Ok(account), _) => + (Ok(account), _) => { if issuer != account { - return Err(DispatchError::BadOrigin) - }, + return Err(DispatchError::BadOrigin); + } + }, _ => return Err(DispatchError::BadOrigin), }; let offer_account = Self::account_id(offer_id); @@ -310,8 +311,8 @@ pub mod pallet { Error::::OfferCompleted ); ensure!( - nb_of_bonds > BalanceOf::::zero() && - nb_of_bonds <= offer.nb_of_bonds, + nb_of_bonds > BalanceOf::::zero() + && nb_of_bonds <= offer.nb_of_bonds, Error::::InvalidNumberOfBonds ); // NOTE(hussein-aitlahcen): can't overflow, subsumed by `offer.valid()` in diff --git a/frame/call-filter/src/lib.rs b/frame/call-filter/src/lib.rs index 7d562581c90..76c335f4c71 100644 --- a/frame/call-filter/src/lib.rs +++ b/frame/call-filter/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-support/src/lib.rs b/frame/composable-support/src/lib.rs index 45acedfa809..eae93b38985 100644 --- a/frame/composable-support/src/lib.rs +++ b/frame/composable-support/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-traits/src/lib.rs b/frame/composable-traits/src/lib.rs index e4180a5a7ad..348fe7fae4e 100644 --- a/frame/composable-traits/src/lib.rs +++ b/frame/composable-traits/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/composable-traits/src/rate_model.rs b/frame/composable-traits/src/rate_model.rs index 38b4b125c44..10d83077ccf 100644 --- a/frame/composable-traits/src/rate_model.rs +++ b/frame/composable-traits/src/rate_model.rs @@ -85,7 +85,7 @@ pub enum InterestRateModel { impl Default for InterestRateModel { // unwrap is used with known parameters, and unit tested right below. - #[allow(clippy::disallowed_methods)] + #[allow(clippy::disallowed_method)] fn default() -> Self { Self::new_jump_model( Rate::saturating_from_rational(2, 100), @@ -159,10 +159,10 @@ impl InterestRate for InterestRateModel { Self::Curve(curve) => curve.get_borrow_rate(utilization), Self::DynamicPIDController(dynamic_pid_model) => { dynamic_pid_model.get_borrow_rate(utilization) - } + }, Self::DoubleExponent(double_exponents_model) => { double_exponents_model.get_borrow_rate(utilization) - } + }, } } } @@ -223,7 +223,7 @@ impl InterestRate for JumpModel { .checked_div(&self.target_utilization.into())? .checked_add(&self.base_rate)?, ) - } + }, Ordering::Equal => Some(self.jump_rate), Ordering::Greater => { // (utilization - target_utilization)*(full_rate - jump_rate) / ( 1 - @@ -237,7 +237,7 @@ impl InterestRate for JumpModel { .checked_div(&available.into())? .checked_add(&self.jump_rate)?, ) - } + }, } } } diff --git a/frame/crowdloan-rewards/src/lib.rs b/frame/crowdloan-rewards/src/lib.rs index b9f3ec47063..0f5291fbdf6 100644 --- a/frame/crowdloan-rewards/src/lib.rs +++ b/frame/crowdloan-rewards/src/lib.rs @@ -18,14 +18,14 @@ Reference for proof mechanism: https://github.com/paritytech/polkadot/blob/maste #![cfg_attr( not(test), warn( - clippy::disallowed_methods, + clippy::disallowed_method, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -173,21 +173,21 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn total_rewards)] // Absence of total rewards is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type TotalRewards = StorageValue<_, T::Balance, ValueQuery>; /// The rewards claimed so far. #[pallet::storage] #[pallet::getter(fn claimed_rewards)] // Absence of claimed rewards is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type ClaimedRewards = StorageValue<_, T::Balance, ValueQuery>; /// The total number of contributors. #[pallet::storage] #[pallet::getter(fn total_contributors)] // Absence of total contributors is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type TotalContributors = StorageValue<_, u32, ValueQuery>; /// The block at which the users are able to claim their rewards. @@ -350,10 +350,10 @@ pub mod pallet { // The user should have claimed the upfront payment + the vested // amount until this window point. let vested_reward = reward.total - upfront_payment; - upfront_payment + - (vested_reward - .saturating_mul(T::Convert::convert(vesting_window)) / - T::Convert::convert(reward.vesting_period)) + upfront_payment + + (vested_reward + .saturating_mul(T::Convert::convert(vesting_window)) + / T::Convert::convert(reward.vesting_period)) } }; let available_to_claim = should_have_claimed - reward.claimed; @@ -452,7 +452,8 @@ pub mod pallet { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { if let Call::associate { reward_account, proof } = call { if Associations::::get(reward_account).is_some() { - return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8).into() + return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8) + .into(); } let remote_account = get_remote_account::(proof.clone(), reward_account, T::Prefix::get()) @@ -463,12 +464,14 @@ pub mod pallet { })?; match Rewards::::get(remote_account.clone()) { None => InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(reward) if reward.total.is_zero() => - InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(_) => + Some(reward) if reward.total.is_zero() => { + InvalidTransaction::Custom(ValidityError::NoReward as u8).into() + }, + Some(_) => { ValidTransaction::with_tag_prefix("CrowdloanRewardsAssociationCheck") .and_provides(remote_account) - .build(), + .build() + }, } } else { Err(InvalidTransaction::Call.into()) diff --git a/frame/currency-factory/src/lib.rs b/frame/currency-factory/src/lib.rs index 0cd16700fd3..5d52b4aa32a 100644 --- a/frame/currency-factory/src/lib.rs +++ b/frame/currency-factory/src/lib.rs @@ -1,15 +1,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -71,7 +71,7 @@ pub mod pallet { #[pallet::getter(fn currency_latest)] // Absense of a set `CurrencyCounter` means we default to `T::DynamicCurrencyIdInitial`, so // `ValueQuery` is allowed - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type CurrencyCounter = StorageValue<_, T::DynamicCurrencyId, ValueQuery, T::DynamicCurrencyIdInitial>; diff --git a/frame/curve-amm/src/lib.rs b/frame/curve-amm/src/lib.rs index a271495f753..6beb95b137e 100644 --- a/frame/curve-amm/src/lib.rs +++ b/frame/curve-amm/src/lib.rs @@ -1,15 +1,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -120,7 +120,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_count)] // Absence of pool count is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolCount = StorageValue<_, T::PoolId, ValueQuery>; /// Existing pools @@ -139,7 +139,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_asset_balance)] // Absence of pool asset balance is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolAssetBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -154,7 +154,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pool_asset_total_balance)] // Absence of pool asset balance is equivalent to 0, so ValueQuery is allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolAssetTotalBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -866,7 +866,7 @@ pub mod pallet { let n = FixedU128::saturating_from_integer(u128::try_from(xp_f.len()).ok()?); let sum = xp_f.iter().try_fold(zero, |s, x| s.checked_add(x))?; if sum == zero { - return Some(zero) + return Some(zero); } let mut d = sum; @@ -889,10 +889,10 @@ pub mod pallet { if d > d_prev { if d.checked_sub(&d_prev)? <= prec { - return Some(d) + return Some(d); } } else if d_prev.checked_sub(&d)? <= prec { - return Some(d) + return Some(d); } } None @@ -928,14 +928,14 @@ pub mod pallet { // Same coin if i == j { - return None + return None; } // j above n if j >= xp_f.len() { - return None + return None; } if i >= xp_f.len() { - return None + return None; } let d_f = Self::get_d(xp_f, ann_f)?; let mut c = d_f; @@ -951,7 +951,7 @@ pub mod pallet { } else if k != j { x_k = *xp_k; } else { - continue + continue; } // s = s + x_k s = s.checked_add(&x_k)?; @@ -981,10 +981,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y) + return Some(y); } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y) + return Some(y); } } @@ -1016,7 +1016,7 @@ pub mod pallet { let n = FixedU128::try_from(xp_f.len() as u128).ok()?; if i >= xp_f.len() { - return None + return None; } let mut c = d_f; @@ -1024,7 +1024,7 @@ pub mod pallet { for (k, xp_k) in xp_f.iter().enumerate() { if k == i { - continue + continue; } let x = xp_k; @@ -1050,10 +1050,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y) + return Some(y); } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y) + return Some(y); } } diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 82190b1b52c..491c607f99b 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -155,8 +155,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -455,7 +455,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn public_props)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PublicProps = StorageValue< _, Vec<(PropIndex, ProposalId, T::AccountId)>, @@ -486,7 +486,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn referendum_count)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type ReferendumCount = StorageValue<_, ReferendumIndex, ValueQuery>; /// The lowest referendum index representing an unbaked referendum. Equal to @@ -494,7 +494,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn lowest_unbaked)] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type LowestUnbaked = StorageValue<_, ReferendumIndex, ValueQuery>; /// Information concerning any given referendum. @@ -516,7 +516,7 @@ pub mod pallet { /// user-controlled data. #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type VotingOf = StorageMap< _, Twox64Concat, @@ -539,7 +539,7 @@ pub mod pallet { // (council). https://github.com/paritytech/substrate/issues/5322 #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type LastTabledWasExternal = StorageValue<_, bool, ValueQuery>; /// The referendum to be tabled whenever it would be valid to table an external proposal. @@ -563,7 +563,7 @@ pub mod pallet { /// Record of all proposals that have been subject to emergency cancellation. #[pallet::storage] // Usage of ValueQuery was audited by parity and allowed for now. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type Cancellations = StorageMap<_, Identity, ProposalId, bool, ValueQuery>; @@ -983,7 +983,7 @@ pub mod pallet { if let Some((e_proposal_id, _)) = >::get() { ensure!(id == e_proposal_id, Error::::ProposalMissing); } else { - return Err(Error::::NoProposal.into()) + return Err(Error::::NoProposal.into()); } let mut existing_vetoers = @@ -1220,8 +1220,9 @@ pub mod pallet { let (provider, deposit, since, expiry) = >::get(&id) .and_then(|m| match m { - PreimageStatus::Available { provider, deposit, since, expiry, .. } => - Some((provider, deposit, since, expiry)), + PreimageStatus::Available { provider, deposit, since, expiry, .. } => { + Some((provider, deposit, since, expiry)) + }, _ => None, }) .ok_or(Error::::PreimageMissing)?; @@ -1982,8 +1983,8 @@ impl Pallet { // of unbaked referendum is bounded by this number. In case those number have changed in a // runtime upgrade the formula should be adjusted but the bound should still be sensible. >::mutate(|ref_index| { - while *ref_index < last && - Self::referendum_info(*ref_index) + while *ref_index < last + && Self::referendum_info(*ref_index) .map_or(true, |info| matches!(info, ReferendumInfo::Finished { .. })) { *ref_index += 1 @@ -2053,7 +2054,7 @@ impl Pallet { Ok(0) => return Err(Error::::PreimageMissing.into()), _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); - return Err(Error::::PreimageMissing.into()) + return Err(Error::::PreimageMissing.into()); }, } diff --git a/frame/dutch-auction/src/lib.rs b/frame/dutch-auction/src/lib.rs index c355999babd..1d5edeb82e8 100644 --- a/frame/dutch-auction/src/lib.rs +++ b/frame/dutch-auction/src/lib.rs @@ -23,15 +23,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![warn( bad_style, @@ -172,7 +172,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn orders_index)] - #[allow(clippy::disallowed_types)] // OrderIdOnEmpty provides a default value + #[allow(clippy::disallowed_type)] // OrderIdOnEmpty provides a default value pub type OrdersIndex = StorageValue<_, T::OrderId, ValueQuery, OrderIdOnEmpty>; #[pallet::storage] diff --git a/frame/governance-registry/src/lib.rs b/frame/governance-registry/src/lib.rs index ba6eb64cd0d..59451716419 100644 --- a/frame/governance-registry/src/lib.rs +++ b/frame/governance-registry/src/lib.rs @@ -5,15 +5,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] pub use pallet::*; diff --git a/frame/lending/src/lib.rs b/frame/lending/src/lib.rs index f8749bc86f3..a6c20bf978e 100644 --- a/frame/lending/src/lib.rs +++ b/frame/lending/src/lib.rs @@ -2,8 +2,8 @@ #![cfg_attr( not(any(test, feature = "runtime-benchmarks")), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -297,17 +297,17 @@ pub mod pallet { let one_read = T::DbWeight::get().reads(1); weight += u64::from(call_counters.now) * ::WeightInfo::now(); weight += u64::from(call_counters.read_markets) * one_read; - weight += u64::from(call_counters.accrue_interest) * - ::WeightInfo::accrue_interest(); + weight += u64::from(call_counters.accrue_interest) + * ::WeightInfo::accrue_interest(); weight += u64::from(call_counters.account_id) * ::WeightInfo::account_id(); - weight += u64::from(call_counters.available_funds) * - ::WeightInfo::available_funds(); - weight += u64::from(call_counters.handle_withdrawable) * - ::WeightInfo::handle_withdrawable(); - weight += u64::from(call_counters.handle_depositable) * - ::WeightInfo::handle_depositable(); - weight += u64::from(call_counters.handle_must_liquidate) * - ::WeightInfo::handle_must_liquidate(); + weight += u64::from(call_counters.available_funds) + * ::WeightInfo::available_funds(); + weight += u64::from(call_counters.handle_withdrawable) + * ::WeightInfo::handle_withdrawable(); + weight += u64::from(call_counters.handle_depositable) + * ::WeightInfo::handle_depositable(); + weight += u64::from(call_counters.handle_must_liquidate) + * ::WeightInfo::handle_must_liquidate(); // TODO: move following loop to OCW for (market_id, account, _) in DebtIndex::::iter() { @@ -324,7 +324,7 @@ pub mod pallet { let signer = Signer::::AuthorityId>::all_accounts(); if !signer.can_sign() { log::warn!("No signer"); - return + return; } for (market_id, account, _) in DebtIndex::::iter() { let results = signer.send_signed_transaction(|_account| { @@ -418,7 +418,7 @@ pub mod pallet { /// Lending instances counter #[pallet::storage] #[pallet::getter(fn lending_count)] - #[allow(clippy::disallowed_types)] // MarketIndex implements Default, so ValueQuery is ok here. + #[allow(clippy::disallowed_type)] // MarketIndex implements Default, so ValueQuery is ok here. pub type LendingCount = StorageValue<_, MarketIndex, ValueQuery>; /// Indexed lending instances @@ -435,7 +435,7 @@ pub mod pallet { /// Debt token allows to simplify some debt management and implementation of features #[pallet::storage] #[pallet::getter(fn debt_currencies)] - #[allow(clippy::disallowed_types)] // AssetId implements default, so ValueQuery is ok here. + #[allow(clippy::disallowed_type)] // AssetId implements default, so ValueQuery is ok here. pub type DebtMarkets = StorageMap<_, Twox64Concat, MarketIndex, ::AssetId, ValueQuery>; @@ -468,7 +468,7 @@ pub mod pallet { /// market borrow index #[pallet::storage] #[pallet::getter(fn borrow_index)] - #[allow(clippy::disallowed_types)] // MarketIndex implements default, so ValueQuery is ok here. + #[allow(clippy::disallowed_type)] // MarketIndex implements default, so ValueQuery is ok here. pub type BorrowIndex = StorageMap<_, Twox64Concat, MarketIndex, Ratio, ValueQuery>; /// (Market, Account) -> Collateral @@ -487,7 +487,7 @@ pub mod pallet { /// The timestamp of the previous block or defaults to timestamp at genesis. #[pallet::storage] #[pallet::getter(fn last_block_timestamp)] - #[allow(clippy::disallowed_types)] // Timestamp default is 0, which is valid in this context. + #[allow(clippy::disallowed_type)] // Timestamp default is 0, which is valid in this context. pub type LastBlockTimestamp = StorageValue<_, Timestamp, ValueQuery>; #[pallet::genesis_config] @@ -989,8 +989,8 @@ pub mod pallet { let existing_borrow_share = Percent::from_rational(existing_borrow_amount, total_borrow_amount); let new_borrow_share = Percent::from_rational(amount_to_borrow, total_borrow_amount); - Ok((market_index * new_borrow_share.into()) + - (account_interest_index * existing_borrow_share.into())) + Ok((market_index * new_borrow_share.into()) + + (account_interest_index * existing_borrow_share.into())) } fn can_borrow( @@ -1004,7 +1004,7 @@ pub mod pallet { let latest_borrow_timestamp = BorrowTimestamp::::get(market_id, debt_owner); if let Some(time) = latest_borrow_timestamp { if time >= Self::last_block_timestamp() { - return Err(Error::::InvalidTimestampOnBorrowRequest.into()) + return Err(Error::::InvalidTimestampOnBorrowRequest.into()); } } @@ -1424,8 +1424,8 @@ pub mod pallet { ); ensure!( - ::Currency::can_deposit(market.collateral, &market_account, amount) == - DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, &market_account, amount) + == DepositConsequence::Success, Error::::TransferFailed ); @@ -1483,8 +1483,8 @@ pub mod pallet { let market_account = Self::account_id(market_id); ensure!( - ::Currency::can_deposit(market.collateral, account, amount) == - DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, account, amount) + == DepositConsequence::Success, Error::::TransferFailed ); ensure!( @@ -1523,7 +1523,7 @@ pub mod pallet { account_interest_index: Ratio, ) -> Result, DispatchError> { if principal.is_zero() { - return Ok(None) + return Ok(None); } let principal: LiftedFixedBalance = principal.into(); let balance = principal diff --git a/frame/lending/src/mocks/oracle.rs b/frame/lending/src/mocks/oracle.rs index bfeb62dc297..a277ccb3d5b 100644 --- a/frame/lending/src/mocks/oracle.rs +++ b/frame/lending/src/mocks/oracle.rs @@ -28,7 +28,7 @@ pub mod pallet { #[pallet::getter(fn btc_value)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type BTCValue = StorageValue<_, u128, ValueQuery>; impl Pallet { diff --git a/frame/liquidations/src/lib.rs b/frame/liquidations/src/lib.rs index b0df43eb8ec..4a27db5b8a5 100644 --- a/frame/liquidations/src/lib.rs +++ b/frame/liquidations/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/frame/oracle/src/lib.rs b/frame/oracle/src/lib.rs index 2c175790730..5cb22d214e7 100644 --- a/frame/oracle/src/lib.rs +++ b/frame/oracle/src/lib.rs @@ -2,15 +2,15 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::too_many_arguments)] pub use pallet::*; @@ -186,7 +186,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn assets_count)] - #[allow(clippy::disallowed_types)] // Default asset count of 0 is valid in this context + #[allow(clippy::disallowed_type)] // Default asset count of 0 is valid in this context /// Total amount of assets pub type AssetsCount = StorageValue<_, u32, ValueQuery>; @@ -225,7 +225,7 @@ pub mod pallet { // REVIEW: (benluelo) I think there's probably a better way to use this with an OptionQuery, // instead of checking against defaults. /// Price for an asset and blocknumber asset was updated at - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type Prices = StorageMap< _, Blake2_128Concat, @@ -236,7 +236,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn price_history)] - #[allow(clippy::disallowed_types)] // default history for an asset is an empty list, which is valid in this context. + #[allow(clippy::disallowed_type)] // default history for an asset is an empty list, which is valid in this context. /// Price for an asset and blocknumber asset was updated at pub type PriceHistory = StorageMap< _, @@ -248,7 +248,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pre_prices)] - #[allow(clippy::disallowed_types)] // default history for an asset is an empty list, which is valid in this context. + #[allow(clippy::disallowed_type)] // default history for an asset is an empty list, which is valid in this context. /// Temporary prices before aggregated pub type PrePrices = StorageMap< _, @@ -262,7 +262,7 @@ pub mod pallet { #[pallet::getter(fn asset_info)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] /// Information about asset, including precision threshold and max/min answers pub type AssetsInfo = StorageMap< _, @@ -538,10 +538,9 @@ pub mod pallet { let author_stake = OracleStake::::get(&who).unwrap_or_else(Zero::zero); ensure!(Self::is_requested(&asset_id), Error::::PriceNotRequested); ensure!( - author_stake >= - T::MinStake::get().saturating_add( - Self::answer_in_transit(&who).unwrap_or_else(Zero::zero) - ), + author_stake + >= T::MinStake::get() + .saturating_add(Self::answer_in_transit(&who).unwrap_or_else(Zero::zero)), Error::::NotEnoughStake ); @@ -556,10 +555,10 @@ pub mod pallet { // because current_prices.len() limited by u32 // (type of AssetsInfo::::get(asset_id).max_answers). if current_prices.len() as u32 >= asset_info.max_answers { - return Err(Error::::MaxPrices.into()) + return Err(Error::::MaxPrices.into()); } if current_prices.iter().any(|candidate| candidate.who == who) { - return Err(Error::::AlreadySubmitted.into()) + return Err(Error::::AlreadySubmitted.into()); } current_prices.push(set_price); Ok(()) @@ -770,7 +769,7 @@ pub mod pallet { prices: &[PrePrice], ) -> Option { if prices.is_empty() { - return None + return None; } let mut numbers: Vec = @@ -865,7 +864,7 @@ pub mod pallet { log::info!("no signer"); return Err( "No local accounts available. Consider adding one via `author_insertKey` RPC.", - ) + ); } // checks to make sure key from keystore has not already submitted price let prices = PrePrices::::get(*price_id); @@ -879,12 +878,12 @@ pub mod pallet { if prices.len() as u32 >= Self::asset_info(price_id).max_answers { log::info!("Max answers reached"); - return Err("Max answers reached") + return Err("Max answers reached"); } if prices.into_iter().any(|price| price.who == address) { log::info!("Tx already submitted"); - return Err("Tx already submitted") + return Err("Tx already submitted"); } // Make an external HTTP request to fetch the current price. // Note this call will block until response is received. @@ -942,7 +941,7 @@ pub mod pallet { // Let's check the status code before we proceed to reading the response. if response.code != 200 { log::warn!("Unexpected status code: {}", response.code); - return Err(http::Error::Unknown) + return Err(http::Error::Unknown); } let body = response.body().collect::>(); diff --git a/frame/ping/src/lib.rs b/frame/ping/src/lib.rs index a894569cc06..8f126acf941 100644 --- a/frame/ping/src/lib.rs +++ b/frame/ping/src/lib.rs @@ -19,8 +19,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -67,13 +67,13 @@ pub mod pallet { /// The target parachains to ping. #[pallet::storage] // Targets is an empty Vec by default, which causes the pallet not to ping any targets. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub(super) type Targets = StorageValue<_, Vec<(ParaId, Vec)>, ValueQuery>; /// The total number of pings sent. #[pallet::storage] // Absence of PingCount is equivalent to 0, so ValueQuery is valid here. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub(super) type PingCount = StorageValue<_, u32, ValueQuery>; /// The sent pings. diff --git a/frame/privilege/src/lib.rs b/frame/privilege/src/lib.rs index e53672fbb2a..65dfaec38bd 100644 --- a/frame/privilege/src/lib.rs +++ b/frame/privilege/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -106,7 +106,7 @@ pub mod pallet { #[pallet::getter(fn account_privileges)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type AccountPrivileges = StorageMap<_, Blake2_128Concat, AccountIdOf, Privilege, ValueQuery>; @@ -114,7 +114,7 @@ pub mod pallet { #[pallet::getter(fn group_privileges)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type GroupPrivileges = StorageMap<_, Blake2_128Concat, T::GroupId, Privilege, ValueQuery>; @@ -122,7 +122,7 @@ pub mod pallet { #[pallet::getter(fn group_members)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type GroupMembers = StorageMap<_, Blake2_128Concat, T::GroupId, PrivilegedGroupSet>, ValueQuery>; @@ -130,14 +130,14 @@ pub mod pallet { #[pallet::getter(fn group_id_last)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type GroupId = StorageValue<_, T::GroupId, ValueQuery>; #[pallet::storage] #[pallet::getter(fn group_count)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type GroupCount = StorageValue<_, u32, ValueQuery>; impl InspectPrivilege for Pallet { diff --git a/frame/transaction-fee/src/lib.rs b/frame/transaction-fee/src/lib.rs index 99c5c345d0b..6755135adc3 100644 --- a/frame/transaction-fee/src/lib.rs +++ b/frame/transaction-fee/src/lib.rs @@ -6,8 +6,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -133,7 +133,7 @@ pub mod pallet { #[pallet::getter(fn next_fee_multiplier)] // `NextFeeMultiplierOnEmpty` explicitly defines what happens on empty, so `ValueQuery` is // allowed. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type NextFeeMultiplier = StorageValue<_, Multiplier, ValueQuery, NextFeeMultiplierOnEmpty>; @@ -146,15 +146,15 @@ pub mod pallet { } // `integrity_test` is allowed to panic. - #[allow(clippy::disallowed_methods, clippy::expect_used)] + #[allow(clippy::disallowed_method, clippy::expect_used)] fn integrity_test() { // given weight == u64, we build multipliers from `diff` of two weight values, which can // at most be maximum block weight. Make sure that this can fit in a multiplier without // loss. use sp_std::convert::TryInto; assert!( - ::max_value() >= - Multiplier::checked_from_integer( + ::max_value() + >= Multiplier::checked_from_integer( T::BlockWeights::get() .max_block .try_into() @@ -168,8 +168,8 @@ pub mod pallet { // that if we collapse to minimum, the trend will be positive with a weight value // which is 1% more than the target. let min_value = T::FeeMultiplierUpdate::min(); - let mut target = T::FeeMultiplierUpdate::target() * - T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( + let mut target = T::FeeMultiplierUpdate::target() + * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( "Setting `max_total` for `Normal` dispatch class is not compatible with \ `transaction-payment` pallet.", ); @@ -177,7 +177,7 @@ pub mod pallet { let addition = target / 100; if addition == 0 { // this is most likely because in a test setup we set everything to (). - return + return; } target += addition; @@ -343,8 +343,8 @@ where let total_native = T::NativeCurrency::total_balance(who); // check native balance if is enough - let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native && - T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( + let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native + && T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( false, |new_free_balance| { T::NativeCurrency::ensure_can_withdraw(who, fee, reason, new_free_balance) @@ -432,7 +432,7 @@ where // Only mess with balances if fee is not zero. if fee.is_zero() { - return Ok((fee, None)) + return Ok((fee, None)); } let reason = if tip.is_zero() { diff --git a/frame/uniswap-v2/src/lib.rs b/frame/uniswap-v2/src/lib.rs index 4127d7b5753..c520d9776ac 100644 --- a/frame/uniswap-v2/src/lib.rs +++ b/frame/uniswap-v2/src/lib.rs @@ -2,8 +2,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, // TODO: enable me after this crate is stablized. todo macros are still denied in the release pipeline, but for // regular development allowed. // clippy::indexing_slicing, @@ -123,7 +123,7 @@ pub mod pallet { /// Current number of pools (also ID for the next created pool) #[pallet::storage] #[pallet::getter(fn pool_count)] - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolCount = StorageValue<_, T::PoolId, ValueQuery, PoolCountOnEmpty>; #[pallet::type_value] @@ -149,7 +149,7 @@ pub mod pallet { /// Balance of asset for given pool excluding admin_fee #[pallet::storage] #[pallet::getter(fn pool_asset_balance)] - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolAssetBalance = StorageDoubleMap< _, Blake2_128Concat, @@ -169,7 +169,7 @@ pub mod pallet { /// Balance of asset for given pool including admin_fee #[pallet::storage] #[pallet::getter(fn pool_asset_total_balance)] - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type PoolAssetTotalBalance = StorageDoubleMap< _, Blake2_128Concat, diff --git a/frame/vault/src/lib.rs b/frame/vault/src/lib.rs index 1cc7bb4888b..4a4b61ca8e4 100644 --- a/frame/vault/src/lib.rs +++ b/frame/vault/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -282,7 +282,7 @@ pub mod pallet { /// Cleaned up vaults do not decrement the counter. #[pallet::storage] #[pallet::getter(fn vault_count)] - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type VaultCount = StorageValue<_, T::VaultId, ValueQuery>; /// Info for each specific vaults. @@ -302,7 +302,7 @@ pub mod pallet { #[pallet::getter(fn capital_structure)] // Bit questionable to have this be ValueQuery, as technically that makes it difficult to // determine if a strategy is connected to a vault vs not having an allocation at all. - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type CapitalStructure = StorageDoubleMap< _, Blake2_128Concat, @@ -565,7 +565,7 @@ pub mod pallet { >::block_number(), vault.deposit, ) { - return Err(Error::::TombstoneDurationNotExceeded.into()) + return Err(Error::::TombstoneDurationNotExceeded.into()); } else { let deletion_reward_account = &Self::deletion_reward_account(dest); let reward = @@ -833,8 +833,8 @@ pub mod pallet { let vault_aum = Self::assets_under_management(vault_id)?; if vault_aum.is_zero() { ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, amount) == - DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, amount) + == DepositConsequence::Success, Error::::MintFailed ); @@ -864,8 +864,8 @@ pub mod pallet { ensure!(lp > T::Balance::zero(), Error::::InsufficientCreationDeposit); ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, lp) == - DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, lp) + == DepositConsequence::Success, Error::::MintFailed ); diff --git a/frame/vault/src/mocks/currency_factory.rs b/frame/vault/src/mocks/currency_factory.rs index a31e477184b..148af9eb420 100644 --- a/frame/vault/src/mocks/currency_factory.rs +++ b/frame/vault/src/mocks/currency_factory.rs @@ -69,7 +69,7 @@ pub mod pallet { #[pallet::getter(fn vault_count)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type CurrencyCounter = StorageValue<_, u32, ValueQuery>; #[pallet::call] diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index e041597e60d..8e860458120 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -29,8 +29,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -148,7 +148,7 @@ pub mod module { #[pallet::getter(fn vesting_schedules)] // FIXME: Temporary fix to get CI to pass, separate PRs will be made per pallet to refactor to // use OptionQuery instead - #[allow(clippy::disallowed_types)] + #[allow(clippy::disallowed_type)] pub type VestingSchedules = StorageDoubleMap< _, Blake2_128Concat, @@ -348,7 +348,7 @@ impl Pallet { if bounded_schedules.len().is_zero() { >::remove(who, asset); T::Currency::remove_lock(VESTING_LOCK_ID, asset, who)?; - return Ok(()) + return Ok(()); } let total_amount = diff --git a/node/src/lib.rs b/node/src/lib.rs index 46da77a9a0d..1193059c965 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -1,5 +1,5 @@ -#![cfg_attr(not(test), warn(clippy::disallowed_methods, clippy::indexing_slicing))] // allow in tests -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![cfg_attr(not(test), warn(clippy::disallowed_method, clippy::indexing_slicing))] // allow in tests +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] pub mod chain_spec; pub mod cli; diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index fe60e964f6c..f15b2df134e 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/runtime/composable/src/lib.rs b/runtime/composable/src/lib.rs index 886335f7812..acbf07483e6 100644 --- a/runtime/composable/src/lib.rs +++ b/runtime/composable/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, diff --git a/runtime/dali/src/lib.rs b/runtime/dali/src/lib.rs index a0345bbb3f8..f3fdcd10242 100644 --- a/runtime/dali/src/lib.rs +++ b/runtime/dali/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -792,7 +792,7 @@ pub struct BaseCallFilter; impl Contains for BaseCallFilter { fn contains(call: &Call) -> bool { if call_filter::Pallet::::contains(call) { - return false + return false; } !matches!( call, diff --git a/runtime/picasso/src/lib.rs b/runtime/picasso/src/lib.rs index 38e57358405..4df245358fa 100644 --- a/runtime/picasso/src/lib.rs +++ b/runtime/picasso/src/lib.rs @@ -1,8 +1,8 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, - clippy::disallowed_types, + clippy::disallowed_method, + clippy::disallowed_type, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, @@ -10,7 +10,7 @@ // clippy::panic ) )] -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] diff --git a/runtime/primitives/src/lib.rs b/runtime/primitives/src/lib.rs index fe455389da4..626b47b62be 100644 --- a/runtime/primitives/src/lib.rs +++ b/runtime/primitives/src/lib.rs @@ -1,14 +1,14 @@ #![cfg_attr( not(test), warn( - clippy::disallowed_methods, + clippy::disallowed_method, clippy::indexing_slicing, clippy::todo, clippy::unwrap_used, clippy::panic ) )] -#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_types)] +#![warn(clippy::unseparated_literal_suffix, clippy::disallowed_type)] #![cfg_attr(not(feature = "std"), no_std)] pub mod currency; From 4aa56fcf9838bc22f5fa33545d73aa6494c1c378 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Wed, 19 Jan 2022 08:41:45 +0100 Subject: [PATCH 34/35] use +nightly-2021-11-29 for fmt --- frame/assets-registry/src/lib.rs | 25 +++++++--------- frame/assets/src/lib.rs | 46 +++++++++++++++--------------- frame/bonded-finance/src/lib.rs | 11 ++++--- frame/crowdloan-rewards/src/lib.rs | 21 ++++++-------- frame/curve-amm/src/lib.rs | 26 ++++++++--------- frame/democracy/src/lib.rs | 13 ++++----- frame/lending/src/lib.rs | 38 ++++++++++++------------ frame/oracle/src/lib.rs | 21 +++++++------- frame/transaction-fee/src/lib.rs | 16 +++++------ frame/vault/src/lib.rs | 10 +++---- frame/vesting/src/lib.rs | 2 +- runtime/dali/src/lib.rs | 2 +- 12 files changed, 111 insertions(+), 120 deletions(-) diff --git a/frame/assets-registry/src/lib.rs b/frame/assets-registry/src/lib.rs index 5cc69ac3531..a1c7e5d60c5 100644 --- a/frame/assets-registry/src/lib.rs +++ b/frame/assets-registry/src/lib.rs @@ -273,7 +273,7 @@ pub mod pallet { let local_admin = >::get(); let foreign_admin = >::get(); match current_candidate_status { - None => { + None => if who == local_admin { >::insert( (local_asset_id, foreign_asset_id), @@ -284,20 +284,17 @@ pub mod pallet { (local_asset_id, foreign_asset_id), CandidateStatus::ForeignAdminApproved, ); - } - }, - Some(CandidateStatus::LocalAdminApproved) => { + }, + Some(CandidateStatus::LocalAdminApproved) => if who == foreign_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - } - }, - Some(CandidateStatus::ForeignAdminApproved) => { + }, + Some(CandidateStatus::ForeignAdminApproved) => if who == local_admin { Self::set_location(local_asset_id, foreign_asset_id.clone())?; >::remove((local_asset_id, foreign_asset_id)); - } - }, + }, }; Ok(().into()) } @@ -308,9 +305,8 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, LocalAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { - Ok(who.clone()) - }, + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => + Ok(who.clone()), (r, _) => Err(T::Origin::from(r)), }) } @@ -327,9 +323,8 @@ pub mod pallet { type Success = T::AccountId; fn try_origin(o: T::Origin) -> Result { o.into().and_then(|o| match (o, ForeignAdmin::::try_get()) { - (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => { - Ok(who.clone()) - }, + (frame_system::RawOrigin::Signed(ref who), Ok(ref f)) if who == f => + Ok(who.clone()), (r, _) => Err(T::Origin::from(r)), }) } diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 67ccba1a78a..0b339ef8ca6 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -343,7 +343,7 @@ pub mod pallet { asset_id: &T::AssetId, ) -> Result<(), DispatchError> { if T::AdminOrigin::ensure_origin(origin.clone()).is_ok() { - return Ok(()); + return Ok(()) } match origin.into() { @@ -740,14 +740,14 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_balance(who, amount); + return <::NativeCurrency>::set_balance(who, amount) } <::MultiCurrency>::set_balance(asset, who, amount) } fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::set_total_issuance(amount); + return <::NativeCurrency>::set_total_issuance(amount) } <::MultiCurrency>::set_total_issuance(asset, amount) } @@ -758,7 +758,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance(who, amount); + return <::NativeCurrency>::decrease_balance(who, amount) } <::MultiCurrency>::decrease_balance(asset, who, amount) } @@ -769,7 +769,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::decrease_balance_at_most(who, amount); + return <::NativeCurrency>::decrease_balance_at_most(who, amount) } <::MultiCurrency>::decrease_balance_at_most(asset, who, amount) } @@ -780,7 +780,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance(who, amount); + return <::NativeCurrency>::increase_balance(who, amount) } <::MultiCurrency>::increase_balance(asset, who, amount) } @@ -791,7 +791,7 @@ pub mod pallet { amount: Self::Balance, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::increase_balance_at_most(who, amount); + return <::NativeCurrency>::increase_balance_at_most(who, amount) } <::MultiCurrency>::increase_balance_at_most(asset, who, amount) } @@ -814,7 +814,7 @@ pub mod pallet { if asset == T::NativeAssetId::get() { return <::NativeCurrency>::transfer( source, dest, amount, keep_alive, - ); + ) } <::MultiCurrency>::transfer(asset, source, dest, amount, keep_alive) } @@ -839,7 +839,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::hold(who, amount); + return <::NativeCurrency>::hold(who, amount) } <::MultiCurrency>::hold(asset, who, amount) } @@ -851,7 +851,7 @@ pub mod pallet { best_effort: bool, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::release(who, amount, best_effort); + return <::NativeCurrency>::release(who, amount, best_effort) } <::MultiCurrency>::release(asset, who, amount, best_effort) } @@ -871,7 +871,7 @@ pub mod pallet { amount, best_effort, on_hold, - ); + ) } <::MultiCurrency>::transfer_held( asset, @@ -899,7 +899,7 @@ pub mod pallet { amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::mint_into(who, amount); + return <::NativeCurrency>::mint_into(who, amount) } <::MultiCurrency>::mint_into(asset, who, amount) } @@ -909,7 +909,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::burn_from(who, amount); + return <::NativeCurrency>::burn_from(who, amount) } <::MultiCurrency>::burn_from(asset, who, amount) } @@ -920,7 +920,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::slash(who, amount); + return <::NativeCurrency>::slash(who, amount) } <::MultiCurrency>::slash(asset, who, amount) } @@ -931,7 +931,7 @@ pub mod pallet { amount: Self::Balance, ) -> Result { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::teleport(source, dest, amount); + return <::NativeCurrency>::teleport(source, dest, amount) } <::MultiCurrency>::teleport(asset, source, dest, amount) } @@ -949,21 +949,21 @@ pub mod pallet { fn total_issuance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::total_issuance(); + return <::NativeCurrency>::total_issuance() } <::MultiCurrency>::total_issuance(asset) } fn minimum_balance(asset: Self::AssetId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::minimum_balance(); + return <::NativeCurrency>::minimum_balance() } <::MultiCurrency>::minimum_balance(asset) } fn balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance(who); + return <::NativeCurrency>::balance(who) } <::MultiCurrency>::balance(asset, who) } @@ -974,7 +974,7 @@ pub mod pallet { keep_alive: bool, ) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::reducible_balance(who, keep_alive); + return <::NativeCurrency>::reducible_balance(who, keep_alive) } <::MultiCurrency>::reducible_balance(asset, who, keep_alive) } @@ -985,7 +985,7 @@ pub mod pallet { amount: Self::Balance, ) -> DepositConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_deposit(who, amount); + return <::NativeCurrency>::can_deposit(who, amount) } <::MultiCurrency>::can_deposit(asset, who, amount) } @@ -996,7 +996,7 @@ pub mod pallet { amount: Self::Balance, ) -> WithdrawConsequence { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_withdraw(who, amount); + return <::NativeCurrency>::can_withdraw(who, amount) } <::MultiCurrency>::can_withdraw(asset, who, amount) } @@ -1011,14 +1011,14 @@ pub mod pallet { { fn balance_on_hold(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::balance_on_hold(who); + return <::NativeCurrency>::balance_on_hold(who) } <::MultiCurrency>::balance_on_hold(asset, who) } fn can_hold(asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance) -> bool { if asset == T::NativeAssetId::get() { - return <::NativeCurrency>::can_hold(who, amount); + return <::NativeCurrency>::can_hold(who, amount) } <::MultiCurrency>::can_hold(asset, who, amount) } diff --git a/frame/bonded-finance/src/lib.rs b/frame/bonded-finance/src/lib.rs index 577ceecf13a..cdca894ec45 100644 --- a/frame/bonded-finance/src/lib.rs +++ b/frame/bonded-finance/src/lib.rs @@ -238,11 +238,10 @@ pub mod pallet { // Continue on admin origin (_, Ok(_)) => {}, // Only issuer is allowed - (Ok(account), _) => { + (Ok(account), _) => if issuer != account { - return Err(DispatchError::BadOrigin); - } - }, + return Err(DispatchError::BadOrigin) + }, _ => return Err(DispatchError::BadOrigin), }; let offer_account = Self::account_id(offer_id); @@ -312,8 +311,8 @@ pub mod pallet { Error::::OfferCompleted ); ensure!( - nb_of_bonds > BalanceOf::::zero() - && nb_of_bonds <= offer.nb_of_bonds, + nb_of_bonds > BalanceOf::::zero() && + nb_of_bonds <= offer.nb_of_bonds, Error::::InvalidNumberOfBonds ); // NOTE(hussein-aitlahcen): can't overflow, subsumed by `offer.valid()` in diff --git a/frame/crowdloan-rewards/src/lib.rs b/frame/crowdloan-rewards/src/lib.rs index 0f5291fbdf6..b74c466e55d 100644 --- a/frame/crowdloan-rewards/src/lib.rs +++ b/frame/crowdloan-rewards/src/lib.rs @@ -350,10 +350,10 @@ pub mod pallet { // The user should have claimed the upfront payment + the vested // amount until this window point. let vested_reward = reward.total - upfront_payment; - upfront_payment - + (vested_reward - .saturating_mul(T::Convert::convert(vesting_window)) - / T::Convert::convert(reward.vesting_period)) + upfront_payment + + (vested_reward + .saturating_mul(T::Convert::convert(vesting_window)) / + T::Convert::convert(reward.vesting_period)) } }; let available_to_claim = should_have_claimed - reward.claimed; @@ -452,8 +452,7 @@ pub mod pallet { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { if let Call::associate { reward_account, proof } = call { if Associations::::get(reward_account).is_some() { - return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8) - .into(); + return InvalidTransaction::Custom(ValidityError::AlreadyAssociated as u8).into() } let remote_account = get_remote_account::(proof.clone(), reward_account, T::Prefix::get()) @@ -464,14 +463,12 @@ pub mod pallet { })?; match Rewards::::get(remote_account.clone()) { None => InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), - Some(reward) if reward.total.is_zero() => { - InvalidTransaction::Custom(ValidityError::NoReward as u8).into() - }, - Some(_) => { + Some(reward) if reward.total.is_zero() => + InvalidTransaction::Custom(ValidityError::NoReward as u8).into(), + Some(_) => ValidTransaction::with_tag_prefix("CrowdloanRewardsAssociationCheck") .and_provides(remote_account) - .build() - }, + .build(), } } else { Err(InvalidTransaction::Call.into()) diff --git a/frame/curve-amm/src/lib.rs b/frame/curve-amm/src/lib.rs index 6beb95b137e..710ef62c449 100644 --- a/frame/curve-amm/src/lib.rs +++ b/frame/curve-amm/src/lib.rs @@ -866,7 +866,7 @@ pub mod pallet { let n = FixedU128::saturating_from_integer(u128::try_from(xp_f.len()).ok()?); let sum = xp_f.iter().try_fold(zero, |s, x| s.checked_add(x))?; if sum == zero { - return Some(zero); + return Some(zero) } let mut d = sum; @@ -889,10 +889,10 @@ pub mod pallet { if d > d_prev { if d.checked_sub(&d_prev)? <= prec { - return Some(d); + return Some(d) } } else if d_prev.checked_sub(&d)? <= prec { - return Some(d); + return Some(d) } } None @@ -928,14 +928,14 @@ pub mod pallet { // Same coin if i == j { - return None; + return None } // j above n if j >= xp_f.len() { - return None; + return None } if i >= xp_f.len() { - return None; + return None } let d_f = Self::get_d(xp_f, ann_f)?; let mut c = d_f; @@ -951,7 +951,7 @@ pub mod pallet { } else if k != j { x_k = *xp_k; } else { - continue; + continue } // s = s + x_k s = s.checked_add(&x_k)?; @@ -981,10 +981,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y); + return Some(y) } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y); + return Some(y) } } @@ -1016,7 +1016,7 @@ pub mod pallet { let n = FixedU128::try_from(xp_f.len() as u128).ok()?; if i >= xp_f.len() { - return None; + return None } let mut c = d_f; @@ -1024,7 +1024,7 @@ pub mod pallet { for (k, xp_k) in xp_f.iter().enumerate() { if k == i { - continue; + continue } let x = xp_k; @@ -1050,10 +1050,10 @@ pub mod pallet { // Equality with the specified precision if y > y_prev { if y.checked_sub(&y_prev)? <= prec { - return Some(y); + return Some(y) } } else if y_prev.checked_sub(&y)? <= prec { - return Some(y); + return Some(y) } } diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 491c607f99b..84354c051d5 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -983,7 +983,7 @@ pub mod pallet { if let Some((e_proposal_id, _)) = >::get() { ensure!(id == e_proposal_id, Error::::ProposalMissing); } else { - return Err(Error::::NoProposal.into()); + return Err(Error::::NoProposal.into()) } let mut existing_vetoers = @@ -1220,9 +1220,8 @@ pub mod pallet { let (provider, deposit, since, expiry) = >::get(&id) .and_then(|m| match m { - PreimageStatus::Available { provider, deposit, since, expiry, .. } => { - Some((provider, deposit, since, expiry)) - }, + PreimageStatus::Available { provider, deposit, since, expiry, .. } => + Some((provider, deposit, since, expiry)), _ => None, }) .ok_or(Error::::PreimageMissing)?; @@ -1983,8 +1982,8 @@ impl Pallet { // of unbaked referendum is bounded by this number. In case those number have changed in a // runtime upgrade the formula should be adjusted but the bound should still be sensible. >::mutate(|ref_index| { - while *ref_index < last - && Self::referendum_info(*ref_index) + while *ref_index < last && + Self::referendum_info(*ref_index) .map_or(true, |info| matches!(info, ReferendumInfo::Finished { .. })) { *ref_index += 1 @@ -2054,7 +2053,7 @@ impl Pallet { Ok(0) => return Err(Error::::PreimageMissing.into()), _ => { sp_runtime::print("Failed to decode `PreimageStatus` variant"); - return Err(Error::::PreimageMissing.into()); + return Err(Error::::PreimageMissing.into()) }, } diff --git a/frame/lending/src/lib.rs b/frame/lending/src/lib.rs index 973ccbd75dd..8dae973b6ae 100644 --- a/frame/lending/src/lib.rs +++ b/frame/lending/src/lib.rs @@ -295,17 +295,17 @@ pub mod pallet { let one_read = T::DbWeight::get().reads(1); weight += u64::from(call_counters.now) * ::WeightInfo::now(); weight += u64::from(call_counters.read_markets) * one_read; - weight += u64::from(call_counters.accrue_interest) - * ::WeightInfo::accrue_interest(); + weight += u64::from(call_counters.accrue_interest) * + ::WeightInfo::accrue_interest(); weight += u64::from(call_counters.account_id) * ::WeightInfo::account_id(); - weight += u64::from(call_counters.available_funds) - * ::WeightInfo::available_funds(); - weight += u64::from(call_counters.handle_withdrawable) - * ::WeightInfo::handle_withdrawable(); - weight += u64::from(call_counters.handle_depositable) - * ::WeightInfo::handle_depositable(); - weight += u64::from(call_counters.handle_must_liquidate) - * ::WeightInfo::handle_must_liquidate(); + weight += u64::from(call_counters.available_funds) * + ::WeightInfo::available_funds(); + weight += u64::from(call_counters.handle_withdrawable) * + ::WeightInfo::handle_withdrawable(); + weight += u64::from(call_counters.handle_depositable) * + ::WeightInfo::handle_depositable(); + weight += u64::from(call_counters.handle_must_liquidate) * + ::WeightInfo::handle_must_liquidate(); // TODO: move following loop to OCW for (market_id, account, _) in DebtIndex::::iter() { @@ -322,7 +322,7 @@ pub mod pallet { let signer = Signer::::AuthorityId>::all_accounts(); if !signer.can_sign() { log::warn!("No signer"); - return; + return } for (market_id, account, _) in DebtIndex::::iter() { let results = signer.send_signed_transaction(|_account| { @@ -978,8 +978,8 @@ pub mod pallet { let existing_borrow_share = Percent::from_rational(existing_borrow_amount, total_borrow_amount); let new_borrow_share = Percent::from_rational(amount_to_borrow, total_borrow_amount); - Ok((market_index * new_borrow_share.into()) - + (account_interest_index * existing_borrow_share.into())) + Ok((market_index * new_borrow_share.into()) + + (account_interest_index * existing_borrow_share.into())) } fn can_borrow( @@ -993,7 +993,7 @@ pub mod pallet { let latest_borrow_timestamp = BorrowTimestamp::::get(market_id, debt_owner); if let Some(time) = latest_borrow_timestamp { if time >= Self::last_block_timestamp() { - return Err(Error::::InvalidTimestampOnBorrowRequest.into()); + return Err(Error::::InvalidTimestampOnBorrowRequest.into()) } } @@ -1416,8 +1416,8 @@ pub mod pallet { ); ensure!( - ::Currency::can_deposit(market.collateral, &market_account, amount) - == DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, &market_account, amount) == + DepositConsequence::Success, Error::::TransferFailed ); @@ -1475,8 +1475,8 @@ pub mod pallet { let market_account = Self::account_id(market_id); ensure!( - ::Currency::can_deposit(market.collateral, account, amount) - == DepositConsequence::Success, + ::Currency::can_deposit(market.collateral, account, amount) == + DepositConsequence::Success, Error::::TransferFailed ); ensure!( @@ -1515,7 +1515,7 @@ pub mod pallet { account_interest_index: Ratio, ) -> Result, DispatchError> { if principal.is_zero() { - return Ok(None); + return Ok(None) } let principal: LiftedFixedBalance = principal.into(); let balance = principal diff --git a/frame/oracle/src/lib.rs b/frame/oracle/src/lib.rs index 47882cd5544..326e1a858ff 100644 --- a/frame/oracle/src/lib.rs +++ b/frame/oracle/src/lib.rs @@ -557,9 +557,10 @@ pub mod pallet { let author_stake = OracleStake::::get(&who).unwrap_or_else(Zero::zero); ensure!(Self::is_requested(&asset_id), Error::::PriceNotRequested); ensure!( - author_stake - >= T::MinStake::get() - .saturating_add(Self::answer_in_transit(&who).unwrap_or_else(Zero::zero)), + author_stake >= + T::MinStake::get().saturating_add( + Self::answer_in_transit(&who).unwrap_or_else(Zero::zero) + ), Error::::NotEnoughStake ); @@ -574,10 +575,10 @@ pub mod pallet { // because current_prices.len() limited by u32 // (type of AssetsInfo::::get(asset_id).max_answers). if current_prices.len() as u32 >= asset_info.max_answers { - return Err(Error::::MaxPrices.into()); + return Err(Error::::MaxPrices.into()) } if current_prices.iter().any(|candidate| candidate.who == who) { - return Err(Error::::AlreadySubmitted.into()); + return Err(Error::::AlreadySubmitted.into()) } current_prices.push(set_price); Ok(()) @@ -788,7 +789,7 @@ pub mod pallet { prices: &[PrePrice], ) -> Option { if prices.is_empty() { - return None; + return None } let mut numbers: Vec = @@ -883,7 +884,7 @@ pub mod pallet { log::info!("no signer"); return Err( "No local accounts available. Consider adding one via `author_insertKey` RPC.", - ); + ) } // checks to make sure key from keystore has not already submitted price let prices = PrePrices::::get(*price_id); @@ -897,12 +898,12 @@ pub mod pallet { if prices.len() as u32 >= Self::asset_info(price_id).max_answers { log::info!("Max answers reached"); - return Err("Max answers reached"); + return Err("Max answers reached") } if prices.into_iter().any(|price| price.who == address) { log::info!("Tx already submitted"); - return Err("Tx already submitted"); + return Err("Tx already submitted") } // Make an external HTTP request to fetch the current price. // Note this call will block until response is received. @@ -960,7 +961,7 @@ pub mod pallet { // Let's check the status code before we proceed to reading the response. if response.code != 200 { log::warn!("Unexpected status code: {}", response.code); - return Err(http::Error::Unknown); + return Err(http::Error::Unknown) } let body = response.body().collect::>(); diff --git a/frame/transaction-fee/src/lib.rs b/frame/transaction-fee/src/lib.rs index 6755135adc3..454fb0cfa03 100644 --- a/frame/transaction-fee/src/lib.rs +++ b/frame/transaction-fee/src/lib.rs @@ -153,8 +153,8 @@ pub mod pallet { // loss. use sp_std::convert::TryInto; assert!( - ::max_value() - >= Multiplier::checked_from_integer( + ::max_value() >= + Multiplier::checked_from_integer( T::BlockWeights::get() .max_block .try_into() @@ -168,8 +168,8 @@ pub mod pallet { // that if we collapse to minimum, the trend will be positive with a weight value // which is 1% more than the target. let min_value = T::FeeMultiplierUpdate::min(); - let mut target = T::FeeMultiplierUpdate::target() - * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( + let mut target = T::FeeMultiplierUpdate::target() * + T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( "Setting `max_total` for `Normal` dispatch class is not compatible with \ `transaction-payment` pallet.", ); @@ -177,7 +177,7 @@ pub mod pallet { let addition = target / 100; if addition == 0 { // this is most likely because in a test setup we set everything to (). - return; + return } target += addition; @@ -343,8 +343,8 @@ where let total_native = T::NativeCurrency::total_balance(who); // check native balance if is enough - let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native - && T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( + let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native && + T::NativeCurrency::free_balance(who).checked_sub(&fee).map_or( false, |new_free_balance| { T::NativeCurrency::ensure_can_withdraw(who, fee, reason, new_free_balance) @@ -432,7 +432,7 @@ where // Only mess with balances if fee is not zero. if fee.is_zero() { - return Ok((fee, None)); + return Ok((fee, None)) } let reason = if tip.is_zero() { diff --git a/frame/vault/src/lib.rs b/frame/vault/src/lib.rs index 4a4b61ca8e4..b26e1ec932f 100644 --- a/frame/vault/src/lib.rs +++ b/frame/vault/src/lib.rs @@ -565,7 +565,7 @@ pub mod pallet { >::block_number(), vault.deposit, ) { - return Err(Error::::TombstoneDurationNotExceeded.into()); + return Err(Error::::TombstoneDurationNotExceeded.into()) } else { let deletion_reward_account = &Self::deletion_reward_account(dest); let reward = @@ -833,8 +833,8 @@ pub mod pallet { let vault_aum = Self::assets_under_management(vault_id)?; if vault_aum.is_zero() { ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, amount) - == DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, amount) == + DepositConsequence::Success, Error::::MintFailed ); @@ -864,8 +864,8 @@ pub mod pallet { ensure!(lp > T::Balance::zero(), Error::::InsufficientCreationDeposit); ensure!( - T::Currency::can_deposit(vault.lp_token_id, from, lp) - == DepositConsequence::Success, + T::Currency::can_deposit(vault.lp_token_id, from, lp) == + DepositConsequence::Success, Error::::MintFailed ); diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index 8e860458120..7ee819ba083 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -348,7 +348,7 @@ impl Pallet { if bounded_schedules.len().is_zero() { >::remove(who, asset); T::Currency::remove_lock(VESTING_LOCK_ID, asset, who)?; - return Ok(()); + return Ok(()) } let total_amount = diff --git a/runtime/dali/src/lib.rs b/runtime/dali/src/lib.rs index dcacc9b5333..102ff87309c 100644 --- a/runtime/dali/src/lib.rs +++ b/runtime/dali/src/lib.rs @@ -792,7 +792,7 @@ pub struct BaseCallFilter; impl Contains for BaseCallFilter { fn contains(call: &Call) -> bool { if call_filter::Pallet::::contains(call) { - return false; + return false } !matches!( call, From a1148ca8b5e4c40a5f870067d56fa4c3c2ff21d6 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Wed, 19 Jan 2022 07:51:31 +0000 Subject: [PATCH 35/35] Updates weights for picasso-dev --- runtime/picasso/src/weights/balances.rs | 16 +-- .../picasso/src/weights/collator_selection.rs | 28 +++--- runtime/picasso/src/weights/collective.rs | 64 ++++++------ runtime/picasso/src/weights/democracy.rs | 98 +++++++++---------- runtime/picasso/src/weights/frame_system.rs | 14 +-- runtime/picasso/src/weights/indices.rs | 12 +-- runtime/picasso/src/weights/membership.rs | 36 +++---- runtime/picasso/src/weights/scheduler.rs | 22 ++--- runtime/picasso/src/weights/timestamp.rs | 6 +- runtime/picasso/src/weights/treasury.rs | 18 ++-- runtime/picasso/src/weights/utility.rs | 16 +-- 11 files changed, 165 insertions(+), 165 deletions(-) diff --git a/runtime/picasso/src/weights/balances.rs b/runtime/picasso/src/weights/balances.rs index 021b6bc942c..b5627b30bf7 100644 --- a/runtime/picasso/src/weights/balances.rs +++ b/runtime/picasso/src/weights/balances.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,43 +30,43 @@ pub struct WeightInfo(PhantomData); impl balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (85_649_000 as Weight) + (91_710_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_keep_alive() -> Weight { - (52_142_000 as Weight) + (55_210_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 { - (30_267_000 as Weight) + (31_990_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 { - (35_831_000 as Weight) + (38_394_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:3 w:3) fn force_transfer() -> Weight { - (85_803_000 as Weight) + (91_815_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (63_021_000 as Weight) + (67_669_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 { - (27_374_000 as Weight) + (29_533_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/picasso/src/weights/collator_selection.rs b/runtime/picasso/src/weights/collator_selection.rs index bb0f3b061df..6b32796b2bc 100644 --- a/runtime/picasso/src/weights/collator_selection.rs +++ b/runtime/picasso/src/weights/collator_selection.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,19 +30,19 @@ pub struct WeightInfo(PhantomData); impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (16_784_000 as Weight) + (16_722_000 as Weight) // Standard Error: 0 - .saturating_add((37_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((36_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (14_691_000 as Weight) + (14_820_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (15_446_000 as Weight) + (15_362_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -52,18 +52,18 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: CollatorSelection CandidacyBond (r:1 w:0) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn register_as_candidate(c: u32, ) -> Weight { - (90_019_000 as Weight) + (90_368_000 as Weight) // Standard Error: 1_000 - .saturating_add((158_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((157_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn leave_intent(c: u32, ) -> Weight { - (80_560_000 as Weight) + (84_260_000 as Weight) // Standard Error: 1_000 - .saturating_add((229_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((225_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,7 +71,7 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) fn note_author() -> Weight { - (67_646_000 as Weight) + (62_756_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -82,10 +82,10 @@ impl collator_selection::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) fn new_session(r: u32, c: u32, ) -> Weight { (0 as Weight) - // Standard Error: 4_247_000 - .saturating_add((22_276_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 4_247_000 - .saturating_add((112_079_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 4_172_000 + .saturating_add((21_918_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 4_172_000 + .saturating_add((110_284_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/picasso/src/weights/collective.rs b/runtime/picasso/src/weights/collective.rs index d53cfe88dd2..f65986b4a49 100644 --- a/runtime/picasso/src/weights/collective.rs +++ b/runtime/picasso/src/weights/collective.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -34,12 +34,12 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Prime (r:0 w:1) fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((17_343_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 15_000 - .saturating_add((102_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 15_000 - .saturating_add((22_296_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 7_000 + .saturating_add((15_474_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 7_000 + .saturating_add((229_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 7_000 + .saturating_add((20_595_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)) @@ -47,11 +47,11 @@ impl collective::WeightInfo for WeightInfo { } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (21_793_000 as Weight) + (22_076_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((85_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -61,7 +61,7 @@ impl collective::WeightInfo for WeightInfo { // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((164_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -70,22 +70,22 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (34_549_000 as Weight) + (35_005_000 as Weight) // Standard Error: 0 - .saturating_add((11_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((100_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((105_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((420_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((407_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: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (43_268_000 as Weight) + (43_185_000 as Weight) // Standard Error: 3_000 - .saturating_add((189_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((184_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)) } @@ -94,11 +94,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (43_446_000 as Weight) + (44_456_000 as Weight) // Standard Error: 2_000 - .saturating_add((207_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((171_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((350_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((341_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)) } @@ -107,13 +107,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (50_375_000 as Weight) + (50_303_000 as Weight) // Standard Error: 0 .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((220_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((194_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((417_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((420_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)) } @@ -123,11 +123,11 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (49_563_000 as Weight) - // Standard Error: 2_000 - .saturating_add((197_000 as Weight).saturating_mul(m as Weight)) + (48_479_000 as Weight) // Standard Error: 2_000 - .saturating_add((342_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((180_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((341_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)) } @@ -137,13 +137,13 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (54_372_000 as Weight) + (51_672_000 as Weight) // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 2_000 - .saturating_add((226_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((208_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 2_000 - .saturating_add((416_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((427_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)) } @@ -151,9 +151,9 @@ impl collective::WeightInfo for WeightInfo { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (27_026_000 as Weight) + (26_984_000 as Weight) // Standard Error: 1_000 - .saturating_add((411_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((398_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/picasso/src/weights/democracy.rs b/runtime/picasso/src/weights/democracy.rs index a80160ce474..f41582fd4bd 100644 --- a/runtime/picasso/src/weights/democracy.rs +++ b/runtime/picasso/src/weights/democracy.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -33,15 +33,15 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (75_709_000 as Weight) + (76_230_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) fn second(s: u32, ) -> Weight { - (39_037_000 as Weight) + (39_494_000 as Weight) // Standard Error: 1_000 - .saturating_add((244_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((235_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)) } @@ -49,9 +49,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (43_061_000 as Weight) + (43_207_000 as Weight) // Standard Error: 0 - .saturating_add((234_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((232_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)) } @@ -59,16 +59,16 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (43_740_000 as Weight) - // Standard Error: 2_000 - .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) + (43_457_000 as Weight) + // Standard Error: 1_000 + .saturating_add((211_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 { - (26_414_000 as Weight) + (26_370_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -79,45 +79,45 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn blacklist(p: u32, ) -> Weight { - (89_177_000 as Weight) + (89_730_000 as Weight) // Standard Error: 6_000 - .saturating_add((557_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((567_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (13_260_000 as Weight) + (13_491_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((77_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 { - (2_744_000 as Weight) + (2_913_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (2_661_000 as Weight) + (2_941_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 { - (27_397_000 as Weight) + (27_424_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) fn veto_external(v: u32, ) -> Weight { - (28_896_000 as Weight) - // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(v as Weight)) + (28_681_000 as Weight) + // Standard Error: 0 + .saturating_add((109_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)) } @@ -125,23 +125,23 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:2 w:2) fn cancel_proposal(p: u32, ) -> Weight { - (66_398_000 as Weight) + (66_475_000 as Weight) // Standard Error: 2_000 - .saturating_add((491_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((513_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: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (17_000_000 as Weight) + (17_019_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) fn cancel_queued(r: u32, ) -> Weight { - (30_669_000 as Weight) + (30_511_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_334_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_399_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)) } @@ -149,9 +149,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (7_103_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_217_000 as Weight).saturating_mul(r as Weight)) + (5_850_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_240_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)) @@ -163,9 +163,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (14_447_000 as Weight) - // Standard Error: 3_000 - .saturating_add((5_234_000 as Weight).saturating_mul(r as Weight)) + (13_175_000 as Weight) + // Standard Error: 4_000 + .saturating_add((5_263_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)) @@ -174,9 +174,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (58_201_000 as Weight) - // Standard Error: 4_000 - .saturating_add((6_908_000 as Weight).saturating_mul(r as Weight)) + (58_838_000 as Weight) + // Standard Error: 5_000 + .saturating_add((6_950_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)) @@ -185,9 +185,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (27_429_000 as Weight) + (27_174_000 as Weight) // Standard Error: 4_000 - .saturating_add((6_936_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_016_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)) @@ -195,12 +195,12 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (3_174_000 as Weight) + (3_298_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (41_760_000 as Weight) + (42_172_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)) @@ -208,7 +208,7 @@ impl democracy::WeightInfo for WeightInfo { } // Storage: Democracy Preimages (r:1 w:1) fn note_imminent_preimage(b: u32, ) -> Weight { - (27_730_000 as Weight) + (28_049_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)) @@ -217,7 +217,7 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) fn reap_preimage(b: u32, ) -> Weight { - (39_896_000 as Weight) + (40_301_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)) @@ -227,9 +227,9 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (37_205_000 as Weight) + (37_625_000 as Weight) // Standard Error: 1_000 - .saturating_add((116_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((104_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)) } @@ -237,27 +237,27 @@ impl democracy::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (35_341_000 as Weight) - // Standard Error: 1_000 - .saturating_add((194_000 as Weight).saturating_mul(r as Weight)) + (35_585_000 as Weight) + // Standard Error: 2_000 + .saturating_add((190_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) fn remove_vote(r: u32, ) -> Weight { - (20_107_000 as Weight) + (20_515_000 as Weight) // Standard Error: 2_000 - .saturating_add((180_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((177_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) fn remove_other_vote(r: u32, ) -> Weight { - (19_971_000 as Weight) + (20_196_000 as Weight) // Standard Error: 1_000 - .saturating_add((189_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((192_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/picasso/src/weights/frame_system.rs b/runtime/picasso/src/weights/frame_system.rs index eafec030b95..599cf555d91 100644 --- a/runtime/picasso/src/weights/frame_system.rs +++ b/runtime/picasso/src/weights/frame_system.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -39,7 +39,7 @@ 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 { - (5_223_000 as Weight) + (5_351_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -47,21 +47,21 @@ impl frame_system::WeightInfo for WeightInfo { fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((837_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((849_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) fn kill_storage(i: u32, ) -> Weight { - (138_000 as Weight) + (0 as Weight) // Standard Error: 1_000 - .saturating_add((560_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((564_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) fn kill_prefix(p: u32, ) -> Weight { - (269_000 as Weight) + (0 as Weight) // Standard Error: 1_000 - .saturating_add((907_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((900_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/picasso/src/weights/indices.rs b/runtime/picasso/src/weights/indices.rs index bd0b7ace914..0454f4906d9 100644 --- a/runtime/picasso/src/weights/indices.rs +++ b/runtime/picasso/src/weights/indices.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,33 +30,33 @@ pub struct WeightInfo(PhantomData); impl indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - (39_070_000 as Weight) + (37_680_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 { - (46_669_000 as Weight) + (45_888_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 { - (39_065_000 as Weight) + (38_314_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 { - (40_511_000 as Weight) + (39_179_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 { - (44_482_000 as Weight) + (43_602_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/picasso/src/weights/membership.rs b/runtime/picasso/src/weights/membership.rs index cbf91da9afc..ceeaabb7589 100644 --- a/runtime/picasso/src/weights/membership.rs +++ b/runtime/picasso/src/weights/membership.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -33,9 +33,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (23_934_000 as Weight) - // Standard Error: 1_000 - .saturating_add((123_000 as Weight).saturating_mul(m as Weight)) + (23_947_000 as Weight) + // Standard Error: 2_000 + .saturating_add((115_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)) } @@ -45,9 +45,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (28_936_000 as Weight) + (28_875_000 as Weight) // Standard Error: 0 - .saturating_add((114_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((105_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)) } @@ -57,9 +57,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (29_276_000 as Weight) - // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(m as Weight)) + (29_055_000 as Weight) + // Standard Error: 1_000 + .saturating_add((119_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)) } @@ -69,9 +69,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (29_937_000 as Weight) - // Standard Error: 1_000 - .saturating_add((253_000 as Weight).saturating_mul(m as Weight)) + (29_788_000 as Weight) + // Standard Error: 0 + .saturating_add((244_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)) } @@ -81,9 +81,9 @@ impl membership::WeightInfo for WeightInfo { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (30_960_000 as Weight) + (30_605_000 as Weight) // Standard Error: 0 - .saturating_add((122_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((112_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)) } @@ -91,18 +91,18 @@ impl membership::WeightInfo for WeightInfo { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (7_798_000 as Weight) + (7_883_000 as Weight) // Standard Error: 0 - .saturating_add((96_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((84_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: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (3_178_000 as Weight) + (3_272_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/picasso/src/weights/scheduler.rs b/runtime/picasso/src/weights/scheduler.rs index 72529bc53a2..ff815b92c7b 100644 --- a/runtime/picasso/src/weights/scheduler.rs +++ b/runtime/picasso/src/weights/scheduler.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -30,36 +30,36 @@ pub struct WeightInfo(PhantomData); impl scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (25_117_000 as Weight) + (24_885_000 as Weight) // Standard Error: 1_000 - .saturating_add((134_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((129_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) fn cancel(s: u32, ) -> Weight { - (24_294_000 as Weight) + (24_004_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_113_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_082_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) fn schedule_named(s: u32, ) -> Weight { - (31_210_000 as Weight) - // Standard Error: 1_000 - .saturating_add((137_000 as Weight).saturating_mul(s as Weight)) + (31_128_000 as Weight) + // Standard Error: 2_000 + .saturating_add((133_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) fn cancel_named(s: u32, ) -> Weight { - (28_072_000 as Weight) - // Standard Error: 4_000 - .saturating_add((1_110_000 as Weight).saturating_mul(s as Weight)) + (27_288_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_103_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/picasso/src/weights/timestamp.rs b/runtime/picasso/src/weights/timestamp.rs index 699adc7cb29..70775415a3c 100644 --- a/runtime/picasso/src/weights/timestamp.rs +++ b/runtime/picasso/src/weights/timestamp.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -31,11 +31,11 @@ impl timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Aura CurrentSlot (r:1 w:0) fn set() -> Weight { - (10_297_000 as Weight) + (10_081_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 { - (4_714_000 as Weight) + (4_540_000 as Weight) } } diff --git a/runtime/picasso/src/weights/treasury.rs b/runtime/picasso/src/weights/treasury.rs index 04938bf8af6..49d4a45f9a4 100644 --- a/runtime/picasso/src/weights/treasury.rs +++ b/runtime/picasso/src/weights/treasury.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -31,23 +31,23 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (40_605_000 as Weight) + (39_340_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:2 w:2) fn reject_proposal() -> Weight { - (62_187_000 as Weight) + (61_069_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (12_294_000 as Weight) - // Standard Error: 2_000 - .saturating_add((179_000 as Weight).saturating_mul(p as Weight)) + (11_635_000 as Weight) + // Standard Error: 3_000 + .saturating_add((205_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)) } @@ -55,9 +55,9 @@ impl treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:1 w:1) fn on_initialize_proposals(p: u32, ) -> Weight { - (58_416_000 as Weight) - // Standard Error: 37_000 - .saturating_add((60_764_000 as Weight).saturating_mul(p as Weight)) + (54_796_000 as Weight) + // Standard Error: 38_000 + .saturating_add((59_096_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/picasso/src/weights/utility.rs b/runtime/picasso/src/weights/utility.rs index 3a5974229e8..254b5ad0e7a 100644 --- a/runtime/picasso/src/weights/utility.rs +++ b/runtime/picasso/src/weights/utility.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("picasso-dev"), DB CACHE: 128 // Executed Command: @@ -29,19 +29,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (33_503_000 as Weight) - // Standard Error: 4_000 - .saturating_add((5_812_000 as Weight).saturating_mul(c as Weight)) + (24_741_000 as Weight) + // Standard Error: 1_000 + .saturating_add((5_724_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_674_000 as Weight) + (3_740_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (27_157_000 as Weight) + (23_323_000 as Weight) // Standard Error: 1_000 - .saturating_add((6_355_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((6_241_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (16_002_000 as Weight) + (15_849_000 as Weight) } }