diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..2ea1ab2d6b9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +/.gitlab-ci.yml filter=ci-prettier +/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a65919bef6..3dc3be0d842 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,6 @@ # # pipelines can be triggered manually in the web - stages: - test - build @@ -15,7 +14,7 @@ stages: - zombienet default: - interruptible: true + interruptible: true retry: max: 2 when: @@ -24,19 +23,24 @@ default: - api_failure variables: - GIT_STRATEGY: fetch - GIT_DEPTH: 100 - CARGO_INCREMENTAL: 0 - CI_IMAGE: "paritytech/ci-linux:production" - DOCKER_OS: "debian:stretch" - ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.35" + GIT_STRATEGY: fetch + GIT_DEPTH: 100 + CARGO_INCREMENTAL: 0 + CI_IMAGE: "paritytech/ci-linux:production" + DOCKER_OS: "debian:stretch" + ARCH: "x86_64" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.37" + +.common-before-script: + before_script: + - !reference [.job-switcher, before_script] + - !reference [.timestamp, before_script] .collect-artifacts: artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: on_success - expire_in: 1 days + name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" + when: on_success + expire_in: 1 days paths: - ./artifacts/ @@ -44,7 +48,6 @@ variables: # they will be used if the job fails .pipeline-stopper-vars: before_script: - - !reference [.job-switcher, before_script] - echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env - echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env - echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env @@ -52,40 +55,40 @@ variables: .pipeline-stopper-artifacts: artifacts: - reports: - dotenv: pipeline-stopper.env + reports: + dotenv: pipeline-stopper.env .common-refs: # these jobs run always* rules: - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 - - if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1 .pr-refs: # these jobs run always* rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs .publish-refs: rules: - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 # run benchmarks manually only on release-parachains-v* branch .benchmarks-manual-refs: rules: - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 when: manual # run benchmarks only on release-parachains-v* branch .benchmarks-refs: rules: - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 .zombienet-refs: rules: @@ -94,16 +97,16 @@ variables: - if: $CI_PIPELINE_SOURCE == "schedule" when: never - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs .job-switcher: before_script: - if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi .docker-env: - image: "${CI_IMAGE}" + image: "${CI_IMAGE}" before_script: - - !reference [.job-switcher, before_script] + - !reference [.common-before-script, before_script] - rustup show - cargo --version - rustup +nightly show @@ -113,9 +116,9 @@ variables: - linux-docker-vm-c2 .kubernetes-env: - image: "${CI_IMAGE}" + image: "${CI_IMAGE}" before_script: - - !reference [.job-switcher, before_script] + - !reference [.common-before-script, before_script] tags: - kubernetes-parity-build @@ -145,6 +148,10 @@ include: - scripts/ci/gitlab/pipeline/publish.yml # zombienet jobs - scripts/ci/gitlab/pipeline/zombienet.yml + # timestamp handler + - project: parity/infrastructure/ci_cd/shared + ref: v0.1 + file: /common/timestamp.yml #### stage: .post @@ -152,33 +159,33 @@ include: # In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests # to fail the pipeline as soon as possible to shorten the feedback loop. cancel-pipeline: - stage: .post + stage: .post needs: - - job: test-linux-stable + - job: test-linux-stable rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs when: on_failure variables: - PROJECT_ID: "${CI_PROJECT_ID}" - PROJECT_NAME: "${CI_PROJECT_NAME}" - PIPELINE_ID: "${CI_PIPELINE_ID}" - FAILED_JOB_URL: "${FAILED_JOB_URL}" - FAILED_JOB_NAME: "${FAILED_JOB_NAME}" - PR_NUM: "${PR_NUM}" + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "${FAILED_JOB_URL}" + FAILED_JOB_NAME: "${FAILED_JOB_NAME}" + PR_NUM: "${PR_NUM}" trigger: - project: "parity/infrastructure/ci_cd/pipeline-stopper" - branch: "as-improve" + project: "parity/infrastructure/ci_cd/pipeline-stopper" + branch: "as-improve" remove-cancel-pipeline-message: stage: .post rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs variables: - PROJECT_ID: "${CI_PROJECT_ID}" - PROJECT_NAME: "${CI_PROJECT_NAME}" - PIPELINE_ID: "${CI_PIPELINE_ID}" - FAILED_JOB_URL: "https://gitlab.com" - FAILED_JOB_NAME: "nope" - PR_NUM: "${CI_COMMIT_REF_NAME}" + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "https://gitlab.com" + FAILED_JOB_NAME: "nope" + PR_NUM: "${CI_COMMIT_REF_NAME}" trigger: - project: "parity/infrastructure/ci_cd/pipeline-stopper" + project: "parity/infrastructure/ci_cd/pipeline-stopper" diff --git a/Cargo.lock b/Cargo.lock index 216f3eb7068..aa7b38595bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,13 +342,39 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "assets-common" +version = "0.1.0" +dependencies = [ + "frame-support", + "parachains-common", + "parity-scale-codec", + "sp-api", + "sp-std", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "async-channel" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +dependencies = [ + "concurrent-queue 2.1.0", + "event-listener", + "futures-core", +] + [[package]] name = "async-io" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" dependencies = [ - "concurrent-queue", + "concurrent-queue 1.2.2", "futures-lite", "libc", "log", @@ -372,9 +398,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2", "quote", @@ -471,63 +497,10 @@ dependencies = [ "serde", ] -[[package]] -name = "beefy-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "array-bytes 4.2.0", - "async-trait", - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-utils", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-beefy", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mmr-primitives", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "beefy-gadget-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "beefy-gadget", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-rpc", - "serde", - "sp-beefy", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "hash-db", "log", @@ -590,13 +563,13 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.2.4", ] [[package]] @@ -607,7 +580,7 @@ checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] @@ -620,7 +593,7 @@ dependencies = [ "arrayvec 0.7.2", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.1.5", "digest 0.10.3", ] @@ -1196,9 +1169,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.6" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", "clap_derive", @@ -1211,9 +1184,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" dependencies = [ "heck", "proc-macro-error", @@ -1344,6 +1317,15 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "concurrent-queue" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "const-oid" version = "0.9.0" @@ -1356,6 +1338,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "constant_time_eq" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" + [[package]] name = "contracts-rococo-runtime" version = "0.2.0" @@ -1486,18 +1474,18 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b18cf92869a6ae85cde3af4bc4beb6154efa8adef03b18db2ad413d5bce3a2" +checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567d9f6e919bac076f39b902a072686eaf9e6d015baa34d10a61b85105b7af59" +checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b" dependencies = [ "arrayvec 0.7.2", "bumpalo", @@ -1516,33 +1504,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e72b2d5ec8917b2971fe83850187373d0a186db4748a7c23a5f48691b8d92bb" +checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3461c0e0c2ebbeb92533aacb27e219289f60dc84134ef34fbf2d77c9eddf07ef" +checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d" [[package]] name = "cranelift-entity" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af684f7f7b01427b1942c7102673322a51b9d6f261e9663dc5e5595786775531" +checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d361ed0373cf5f086b49c499aa72227b646a64f899f32e34312f97c0fadff75" +checksum = "0b66bf9e916f57fbbd0f7703ec6286f4624866bf45000111627c70d272c8dda1" dependencies = [ "cranelift-codegen", "log", @@ -1552,15 +1540,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef4f8f3984d772c199a48896d2fb766f96301bf71b371e03a2b99f4f3b7b931" +checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358" [[package]] name = "cranelift-native" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98e4e99a353703475d5acb402b9c13482d41d8a4008b352559bd560afb90363" +checksum = "937e021e089c51f9749d09e7ad1c4f255c2f8686cb8c3df63a34b3ec9921bc41" dependencies = [ "cranelift-codegen", "libc", @@ -1569,9 +1557,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e3f4f0779a1b0f286a6ef19835d8665f88326e656a6d7d84fa9a39fa38ca32" +checksum = "d850cf6775477747c9dfda9ae23355dd70512ffebc70cf82b85a5b111ae668b5" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1691,12 +1679,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", - "lazy_static", ] [[package]] @@ -1779,7 +1766,7 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -1970,11 +1957,11 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", "futures", - "parking_lot 0.12.1", "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-network", + "sc-network-sync", "sc-network-transactions", "sc-rpc", "sc-service", @@ -2261,13 +2248,11 @@ dependencies = [ "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", - "polkadot-service", "sc-client-api", "sp-api", "sp-blockchain", "sp-state-machine", "thiserror", - "tokio", ] [[package]] @@ -2290,15 +2275,10 @@ dependencies = [ "polkadot-service", "sc-authority-discovery", "sc-client-api", - "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-service", - "sc-telemetry", "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", @@ -2306,7 +2286,6 @@ dependencies = [ "sp-runtime", "tokio", "tracing", - "url", ] [[package]] @@ -2321,9 +2300,10 @@ dependencies = [ "jsonrpsee", "lru 0.9.0", "parity-scale-codec", - "polkadot-service", + "polkadot-overseer", "sc-client-api", "sc-rpc-api", + "sc-service", "serde", "serde_json", "sp-api", @@ -2424,12 +2404,11 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.1.6", + "clap 4.1.8", "criterion", "cumulus-client-cli", "cumulus-client-consensus-common", "cumulus-client-consensus-relay-chain", - "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-client-service", "cumulus-primitives-core", @@ -2437,7 +2416,6 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "cumulus-relay-chain-rpc-interface", "cumulus-test-relay-validation-worker-provider", "cumulus-test-runtime", "frame-system", @@ -2462,7 +2440,6 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -2869,9 +2846,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecdsa" @@ -3086,6 +3063,19 @@ dependencies = [ "syn", ] +[[package]] +name = "expander" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -3238,7 +3228,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", ] @@ -3261,7 +3251,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-support-procedural", @@ -3286,12 +3276,12 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "Inflector", "array-bytes 4.2.0", "chrono", - "clap 4.1.6", + "clap 4.1.8", "comfy-table", "frame-benchmarking", "frame-support", @@ -3333,7 +3323,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3344,7 +3334,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3361,7 +3351,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -3390,7 +3380,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "log", @@ -3406,9 +3396,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "bitflags", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", @@ -3438,7 +3429,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "Inflector", "cfg-expr", @@ -3453,7 +3444,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3465,7 +3456,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro2", "quote", @@ -3475,7 +3466,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "log", @@ -3493,7 +3484,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -3508,7 +3499,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -3517,7 +3508,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "parity-scale-codec", @@ -3542,6 +3533,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" +dependencies = [ + "libc", + "rustix 0.35.13", + "winapi", +] + [[package]] name = "fs_extra" version = "1.2.0" @@ -3844,9 +3846,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -4220,6 +4222,12 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "io-lifetimes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" + [[package]] name = "io-lifetimes" version = "1.0.2" @@ -4261,8 +4269,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" dependencies = [ "hermit-abi 0.2.6", - "io-lifetimes", - "rustix", + "io-lifetimes 1.0.2", + "rustix 0.36.7", "windows-sys 0.42.0", ] @@ -4449,8 +4457,8 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "frame-benchmarking", @@ -4523,9 +4531,9 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -4547,8 +4555,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "polkadot-primitives", @@ -5139,6 +5147,12 @@ dependencies = [ "nalgebra", ] +[[package]] +name = "linux-raw-sys" +version = "0.0.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" + [[package]] name = "linux-raw-sys" version = "0.1.3" @@ -5276,7 +5290,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "rustix", + "rustix 0.36.7", ] [[package]] @@ -5308,12 +5322,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", ] [[package]] @@ -5385,7 +5398,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "log", @@ -5393,9 +5406,9 @@ dependencies = [ "sc-client-api", "sc-offchain", "sp-api", - "sp-beefy", "sp-blockchain", "sp-consensus", + "sp-consensus-beefy", "sp-core", "sp-mmr-primitives", "sp-runtime", @@ -5404,7 +5417,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "anyhow", "jsonrpsee", @@ -5832,9 +5845,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "orchestra" -version = "0.0.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" +checksum = "ecae97f74ddeb5c6ff00c98ef368423b4ec9a4d5ab48c0d909e84b7594b09718" dependencies = [ "async-trait", "dyn-clonable", @@ -5849,9 +5862,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" +checksum = "08a9846c70b1df02657dbe5b54fadbad0ea3b944623ebf3fcbf7f33ef859dcba" dependencies = [ "expander 0.0.6", "itertools", @@ -5902,7 +5915,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "frame-benchmarking", @@ -5913,8 +5926,8 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sha2 0.10.2", "sp-core", + "sp-core-hashing", "sp-io", "sp-runtime", "sp-std", @@ -5923,7 +5936,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5941,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5956,7 +5969,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -5972,7 +5985,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -5988,7 +6001,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6002,7 +6015,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6026,7 +6039,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6046,7 +6059,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6061,7 +6074,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6070,7 +6083,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-beefy", + "sp-consensus-beefy", "sp-runtime", "sp-session", "sp-staking", @@ -6080,7 +6093,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -6094,7 +6107,7 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-beefy", + "sp-consensus-beefy", "sp-core", "sp-io", "sp-runtime", @@ -6104,7 +6117,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6122,7 +6135,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6166,7 +6179,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6183,9 +6196,10 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "bitflags", + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -6212,7 +6226,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "bitflags", "parity-scale-codec", @@ -6225,7 +6239,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro2", "quote", @@ -6235,7 +6249,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6252,7 +6266,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6270,7 +6284,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6293,7 +6307,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6306,7 +6320,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6324,7 +6338,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6342,7 +6356,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6353,8 +6367,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-io", "sp-runtime", "sp-session", @@ -6365,7 +6379,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6381,7 +6395,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6401,7 +6415,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6418,7 +6432,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6432,7 +6446,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6449,7 +6463,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6466,7 +6480,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6482,7 +6496,7 @@ dependencies = [ [[package]] name = "pallet-nfts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6500,7 +6514,7 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "pallet-nfts", @@ -6511,7 +6525,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6527,7 +6541,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6544,7 +6558,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6564,7 +6578,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6575,7 +6589,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6592,7 +6606,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6616,7 +6630,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6633,7 +6647,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6648,7 +6662,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6666,7 +6680,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6681,7 +6695,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6700,7 +6714,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6717,7 +6731,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6738,7 +6752,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6754,7 +6768,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6768,7 +6782,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6791,7 +6805,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6802,7 +6816,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "log", "sp-arithmetic", @@ -6811,7 +6825,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -6820,7 +6834,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6837,7 +6851,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6866,7 +6880,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6884,7 +6898,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6903,7 +6917,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-support", "frame-system", @@ -6919,7 +6933,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6935,7 +6949,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6947,7 +6961,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6964,7 +6978,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6979,7 +6993,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6995,7 +7009,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -7010,7 +7024,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -7024,8 +7038,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -7045,8 +7059,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-benchmarking", "frame-support", @@ -7077,11 +7091,10 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", - "cumulus-client-network", "cumulus-client-service", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", @@ -7095,7 +7108,6 @@ dependencies = [ "parity-scale-codec", "polkadot-cli", "polkadot-primitives", - "polkadot-service", "sc-basic-authorship", "sc-chain-spec", "sc-cli", @@ -7103,7 +7115,7 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", - "sc-network-common", + "sc-network-sync", "sc-rpc", "sc-service", "sc-sysinfo", @@ -7119,11 +7131,8 @@ dependencies = [ "sp-core", "sp-io", "sp-keystore", - "sp-offchain", "sp-runtime", - "sp-session", "sp-timestamp", - "sp-transaction-pool", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", @@ -7215,9 +7224,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd684a725651d9588ef21f140a328b6b4f64e646b2e931f3e6f14f75eedf9980" +checksum = "df89dd8311063c54ae4e03d9aeb597b04212a57e82c339344130a9cad9b3e2d9" dependencies = [ "blake2", "crc32fast", @@ -7229,6 +7238,7 @@ dependencies = [ "memmap2", "parking_lot 0.12.1", "rand 0.8.5", + "siphasher", "snap", ] @@ -7581,8 +7591,8 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "polkadot-node-metrics", @@ -7596,8 +7606,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7610,8 +7620,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "derive_more", "fatality", @@ -7633,8 +7643,8 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "fatality", "futures", @@ -7654,10 +7664,10 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "frame-benchmarking-cli", "futures", "log", @@ -7682,8 +7692,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "frame-benchmarking", @@ -7705,13 +7715,13 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-keyring", "sp-mmr-primitives", @@ -7725,8 +7735,8 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "always-assert", "bitvec", @@ -7747,8 +7757,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "parity-scale-codec", "scale-info", @@ -7759,8 +7769,8 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "derive_more", "fatality", @@ -7784,8 +7794,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7798,8 +7808,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "futures-timer", @@ -7818,8 +7828,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "always-assert", "async-trait", @@ -7834,7 +7844,6 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-network", - "sc-network-common", "sp-consensus", "thiserror", "tracing-gum", @@ -7842,8 +7851,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "parity-scale-codec", @@ -7860,8 +7869,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "derive_more", @@ -7889,8 +7898,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "futures", @@ -7910,8 +7919,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "fatality", @@ -7929,8 +7938,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7944,8 +7953,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "futures", @@ -7964,8 +7973,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "polkadot-node-metrics", @@ -7979,8 +7988,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "futures-timer", @@ -7996,8 +8005,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "fatality", "futures", @@ -8015,8 +8024,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "futures", @@ -8032,8 +8041,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "fatality", @@ -8050,8 +8059,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "always-assert", "assert_matches", @@ -8086,8 +8095,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "polkadot-node-primitives", @@ -8102,8 +8111,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "futures", "lru 0.9.0", @@ -8117,8 +8126,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "lazy_static", "log", @@ -8135,8 +8144,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bs58", "futures", @@ -8154,8 +8163,8 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "derive_more", @@ -8169,7 +8178,6 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", - "sc-network-common", "strum", "thiserror", "tracing-gum", @@ -8177,8 +8185,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bounded-vec", "futures", @@ -8200,8 +8208,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8210,8 +8218,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "futures", @@ -8228,8 +8236,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "derive_more", @@ -8251,8 +8259,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "derive_more", @@ -8284,8 +8292,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", "futures", @@ -8307,8 +8315,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bounded-collections", "derive_more", @@ -8324,21 +8332,20 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "0.9.370" +version = "0.9.380" dependencies = [ "assert_cmd", "async-trait", "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "bridge-hub-rococo-runtime", - "clap 4.1.6", + "clap 4.1.8", "collectives-polkadot-runtime", "contracts-rococo-runtime", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", "cumulus-client-consensus-relay-chain", - "cumulus-client-network", "cumulus-client-service", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", @@ -8365,7 +8372,7 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", - "sc-network-common", + "sc-network-sync", "sc-rpc", "sc-service", "sc-sysinfo", @@ -8379,7 +8386,6 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-consensus", "sp-consensus-aura", "sp-core", "sp-io", @@ -8406,8 +8412,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -8422,8 +8428,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "hex-literal", @@ -8448,11 +8454,9 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ - "beefy-gadget", - "beefy-gadget-rpc", "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -8461,9 +8465,11 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", @@ -8480,8 +8486,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "frame-benchmarking", @@ -8546,9 +8552,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8570,8 +8576,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "frame-benchmarking", @@ -8584,7 +8590,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-beefy-mmr", "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-session", @@ -8603,7 +8608,6 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8618,8 +8622,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "polkadot-primitives", @@ -8632,8 +8636,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bs58", "parity-scale-codec", @@ -8644,8 +8648,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitflags", "bitvec", @@ -8688,11 +8692,10 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "async-trait", - "beefy-gadget", "frame-benchmarking-cli", "frame-support", "frame-system-rpc-runtime-api", @@ -8754,12 +8757,14 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", - "sc-finality-grandpa", "sc-keystore", "sc-network", "sc-network-common", + "sc-network-sync", "sc-offchain", "sc-service", "sc-sync-state-rpc", @@ -8770,13 +8775,13 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-keystore", @@ -8797,8 +8802,8 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8818,8 +8823,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8828,8 +8833,8 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8853,8 +8858,8 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8891,9 +8896,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8914,8 +8919,8 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-benchmarking", "frame-system", @@ -8941,10 +8946,9 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", + "sc-consensus-grandpa", "sc-executor", - "sc-finality-grandpa", "sc-network", - "sc-network-common", "sc-service", "sc-tracing", "sc-transaction-pool", @@ -8953,8 +8957,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-keyring", "sp-runtime", @@ -9073,10 +9077,11 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +checksum = "a3caef72a78ca8e77cbdfa87dd516ebb79d4cbe5b42e3b8435b463a8261339ff" dependencies = [ + "async-channel", "coarsetime", "crossbeam-queue", "derive_more", @@ -9089,12 +9094,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.18.1", + "toml_edit", ] [[package]] @@ -9123,9 +9128,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] @@ -9386,26 +9391,23 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] @@ -9525,11 +9527,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "region" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" dependencies = [ + "bitflags", + "libc", + "mach", "winapi", ] @@ -9629,8 +9634,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -9692,9 +9697,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -9715,8 +9720,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "polkadot-primitives", @@ -9822,6 +9827,20 @@ dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "0.35.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes 0.7.5", + "libc", + "linux-raw-sys 0.0.46", + "windows-sys 0.42.0", +] + [[package]] name = "rustix" version = "0.36.7" @@ -9830,9 +9849,9 @@ checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", - "io-lifetimes", + "io-lifetimes 1.0.2", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.3", "windows-sys 0.42.0", ] @@ -9935,7 +9954,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "log", "sp-core", @@ -9946,7 +9965,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -9959,6 +9978,7 @@ dependencies = [ "prost-build", "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", "sp-api", "sp-authority-discovery", @@ -9973,7 +9993,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "futures-timer", @@ -9996,7 +10016,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10006,28 +10026,31 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "memmap2", "sc-chain-spec-derive", - "sc-network-common", + "sc-client-api", + "sc-executor", + "sc-network", "sc-telemetry", "serde", "serde_json", + "sp-blockchain", "sp-core", "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10038,11 +10061,11 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "chrono", - "clap 4.1.6", + "clap 4.1.8", "fdlimit", "futures", "libp2p", @@ -10078,7 +10101,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "fnv", "futures", @@ -10104,7 +10127,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "hash-db", "kvdb", @@ -10130,7 +10153,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -10155,7 +10178,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -10184,7 +10207,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "fork-tree", @@ -10223,7 +10246,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "jsonrpsee", @@ -10242,10 +10265,64 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "array-bytes 4.2.0", + "async-trait", + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-network-sync", + "sc-utils", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10255,10 +10332,70 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-consensus-grandpa" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "ahash 0.8.2", + "array-bytes 4.2.0", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "finality-grandpa", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -10281,7 +10418,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10299,46 +10436,46 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi 0.13.0", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument 0.3.0", - "wasmi 0.13.0", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "log", "sc-allocator", "sc-executor-common", "sp-runtime-interface", "sp-wasm-interface", - "wasmi 0.13.0", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix", + "rustix 0.36.7", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -10346,76 +10483,17 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sc-finality-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "ahash 0.8.2", - "array-bytes 4.2.0", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ansi_term", "futures", "futures-timer", "log", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", @@ -10424,7 +10502,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10439,12 +10517,12 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", + "async-channel", "async-trait", "asynchronous-codec", - "backtrace", "bytes", "either", "fnv", @@ -10452,6 +10530,7 @@ dependencies = [ "futures-timer", "ip_network", "libp2p", + "linked_hash_set", "log", "lru 0.8.1", "mockall", @@ -10482,7 +10561,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "cid", "futures", @@ -10491,6 +10570,7 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", @@ -10501,33 +10581,35 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ + "array-bytes 4.2.0", "async-trait", "bitflags", "bytes", "futures", "futures-timer", "libp2p", - "linked_hash_set", "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", + "sc-utils", "serde", "smallvec", "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ahash 0.8.2", "futures", @@ -10535,6 +10617,7 @@ dependencies = [ "libp2p", "log", "lru 0.8.1", + "sc-network", "sc-network-common", "sc-peerset", "sp-runtime", @@ -10545,7 +10628,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10555,6 +10638,7 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sp-blockchain", @@ -10566,12 +10650,13 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "async-trait", "fork-tree", "futures", + "futures-timer", "libp2p", "log", "lru 0.8.1", @@ -10581,6 +10666,7 @@ dependencies = [ "prost-build", "sc-client-api", "sc-consensus", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -10588,8 +10674,8 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -10598,7 +10684,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10606,6 +10692,7 @@ dependencies = [ "log", "parity-scale-codec", "pin-project", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -10617,7 +10704,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10633,6 +10720,7 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -10647,7 +10735,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "libp2p", @@ -10660,7 +10748,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10669,7 +10757,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "jsonrpsee", @@ -10699,7 +10787,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10718,7 +10806,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "http", "jsonrpsee", @@ -10733,7 +10821,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10759,7 +10847,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "directories", @@ -10825,7 +10913,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "log", "parity-scale-codec", @@ -10836,12 +10924,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", + "fs4", "futures", "log", - "nix 0.26.2", "sc-client-db", "sc-utils", "sp-core", @@ -10852,7 +10940,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10860,7 +10948,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-finality-grandpa", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", @@ -10871,7 +10959,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "libc", @@ -10890,7 +10978,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "chrono", "futures", @@ -10909,7 +10997,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ansi_term", "atty", @@ -10940,7 +11028,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10951,7 +11039,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -10978,7 +11066,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -10992,15 +11080,16 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ - "backtrace", + "async-channel", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", + "sp-arithmetic", ] [[package]] @@ -11427,6 +11516,12 @@ dependencies = [ "wide", ] +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + [[package]] name = "slab" version = "0.4.5" @@ -11441,8 +11536,8 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "enumn", "parity-scale-codec", @@ -11519,7 +11614,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "hash-db", "log", @@ -11537,9 +11632,11 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ + "Inflector", "blake2", + "expander 1.0.0", "proc-macro-crate", "proc-macro2", "quote", @@ -11549,7 +11646,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11562,7 +11659,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "integer-sqrt", "num-traits", @@ -11576,7 +11673,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11586,29 +11683,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "lazy_static", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", - "strum", -] - [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -11620,7 +11698,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "log", @@ -11638,25 +11716,22 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-version", "thiserror", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "parity-scale-codec", @@ -11674,7 +11749,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "merlin", @@ -11694,10 +11769,47 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "sp-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", + "strum", +] + +[[package]] +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11709,7 +11821,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11722,7 +11834,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11765,9 +11877,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.3", "sha2 0.10.2", @@ -11779,7 +11891,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro2", "quote", @@ -11790,7 +11902,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11799,7 +11911,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro2", "quote", @@ -11809,7 +11921,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "environmental", "parity-scale-codec", @@ -11817,28 +11929,10 @@ dependencies = [ "sp-storage", ] -[[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11853,7 +11947,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "bytes", "ed25519", @@ -11878,7 +11972,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "lazy_static", "sp-core", @@ -11889,7 +11983,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures", @@ -11906,7 +12000,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "thiserror", "zstd", @@ -11915,7 +12009,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11933,7 +12027,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11947,7 +12041,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "sp-api", "sp-core", @@ -11957,7 +12051,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "backtrace", "lazy_static", @@ -11967,7 +12061,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "rustc-hash", "serde", @@ -11977,7 +12071,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "either", "hash256-std-hasher", @@ -11999,7 +12093,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12017,7 +12111,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "Inflector", "proc-macro-crate", @@ -12029,7 +12123,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "serde", "serde_json", @@ -12038,7 +12132,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -12052,7 +12146,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -12064,7 +12158,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "hash-db", "log", @@ -12084,12 +12178,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12102,7 +12196,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "futures-timer", @@ -12117,7 +12211,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "sp-std", @@ -12129,7 +12223,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "sp-api", "sp-runtime", @@ -12138,7 +12232,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "log", @@ -12154,7 +12248,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ahash 0.8.2", "hash-db", @@ -12177,7 +12271,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12194,7 +12288,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12205,21 +12299,21 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi 0.13.0", + "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -12279,6 +12373,7 @@ name = "statemine-runtime" version = "2.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -12345,6 +12440,7 @@ name = "statemint-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -12527,7 +12623,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "platforms", ] @@ -12535,7 +12631,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12554,7 +12650,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "hyper", "log", @@ -12566,7 +12662,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", "jsonrpsee", @@ -12579,7 +12675,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "jsonrpsee", "log", @@ -12598,7 +12694,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12624,7 +12720,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12634,7 +12730,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12645,7 +12741,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "ansi_term", "build-helper", @@ -12676,9 +12772,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -12732,16 +12828,15 @@ checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix 0.36.7", + "windows-sys 0.42.0", ] [[package]] @@ -12761,8 +12856,8 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "polkadot-primitives", @@ -12942,9 +13037,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -12957,7 +13052,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -13039,16 +13134,10 @@ checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.1", - "toml_edit 0.19.3", + "toml_datetime", + "toml_edit", ] -[[package]] -name = "toml_datetime" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" - [[package]] name = "toml_datetime" version = "0.6.1" @@ -13058,17 +13147,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" -dependencies = [ - "indexmap", - "nom8", - "toml_datetime 0.5.1", -] - [[package]] name = "toml_edit" version = "0.19.3" @@ -13079,7 +13157,7 @@ dependencies = [ "nom8", "serde", "serde_spanned", - "toml_datetime 0.6.1", + "toml_datetime", ] [[package]] @@ -13169,8 +13247,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -13180,8 +13258,8 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -13236,9 +13314,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.25.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920" +checksum = "634d75c77ea43f2ad8ea9d9c58de49dfc9c3995bdef32b503df7883ff054e7f1" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -13249,9 +13327,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -13311,10 +13389,10 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#fbddfbd76c60c6fda0024e8a44e82ad776033e4b" +source = "git+https://github.com/paritytech/substrate?branch=master#36ed84069343c55ec4280b2d3cc49c49e3b019d2" dependencies = [ "async-trait", - "clap 4.1.6", + "clap 4.1.8", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -13716,13 +13794,13 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc13b3c219ca9aafeec59150d80d89851df02e0061bc357b4d66fc55a8d38787" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ "parity-wasm", "wasmi-validation", - "wasmi_core 0.2.0", + "wasmi_core 0.2.1", ] [[package]] @@ -13754,15 +13832,16 @@ checksum = "a1ea379cbb0b41f3a9f0bf7b47036d036aae7f43383d8cc487d4deccf40dee0a" [[package]] name = "wasmi_core" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a088e8c4c59c6f2b9eae169bf86328adccc477c00b56d3661e3e9fb397b184" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", "libm", "memory_units", "num-rational", "num-traits", + "region", ] [[package]] @@ -13797,9 +13876,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9010891d0b8e367c3be94ca35d7bc25c1de3240463bb1d61bcfc8c2233c4e0d0" +checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632" dependencies = [ "anyhow", "bincode", @@ -13825,18 +13904,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65805c663eaa8257b910666f6d4b056b5c7329750da754ba5df54f3af7dbf35c" +checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2049ddfc1b10efc3c5591d0e84b9570ca50478f8818f3bfabb1a467918f53fb4" +checksum = "b389ae9b678b9c3851091a4804f4182d688d27aff7abc9aa37fa7be37d8ecffa" dependencies = [ "anyhow", "base64", @@ -13844,7 +13923,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix", + "rustix 0.36.7", "serde", "sha2 0.10.2", "toml 0.5.10", @@ -13854,9 +13933,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9065cad6a724fa838ec8497567e0b23acc26417bb2449f8d9d2021925c72f2" +checksum = "59b2c92a08c0db6efffd88fdc97d7aa9c7c63b03edb0971dbca745469f820e8c" dependencies = [ "anyhow", "cranelift-codegen", @@ -13875,9 +13954,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f964bb0b91fa021b8d1b488c62cc77b346c1dae6e3ebd010050b57c1f2ca657" +checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883" dependencies = [ "anyhow", "cranelift-entity", @@ -13894,9 +13973,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a1d06f5d109539e0168fc74fa65e3948ac8dac3bb8cdbd08b62b36a0ae27b8" +checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -13918,20 +13997,20 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76ef2e410329aaf8555ac6571d6fe07711be0646dcdf7ff3ab750a42ed2e583" +checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix", + "rustix 0.36.7", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1fd0f0dd79e7cc0f55b102e320d7c77ab76cd272008a8fd98e25b5777e2636" +checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064" dependencies = [ "cfg-if", "libc", @@ -13940,9 +14019,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271aef9b4ca2e953a866293683f2db33cda46f6933c5e431e68d8373723d4ab6" +checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d" dependencies = [ "anyhow", "cc", @@ -13955,7 +14034,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix", + "rustix 0.36.7", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13964,9 +14043,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18144b0e45479a830ac9fcebfc71a16d90dc72d8ebd5679700eb3bfe974d7df" +checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2" dependencies = [ "cranelift-entity", "serde", @@ -14236,8 +14315,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bitvec", "frame-benchmarking", @@ -14304,9 +14383,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -14328,8 +14407,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "polkadot-primitives", @@ -14345,6 +14424,7 @@ name = "westmint-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -14511,19 +14591,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" @@ -14545,9 +14649,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" @@ -14569,9 +14673,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" @@ -14593,9 +14697,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" @@ -14617,15 +14721,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" @@ -14647,9 +14751,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winreg" @@ -14730,8 +14834,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "bounded-collections", "derivative", @@ -14746,8 +14850,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "frame-support", "frame-system", @@ -14767,8 +14871,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "environmental", "frame-benchmarking", @@ -14787,8 +14891,8 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#a1ceba005eecee10490b2dc5ee5169cb41282c39" +version = "0.9.39" +source = "git+https://github.com/paritytech/polkadot?branch=master#6282def1bb053858522cf551b86b2d07aad04f29" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index a4b817ffe87..acb6ae62f72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ members = [ "parachains/runtimes/testing/rococo-parachain", "parachains/runtimes/starters/shell", "parachains/runtimes/starters/seedling", + "parachains/runtimes/assets/common", "parachains/runtimes/assets/statemint", "parachains/runtimes/assets/statemine", "parachains/runtimes/assets/westmint", diff --git a/README.md b/README.md index b78d7fdd2b6..d1828eafce1 100644 --- a/README.md +++ b/README.md @@ -37,20 +37,71 @@ and treat as best. A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is implemented by the `polkadot-parachain` binary (previously called `polkadot-collator`). +### Relay Chain Interaction +To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be +achieved in one of two ways: +1. Run a full relay chain node within the parachain node (default) +2. Connect to an external relay chain node via WebSocket RPC + +#### In-process Relay Chain Node +If an external relay chain node is not specified (default behavior), then a full relay chain node is +spawned within the same process. + +This node has all of the typical components of a regular Polkadot node and will have to fully sync +with the relay chain to work. + +##### Example command +```shell= +polkadot-parachain \ + --chain parachain-chainspec.json \ + --tmp \ + -- \ + --chain relaychain-chainspec.json +``` + +#### External Relay Chain Node +An external relay chain node is connected via WebsSocket RPC by using the `--relay-chain-rpc-urls` +command line argument. This option accepts one or more space-separated WebSocket URLs to a full relay +chain node. By default, only the first URL will be used, with the rest as a backup in case the +connection to the first node is lost. + +Parachain nodes using this feature won't have to fully sync with the relay chain to work, so in general +they will use fewer system resources. + +**Note:** At this time, any parachain nodes using this feature will still spawn a significantly cut-down +relay chain node in-process. Even though they lack the majority of normal Polkadot subsystems, they +will still need to connect directly to the relay chain network. +##### Example command +```shell= +polkadot-parachain \ + --chain parachain-chainspec.json \ + --tmp \ + --relay-chain-rpc-urls \ + "ws://relaychain-rpc-endpoint:9944" \ + "ws://relaychain-rpc-endpoint-backup:9944" \ + -- \ + --chain relaychain-chainspec.json +``` + ## Installation and Setup -Before building Cumulus SDK based nodes / runtimes prepare your environment by following Substrate [installation instructions](https://docs.substrate.io/main-docs/install/). +Before building Cumulus SDK based nodes / runtimes prepare your environment by following Substrate +[installation instructions](https://docs.substrate.io/main-docs/install/). -To launch a local network, you can use [zombienet](https://github.com/paritytech/zombienet) for quick setup and experimentation or follow the [manual setup](#manual-setup). +To launch a local network, you can use [zombienet](https://github.com/paritytech/zombienet) for +quick setup and experimentation or follow the [manual setup](#manual-setup). ### Zombienet -We use Zombienet to spin up networks for integration tests and local networks. Follow [these installation steps](https://github.com/paritytech/zombienet#requirements-by-provider) to set it up on your machine. -A simple network specification with two relay chain nodes and one collator is located at [zombienet/examples/small_network.toml](zombienet/examples/small_network.toml). +We use Zombienet to spin up networks for integration tests and local networks. +Follow [these installation steps](https://github.com/paritytech/zombienet#requirements-by-provider) +to set it up on your machine. A simple network specification with two relay chain nodes and one collator is +located at [zombienet/examples/small_network.toml](zombienet/examples/small_network.toml). #### Which provider should I use? Zombienet offers multiple providers to run networks. Choose the one that best fits your needs: - **Podman:** Choose this if you want to spin up a network quick and easy. -- **Native:** Choose this if you want to develop and deploy your changes. Requires compilation of the binaries. +- **Native:** Choose this if you want to develop and deploy your changes. Requires compilation +of the binaries. - **Kubernetes:** Choose this for advanced use-cases or running on cloud-infrastructure. #### How to run @@ -150,7 +201,12 @@ See [the `bridge-hubs` readme](parachains/runtimes/bridge-hubs/README.md) for de ## Rococo 👑 -[Rococo](https://polkadot.js.org/apps/?rpc=wss://rococo-rpc.polkadot.io) is becoming a [Community Parachain Testbed](https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/) for parachain teams in the Polkadot ecosystem. It supports multiple parachains with the differentiation of long-term connections and recurring short-term connections, to see which parachains are currently connected and how long they will be connected for [see here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains). +[Rococo](https://polkadot.js.org/apps/?rpc=wss://rococo-rpc.polkadot.io) is becoming a +[Community Parachain Testbed](https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/) +for parachain teams in the Polkadot ecosystem. It supports multiple parachains with the +differentiation of long-term connections and recurring short-term connections, to see which +parachains are currently connected and how long they will be connected for +[see here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains). Rococo is an elaborate style of design and the name describes the painstaking effort that has gone into this project. diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index e45d367f7d8..1cf1746137a 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -clap = { version = "4.1.6", features = ["derive"] } +clap = { version = "4.1.8", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0" } url = "2.3.1" diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 92eed4351e8..43da4f61b81 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.63" +async-trait = "0.1.66" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } futures = "0.3.26" tracing = "0.1.37" diff --git a/client/consensus/common/Cargo.toml b/client/consensus/common/Cargo.toml index 913e63cfbdc..ffcc229999c 100644 --- a/client/consensus/common/Cargo.toml +++ b/client/consensus/common/Cargo.toml @@ -6,9 +6,9 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.63" +async-trait = "0.1.66" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } -dyn-clone = "1.0.10" +dyn-clone = "1.0.11" futures = "0.3.26" log = "0.4.17" tracing = "0.1.37" diff --git a/client/consensus/common/src/lib.rs b/client/consensus/common/src/lib.rs index 0e5567c6d2e..86a781adc01 100644 --- a/client/consensus/common/src/lib.rs +++ b/client/consensus/common/src/lib.rs @@ -140,7 +140,6 @@ where async fn import_block( &mut self, mut params: sc_consensus::BlockImportParams, - cache: std::collections::HashMap>, ) -> Result { // Blocks are stored within the backend by using POST hash. let hash = params.post_hash(); @@ -158,7 +157,7 @@ where monitor.release_mutex() }); - let res = self.inner.import_block(params, cache).await?; + let res = self.inner.import_block(params).await?; if let (Some(mut monitor_lock), ImportResult::Imported(_)) = (maybe_lock, &res) { let mut monitor = monitor_lock.upgrade(); diff --git a/client/consensus/common/src/parachain_consensus.rs b/client/consensus/common/src/parachain_consensus.rs index 17e07fb3b91..734f682d25b 100644 --- a/client/consensus/common/src/parachain_consensus.rs +++ b/client/consensus/common/src/parachain_consensus.rs @@ -456,7 +456,7 @@ where block_import_params.fork_choice = Some(ForkChoiceStrategy::Custom(true)); block_import_params.import_existing = true; - if let Err(err) = (&*parachain).import_block(block_import_params, Default::default()).await { + if let Err(err) = (&*parachain).import_block(block_import_params).await { tracing::warn!( target: LOG_TARGET, block_hash = ?hash, diff --git a/client/consensus/common/src/tests.rs b/client/consensus/common/src/tests.rs index ba596e2d2c5..e44c26e85d1 100644 --- a/client/consensus/common/src/tests.rs +++ b/client/consensus/common/src/tests.rs @@ -248,7 +248,7 @@ async fn import_block>( block_import_params.body = Some(body); block_import_params.post_digests.push(post_digest); - importer.import_block(block_import_params, Default::default()).await.unwrap(); + importer.import_block(block_import_params).await.unwrap(); } fn import_block_sync>( @@ -508,7 +508,7 @@ fn follow_new_best_sets_best_after_it_is_imported() { block_import_params.body = Some(body); // Now import the unkown block to make it "known" - client.import_block(block_import_params, Default::default()).await.unwrap(); + client.import_block(block_import_params).await.unwrap(); loop { Delay::new(Duration::from_millis(100)).await; diff --git a/client/consensus/relay-chain/Cargo.toml b/client/consensus/relay-chain/Cargo.toml index e085536ab5b..7cb6c5e4957 100644 --- a/client/consensus/relay-chain/Cargo.toml +++ b/client/consensus/relay-chain/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.63" +async-trait = "0.1.66" futures = "0.3.26" parking_lot = "0.12.1" tracing = "0.1.37" diff --git a/client/consensus/relay-chain/src/import_queue.rs b/client/consensus/relay-chain/src/import_queue.rs index 4bfefed26b4..ba082574328 100644 --- a/client/consensus/relay-chain/src/import_queue.rs +++ b/client/consensus/relay-chain/src/import_queue.rs @@ -25,7 +25,7 @@ use sc_consensus::{ use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::Result as ClientResult; -use sp_consensus::{error::Error as ConsensusError, CacheKeyId}; +use sp_consensus::error::Error as ConsensusError; use sp_inherents::{CreateInherentDataProviders, InherentDataProvider}; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; @@ -54,13 +54,13 @@ where async fn verify( &mut self, mut block_params: BlockImportParams, - ) -> Result<(BlockImportParams, Option)>>), String> { + ) -> Result, String> { // Skip checks that include execution, if being told so, or when importing only state. // // This is done for example when gap syncing and it is expected that the block after the gap // was checked/chosen properly, e.g. by warp syncing to this block using a finality proof. if block_params.state_action.skip_execution_checks() || block_params.with_state() { - return Ok((block_params, Default::default())) + return Ok(block_params) } if let Some(inner_body) = block_params.body.take() { @@ -101,7 +101,7 @@ where block_params.post_hash = Some(block_params.header.hash()); - Ok((block_params, None)) + Ok(block_params) } } diff --git a/client/consensus/relay-chain/src/lib.rs b/client/consensus/relay-chain/src/lib.rs index 0891514ae77..a31a9ec8b2a 100644 --- a/client/consensus/relay-chain/src/lib.rs +++ b/client/consensus/relay-chain/src/lib.rs @@ -197,13 +197,7 @@ where sc_consensus::StorageChanges::Changes(storage_changes), ); - if let Err(err) = self - .block_import - .lock() - .await - .import_block(block_import_params, Default::default()) - .await - { + if let Err(err) = self.block_import.lock().await.import_block(block_import_params).await { tracing::error!( target: LOG_TARGET, at = ?parent.hash(), diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 05a55ed8b03..a7046d09189 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -6,7 +6,7 @@ description = "Cumulus-specific networking protocol" edition = "2021" [dependencies] -async-trait = "0.1.63" +async-trait = "0.1.66" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } futures = "0.3.26" futures-timer = "3.0.2" @@ -31,7 +31,7 @@ cumulus-relay-chain-interface = { path = "../relay-chain-interface" } [dev-dependencies] portpicker = "0.1.1" -tokio = { version = "1.25.0", features = ["macros"] } +tokio = { version = "1.26.0", features = ["macros"] } url = "2.3.1" # Substrate diff --git a/client/pov-recovery/Cargo.toml b/client/pov-recovery/Cargo.toml index 04be9dcc8af..0bf2678e925 100644 --- a/client/pov-recovery/Cargo.toml +++ b/client/pov-recovery/Cargo.toml @@ -28,10 +28,10 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = # Cumulus cumulus-primitives-core = { path = "../../primitives/core" } cumulus-relay-chain-interface = {path = "../relay-chain-interface"} -async-trait = "0.1.64" +async-trait = "0.1.66" [dev-dependencies] -tokio = { version = "1.25.0", features = ["macros"] } +tokio = { version = "1.26.0", features = ["macros"] } portpicker = "0.1.1" # Cumulus diff --git a/client/relay-chain-inprocess-interface/Cargo.toml b/client/relay-chain-inprocess-interface/Cargo.toml index 555489df30c..621293ba618 100644 --- a/client/relay-chain-inprocess-interface/Cargo.toml +++ b/client/relay-chain-inprocess-interface/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2021" [dependencies] -async-trait = "0.1.63" +async-trait = "0.1.66" futures = "0.3.26" futures-timer = "3.0.2" @@ -38,7 +38,7 @@ sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master # Polkadot polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-test-client = { git = "https://github.com/paritytech/polkadot", branch = "master" } -metered = { package = "prioritized-metered-channel", version = "0.2.0" } +metered = { package = "prioritized-metered-channel", version = "0.4.0" } # Cumulus cumulus-test-service = { path = "../../test/service" } diff --git a/client/relay-chain-inprocess-interface/src/lib.rs b/client/relay-chain-inprocess-interface/src/lib.rs index 3aa1fbe55a3..f230a23bd25 100644 --- a/client/relay-chain-inprocess-interface/src/lib.rs +++ b/client/relay-chain-inprocess-interface/src/lib.rs @@ -367,13 +367,13 @@ pub fn build_inprocess_relay_chain( parachain_config, telemetry_worker_handle, hwbench, - )?; + ) + .map_err(|e| RelayChainError::Application(Box::new(e) as Box<_>))?; - let sync_oracle: Arc = Arc::new(full_node.network.clone()); let relay_chain_interface_builder = RelayChainInProcessInterfaceBuilder { polkadot_client: full_node.client.clone(), backend: full_node.backend.clone(), - sync_oracle, + sync_oracle: full_node.sync_service.clone(), overseer_handle: full_node.overseer_handle.clone().ok_or(RelayChainError::GenericError( "Overseer not running in full node.".to_string(), ))?, diff --git a/client/relay-chain-interface/Cargo.toml b/client/relay-chain-interface/Cargo.toml index 5f637129a7a..20816c8a689 100644 --- a/client/relay-chain-interface/Cargo.toml +++ b/client/relay-chain-interface/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } cumulus-primitives-core = { path = "../../primitives/core" } @@ -15,9 +14,8 @@ sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "mas sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.25.0", features = ["sync"] } futures = "0.3.26" -async-trait = "0.1.63" +async-trait = "0.1.66" thiserror = "1.0.38" jsonrpsee-core = "0.16.2" parity-scale-codec = "3.4.0" diff --git a/client/relay-chain-interface/src/lib.rs b/client/relay-chain-interface/src/lib.rs index 01ebe9f5d8a..db4fd24c64f 100644 --- a/client/relay-chain-interface/src/lib.rs +++ b/client/relay-chain-interface/src/lib.rs @@ -17,7 +17,6 @@ use std::{collections::BTreeMap, pin::Pin, sync::Arc}; use polkadot_overseer::prometheus::PrometheusError; -use polkadot_service::SubstrateServiceError; use sc_client_api::StorageProof; use futures::Stream; @@ -61,10 +60,8 @@ pub enum RelayChainError { WorkerCommunicationError(String), #[error("Scale codec deserialization error: {0}")] DeserializationError(CodecError), - #[error("Polkadot service error: {0}")] - ServiceError(#[from] polkadot_service::Error), - #[error("Substrate service error: {0}")] - SubServiceError(#[from] SubstrateServiceError), + #[error(transparent)] + Application(#[from] Box), #[error("Prometheus error: {0}")] PrometheusError(#[from] PrometheusError), #[error("Unspecified error occured: {0}")] diff --git a/client/relay-chain-minimal-node/Cargo.toml b/client/relay-chain-minimal-node/Cargo.toml index 5cdbd405a23..a41b8fb737b 100644 --- a/client/relay-chain-minimal-node/Cargo.toml +++ b/client/relay-chain-minimal-node/Cargo.toml @@ -17,15 +17,10 @@ polkadot-network-bridge = { git = "https://github.com/paritytech/polkadot", bran # substrate deps sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -40,7 +35,6 @@ cumulus-primitives-core = { path = "../../primitives/core" } array-bytes = "6.0" lru = "0.9" tracing = "0.1.37" -async-trait = "0.1.63" +async-trait = "0.1.66" futures = "0.3.26" -url = "2.2.2" -tokio = { version = "1.25.0", features = ["macros"] } +tokio = { version = "1.26.0", features = ["macros"] } diff --git a/client/relay-chain-minimal-node/src/blockchain_rpc_client.rs b/client/relay-chain-minimal-node/src/blockchain_rpc_client.rs index e13a689c0dd..eb7e80d51a0 100644 --- a/client/relay-chain-minimal-node/src/blockchain_rpc_client.rs +++ b/client/relay-chain-minimal-node/src/blockchain_rpc_client.rs @@ -21,12 +21,11 @@ use cumulus_relay_chain_rpc_interface::RelayChainRpcClient; use futures::{Future, Stream, StreamExt}; use polkadot_core_primitives::{Block, CandidateHash, Hash, Header}; use polkadot_overseer::RuntimeApiSubsystemClient; -use polkadot_primitives::{vstaging, SessionIndex, ValidatorId}; -use polkadot_service::{AuxStore, HeaderBackend}; +use polkadot_primitives::vstaging; use sc_authority_discovery::AuthorityDiscovery; - use sp_api::{ApiError, RuntimeApiInfo}; -use sp_blockchain::Info; +use sp_blockchain::{HeaderBackend, Info}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; #[derive(Clone)] pub struct BlockChainRpcClient { @@ -47,34 +46,12 @@ impl BlockChainRpcClient { pub async fn block_get_hash( &self, - number: Option, + number: Option, ) -> Result, RelayChainError> { self.rpc_client.chain_get_block_hash(number).await } } -// Implementation required by Availability-Distribution subsystem -// but never called in our case. -impl AuxStore for BlockChainRpcClient { - fn insert_aux< - 'a, - 'b: 'a, - 'c: 'a, - I: IntoIterator, - D: IntoIterator, - >( - &self, - _insert: I, - _delete: D, - ) -> sp_blockchain::Result<()> { - unimplemented!("Not supported on the RPC collator") - } - - fn get_aux(&self, _key: &[u8]) -> sp_blockchain::Result>> { - unimplemented!("Not supported on the RPC collator") - } -} - #[async_trait::async_trait] impl RuntimeApiSubsystemClient for BlockChainRpcClient { async fn validators( @@ -258,7 +235,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient { &self, at: Hash, session_index: polkadot_primitives::SessionIndex, - ) -> Result, sp_api::ApiError> { + ) -> Result, sp_api::ApiError> { Ok(self .rpc_client .parachain_host_session_executor_params(at, session_index) @@ -331,14 +308,21 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient { async fn unapplied_slashes( &self, at: Hash, - ) -> Result, ApiError> { + ) -> Result< + Vec<( + polkadot_primitives::SessionIndex, + polkadot_primitives::CandidateHash, + vstaging::slashing::PendingSlashes, + )>, + ApiError, + > { Ok(Vec::new()) } async fn key_ownership_proof( &self, at: Hash, - validator_id: ValidatorId, + validator_id: polkadot_primitives::ValidatorId, ) -> Result, ApiError> { Ok(None) } @@ -386,8 +370,8 @@ fn block_local(fut: impl Future) -> T { impl HeaderBackend for BlockChainRpcClient { fn header( &self, - hash: ::Hash, - ) -> sp_blockchain::Result::Header>> { + hash: ::Hash, + ) -> sp_blockchain::Result::Header>> { Ok(block_local(self.rpc_client.chain_get_header(Some(hash)))?) } @@ -416,7 +400,7 @@ impl HeaderBackend for BlockChainRpcClient { fn status( &self, - hash: ::Hash, + hash: ::Hash, ) -> sp_blockchain::Result { if self.header(hash)?.is_some() { Ok(sc_client_api::blockchain::BlockStatus::InChain) @@ -427,10 +411,8 @@ impl HeaderBackend for BlockChainRpcClient { fn number( &self, - hash: ::Hash, - ) -> sp_blockchain::Result< - Option<<::Header as polkadot_service::HeaderT>::Number>, - > { + hash: ::Hash, + ) -> sp_blockchain::Result::Header as HeaderT>::Number>> { let result = block_local(self.rpc_client.chain_get_header(Some(hash)))? .map(|maybe_header| maybe_header.number); Ok(result) @@ -438,8 +420,8 @@ impl HeaderBackend for BlockChainRpcClient { fn hash( &self, - number: polkadot_service::NumberFor, - ) -> sp_blockchain::Result::Hash>> { + number: NumberFor, + ) -> sp_blockchain::Result::Hash>> { Ok(block_local(self.rpc_client.chain_get_block_hash(number.into()))?) } } diff --git a/client/relay-chain-minimal-node/src/collator_overseer.rs b/client/relay-chain-minimal-node/src/collator_overseer.rs index 4f2c3adeb61..dce68e3b1f6 100644 --- a/client/relay-chain-minimal-node/src/collator_overseer.rs +++ b/client/relay-chain-minimal-node/src/collator_overseer.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use cumulus_relay_chain_interface::RelayChainError; +use futures::{select, StreamExt}; use lru::LruCache; +use std::sync::Arc; + use polkadot_node_network_protocol::{ peer_set::PeerSetProtocolNames, request_response::{ @@ -25,8 +27,8 @@ use polkadot_node_network_protocol::{ }; use polkadot_node_subsystem_util::metrics::{prometheus::Registry, Metrics}; use polkadot_overseer::{ - BlockInfo, DummySubsystem, MetricsTrait, Overseer, OverseerHandle, OverseerMetrics, SpawnGlue, - KNOWN_LEAVES_CACHE_SIZE, + BlockInfo, DummySubsystem, Handle, MetricsTrait, Overseer, OverseerHandle, OverseerMetrics, + SpawnGlue, KNOWN_LEAVES_CACHE_SIZE, }; use polkadot_primitives::CollatorPair; use polkadot_service::{ @@ -37,18 +39,16 @@ use polkadot_service::{ }, Error, OverseerConnector, }; + use sc_authority_discovery::Service as AuthorityDiscoveryService; use sc_network::NetworkStateInfo; - -use std::sync::Arc; +use sc_service::TaskManager; +use sp_runtime::traits::Block as BlockT; use cumulus_primitives_core::relay_chain::{Block, Hash as PHash}; - -use polkadot_service::{Handle, TaskManager}; +use cumulus_relay_chain_interface::RelayChainError; use crate::BlockChainRpcClient; -use futures::{select, StreamExt}; -use sp_runtime::traits::Block as BlockT; /// Arguments passed for overseer construction. pub(crate) struct CollatorOverseerGenArgs<'a> { @@ -56,6 +56,8 @@ pub(crate) struct CollatorOverseerGenArgs<'a> { pub runtime_client: Arc, /// Underlying network service implementation. pub network_service: Arc>, + /// Syncing oracle. + pub sync_oracle: Box, /// Underlying authority discovery service. pub authority_discovery_service: AuthorityDiscoveryService, /// Receiver for collation request protocol @@ -79,6 +81,7 @@ fn build_overseer<'a>( CollatorOverseerGenArgs { runtime_client, network_service, + sync_oracle, authority_discovery_service, collation_req_receiver, available_data_req_receiver, @@ -92,7 +95,6 @@ fn build_overseer<'a>( (Overseer, Arc>, OverseerHandle), Error, > { - let leaves = Vec::new(); let metrics = ::register(registry)?; let spawner = SpawnGlue(spawner); let network_bridge_metrics: NetworkBridgeMetrics = Metrics::register(registry)?; @@ -122,7 +124,7 @@ fn build_overseer<'a>( .network_bridge_rx(NetworkBridgeRxSubsystem::new( network_service.clone(), authority_discovery_service.clone(), - Box::new(network_service.clone()), + sync_oracle, network_bridge_metrics.clone(), peer_set_protocol_names.clone(), )) @@ -146,11 +148,6 @@ fn build_overseer<'a>( .dispute_coordinator(DummySubsystem) .dispute_distribution(DummySubsystem) .chain_selection(DummySubsystem) - .leaves(Vec::from_iter( - leaves - .into_iter() - .map(|BlockInfo { hash, parent_hash: _, number }| (hash, number)), - )) .activation_external_listeners(Default::default()) .span_per_active_leaf(Default::default()) .active_leaves(Default::default()) diff --git a/client/relay-chain-minimal-node/src/lib.rs b/client/relay-chain-minimal-node/src/lib.rs index e47b3c576e5..c5c2c2fd6e9 100644 --- a/client/relay-chain-minimal-node/src/lib.rs +++ b/client/relay-chain-minimal-node/src/lib.rs @@ -28,15 +28,12 @@ use polkadot_node_subsystem_util::metrics::prometheus::Registry; use polkadot_primitives::CollatorPair; use sc_authority_discovery::Service as AuthorityDiscoveryService; -use sc_network::{Event, NetworkService}; -use sc_network_common::service::NetworkEventStream; -use std::sync::Arc; - -use polkadot_service::{Configuration, TaskManager}; +use sc_network::{Event, NetworkEventStream, NetworkService}; +use sc_service::{Configuration, TaskManager}; +use sp_runtime::{app_crypto::Pair, traits::Block as BlockT}; use futures::StreamExt; - -use sp_runtime::{app_crypto::Pair, traits::Block as BlockT}; +use std::sync::Arc; mod collator_overseer; @@ -152,13 +149,14 @@ async fn new_minimal_relay_chain( let (collation_req_receiver, available_data_req_receiver) = build_request_response_protocol_receivers(&request_protocol_names, &mut config); - let (network, network_starter) = + let (network, network_starter, sync_oracle) = network::build_collator_network(network::BuildCollatorNetworkParams { config: &config, client: relay_chain_rpc_client.clone(), spawn_handle: task_manager.spawn_handle(), genesis_hash, - })?; + }) + .map_err(|e| RelayChainError::Application(Box::new(e) as Box<_>))?; let authority_discovery_service = build_authority_discovery_service( &task_manager, @@ -171,6 +169,7 @@ async fn new_minimal_relay_chain( let overseer_args = CollatorOverseerGenArgs { runtime_client: relay_chain_rpc_client.clone(), network_service: network.clone(), + sync_oracle, authority_discovery_service, collation_req_receiver, available_data_req_receiver, @@ -185,7 +184,8 @@ async fn new_minimal_relay_chain( overseer_args, &task_manager, relay_chain_rpc_client.clone(), - )?; + ) + .map_err(|e| RelayChainError::Application(Box::new(e) as Box<_>))?; network_starter.start_network(); diff --git a/client/relay-chain-minimal-node/src/network.rs b/client/relay-chain-minimal-node/src/network.rs index 9c58ab35847..0a4ace78ca5 100644 --- a/client/relay-chain-minimal-node/src/network.rs +++ b/client/relay-chain-minimal-node/src/network.rs @@ -15,24 +15,17 @@ // along with Cumulus. If not, see . use polkadot_core_primitives::{Block, Hash}; -use polkadot_service::{BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; -use polkadot_node_network_protocol::PeerId; -use sc_network::{NetworkService, SyncState}; - -use sc_client_api::HeaderBackend; -use sc_consensus::{BlockImportError, BlockImportStatus, JustificationSyncLink, Link}; -use sc_network_common::{ +use sc_network::{ config::{ NonDefaultSetConfig, NonReservedPeerMode, NotificationHandshake, ProtocolId, SetConfig, }, - protocol::role::Roles, - service::NetworkSyncForkRequest, - sync::{ - message::{BlockAnnouncesHandshake, BlockRequest}, - BadPeer, Metrics, OnBlockData, PollBlockAnnounceValidation, SyncStatus, - }, + NetworkService, }; + +use sc_client_api::HeaderBackend; +use sc_network_common::{role::Roles, sync::message::BlockAnnouncesHandshake}; use sc_service::{error::Error, Configuration, NetworkStarter, SpawnTaskHandle}; use std::{iter, sync::Arc}; @@ -53,12 +46,14 @@ pub(crate) struct BuildCollatorNetworkParams<'a> { /// Build the network service, the network status sinks and an RPC sender. pub(crate) fn build_collator_network( params: BuildCollatorNetworkParams, -) -> Result<(Arc>, NetworkStarter), Error> { +) -> Result< + (Arc>, NetworkStarter, Box), + Error, +> { let BuildCollatorNetworkParams { config, client, spawn_handle, genesis_hash } = params; let protocol_id = config.protocol_id(); - let chain_sync = DummyChainSync; - let block_announce_config = chain_sync.get_block_announce_proto_config::( + let block_announce_config = get_block_announce_proto_config::( protocol_id.clone(), &None, Roles::from(&config.role), @@ -76,13 +71,11 @@ pub(crate) fn build_collator_network( }) }, fork_id: None, - chain_sync: Box::new(chain_sync), network_config: config.network.clone(), chain: client.clone(), protocol_id, metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()), block_announce_config, - chain_sync_service: Box::new(DummyChainSyncService::(Default::default())), request_response_protocol_configs: Vec::new(), }; @@ -113,246 +106,56 @@ pub(crate) fn build_collator_network( let network_starter = NetworkStarter::new(network_start_tx); - Ok((network_service, network_starter)) -} - -/// Empty ChainSync shell. Syncing code is not necessary for -/// the minimal node, but network currently requires it. So -/// we provide a noop implementation. -struct DummyChainSync; - -impl DummyChainSync { - pub fn get_block_announce_proto_config( - &self, - protocol_id: ProtocolId, - fork_id: &Option, - roles: Roles, - best_number: NumberFor, - best_hash: B::Hash, - genesis_hash: B::Hash, - ) -> NonDefaultSetConfig { - let block_announces_protocol = { - let genesis_hash = genesis_hash.as_ref(); - if let Some(ref fork_id) = fork_id { - format!( - "/{}/{}/block-announces/1", - array_bytes::bytes2hex("", genesis_hash), - fork_id - ) - } else { - format!("/{}/block-announces/1", array_bytes::bytes2hex("", genesis_hash)) - } - }; - - NonDefaultSetConfig { - notifications_protocol: block_announces_protocol.into(), - fallback_names: iter::once( - format!("/{}/block-announces/1", protocol_id.as_ref()).into(), - ) - .collect(), - max_notification_size: 1024 * 1024, - handshake: Some(NotificationHandshake::new(BlockAnnouncesHandshake::::build( - roles, - best_number, - best_hash, - genesis_hash, - ))), - // NOTE: `set_config` will be ignored by `protocol.rs` as the block announcement - // protocol is still hardcoded into the peerset. - set_config: SetConfig { - in_peers: 0, - out_peers: 0, - reserved_nodes: Vec::new(), - non_reserved_mode: NonReservedPeerMode::Deny, - }, - } - } + Ok((network_service, network_starter, Box::new(SyncOracle {}))) } -impl sc_network_common::sync::ChainSync for DummyChainSync { - fn peer_info(&self, _who: &PeerId) -> Option> { - None - } - - fn status(&self) -> sc_network_common::sync::SyncStatus { - SyncStatus { - state: SyncState::Idle, - best_seen_block: None, - num_peers: 0, - queued_blocks: 0, - state_sync: None, - warp_sync: None, - } - } - - fn num_sync_requests(&self) -> usize { - 0 - } - - fn num_downloaded_blocks(&self) -> usize { - 0 - } - - fn num_peers(&self) -> usize { - 0 - } - - fn new_peer( - &mut self, - _who: PeerId, - _best_hash: ::Hash, - _best_number: polkadot_service::NumberFor, - ) -> Result< - Option>, - sc_network_common::sync::BadPeer, - > { - Ok(None) - } - - fn update_chain_info( - &mut self, - _best_hash: &::Hash, - _best_number: polkadot_service::NumberFor, - ) { - } - - fn request_justification( - &mut self, - _hash: &::Hash, - _number: polkadot_service::NumberFor, - ) { - } - - fn clear_justification_requests(&mut self) {} - - fn set_sync_fork_request( - &mut self, - _peers: Vec, - _hash: &::Hash, - _number: polkadot_service::NumberFor, - ) { - } - - fn on_block_data( - &mut self, - _who: &PeerId, - _request: Option>, - _response: sc_network_common::sync::message::BlockResponse, - ) -> Result, sc_network_common::sync::BadPeer> { - unimplemented!("Not supported on the RPC collator") - } - - fn on_block_justification( - &mut self, - _who: PeerId, - _response: sc_network_common::sync::message::BlockResponse, - ) -> Result, sc_network_common::sync::BadPeer> - { - unimplemented!("Not supported on the RPC collator") - } - - fn on_justification_import( - &mut self, - _hash: ::Hash, - _number: polkadot_service::NumberFor, - _success: bool, - ) { - } - - fn on_block_finalized( - &mut self, - _hash: &::Hash, - _number: polkadot_service::NumberFor, - ) { - } - - fn push_block_announce_validation( - &mut self, - _who: PeerId, - _hash: ::Hash, - _announce: sc_network_common::sync::message::BlockAnnounce<::Header>, - _is_best: bool, - ) { - } - - fn poll_block_announce_validation( - &mut self, - _cx: &mut std::task::Context, - ) -> std::task::Poll::Header>> - { - std::task::Poll::Pending - } - - fn peer_disconnected(&mut self, _who: &PeerId) {} - - fn metrics(&self) -> sc_network_common::sync::Metrics { - Metrics { - queued_blocks: 0, - fork_targets: 0, - justifications: sc_network_common::sync::metrics::Metrics { - pending_requests: 0, - active_requests: 0, - importing_requests: 0, - failed_requests: 0, - }, - } - } - - fn block_response_into_blocks( - &self, - _request: &sc_network_common::sync::message::BlockRequest, - _response: sc_network_common::sync::OpaqueBlockResponse, - ) -> Result>, String> { - unimplemented!("Not supported on the RPC collator") - } - - fn poll( - &mut self, - _cx: &mut std::task::Context, - ) -> std::task::Poll> { - std::task::Poll::Pending - } +struct SyncOracle; - fn send_block_request(&mut self, _who: PeerId, _request: BlockRequest) { - unimplemented!("Not supported on the RPC collator") +impl sp_consensus::SyncOracle for SyncOracle { + fn is_major_syncing(&self) -> bool { + false } - fn num_active_peers(&self) -> usize { - 0 + fn is_offline(&self) -> bool { + true } - - fn process_block_response_data(&mut self, _blocks_to_import: Result, BadPeer>) {} -} - -struct DummyChainSyncService(std::marker::PhantomData); - -impl NetworkSyncForkRequest> for DummyChainSyncService { - fn set_sync_fork_request(&self, _peers: Vec, _hash: B::Hash, _number: NumberFor) {} -} - -impl JustificationSyncLink for DummyChainSyncService { - fn request_justification(&self, _hash: &B::Hash, _number: NumberFor) {} - - fn clear_justification_requests(&self) {} } -impl Link for DummyChainSyncService { - fn blocks_processed( - &mut self, - _imported: usize, - _count: usize, - _results: Vec<(Result>, BlockImportError>, B::Hash)>, - ) { - } +fn get_block_announce_proto_config( + protocol_id: ProtocolId, + fork_id: &Option, + roles: Roles, + best_number: NumberFor, + best_hash: B::Hash, + genesis_hash: B::Hash, +) -> NonDefaultSetConfig { + let block_announces_protocol = { + let genesis_hash = genesis_hash.as_ref(); + if let Some(ref fork_id) = fork_id { + format!("/{}/{}/block-announces/1", array_bytes::bytes2hex("", genesis_hash), fork_id) + } else { + format!("/{}/block-announces/1", array_bytes::bytes2hex("", genesis_hash)) + } + }; - fn justification_imported( - &mut self, - _who: PeerId, - _hash: &B::Hash, - _number: NumberFor, - _success: bool, - ) { + NonDefaultSetConfig { + notifications_protocol: block_announces_protocol.into(), + fallback_names: iter::once(format!("/{}/block-announces/1", protocol_id.as_ref()).into()) + .collect(), + max_notification_size: 1024 * 1024, + handshake: Some(NotificationHandshake::new(BlockAnnouncesHandshake::::build( + roles, + best_number, + best_hash, + genesis_hash, + ))), + // NOTE: `set_config` will be ignored by `protocol.rs` as the block announcement + // protocol is still hardcoded into the peerset. + set_config: SetConfig { + in_peers: 0, + out_peers: 0, + reserved_nodes: Vec::new(), + non_reserved_mode: NonReservedPeerMode::Deny, + }, } - - fn request_justification(&mut self, _hash: &B::Hash, _number: NumberFor) {} } diff --git a/client/relay-chain-rpc-interface/Cargo.toml b/client/relay-chain-rpc-interface/Cargo.toml index 70afef3c7a7..2f52b91367b 100644 --- a/client/relay-chain-rpc-interface/Cargo.toml +++ b/client/relay-chain-rpc-interface/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "master" } cumulus-primitives-core = { path = "../../primitives/core" } cumulus-relay-chain-interface = { path = "../relay-chain-interface" } @@ -19,14 +19,16 @@ sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = " sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.25.0", features = ["sync"] } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } + +tokio = { version = "1.26.0", features = ["sync"] } futures = "0.3.26" futures-timer = "3.0.2" parity-scale-codec = "3.4.0" jsonrpsee = { version = "0.16.2", features = ["ws-client"] } tracing = "0.1.37" -async-trait = "0.1.63" +async-trait = "0.1.66" url = "2.3.1" serde_json = "1.0.93" serde = "1.0.152" diff --git a/client/relay-chain-rpc-interface/src/lib.rs b/client/relay-chain-rpc-interface/src/lib.rs index 748a2b26e68..475d5d905b6 100644 --- a/client/relay-chain-rpc-interface/src/lib.rs +++ b/client/relay-chain-rpc-interface/src/lib.rs @@ -25,7 +25,8 @@ use cumulus_primitives_core::{ }; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; use futures::{FutureExt, Stream, StreamExt}; -use polkadot_service::Handle; +use polkadot_overseer::Handle; + use sc_client_api::StorageProof; use sp_core::sp_std::collections::btree_map::BTreeMap; use sp_state_machine::StorageValue; diff --git a/client/relay-chain-rpc-interface/src/reconnecting_ws_client.rs b/client/relay-chain-rpc-interface/src/reconnecting_ws_client.rs index 3414dd652c6..9184ab74651 100644 --- a/client/relay-chain-rpc-interface/src/reconnecting_ws_client.rs +++ b/client/relay-chain-rpc-interface/src/reconnecting_ws_client.rs @@ -37,7 +37,7 @@ use jsonrpsee::{ ws_client::WsClientBuilder, }; use lru::LruCache; -use polkadot_service::TaskManager; +use sc_service::TaskManager; use std::{num::NonZeroUsize, sync::Arc}; use tokio::sync::mpsc::{ channel as tokio_channel, Receiver as TokioReceiver, Sender as TokioSender, diff --git a/client/relay-chain-rpc-interface/src/rpc_client.rs b/client/relay-chain-rpc-interface/src/rpc_client.rs index 0d3b2c8492e..6bd2d33d3a2 100644 --- a/client/relay-chain-rpc-interface/src/rpc_client.rs +++ b/client/relay-chain-rpc-interface/src/rpc_client.rs @@ -14,30 +14,33 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::reconnecting_ws_client::ReconnectingWsClient; -use cumulus_primitives_core::{ - relay_chain::{ - vstaging::ExecutorParams, CandidateCommitments, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash as RelayHash, - Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption, PvfCheckStatement, - ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, - ValidatorId, ValidatorIndex, ValidatorSignature, - }, - InboundDownwardMessage, ParaId, PersistedValidationData, -}; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainResult}; use futures::channel::mpsc::Receiver; use jsonrpsee::{core::params::ArrayParams, rpc_params}; use parity_scale_codec::{Decode, Encode}; -use polkadot_service::{BlockNumber, TaskManager}; +use serde::de::DeserializeOwned; +pub use url::Url; + use sc_client_api::StorageData; use sc_rpc_api::{state::ReadProof, system::Health}; -use serde::de::DeserializeOwned; +use sc_service::TaskManager; use sp_api::RuntimeVersion; use sp_consensus_babe::Epoch; use sp_core::sp_std::collections::btree_map::BTreeMap; use sp_storage::StorageKey; -pub use url::Url; + +use cumulus_primitives_core::{ + relay_chain::{ + BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, + CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, + Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption, + PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, + ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, + InboundDownwardMessage, ParaId, PersistedValidationData, +}; +use cumulus_relay_chain_interface::{RelayChainError, RelayChainResult}; + +use crate::reconnecting_ws_client::ReconnectingWsClient; const LOG_TARGET: &str = "relay-chain-rpc-client"; @@ -261,7 +264,7 @@ impl RelayChainRpcClient { /// Get hash of n-th block. pub async fn chain_get_block_hash( &self, - block_number: Option, + block_number: Option, ) -> Result, RelayChainError> { let params = rpc_params![block_number]; self.request("chain_getBlockHash", params).await diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 14240d03d90..ade6e7e8067 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -parking_lot = "0.12.1" futures = "0.3.26" # Substrate @@ -17,6 +16,7 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-transactions = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -38,4 +38,4 @@ cumulus-client-network = { path = "../network" } cumulus-primitives-core = { path = "../../primitives/core" } cumulus-relay-chain-interface = { path = "../relay-chain-interface" } cumulus-relay-chain-inprocess-interface = { path = "../relay-chain-inprocess-interface" } -cumulus-relay-chain-minimal-node = { path = "../relay-chain-minimal-node" } \ No newline at end of file +cumulus-relay-chain-minimal-node = { path = "../relay-chain-minimal-node" } diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index fa9981bb886..6f0d5790586 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -34,8 +34,12 @@ use polkadot_primitives::{CollatorPair, OccupiedCoreAssumption}; use sc_client_api::{ Backend as BackendT, BlockBackend, BlockchainEvents, Finalizer, ProofProvider, UsageProvider, }; -use sc_consensus::{import_queue::ImportQueueService, BlockImport, ImportQueue}; +use sc_consensus::{ + import_queue::{ImportQueue, ImportQueueService}, + BlockImport, +}; use sc_network::{config::SyncMode, NetworkService}; +use sc_network_sync::SyncingService; use sc_network_transactions::TransactionsHandlerController; use sc_service::{Configuration, NetworkStarter, SpawnTaskHandle, TaskManager, WarpSyncParams}; use sc_telemetry::{log, TelemetryWorkerHandle}; @@ -315,6 +319,7 @@ pub async fn build_network<'a, Block, Client, RCInterface, IQ>( TracingUnboundedSender>, TransactionsHandlerController, NetworkStarter, + Arc>, )> where Block: BlockT, diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index 05f9db98c13..3dba6846cc3 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -165,7 +165,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The invulnerable, fixed collators. diff --git a/pallets/collator-selection/src/weights.rs b/pallets/collator-selection/src/weights.rs index 66292751b97..32e816b5dbe 100644 --- a/pallets/collator-selection/src/weights.rs +++ b/pallets/collator-selection/src/weights.rs @@ -39,42 +39,42 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_invulnerables(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) + Weight::from_parts(18_563_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(68_000 as u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn set_desired_candidates() -> Weight { - Weight::from_ref_time(16_363_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(16_363_000 as u64, 0).saturating_add(T::DbWeight::get().writes(1 as u64)) } fn set_candidacy_bond() -> Weight { - Weight::from_ref_time(16_840_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_parts(16_840_000 as u64, 0).saturating_add(T::DbWeight::get().writes(1 as u64)) } fn register_as_candidate(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) + Weight::from_parts(71_196_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(198_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn leave_intent(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) + Weight::from_parts(55_336_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(151_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn note_author() -> Weight { - Weight::from_ref_time(71_461_000 as u64) + Weight::from_parts(71_461_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } fn new_session(r: u32, c: u32) -> Weight { - Weight::from_ref_time(0 as u64) + Weight::from_parts(0 as u64, 0) // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(109_961_000 as u64).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(109_961_000 as u64, 0).saturating_mul(r as u64)) // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(151_952_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(151_952_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(r as u64))) @@ -85,44 +85,44 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { fn set_invulnerables(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) + Weight::from_parts(18_563_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(68_000 as u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn set_desired_candidates() -> Weight { - Weight::from_ref_time(16_363_000 as u64) + Weight::from_parts(16_363_000 as u64, 0) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn set_candidacy_bond() -> Weight { - Weight::from_ref_time(16_840_000 as u64) + Weight::from_parts(16_840_000 as u64, 0) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn register_as_candidate(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) + Weight::from_parts(71_196_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(198_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn leave_intent(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) + Weight::from_parts(55_336_000 as u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(151_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn note_author() -> Weight { - Weight::from_ref_time(71_461_000 as u64) + Weight::from_parts(71_461_000 as u64, 0) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } fn new_session(r: u32, c: u32) -> Weight { - Weight::from_ref_time(0 as u64) + Weight::from_parts(0 as u64, 0) // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(109_961_000 as u64).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(109_961_000 as u64, 0).saturating_mul(r as u64)) // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(151_952_000 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(151_952_000 as u64, 0).saturating_mul(c as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(c as u64))) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(r as u64))) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 9bdf786ba63..6512bb94811 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -90,7 +90,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::storage_version(migration::STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -154,7 +153,7 @@ pub mod pallet { impl Pallet { /// Service a single overweight message. #[pallet::call_index(0)] - #[pallet::weight(weight_limit.saturating_add(Weight::from_ref_time(1_000_000)))] + #[pallet::weight(weight_limit.saturating_add(Weight::from_parts(1_000_000, 0)))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, @@ -167,7 +166,7 @@ pub mod pallet { .map_err(|_| Error::::OverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { overweight_index: index, weight_used }); - Ok(Some(weight_used.saturating_add(Weight::from_ref_time(1_000_000))).into()) + Ok(Some(weight_used.saturating_add(Weight::from_parts(1_000_000, 0))).into()) } } diff --git a/pallets/dmp-queue/src/migration.rs b/pallets/dmp-queue/src/migration.rs index 82c1e8b6eb1..b360f5a7bd4 100644 --- a/pallets/dmp-queue/src/migration.rs +++ b/pallets/dmp-queue/src/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::{Config, Pallet, Store, DEFAULT_POV_SIZE}; +use crate::{Config, Configuration, Overweight, Pallet, DEFAULT_POV_SIZE}; use frame_support::{ pallet_prelude::*, traits::StorageVersion, @@ -74,7 +74,7 @@ pub fn migrate_to_v1() -> Weight { } }; - if let Err(_) = as Store>::Configuration::translate(|pre| pre.map(translate)) { + if let Err(_) = Configuration::::translate(|pre| pre.map(translate)) { log::error!( target: "dmp_queue", "unexpected error when performing translation of the QueueConfig type during storage upgrade to v2" @@ -89,7 +89,7 @@ pub fn migrate_to_v1() -> Weight { /// NOTE: Only use this function if you know what you're doing. Default to using /// `migrate_to_latest`. pub fn migrate_to_v2() -> Weight { - let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + let overweight_messages = Overweight::::initialize_counter() as u64; T::DbWeight::get().reads_writes(overweight_messages, 1) } diff --git a/pallets/parachain-system/proc-macro/Cargo.toml b/pallets/parachain-system/proc-macro/Cargo.toml index 6510f62b3bc..952fde32d86 100644 --- a/pallets/parachain-system/proc-macro/Cargo.toml +++ b/pallets/parachain-system/proc-macro/Cargo.toml @@ -9,10 +9,10 @@ description = "Proc macros provided by the parachain-system pallet" proc-macro = true [dependencies] -syn = "1.0.107" -proc-macro2 = "1.0.50" +syn = "1.0.109" +proc-macro2 = "1.0.52" quote = "1.0.23" -proc-macro-crate = "1.3.0" +proc-macro-crate = "1.3.1" [features] default = [ "std" ] diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index 456ae5bf578..97c6cfe368d 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -16,18 +16,18 @@ #![cfg_attr(not(feature = "std"), no_std)] -//! cumulus-pallet-parachain-system is a base pallet for cumulus-based parachains. +//! `cumulus-pallet-parachain-system` is a base pallet for Cumulus-based parachains. //! -//! This pallet handles low-level details of being a parachain. It's responsibilities include: +//! This pallet handles low-level details of being a parachain. Its responsibilities include: //! -//! - ingestion of the parachain validation data -//! - ingestion of incoming downward and lateral messages and dispatching them -//! - coordinating upgrades with the relay-chain -//! - communication of parachain outputs, such as sent messages, signalling an upgrade, etc. +//! - ingestion of the parachain validation data; +//! - ingestion and dispatch of incoming downward and lateral messages; +//! - coordinating upgrades with the Relay Chain; and +//! - communication of parachain outputs, such as sent messages, signaling an upgrade, etc. //! //! Users must ensure that they register this pallet as an inherent provider. -use codec::Encode; +use codec::{Decode, Encode, MaxEncodedLen}; use cumulus_primitives_core::{ relay_chain, AbridgedHostConfiguration, ChannelStatus, CollationInfo, DmpMessageHandler, GetChannelInfo, InboundDownwardMessage, InboundHrmpMessage, MessageSendError, @@ -42,9 +42,11 @@ use frame_support::{ storage, traits::Get, weights::Weight, + RuntimeDebug, }; use frame_system::{ensure_none, ensure_root}; use polkadot_parachain::primitives::RelayChainBlockNumber; +use scale_info::TypeInfo; use sp_runtime::{ traits::{Block as BlockT, BlockNumberProvider, Hash}, transaction_validity::{ @@ -134,6 +136,20 @@ impl CheckAssociatedRelayNumber for AnyRelayNumber { fn check_associated_relay_number(_: RelayChainBlockNumber, _: RelayChainBlockNumber) {} } +/// Information needed when a new runtime binary is submitted and needs to be authorized before +/// replacing the current runtime. +#[derive(Decode, Encode, Default, PartialEq, Eq, MaxEncodedLen, TypeInfo)] +#[scale_info(skip_type_params(T))] +struct CodeUpgradeAuthorization +where + T: Config, +{ + /// Hash of the new runtime binary. + code_hash: T::Hash, + /// Whether or not to carry out version checks. + check_version: bool, +} + #[frame_support::pallet] pub mod pallet { use super::*; @@ -142,7 +158,6 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(migration::STORAGE_VERSION)] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -442,17 +457,40 @@ pub mod pallet { Ok(()) } + /// Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied + /// later. + /// + /// The `check_version` parameter sets a boolean flag for whether or not the runtime's spec + /// version and name should be verified on upgrade. Since the authorization only has a hash, + /// it cannot actually perform the verification. + /// + /// This call requires Root origin. #[pallet::call_index(2)] #[pallet::weight((1_000_000, DispatchClass::Operational))] - pub fn authorize_upgrade(origin: OriginFor, code_hash: T::Hash) -> DispatchResult { + pub fn authorize_upgrade( + origin: OriginFor, + code_hash: T::Hash, + check_version: bool, + ) -> DispatchResult { ensure_root(origin)?; - - AuthorizedUpgrade::::put(&code_hash); + AuthorizedUpgrade::::put(CodeUpgradeAuthorization { + code_hash: code_hash.clone(), + check_version, + }); Self::deposit_event(Event::UpgradeAuthorized { code_hash }); Ok(()) } + /// Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. + /// + /// If the authorization required a version check, this call will ensure the spec name + /// remains unchanged and that the spec version has increased. + /// + /// Note that this function will not apply the new `code`, but only attempt to schedule the + /// upgrade with the Relay Chain. + /// + /// All origins are allowed. #[pallet::call_index(3)] #[pallet::weight(1_000_000)] pub fn enact_authorized_upgrade( @@ -487,16 +525,16 @@ pub mod pallet { #[pallet::error] pub enum Error { - /// Attempt to upgrade validation function while existing upgrade pending + /// Attempt to upgrade validation function while existing upgrade pending. OverlappingUpgrades, - /// Polkadot currently prohibits this parachain from upgrading its validation function + /// Polkadot currently prohibits this parachain from upgrading its validation function. ProhibitedByPolkadot, /// The supplied validation function has compiled into a blob larger than Polkadot is - /// willing to run + /// willing to run. TooBig, - /// The inherent which supplies the validation data did not run this block + /// The inherent which supplies the validation data did not run this block. ValidationDataNotAvailable, - /// The inherent which supplies the host configuration did not run this block + /// The inherent which supplies the host configuration did not run this block. HostConfigurationNotAvailable, /// No validation function upgrade is currently scheduled. NotScheduled, @@ -645,7 +683,7 @@ pub mod pallet { /// The next authorized upgrade, if there is one. #[pallet::storage] - pub(super) type AuthorizedUpgrade = StorageValue<_, T::Hash>; + pub(super) type AuthorizedUpgrade = StorageValue<_, CodeUpgradeAuthorization>; /// A custom head data that should be returned as result of `validate_block`. /// @@ -712,9 +750,17 @@ pub mod pallet { impl Pallet { fn validate_authorized_upgrade(code: &[u8]) -> Result { - let required_hash = AuthorizedUpgrade::::get().ok_or(Error::::NothingAuthorized)?; + let authorization = AuthorizedUpgrade::::get().ok_or(Error::::NothingAuthorized)?; + + // ensure that the actual hash matches the authorized hash let actual_hash = T::Hashing::hash(&code[..]); - ensure!(actual_hash == required_hash, Error::::Unauthorized); + ensure!(actual_hash == authorization.code_hash, Error::::Unauthorized); + + // check versions if required as part of the authorization + if authorization.check_version { + frame_system::Pallet::::can_set_code(code)?; + } + Ok(actual_hash) } } @@ -1080,11 +1126,33 @@ pub trait OnSystemEvent { fn on_validation_code_applied(); } -/// Implements [`BlockNumberProvider`] that returns relay chain block number fetched from -/// validation data. -/// NTOE: When validation data is not available (e.g. within on_initialize), 0 will be returned. +/// Holds the most recent relay-parent state root and block number of the current parachain block. +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Default, RuntimeDebug)] +pub struct RelayChainState { + /// Current relay chain height. + pub number: relay_chain::BlockNumber, + /// State root for current relay chain height. + pub state_root: relay_chain::Hash, +} + +/// This exposes the [`RelayChainState`] to other runtime modules. +/// +/// Enables parachains to read relay chain state via state proofs. +pub trait RelaychainStateProvider { + /// May be called by any runtime module to obtain the current state of the relay chain. + /// + /// **NOTE**: This is not guaranteed to return monotonically increasing relay parents. + fn current_relay_chain_state() -> RelayChainState; +} + +/// Implements [`BlockNumberProvider`] that returns relay chain block number fetched from validation data. +/// When validation data is not available (e.g. within on_initialize), 0 will be returned. +/// +/// **NOTE**: This has been deprecated, please use [`RelaychainDataProvider`] +#[deprecated = "Use `RelaychainDataProvider` instead"] pub struct RelaychainBlockNumberProvider(sp_std::marker::PhantomData); +#[allow(deprecated)] impl BlockNumberProvider for RelaychainBlockNumberProvider { type BlockNumber = relay_chain::BlockNumber; @@ -1093,6 +1161,47 @@ impl BlockNumberProvider for RelaychainBlockNumberProvider { .map(|d| d.relay_parent_number) .unwrap_or_default() } + + #[cfg(feature = "runtime-benchmarks")] + fn set_block_number(block: Self::BlockNumber) { + let mut validation_data = Pallet::::validation_data().unwrap_or_else(|| + // PersistedValidationData does not impl default in non-std + PersistedValidationData { + parent_head: vec![].into(), + relay_parent_number: Default::default(), + max_pov_size: Default::default(), + relay_parent_storage_root: Default::default(), + }); + validation_data.relay_parent_number = block; + ValidationData::::put(validation_data) + } +} + +impl RelaychainStateProvider for RelaychainDataProvider { + fn current_relay_chain_state() -> RelayChainState { + Pallet::::validation_data() + .map(|d| RelayChainState { + number: d.relay_parent_number, + state_root: d.relay_parent_storage_root, + }) + .unwrap_or_default() + } +} + +/// Implements [`BlockNumberProvider`] and [`RelaychainStateProvider`] that returns relevant relay data fetched from +/// validation data. +/// NOTE: When validation data is not available (e.g. within on_initialize), default values will be returned. +pub struct RelaychainDataProvider(sp_std::marker::PhantomData); + +impl BlockNumberProvider for RelaychainDataProvider { + type BlockNumber = relay_chain::BlockNumber; + + fn current_block_number() -> relay_chain::BlockNumber { + Pallet::::validation_data() + .map(|d| d.relay_parent_number) + .unwrap_or_default() + } + #[cfg(feature = "runtime-benchmarks")] fn set_block_number(block: Self::BlockNumber) { let mut validation_data = Pallet::::validation_data().unwrap_or_else(|| diff --git a/pallets/parachain-system/src/migration.rs b/pallets/parachain-system/src/migration.rs index 514675b89ac..e3d1e11a51b 100644 --- a/pallets/parachain-system/src/migration.rs +++ b/pallets/parachain-system/src/migration.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{Config, Pallet, Store}; +use crate::{Config, Pallet, ReservedDmpWeightOverride, ReservedXcmpWeightOverride}; use frame_support::{ traits::{Get, StorageVersion}, weights::Weight, @@ -52,18 +52,14 @@ mod v2 { pub fn migrate() -> Weight { let translate = |pre: u64| -> Weight { Weight::from_parts(pre, DEFAULT_POV_SIZE) }; - if as Store>::ReservedXcmpWeightOverride::translate(|pre| pre.map(translate)) - .is_err() - { + if ReservedXcmpWeightOverride::::translate(|pre| pre.map(translate)).is_err() { log::error!( target: "parachain_system", "unexpected error when performing translation of the ReservedXcmpWeightOverride type during storage upgrade to v2" ); } - if as Store>::ReservedDmpWeightOverride::translate(|pre| pre.map(translate)) - .is_err() - { + if ReservedDmpWeightOverride::::translate(|pre| pre.map(translate)).is_err() { log::error!( target: "parachain_system", "unexpected error when performing translation of the ReservedDmpWeightOverride type during storage upgrade to v2" diff --git a/pallets/parachain-system/src/tests.rs b/pallets/parachain-system/src/tests.rs index 871596ae8cb..70e4c106bf2 100755 --- a/pallets/parachain-system/src/tests.rs +++ b/pallets/parachain-system/src/tests.rs @@ -32,10 +32,11 @@ use frame_support::{ use frame_system::RawOrigin; use hex_literal::hex; use relay_chain::HrmpChannelId; -use sp_core::H256; +use sp_core::{blake2_256, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + DispatchErrorWithPostInfo, }; use sp_version::RuntimeVersion; use std::cell::RefCell; @@ -974,3 +975,37 @@ fn test() { .add(1, || {}) .add(2, || {}); } + +#[test] +fn upgrade_version_checks_should_work() { + let test_data = vec![ + ("test", 0, 1, Err(frame_system::Error::::SpecVersionNeedsToIncrease)), + ("test", 1, 0, Err(frame_system::Error::::SpecVersionNeedsToIncrease)), + ("test", 1, 1, Err(frame_system::Error::::SpecVersionNeedsToIncrease)), + ("test", 1, 2, Err(frame_system::Error::::SpecVersionNeedsToIncrease)), + ("test2", 1, 1, Err(frame_system::Error::::InvalidSpecName)), + ]; + + for (spec_name, spec_version, impl_version, expected) in test_data.into_iter() { + let version = RuntimeVersion { + spec_name: spec_name.into(), + spec_version, + impl_version, + ..Default::default() + }; + let read_runtime_version = ReadRuntimeVersion(version.encode()); + + let mut ext = new_test_ext(); + ext.register_extension(sp_core::traits::ReadRuntimeVersionExt::new(read_runtime_version)); + ext.execute_with(|| { + let new_code = vec![1, 2, 3, 4]; + let new_code_hash = sp_core::H256(blake2_256(&new_code)); + + let _authorize = + ParachainSystem::authorize_upgrade(RawOrigin::Root.into(), new_code_hash, true); + let res = ParachainSystem::enact_authorized_upgrade(RawOrigin::None.into(), new_code); + + assert_eq!(expected.map_err(DispatchErrorWithPostInfo::from), res); + }); + } +} diff --git a/pallets/solo-to-para/src/lib.rs b/pallets/solo-to-para/src/lib.rs index 56b4ef4b4dc..515dd385e7b 100644 --- a/pallets/solo-to-para/src/lib.rs +++ b/pallets/solo-to-para/src/lib.rs @@ -35,7 +35,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 1bcfcdcce73..f230ced5dc5 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -41,7 +41,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The module configuration trait. diff --git a/pallets/xcmp-queue/src/benchmarking.rs b/pallets/xcmp-queue/src/benchmarking.rs index 5ac78bee763..f4167e522fa 100644 --- a/pallets/xcmp-queue/src/benchmarking.rs +++ b/pallets/xcmp-queue/src/benchmarking.rs @@ -22,7 +22,7 @@ use frame_system::RawOrigin; benchmarks! { set_config_with_u32 {}: update_resume_threshold(RawOrigin::Root, 100) - set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_ref_time(3_000_000)) + set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_parts(3_000_000, 0)) } impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index e31041b190e..df2b78ebc20 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -79,7 +79,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::storage_version(migration::STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -142,7 +141,7 @@ pub mod pallet { /// Events: /// - `OverweightServiced`: On success. #[pallet::call_index(0)] - #[pallet::weight((weight_limit.saturating_add(Weight::from_ref_time(1_000_000)), DispatchClass::Operational))] + #[pallet::weight((weight_limit.saturating_add(Weight::from_parts(1_000_000, 0)), DispatchClass::Operational))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, @@ -161,7 +160,7 @@ pub mod pallet { .map_err(|_| Error::::WeightOverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { index, used }); - Ok(Some(used.saturating_add(Weight::from_ref_time(1_000_000))).into()) + Ok(Some(used.saturating_add(Weight::from_parts(1_000_000, 0))).into()) } /// Suspends all XCM executions for the XCMP queue, regardless of the sender's origin. @@ -467,8 +466,8 @@ impl Default for QueueConfigData { suspend_threshold: 2, drop_threshold: 5, resume_threshold: 1, - threshold_weight: Weight::from_ref_time(100_000), - weight_restrict_decay: Weight::from_ref_time(2), + threshold_weight: Weight::from_parts(100_000, 0), + weight_restrict_decay: Weight::from_parts(2, 0), xcmp_max_individual_weight: Weight::from_parts( 20u64 * WEIGHT_REF_TIME_PER_MILLIS, DEFAULT_POV_SIZE, @@ -763,13 +762,13 @@ impl Pallet { sent_at: RelayBlockNumber, xcm: Vec, ) -> OverweightIndex { - let index = ::OverweightCount::mutate(|count| { + let index = OverweightCount::::mutate(|count| { let index = *count; *count += 1; index }); - ::Overweight::insert(index, (sender, sent_at, xcm)); + Overweight::::insert(index, (sender, sent_at, xcm)); index } diff --git a/pallets/xcmp-queue/src/migration.rs b/pallets/xcmp-queue/src/migration.rs index 51a2c3104e9..f6ece1da1a8 100644 --- a/pallets/xcmp-queue/src/migration.rs +++ b/pallets/xcmp-queue/src/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::{Config, Pallet, Store, DEFAULT_POV_SIZE}; +use crate::{Config, Overweight, Pallet, QueueConfig, DEFAULT_POV_SIZE}; use frame_support::{ pallet_prelude::*, traits::StorageVersion, @@ -85,8 +85,8 @@ pub fn migrate_to_v2() -> Weight { suspend_threshold: pre.suspend_threshold, drop_threshold: pre.drop_threshold, resume_threshold: pre.resume_threshold, - threshold_weight: Weight::from_ref_time(pre.threshold_weight), - weight_restrict_decay: Weight::from_ref_time(pre.weight_restrict_decay), + threshold_weight: Weight::from_parts(pre.threshold_weight, 0), + weight_restrict_decay: Weight::from_parts(pre.weight_restrict_decay, 0), xcmp_max_individual_weight: Weight::from_parts( pre.xcmp_max_individual_weight, DEFAULT_POV_SIZE, @@ -94,7 +94,7 @@ pub fn migrate_to_v2() -> Weight { } }; - if let Err(_) = as Store>::QueueConfig::translate(|pre| pre.map(translate)) { + if let Err(_) = QueueConfig::::translate(|pre| pre.map(translate)) { log::error!( target: super::LOG_TARGET, "unexpected error when performing translation of the QueueConfig type during storage upgrade to v2" @@ -105,7 +105,7 @@ pub fn migrate_to_v2() -> Weight { } pub fn migrate_to_v3() -> Weight { - let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + let overweight_messages = Overweight::::initialize_counter() as u64; T::DbWeight::get().reads_writes(overweight_messages, 1) } diff --git a/pallets/xcmp-queue/src/tests.rs b/pallets/xcmp-queue/src/tests.rs index 48cc4208b58..952a2758f30 100644 --- a/pallets/xcmp-queue/src/tests.rs +++ b/pallets/xcmp-queue/src/tests.rs @@ -47,8 +47,8 @@ fn bad_message_is_handled() { 1000.into(), (1, format), &mut 0, - Weight::from_ref_time(10_000_000_000), - Weight::from_ref_time(10_000_000_000), + Weight::from_parts(10_000_000_000, 0), + Weight::from_parts(10_000_000_000, 0), ); }); } @@ -71,8 +71,8 @@ fn handle_blob_message() { 1000.into(), (1, format), &mut 0, - Weight::from_ref_time(10_000_000_000), - Weight::from_ref_time(10_000_000_000), + Weight::from_parts(10_000_000_000, 0), + Weight::from_parts(10_000_000_000, 0), ); }); } @@ -89,8 +89,8 @@ fn handle_invalid_data() { 1000.into(), (1, format), &mut 0, - Weight::from_ref_time(10_000_000_000), - Weight::from_ref_time(10_000_000_000), + Weight::from_parts(10_000_000_000, 0), + Weight::from_parts(10_000_000_000, 0), ); }); } @@ -189,21 +189,21 @@ fn update_resume_threshold_works() { fn update_threshold_weight_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); - assert_eq!(data.threshold_weight, Weight::from_ref_time(100_000)); + assert_eq!(data.threshold_weight, Weight::from_parts(100_000, 0)); assert_ok!(XcmpQueue::update_threshold_weight( RuntimeOrigin::root(), - Weight::from_ref_time(10_000) + Weight::from_parts(10_000, 0) )); assert_noop!( XcmpQueue::update_threshold_weight( RuntimeOrigin::signed(5), - Weight::from_ref_time(10_000_000), + Weight::from_parts(10_000_000, 0), ), BadOrigin ); let data: QueueConfigData = >::get(); - assert_eq!(data.threshold_weight, Weight::from_ref_time(10_000)); + assert_eq!(data.threshold_weight, Weight::from_parts(10_000, 0)); }); } @@ -211,21 +211,21 @@ fn update_threshold_weight_works() { fn update_weight_restrict_decay_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); - assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(2)); + assert_eq!(data.weight_restrict_decay, Weight::from_parts(2, 0)); assert_ok!(XcmpQueue::update_weight_restrict_decay( RuntimeOrigin::root(), - Weight::from_ref_time(5) + Weight::from_parts(5, 0) )); assert_noop!( XcmpQueue::update_weight_restrict_decay( RuntimeOrigin::signed(6), - Weight::from_ref_time(4), + Weight::from_parts(4, 0), ), BadOrigin ); let data: QueueConfigData = >::get(); - assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(5)); + assert_eq!(data.weight_restrict_decay, Weight::from_parts(5, 0)); }); } @@ -239,12 +239,12 @@ fn update_xcmp_max_individual_weight() { ); assert_ok!(XcmpQueue::update_xcmp_max_individual_weight( RuntimeOrigin::root(), - Weight::from_ref_time(30u64 * WEIGHT_REF_TIME_PER_MILLIS) + Weight::from_parts(30u64 * WEIGHT_REF_TIME_PER_MILLIS, 0) )); assert_noop!( XcmpQueue::update_xcmp_max_individual_weight( RuntimeOrigin::signed(3), - Weight::from_ref_time(10u64 * WEIGHT_REF_TIME_PER_MILLIS) + Weight::from_parts(10u64 * WEIGHT_REF_TIME_PER_MILLIS, 0) ), BadOrigin ); @@ -252,7 +252,7 @@ fn update_xcmp_max_individual_weight() { assert_eq!( data.xcmp_max_individual_weight, - Weight::from_ref_time(30u64 * WEIGHT_REF_TIME_PER_MILLIS) + Weight::from_parts(30u64 * WEIGHT_REF_TIME_PER_MILLIS, 0) ); }); } diff --git a/pallets/xcmp-queue/src/weights.rs b/pallets/xcmp-queue/src/weights.rs index 41a3d812fb2..b275982b003 100644 --- a/pallets/xcmp-queue/src/weights.rs +++ b/pallets/xcmp-queue/src/weights.rs @@ -18,14 +18,14 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(2_717_000 as u64) + Weight::from_parts(2_717_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(2_717_000 as u64) + Weight::from_parts(2_717_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -34,14 +34,14 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(2_717_000 as u64) + Weight::from_parts(2_717_000 as u64, 0) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(2_717_000 as u64) + Weight::from_parts(2_717_000 as u64, 0) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/parachain-template/node/Cargo.toml b/parachain-template/node/Cargo.toml index d64ab0702ae..f4b5019ed00 100644 --- a/parachain-template/node/Cargo.toml +++ b/parachain-template/node/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" build = "build.rs" [dependencies] -clap = { version = "4.1.6", features = ["derive"] } +clap = { version = "4.1.8", features = ["derive"] } log = "0.4.17" codec = { package = "parity-scale-codec", version = "3.0.0" } serde = { version = "1.0.152", features = ["derive"] } @@ -30,7 +30,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -44,12 +44,9 @@ sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "mas sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } @@ -57,14 +54,12 @@ try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "m # Polkadot polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } # Cumulus cumulus-client-cli = { path = "../../client/cli" } cumulus-client-consensus-aura = { path = "../../client/consensus/aura" } cumulus-client-consensus-common = { path = "../../client/consensus/common" } -cumulus-client-network = { path = "../../client/network" } cumulus-client-service = { path = "../../client/service" } cumulus-primitives-core = { path = "../../primitives/core" } cumulus-primitives-parachain-inherent = { path = "../../primitives/parachain-inherent" } diff --git a/parachain-template/node/src/service.rs b/parachain-template/node/src/service.rs index c6877f22b19..245569230eb 100644 --- a/parachain-template/node/src/service.rs +++ b/parachain-template/node/src/service.rs @@ -5,7 +5,7 @@ use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; // Local Runtime Types -use parachain_template_runtime::{opaque::Block, Hash, RuntimeApi}; +use parachain_template_runtime::{opaque::Block, RuntimeApi}; // Cumulus Imports use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; @@ -17,14 +17,14 @@ use cumulus_client_service::{ start_full_node, BuildNetworkParams, StartCollatorParams, StartFullNodeParams, }; use cumulus_primitives_core::ParaId; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; +use cumulus_relay_chain_interface::RelayChainInterface; // Substrate Imports use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use sc_consensus::ImportQueue; use sc_executor::NativeElseWasmExecutor; -use sc_network::NetworkService; -use sc_network_common::service::NetworkBlock; +use sc_network::NetworkBlock; +use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_keystore::SyncCryptoStorePtr; @@ -162,10 +162,7 @@ async fn start_node_impl( hwbench.clone(), ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); @@ -173,7 +170,7 @@ async fn start_node_impl( let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { parachain_config: ¶chain_config, client: client.clone(), @@ -218,6 +215,7 @@ async fn start_node_impl( keystore: params.keystore_container.sync_keystore(), backend, network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), @@ -245,8 +243,8 @@ async fn start_node_impl( } let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); @@ -264,7 +262,7 @@ async fn start_node_impl( &task_manager, relay_chain_interface.clone(), transaction_pool, - network, + sync_service, params.keystore_container.sync_keystore(), force_authoring, para_id, @@ -353,7 +351,7 @@ fn build_consensus( task_manager: &TaskManager, relay_chain_interface: Arc, transaction_pool: Arc>, - sync_oracle: Arc>, + sync_oracle: Arc>, keystore: SyncCryptoStorePtr, force_authoring: bool, para_id: ParaId, diff --git a/parachain-template/pallets/template/src/lib.rs b/parachain-template/pallets/template/src/lib.rs index fde11a46108..5f3252bfc3a 100644 --- a/parachain-template/pallets/template/src/lib.rs +++ b/parachain-template/pallets/template/src/lib.rs @@ -27,7 +27,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); // The pallet's runtime storage items. @@ -68,7 +67,7 @@ pub mod pallet { /// An example dispatchable that takes a singles value as a parameter, writes the value to /// storage and emits an event. This function must be dispatched by a signed extrinsic. #[pallet::call_index(0)] - #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(1))] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().writes(1))] pub fn do_something(origin: OriginFor, something: u32) -> DispatchResultWithPostInfo { // Check that the extrinsic was signed and get the signer. // This function will return an error if the extrinsic is not signed. @@ -86,7 +85,7 @@ pub mod pallet { /// An example dispatchable that may throw a custom error. #[pallet::call_index(1)] - #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().reads_writes(1,1))] + #[pallet::weight(Weight::from_parts(10_000, 0) + T::DbWeight::get().reads_writes(1,1))] pub fn cause_error(origin: OriginFor) -> DispatchResultWithPostInfo { let _who = ensure_signed(origin)?; diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index 7b5d0b4e2f8..db9a8bf1028 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -528,6 +528,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachain-template/runtime/src/weights/block_weights.rs b/parachain-template/runtime/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachain-template/runtime/src/weights/block_weights.rs +++ b/parachain-template/runtime/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachain-template/runtime/src/weights/extrinsic_weights.rs b/parachain-template/runtime/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachain-template/runtime/src/weights/extrinsic_weights.rs +++ b/parachain-template/runtime/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index fa056fc65d3..8383e096a7d 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -2,7 +2,7 @@ use super::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; -use core::marker::PhantomData; +use core::{marker::PhantomData, ops::ControlFlow}; use frame_support::{ log, match_types, parameter_types, traits::{ConstU32, Everything, Nothing}, @@ -11,7 +11,7 @@ use frame_support::{ use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; -use xcm::latest::prelude::*; +use xcm::{latest::prelude::*, CreateMatcher, MatchXcm}; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, @@ -122,32 +122,36 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.iter().any(|inst| { - matches!( - inst, + message.matcher().match_next_inst_while( + |_| true, + |inst| match inst { InitiateReserveWithdraw { reserve: MultiLocation { parents: 1, interior: Here }, .. - } | DepositReserveAsset { dest: MultiLocation { parents: 1, interior: Here }, .. } | - TransferReserveAsset { - dest: MultiLocation { parents: 1, interior: Here }, - .. - } - ) - }) { - return Err(()) // Deny - } - - // An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve` - // should not allow this, but we just log it here. - if matches!(origin, MultiLocation { parents: 1, interior: Here }) && - message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) - { - log::warn!( - target: "xcm::barriers", - "Unexpected ReserveAssetDeposited from the Relay Chain", - ); - } + } | + DepositReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } | + TransferReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } => { + Err(()) // Deny + }, + // An unexpected reserve transfer has arrived from the Relay Chain. Generally, + // `IsReserve` should not allow this, but we just log it here. + ReserveAssetDeposited { .. } + if matches!(origin, MultiLocation { parents: 1, interior: Here }) => + { + log::warn!( + target: "xcm::barrier", + "Unexpected ReserveAssetDeposited from the Relay Chain", + ); + Ok(ControlFlow::Continue(())) + }, + _ => Ok(ControlFlow::Continue(())), + }, + )?; + // Permit everything else Ok(()) } diff --git a/parachains/chain-specs/bridge-hub-kusama.json b/parachains/chain-specs/bridge-hub-kusama.json index f055a12680c..f49420b1747 100644 --- a/parachains/chain-specs/bridge-hub-kusama.json +++ b/parachains/chain-specs/bridge-hub-kusama.json @@ -19,8 +19,15 @@ "/dns/boot.stake.plus/tcp/41334/wss/p2p/12D3KooWBzbs2jsXjG5dipktGPKaUm9XWvkmeJFsEAGkVt946Aa7", "/dns/boot.metaspan.io/tcp/26032/p2p/12D3KooWKfuSaZrLNz43PDgM4inMALXRHTSh2WBuqQtZRq8zmT1Z", "/dns/boot.metaspan.io/tcp/26036/wss/p2p/12D3KooWKfuSaZrLNz43PDgM4inMALXRHTSh2WBuqQtZRq8zmT1Z", + "/dns/boot-ksm-bridgehub-cr.gatotech.network/tcp/31327/p2p/12D3KooWFQFmg8UqAYLDNc2onySB6o5LLvpbx3eXZVqz9YFxAmXs", + "/dns/boot-ksm-bridgehub-cr.gatotech.network/tcp/31427/ws/p2p/12D3KooWFQFmg8UqAYLDNc2onySB6o5LLvpbx3eXZVqz9YFxAmXs", + "/dns/boot-ksm-bridgehub-cr.gatotech.network/tcp/31527/wss/p2p/12D3KooWFQFmg8UqAYLDNc2onySB6o5LLvpbx3eXZVqz9YFxAmXs", "/dns/bridge-hub-kusama-bootnode.turboflakes.io/tcp/30615/p2p/12D3KooWE3dJXbwA5SQqbDNxHfj7BXJRcy2KiXWjJY4VUMKoa7S2", - "/dns/bridge-hub-kusama-bootnode.turboflakes.io/tcp/30715/wss/p2p/12D3KooWE3dJXbwA5SQqbDNxHfj7BXJRcy2KiXWjJY4VUMKoa7S2" + "/dns/bridge-hub-kusama-bootnode.turboflakes.io/tcp/30715/wss/p2p/12D3KooWE3dJXbwA5SQqbDNxHfj7BXJRcy2KiXWjJY4VUMKoa7S2", + "/dns/boot-node.helikon.io/tcp/10250/p2p/12D3KooWDJLkhqQdXcVKWX7CqJHnpAY6PzrPc4ZG2CUWnARbmguy", + "/dns/boot-node.helikon.io/tcp/10252/wss/p2p/12D3KooWDJLkhqQdXcVKWX7CqJHnpAY6PzrPc4ZG2CUWnARbmguy", + "/dns/bridge-hub-kusama.bootnode.amforc.com/tcp/30337/p2p/12D3KooWGNeQJ5rXnEJkVUuQqwHd8aV5GkTAheaRoCaK8ZwW94id", + "/dns/bridge-hub-kusama.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWGNeQJ5rXnEJkVUuQqwHd8aV5GkTAheaRoCaK8ZwW94id" ], "telemetryEndpoints": null, "protocolId": null, @@ -87,4 +94,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/parachains/chain-specs/collectives-polkadot.json b/parachains/chain-specs/collectives-polkadot.json index 06ca67073c4..99fc78ea4a6 100644 --- a/parachains/chain-specs/collectives-polkadot.json +++ b/parachains/chain-specs/collectives-polkadot.json @@ -19,8 +19,15 @@ "/dns/boot.stake.plus/tcp/37334/wss/p2p/12D3KooWRgFfEtwPo3xorKGYALRHRteKNgF37iN9q8xTLPYc34LA", "/dns/boot.metaspan.io/tcp/16072/p2p/12D3KooWJWTTu2t2yg5bFRH6tjEpfzKwZir5R9JRRjQpgFPXdDfp", "/dns/boot.metaspan.io/tcp/16076/wss/p2p/12D3KooWJWTTu2t2yg5bFRH6tjEpfzKwZir5R9JRRjQpgFPXdDfp", + "/dns/boot-dot-collectives-cr.gatotech.network/tcp/31316/p2p/12D3KooWGZsa9tSeLQ1VeC996e1YsCPuyRYMipHQuXikPjcKcpVQ", + "/dns/boot-dot-collectives-cr.gatotech.network/tcp/31416/ws/p2p/12D3KooWGZsa9tSeLQ1VeC996e1YsCPuyRYMipHQuXikPjcKcpVQ", + "/dns/boot-dot-collectives-cr.gatotech.network/tcp/31516/wss/p2p/12D3KooWGZsa9tSeLQ1VeC996e1YsCPuyRYMipHQuXikPjcKcpVQ", "/dns/collectives-polkadot-bootnode.turboflakes.io/tcp/30605/p2p/12D3KooWPyzM7eX64J4aG8uRfSARakDVtiEtthEM8FUjrLWAg2sC", - "/dns/collectives-polkadot-bootnode.turboflakes.io/tcp/30705/wss/p2p/12D3KooWPyzM7eX64J4aG8uRfSARakDVtiEtthEM8FUjrLWAg2sC" + "/dns/collectives-polkadot-bootnode.turboflakes.io/tcp/30705/wss/p2p/12D3KooWPyzM7eX64J4aG8uRfSARakDVtiEtthEM8FUjrLWAg2sC", + "/dns/boot-node.helikon.io/tcp/10230/p2p/12D3KooWS8CBz4P5CBny9aBy2EQUvAExFo9PUVT57X8r3zWMFkXT", + "/dns/boot-node.helikon.io/tcp/10232/wss/p2p/12D3KooWS8CBz4P5CBny9aBy2EQUvAExFo9PUVT57X8r3zWMFkXT", + "/dns/collectives-polkadot.bootnode.amforc.com/tcp/30335/p2p/12D3KooWQeAjDnGkrPe5vtpfnB6ydZfWyMxyrXLkBFmA6o4k9aiU", + "/dns/collectives-polkadot.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWQeAjDnGkrPe5vtpfnB6ydZfWyMxyrXLkBFmA6o4k9aiU" ], "telemetryEndpoints": null, "protocolId": null, @@ -91,4 +98,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/parachains/chain-specs/collectives-westend.json b/parachains/chain-specs/collectives-westend.json index 70a11e0a80e..db4552e046b 100644 --- a/parachains/chain-specs/collectives-westend.json +++ b/parachains/chain-specs/collectives-westend.json @@ -3,28 +3,35 @@ "id": "collectives_westend", "chainType": "Live", "bootNodes": [ - "/dns/westend-collectives-collator-0.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWN8B1ChzED6DkWekX3QnNo6fZ6gGGwjnAhSkhG6QsWkLr", - "/dns/westend-collectives-collator-1.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWHeAG244H1UfB8516KVspL1V7ubeeKLLnHNfxxDfbBAvg", - "/dns/westend-collectives-collator-2.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWFZQoNPiCdyPg5yzUhQJyBDo9XPYfNA97njfhH57smsud", - "/dns/westend-collectives-collator-3.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWQ7p65S7koitvskQuEwsoHHEM3g78pCdwZ5RpJi2FAtxE", - "/dns/westend-collectives-collator-4.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWCui467sJqUd7GzxB9HWpxrvXQfHWuYGN14KoSQwJQ9Sk", - "/dns/westend-collectives-collator-5.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWLGeRp67Y4LTpDYW15ophkcn8VAbNf4mhw9MXwPUamCss", - "/dns/westend-collectives-collator-6.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWDVdnw4fU8KsvVmXYwC7ifqsXssQgQ5rzPpBNEJPZewEB", - "/dns/westend-collectives-collator-7.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWCYmG2HhYQTSs7PHcrBcsdfte7SJhctW6PeTYLLDyN4Yb", - "/dns/westend-collectives-collator-0.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWN8B1ChzED6DkWekX3QnNo6fZ6gGGwjnAhSkhG6QsWkLr", - "/dns/westend-collectives-collator-1.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWHeAG244H1UfB8516KVspL1V7ubeeKLLnHNfxxDfbBAvg", - "/dns/westend-collectives-collator-2.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWFZQoNPiCdyPg5yzUhQJyBDo9XPYfNA97njfhH57smsud", - "/dns/westend-collectives-collator-3.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWQ7p65S7koitvskQuEwsoHHEM3g78pCdwZ5RpJi2FAtxE", - "/dns/westend-collectives-collator-4.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWCui467sJqUd7GzxB9HWpxrvXQfHWuYGN14KoSQwJQ9Sk", - "/dns/westend-collectives-collator-5.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWLGeRp67Y4LTpDYW15ophkcn8VAbNf4mhw9MXwPUamCss", - "/dns/westend-collectives-collator-6.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWDVdnw4fU8KsvVmXYwC7ifqsXssQgQ5rzPpBNEJPZewEB", - "/dns/westend-collectives-collator-7.parity-testnet.parity.io/tcp/443/wss/p2p/12D3KooWCYmG2HhYQTSs7PHcrBcsdfte7SJhctW6PeTYLLDyN4Yb", + "/dns/westend-collectives-collator-node-0.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWBMAuyzQu3yAf8YXyoyxsSzSsgoaqAepgnNyQcPaPjPXe", + "/dns/westend-collectives-collator-node-1.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWAujYtHbCs4MiDD57JNTntTJnYnikfnaPa7JdnMyAUrHB", + "/dns/westend-collectives-collator-node-2.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWP4pJg6pZUpxETd8Rs6GmS9FeRCeNtrBerqZhUyEPCiPp", + "/dns/westend-collectives-collator-node-3.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWBbrBYhXxFXhdio3AiuaqMG26pn91SUnd12gJiVn2Wh8Q", + "/dns/westend-collectives-collator-node-4.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWFBv97dMANBSh9uq31jcMGhJ99uhD7e6wLnX8prAGzoSU", + "/dns/westend-collectives-collator-node-5.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWQW73KGG5QYDkzE5fM7JwfkebuqVZLGWhnvaU7khhoRch", + "/dns/westend-collectives-collator-node-6.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWE5XiazVCPvG9wPw4k8hLguwnvwWWc463MJUC6mNbaioa", + "/dns/westend-collectives-collator-node-7.parity-testnet.parity.io/tcp/30334/p2p/12D3KooWGg3DezjZKG5DfbaWSc19nWybB4273wjHkeRTJoT1DQS2", + "/dns/westend-collectives-collator-0.polkadot.io/tcp/443/wss/p2p/12D3KooWBMAuyzQu3yAf8YXyoyxsSzSsgoaqAepgnNyQcPaPjPXe", + "/dns/westend-collectives-collator-1.polkadot.io/tcp/443/wss/p2p/12D3KooWAujYtHbCs4MiDD57JNTntTJnYnikfnaPa7JdnMyAUrHB", + "/dns/westend-collectives-collator-2.polkadot.io/tcp/443/wss/p2p/12D3KooWP4pJg6pZUpxETd8Rs6GmS9FeRCeNtrBerqZhUyEPCiPp", + "/dns/westend-collectives-collator-3.polkadot.io/tcp/443/wss/p2p/12D3KooWBbrBYhXxFXhdio3AiuaqMG26pn91SUnd12gJiVn2Wh8Q", + "/dns/westend-collectives-collator-4.polkadot.io/tcp/443/wss/p2p/12D3KooWFBv97dMANBSh9uq31jcMGhJ99uhD7e6wLnX8prAGzoSU", + "/dns/westend-collectives-collator-5.polkadot.io/tcp/443/wss/p2p/12D3KooWQW73KGG5QYDkzE5fM7JwfkebuqVZLGWhnvaU7khhoRch", + "/dns/westend-collectives-collator-6.polkadot.io/tcp/443/wss/p2p/12D3KooWE5XiazVCPvG9wPw4k8hLguwnvwWWc463MJUC6mNbaioa", + "/dns/westend-collectives-collator-7.polkadot.io/tcp/443/wss/p2p/12D3KooWGg3DezjZKG5DfbaWSc19nWybB4273wjHkeRTJoT1DQS2", "/dns/boot.stake.plus/tcp/38333/p2p/12D3KooWQoVsFCfgu21iu6kdtQsU9T6dPn1wsyLn1U34yPerR6zQ", "/dns/boot.stake.plus/tcp/38334/wss/p2p/12D3KooWQoVsFCfgu21iu6kdtQsU9T6dPn1wsyLn1U34yPerR6zQ", "/dns/boot.metaspan.io/tcp/36072/p2p/12D3KooWEf2QXWq5pAbFJLfbnexA7KYtRRDSPkqTP64n1KtdsdV2", "/dns/boot.metaspan.io/tcp/36076/wss/p2p/12D3KooWEf2QXWq5pAbFJLfbnexA7KYtRRDSPkqTP64n1KtdsdV2", + "/dns/boot-wnd-collectives-cr.gatotech.network/tcp/31336/p2p/12D3KooWMedtdBGiSn7HLZusHwafXkZAdmWD18ciGQBfS4X1fv9K", + "/dns/boot-wnd-collectives-cr.gatotech.network/tcp/31436/ws/p2p/12D3KooWMedtdBGiSn7HLZusHwafXkZAdmWD18ciGQBfS4X1fv9K", + "/dns/boot-wnd-collectives-cr.gatotech.network/tcp/31536/wss/p2p/12D3KooWMedtdBGiSn7HLZusHwafXkZAdmWD18ciGQBfS4X1fv9K", "/dns/collectives-westend-bootnode.turboflakes.io/tcp/30600/p2p/12D3KooWAe9CFXp6je3TAPQJE135KRemTLSqEqQBZMFwJontrThZ", - "/dns/collectives-westend-bootnode.turboflakes.io/tcp/30700/wss/p2p/12D3KooWAe9CFXp6je3TAPQJE135KRemTLSqEqQBZMFwJontrThZ" + "/dns/collectives-westend-bootnode.turboflakes.io/tcp/30700/wss/p2p/12D3KooWAe9CFXp6je3TAPQJE135KRemTLSqEqQBZMFwJontrThZ", + "/dns/boot-node.helikon.io/tcp/10260/p2p/12D3KooWMzfnt29VAmrJHQcJU6Vfn4RsMbqPqgyWHqt9VTTAbSrL", + "/dns/boot-node.helikon.io/tcp/10262/wss/p2p/12D3KooWMzfnt29VAmrJHQcJU6Vfn4RsMbqPqgyWHqt9VTTAbSrL", + "/dns/collectives-westend.bootnode.amforc.com/tcp/30340/p2p/12D3KooWERPzUhHau6o2XZRUi3tn7544rYiaHL418Nw5t8fYWP1F", + "/dns/collectives-westend.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWERPzUhHau6o2XZRUi3tn7544rYiaHL418Nw5t8fYWP1F" ], "telemetryEndpoints": null, "protocolId": null, diff --git a/parachains/chain-specs/statemine.json b/parachains/chain-specs/statemine.json index 400699ad347..dd32b21adb5 100644 --- a/parachains/chain-specs/statemine.json +++ b/parachains/chain-specs/statemine.json @@ -17,8 +17,15 @@ "/dns/boot.stake.plus/tcp/34334/wss/p2p/12D3KooWAzSSZ7jLqMw1WPomYEKCYANQaKemXQ8BKoFvNEvfmdqR", "/dns/boot.metaspan.io/tcp/26052/p2p/12D3KooW9z9hKqe3mqYAp5UJMhZiCqhkTHyiR43fegnGmTJ3JAba", "/dns/boot.metaspan.io/tcp/26056/wss/p2p/12D3KooW9z9hKqe3mqYAp5UJMhZiCqhkTHyiR43fegnGmTJ3JAba", + "/dns/boot-ksm-statemine-cr.gatotech.network/tcp/31325/p2p/12D3KooWRMUYeWMPkadDG8baX9j1e95fspfp8MhPGym5BQza7Fm5", + "/dns/boot-ksm-statemine-cr.gatotech.network/tcp/31425/ws/p2p/12D3KooWRMUYeWMPkadDG8baX9j1e95fspfp8MhPGym5BQza7Fm5", + "/dns/boot-ksm-statemine-cr.gatotech.network/tcp/31525/wss/p2p/12D3KooWRMUYeWMPkadDG8baX9j1e95fspfp8MhPGym5BQza7Fm5", "/dns/statemine-bootnode.turboflakes.io/tcp/30320/p2p/12D3KooWN2Qqvp5wWgjbBMpbqhKgvSibSHfomP5VWVD9VCn3VrV4", - "/dns/statemine-bootnode.turboflakes.io/tcp/30420/wss/p2p/12D3KooWN2Qqvp5wWgjbBMpbqhKgvSibSHfomP5VWVD9VCn3VrV4" + "/dns/statemine-bootnode.turboflakes.io/tcp/30420/wss/p2p/12D3KooWN2Qqvp5wWgjbBMpbqhKgvSibSHfomP5VWVD9VCn3VrV4", + "/dns/boot-node.helikon.io/tcp/10210/p2p/12D3KooWFXRQce3aMgZMn5SxvHtYH4PsR63TZLf8LrnBsEVTyzdr", + "/dns/boot-node.helikon.io/tcp/10212/wss/p2p/12D3KooWFXRQce3aMgZMn5SxvHtYH4PsR63TZLf8LrnBsEVTyzdr", + "/dns/statemine.bootnode.amforc.com/tcp/30336/p2p/12D3KooWHmSyrBWsc6fdpq8HtCFWasmLVLYGKWA2a78m4xAHKyBq", + "/dns/statemine.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWHmSyrBWsc6fdpq8HtCFWasmLVLYGKWA2a78m4xAHKyBq" ], "telemetryEndpoints": null, "protocolId": null, @@ -49,4 +56,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/parachains/chain-specs/statemint.json b/parachains/chain-specs/statemint.json index 5e0f3c16692..12d655ae7df 100644 --- a/parachains/chain-specs/statemint.json +++ b/parachains/chain-specs/statemint.json @@ -17,8 +17,15 @@ "/dns/boot.stake.plus/tcp/35334/wss/p2p/12D3KooWFrQjYaPZSSLLxEVmoaHFcrF6VoY4awG4KRSLaqy3JCdQ", "/dns/boot.metaspan.io/tcp/16052/p2p/12D3KooWLwiJuvqQUB4kYaSjLenFKH9dWZhGZ4qi7pSb3sUYU651", "/dns/boot.metaspan.io/tcp/16056/wss/p2p/12D3KooWLwiJuvqQUB4kYaSjLenFKH9dWZhGZ4qi7pSb3sUYU651", + "/dns/boot-dot-statemint-cr.gatotech.network/tcp/31315/p2p/12D3KooWKgwQfAeDoJARdtxFNNWfbYmcu6s4yUuSifnNoDgzHZgm", + "/dns/boot-dot-statemint-cr.gatotech.network/tcp/31415/ws/p2p/12D3KooWKgwQfAeDoJARdtxFNNWfbYmcu6s4yUuSifnNoDgzHZgm", + "/dns/boot-dot-statemint-cr.gatotech.network/tcp/31515/wss/p2p/12D3KooWKgwQfAeDoJARdtxFNNWfbYmcu6s4yUuSifnNoDgzHZgm", "/dns/statemint-bootnode.turboflakes.io/tcp/30315/p2p/12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo", - "/dns/statemint-bootnode.turboflakes.io/tcp/30415/wss/p2p/12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo" + "/dns/statemint-bootnode.turboflakes.io/tcp/30415/wss/p2p/12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo", + "/dns/boot-node.helikon.io/tcp/10220/p2p/12D3KooW9uybhguhDjVJc3U3kgZC3i8rWmAnSpbnJkmuR7C6ZsRW", + "/dns/boot-node.helikon.io/tcp/10222/wss/p2p/12D3KooW9uybhguhDjVJc3U3kgZC3i8rWmAnSpbnJkmuR7C6ZsRW", + "/dns/statemint.bootnode.amforc.com/tcp/30341/p2p/12D3KooWByohP9FXn7ao8syS167qJsbFdpa7fY2Y24xbKtt3r7Ls", + "/dns/statemint.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWByohP9FXn7ao8syS167qJsbFdpa7fY2Y24xbKtt3r7Ls" ], "telemetryEndpoints": null, "protocolId": null, @@ -51,4 +58,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/parachains/chain-specs/westmint.json b/parachains/chain-specs/westmint.json index be1053ebd1d..3516fbfaa56 100644 --- a/parachains/chain-specs/westmint.json +++ b/parachains/chain-specs/westmint.json @@ -3,17 +3,24 @@ "id": "westmint", "chainType": "Live", "bootNodes": [ - "/ip4/35.204.21.205/tcp/30334/p2p/12D3KooWLjaXWhNTSiRVFbTJCKLRWt9XXHLGVnAFtxvnExKkVPqn", - "/ip4/34.141.171.170/tcp/30334/p2p/12D3KooWBNy2Jdrjv2P7sdfb1mzH1AGzwjip5rW4N2Ft1T3Hdq5c", - "/ip4/34.141.221.252/tcp/30334/p2p/12D3KooWC9YYdjQLwxTNVda6t4nmjAZG37gaRZLNi4Zuhr9xUveW", - "/ip4/34.90.92.174/tcp/30334/p2p/12D3KooWQcXpUyVqwC2zJkwECCC7ttLCUCLTjnbGxTVfhSgmH2sD", - "/dns/boot.stake.plus/tcp/33333/p2p/12D3KooWNiB27rpXX7EYongoWWUeRKzLQxWGms6MQU2B9LX7Ztzo", - "/dns/boot.stake.plus/tcp/33334/wss/p2p/12D3KooWNiB27rpXX7EYongoWWUeRKzLQxWGms6MQU2B9LX7Ztzo", - "/dns/boot.metaspan.io/tcp/36052/p2p/12D3KooWBCqfNb6Y39DXTr4UBWXyjuS3hcZM1qTbHhDXxF6HkAJJ", - "/dns/boot.metaspan.io/tcp/36056/wss/p2p/12D3KooWBCqfNb6Y39DXTr4UBWXyjuS3hcZM1qTbHhDXxF6HkAJJ", - "/dns/westmint-bootnode.turboflakes.io/tcp/30325/p2p/12D3KooWHU4qqSyqKdbXdrCTMXUJxxueaZjqpqSaQqYiFPw6XqEx", - "/dns/westmint-bootnode.turboflakes.io/tcp/30425/wss/p2p/12D3KooWHU4qqSyqKdbXdrCTMXUJxxueaZjqpqSaQqYiFPw6XqEx" - ], + "/ip4/35.204.21.205/tcp/30334/p2p/12D3KooWLjaXWhNTSiRVFbTJCKLRWt9XXHLGVnAFtxvnExKkVPqn", + "/ip4/34.141.171.170/tcp/30334/p2p/12D3KooWBNy2Jdrjv2P7sdfb1mzH1AGzwjip5rW4N2Ft1T3Hdq5c", + "/ip4/34.141.221.252/tcp/30334/p2p/12D3KooWC9YYdjQLwxTNVda6t4nmjAZG37gaRZLNi4Zuhr9xUveW", + "/ip4/34.90.92.174/tcp/30334/p2p/12D3KooWQcXpUyVqwC2zJkwECCC7ttLCUCLTjnbGxTVfhSgmH2sD", + "/dns/boot.stake.plus/tcp/33333/p2p/12D3KooWNiB27rpXX7EYongoWWUeRKzLQxWGms6MQU2B9LX7Ztzo", + "/dns/boot.stake.plus/tcp/33334/wss/p2p/12D3KooWNiB27rpXX7EYongoWWUeRKzLQxWGms6MQU2B9LX7Ztzo", + "/dns/boot.metaspan.io/tcp/36052/p2p/12D3KooWBCqfNb6Y39DXTr4UBWXyjuS3hcZM1qTbHhDXxF6HkAJJ", + "/dns/boot.metaspan.io/tcp/36056/wss/p2p/12D3KooWBCqfNb6Y39DXTr4UBWXyjuS3hcZM1qTbHhDXxF6HkAJJ", + "/dns/boot-wnd-westmint-cr.gatotech.network/tcp/31335/p2p/12D3KooWMSW6hr8KcNBhGFN1bg8kYC76o67PnuDEbxRhxacW6dui", + "/dns/boot-wnd-westmint-cr.gatotech.network/tcp/31435/ws/p2p/12D3KooWMSW6hr8KcNBhGFN1bg8kYC76o67PnuDEbxRhxacW6dui", + "/dns/boot-wnd-westmint-cr.gatotech.network/tcp/31535/wss/p2p/12D3KooWMSW6hr8KcNBhGFN1bg8kYC76o67PnuDEbxRhxacW6dui", + "/dns/westmint-bootnode.turboflakes.io/tcp/30325/p2p/12D3KooWHU4qqSyqKdbXdrCTMXUJxxueaZjqpqSaQqYiFPw6XqEx", + "/dns/westmint-bootnode.turboflakes.io/tcp/30425/wss/p2p/12D3KooWHU4qqSyqKdbXdrCTMXUJxxueaZjqpqSaQqYiFPw6XqEx", + "/dns/boot-node.helikon.io/tcp/10200/p2p/12D3KooWMRY8wb7rMT81LLuivvsy6ahUxKHQgYJw4zm1hC1uYLxb", + "/dns/boot-node.helikon.io/tcp/10202/wss/p2p/12D3KooWMRY8wb7rMT81LLuivvsy6ahUxKHQgYJw4zm1hC1uYLxb", + "/dns/westmint.bootnode.amforc.com/tcp/30339/p2p/12D3KooWNjKeaANaeZxBAPctmx8jugSYzuw4vnSCJmEDPB5mtRd6", + "/dns/westmint.bootnode.amforc.com/tcp/30333/wss/p2p/12D3KooWNjKeaANaeZxBAPctmx8jugSYzuw4vnSCJmEDPB5mtRd6" + ], "telemetryEndpoints": null, "protocolId": null, "relay_chain": "westend", @@ -42,4 +49,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index ac4cd8858e7..753aa97c6fe 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -1,12 +1,12 @@ use crate::impls::AccountIdOf; -use core::marker::PhantomData; +use core::{marker::PhantomData, ops::ControlFlow}; use frame_support::{ log, traits::{fungibles::Inspect, tokens::BalanceConversion, ContainsPair}, weights::{Weight, WeightToFee, WeightToFeePolynomial}, }; use sp_runtime::traits::Get; -use xcm::latest::prelude::*; +use xcm::{latest::prelude::*, CreateMatcher, MatchXcm}; use xcm_executor::traits::ShouldExecute; //TODO: move DenyThenTry to polkadot's xcm module. @@ -42,32 +42,38 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.iter().any(|inst| { - matches!( - inst, + message.matcher().match_next_inst_while( + |_| true, + |inst| match inst { InitiateReserveWithdraw { reserve: MultiLocation { parents: 1, interior: Here }, .. - } | DepositReserveAsset { dest: MultiLocation { parents: 1, interior: Here }, .. } | - TransferReserveAsset { - dest: MultiLocation { parents: 1, interior: Here }, - .. - } - ) - }) { - return Err(()) // Deny - } + } | + DepositReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } | + TransferReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } => { + Err(()) // Deny + }, + + // An unexpected reserve transfer has arrived from the Relay Chain. Generally, + // `IsReserve` should not allow this, but we just log it here. + ReserveAssetDeposited { .. } + if matches!(origin, MultiLocation { parents: 1, interior: Here }) => + { + log::warn!( + target: "xcm::barrier", + "Unexpected ReserveAssetDeposited from the Relay Chain", + ); + Ok(ControlFlow::Continue(())) + }, + + _ => Ok(ControlFlow::Continue(())), + }, + )?; - // An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve` - // should not allow this, but we just log it here. - if matches!(origin, MultiLocation { parents: 1, interior: Here }) && - message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) - { - log::warn!( - target: "xcm::barriers", - "Unexpected ReserveAssetDeposited from the Relay Chain", - ); - } // Permit everything else Ok(()) } diff --git a/parachains/pallets/parachain-info/src/lib.rs b/parachains/pallets/parachain-info/src/lib.rs index 9cb20c9f1e6..d61387aaeb6 100644 --- a/parachains/pallets/parachain-info/src/lib.rs +++ b/parachains/pallets/parachain-info/src/lib.rs @@ -27,7 +27,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/parachains/pallets/ping/src/lib.rs b/parachains/pallets/ping/src/lib.rs index 2c9e5a40aff..956457f5916 100644 --- a/parachains/pallets/ping/src/lib.rs +++ b/parachains/pallets/ping/src/lib.rs @@ -40,7 +40,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The module configuration trait. diff --git a/parachains/runtimes/assets/common/Cargo.toml b/parachains/runtimes/assets/common/Cargo.toml new file mode 100644 index 00000000000..c551a97757b --- /dev/null +++ b/parachains/runtimes/assets/common/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "assets-common" +version = "0.1.0" +authors = ["Parity Technologies "] +edition = "2021" +description = "Assets common utilities" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } + +# Substrate +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } + +# Polkadot +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } + +# Cumulus +parachains-common = { path = "../../../common", default-features = false } + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } + +[features] +default = [ "std" ] +std = [ + "codec/std", + "frame-support/std", + "parachains-common/std", + "sp-api/std", + "sp-std/std", + "xcm/std", + "xcm-builder/std", + "xcm-executor/std", +] diff --git a/parachains/runtimes/assets/common/src/fungible_conversion.rs b/parachains/runtimes/assets/common/src/fungible_conversion.rs new file mode 100644 index 00000000000..2b8413cfe6e --- /dev/null +++ b/parachains/runtimes/assets/common/src/fungible_conversion.rs @@ -0,0 +1,136 @@ +// This file is part of Substrate. + +// Copyright (C) 2018-2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Runtime API definition for assets. + +use crate::runtime_api::FungiblesAccessError; +use sp_std::{borrow::Borrow, vec::Vec}; +use xcm::latest::{MultiAsset, MultiLocation}; +use xcm_builder::ConvertedConcreteId; +use xcm_executor::traits::{Convert, MatchesFungibles}; + +/// Converting any [`(AssetId, Balance)`] to [`MultiAsset`] +pub trait MultiAssetConverter: + MatchesFungibles +where + AssetId: Clone, + Balance: Clone, + ConvertAssetId: Convert, + ConvertBalance: Convert, +{ + fn convert_ref( + value: impl Borrow<(AssetId, Balance)>, + ) -> Result; +} + +impl< + AssetId: Clone, + Balance: Clone, + ConvertAssetId: Convert, + ConvertBalance: Convert, + > MultiAssetConverter + for ConvertedConcreteId +{ + fn convert_ref( + value: impl Borrow<(AssetId, Balance)>, + ) -> Result { + let (asset_id, balance) = value.borrow(); + match ConvertAssetId::reverse_ref(asset_id) { + Ok(asset_id_as_multilocation) => match ConvertBalance::reverse_ref(balance) { + Ok(amount) => Ok((asset_id_as_multilocation, amount).into()), + Err(_) => Err(FungiblesAccessError::AmountToBalanceConversionFailed), + }, + Err(_) => Err(FungiblesAccessError::AssetIdConversionFailed), + } + } +} + +/// Helper function to convert collections with [`(AssetId, Balance)`] to [`MultiAsset`] +pub fn convert<'a, AssetId, Balance, ConvertAssetId, ConvertBalance, Converter>( + items: impl Iterator, +) -> Result, FungiblesAccessError> +where + AssetId: Clone + 'a, + Balance: Clone + 'a, + ConvertAssetId: Convert, + ConvertBalance: Convert, + Converter: MultiAssetConverter, +{ + items.map(Converter::convert_ref).collect() +} + +/// Helper function to convert `Balance` with MultiLocation` to `MultiAsset` +pub fn convert_balance< + T: frame_support::pallet_prelude::Get, + Balance: TryInto, +>( + balance: Balance, +) -> Result { + match balance.try_into() { + Ok(balance) => Ok((T::get(), balance).into()), + Err(_) => Err(FungiblesAccessError::AmountToBalanceConversionFailed), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + use xcm::latest::prelude::*; + use xcm_executor::traits::{Identity, JustTry}; + + type Converter = ConvertedConcreteId; + + #[test] + fn converted_concrete_id_fungible_multi_asset_conversion_roundtrip_works() { + let location = MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32])))); + let amount = 123456_u64; + let expected_multi_asset = MultiAsset { + id: Concrete(MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32]))))), + fun: Fungible(123456_u128), + }; + + assert_eq!( + Converter::matches_fungibles(&expected_multi_asset).map_err(|_| ()), + Ok((location, amount)) + ); + + assert_eq!(Converter::convert_ref((location, amount)), Ok(expected_multi_asset)); + } + + #[test] + fn converted_concrete_id_fungible_multi_asset_conversion_collection_works() { + let data = vec![ + (MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32])))), 123456_u64), + (MultiLocation::new(1, X1(GlobalConsensus(ByGenesis([1; 32])))), 654321_u64), + ]; + + let expected_data = vec![ + MultiAsset { + id: Concrete(MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32]))))), + fun: Fungible(123456_u128), + }, + MultiAsset { + id: Concrete(MultiLocation::new(1, X1(GlobalConsensus(ByGenesis([1; 32]))))), + fun: Fungible(654321_u128), + }, + ]; + + assert_eq!(convert::<_, _, _, _, Converter>(data.iter()), Ok(expected_data)); + } +} diff --git a/parachains/runtimes/assets/common/src/lib.rs b/parachains/runtimes/assets/common/src/lib.rs new file mode 100644 index 00000000000..28d8ca59106 --- /dev/null +++ b/parachains/runtimes/assets/common/src/lib.rs @@ -0,0 +1,70 @@ +// Copyright (C) 2023 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![cfg_attr(not(feature = "std"), no_std)] + +pub mod fungible_conversion; +pub mod runtime_api; + +use parachains_common::AssetIdForTrustBackedAssets; +use xcm_builder::{AsPrefixedGeneralIndex, ConvertedConcreteId}; +use xcm_executor::traits::JustTry; + +/// `MultiLocation` vs `AssetIdForTrustBackedAssets` converter for `TrustBackedAssets` +pub type AssetIdForTrustBackedAssetsConvert = + AsPrefixedGeneralIndex; + +/// [`ConvertedConcreteId`] converter dedicated for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + ConvertedConcreteId< + AssetIdForTrustBackedAssets, + Balance, + AssetIdForTrustBackedAssetsConvert, + JustTry, + >; + +#[cfg(test)] +mod tests { + + use super::*; + use xcm::latest::prelude::*; + use xcm_executor::traits::Convert; + + frame_support::parameter_types! { + pub TrustBackedAssetsPalletLocation: MultiLocation = MultiLocation::new(5, X1(PalletInstance(13))); + } + + #[test] + fn asset_id_for_trust_backed_assets_convert_works() { + let local_asset_id = 123456789 as AssetIdForTrustBackedAssets; + let expected_reverse_ref = + MultiLocation::new(5, X2(PalletInstance(13), GeneralIndex(local_asset_id.into()))); + + assert_eq!( + AssetIdForTrustBackedAssetsConvert::::reverse_ref( + local_asset_id + ) + .unwrap(), + expected_reverse_ref + ); + assert_eq!( + AssetIdForTrustBackedAssetsConvert::::convert_ref( + expected_reverse_ref + ) + .unwrap(), + local_asset_id + ); + } +} diff --git a/parachains/runtimes/assets/common/src/runtime_api.rs b/parachains/runtimes/assets/common/src/runtime_api.rs new file mode 100644 index 00000000000..6d060f22687 --- /dev/null +++ b/parachains/runtimes/assets/common/src/runtime_api.rs @@ -0,0 +1,41 @@ +// Copyright (C) 2023 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Runtime API definition for fungibles. + +use codec::{Codec, Decode, Encode}; +use frame_support::RuntimeDebug; +use sp_std::vec::Vec; +use xcm::latest::MultiAsset; + +/// The possible errors that can happen querying the storage of assets. +#[derive(Eq, PartialEq, Encode, Decode, RuntimeDebug)] +pub enum FungiblesAccessError { + /// `MultiLocation` to `AssetId`/`ClassId` conversion failed. + AssetIdConversionFailed, + /// `u128` amount to currency `Balance` conversion failed. + AmountToBalanceConversionFailed, +} + +sp_api::decl_runtime_apis! { + /// The API for querying account's balances from runtime. + pub trait FungiblesApi + where + AccountId: Codec, + { + /// Returns the list of all [`MultiAsset`] that an `AccountId` has. + fn query_account_balances(account: AccountId) -> Result, FungiblesAccessError>; + } +} diff --git a/parachains/runtimes/assets/statemine/Cargo.toml b/parachains/runtimes/assets/statemine/Cargo.toml index 7ec11cf5786..0f0921976a8 100644 --- a/parachains/runtimes/assets/statemine/Cargo.toml +++ b/parachains/runtimes/assets/statemine/Cargo.toml @@ -49,6 +49,7 @@ pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", # Polkadot kusama-runtime-constants = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -69,8 +70,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } - +assets-common = { path = "../common", default-features = false } [dev-dependencies] asset-test-utils = { path = "../test-utils"} @@ -187,4 +187,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 90cd768f989..446ae77bc2b 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -64,7 +64,7 @@ use parachains_common::{ Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{KsmLocation, XcmConfig}; +use xcm_config::{KsmLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -89,10 +89,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 11, + transaction_version: 12, state_version: 1, }; @@ -102,10 +102,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 11, + transaction_version: 12, state_version: 0, }; @@ -730,6 +730,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { @@ -831,6 +839,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/statemine/src/weights/block_weights.rs b/parachains/runtimes/assets/statemine/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/assets/statemine/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs index 80173f5e887..9730e2df7b6 100644 --- a/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_956 nanoseconds. - Weight::from_ref_time(5_108_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_108_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_945 nanoseconds. - Weight::from_ref_time(5_080_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_080_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/statemine/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemine/src/weights/frame_system.rs b/parachains/runtimes/assets/statemine/src/weights/frame_system.rs index d6ae8200fd6..11188b93267 100644 --- a/parachains/runtimes/assets/statemine/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/statemine/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_524 nanoseconds. - Weight::from_ref_time(1_612_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_612_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(413).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(413, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_865 nanoseconds. - Weight::from_ref_time(6_939_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_939_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_762).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_762, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_490 nanoseconds. - Weight::from_ref_time(3_688_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_688_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_683 nanoseconds. - Weight::from_ref_time(1_726_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_726_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_736 - .saturating_add(Weight::from_ref_time(582_823).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(582_823, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_711 nanoseconds. - Weight::from_ref_time(1_787_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_787_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 779 - .saturating_add(Weight::from_ref_time(445_878).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(445_878, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `81 + p * (69 ±0)` // Estimated: `72 + p * (70 ±0)` // Minimum execution time: 3_428 nanoseconds. - Weight::from_ref_time(3_492_000) - .saturating_add(Weight::from_proof_size(72)) + Weight::from_parts(3_492_000, 0) + .saturating_add(Weight::from_parts(0, 72)) // Standard Error: 991 - .saturating_add(Weight::from_ref_time(953_258).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(953_258, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs index c266dacc2de..1ecec9b5e09 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs @@ -56,8 +56,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `141` // Estimated: `5288` // Minimum execution time: 21_487 nanoseconds. - Weight::from_ref_time(21_977_000) - .saturating_add(Weight::from_proof_size(5288)) + Weight::from_parts(21_977_000, 0) + .saturating_add(Weight::from_parts(0, 5288)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `6` // Estimated: `2685` // Minimum execution time: 10_630 nanoseconds. - Weight::from_ref_time(10_963_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(10_963_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 13_627 nanoseconds. - Weight::from_ref_time(13_906_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_906_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -97,15 +97,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `0 + c * (240 ±0)` // Estimated: `5262 + c * (5180 ±0)` // Minimum execution time: 15_861 nanoseconds. - Weight::from_ref_time(16_079_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_079_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) // Standard Error: 10_732 - .saturating_add(Weight::from_ref_time(14_192_928).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(14_192_928, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(5180).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -117,15 +117,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `446 + a * (86 ±0)` // Estimated: `5308 + a * (2623 ±0)` // Minimum execution time: 16_455 nanoseconds. - Weight::from_ref_time(16_720_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(16_720_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) // Standard Error: 7_111 - .saturating_add(Weight::from_ref_time(13_717_750).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(13_717_750, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2623).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -136,8 +136,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 12_819 nanoseconds. - Weight::from_ref_time(13_111_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(13_111_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,8 +150,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5262` // Minimum execution time: 22_897 nanoseconds. - Weight::from_ref_time(23_386_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(23_386_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -164,8 +164,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 28_432 nanoseconds. - Weight::from_ref_time(28_903_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(28_903_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -180,8 +180,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 39_823 nanoseconds. - Weight::from_ref_time(40_380_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(40_380_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -196,8 +196,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 34_924 nanoseconds. - Weight::from_ref_time(35_584_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(35_584_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -212,8 +212,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 39_647 nanoseconds. - Weight::from_ref_time(40_611_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(40_611_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -226,8 +226,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 16_462 nanoseconds. - Weight::from_ref_time(16_821_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_821_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -240,8 +240,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 16_416 nanoseconds. - Weight::from_ref_time(16_758_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_758_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_853 nanoseconds. - Weight::from_ref_time(13_257_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_257_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -264,8 +264,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_422 nanoseconds. - Weight::from_ref_time(12_763_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_763_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 13_950 nanoseconds. - Weight::from_ref_time(14_242_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(14_242_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -290,8 +290,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 12_726 nanoseconds. - Weight::from_ref_time(13_072_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_072_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -306,10 +306,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 22_772 nanoseconds. - Weight::from_ref_time(24_026_274) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(24_026_274, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 1_231 - .saturating_add(Weight::from_ref_time(203).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(203, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -322,8 +322,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 23_310 nanoseconds. - Weight::from_ref_time(23_724_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_724_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,12 +338,12 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `82` // Estimated: `5300` // Minimum execution time: 12_379 nanoseconds. - Weight::from_ref_time(12_903_065) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(12_903_065, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 330 - .saturating_add(Weight::from_ref_time(667).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(667, 0).saturating_mul(n.into())) // Standard Error: 330 - .saturating_add(Weight::from_ref_time(2_891).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(2_891, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -356,8 +356,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 23_531 nanoseconds. - Weight::from_ref_time(23_845_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_845_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -368,8 +368,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 12_426 nanoseconds. - Weight::from_ref_time(12_888_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_888_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -382,8 +382,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `5308` // Minimum execution time: 26_365 nanoseconds. - Weight::from_ref_time(26_700_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(26_700_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -400,8 +400,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `553` // Estimated: `13065` // Minimum execution time: 53_167 nanoseconds. - Weight::from_ref_time(53_564_000) - .saturating_add(Weight::from_proof_size(13065)) + Weight::from_parts(53_564_000, 0) + .saturating_add(Weight::from_parts(0, 13065)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -414,8 +414,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 28_120 nanoseconds. - Weight::from_ref_time(28_540_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_540_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -428,9 +428,21 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 28_503 nanoseconds. - Weight::from_ref_time(28_988_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_988_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 16_213 nanoseconds. + Weight::from_parts(16_575_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs index 3435e6ab127..0b86b3ebfca 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1178` // Estimated: `2603` // Minimum execution time: 46_493 nanoseconds. - Weight::from_ref_time(47_804_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(47_804_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1062` // Estimated: `2603` // Minimum execution time: 35_020 nanoseconds. - Weight::from_ref_time(35_462_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(35_462_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `2603` // Minimum execution time: 26_282 nanoseconds. - Weight::from_ref_time(26_915_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_915_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `2603` // Minimum execution time: 29_529 nanoseconds. - Weight::from_ref_time(30_135_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(30_135_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `5206` // Minimum execution time: 46_969 nanoseconds. - Weight::from_ref_time(47_657_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(47_657_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1062` // Estimated: `2603` // Minimum execution time: 41_398 nanoseconds. - Weight::from_ref_time(42_012_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(42_012_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1058` // Estimated: `2603` // Minimum execution time: 22_969 nanoseconds. - Weight::from_ref_time(23_548_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(23_548_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs index 448f90806b4..4ad4a2ffce2 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `178 + b * (78 ±0)` // Estimated: `178 + b * (2554 ±0)` // Minimum execution time: 14_234 nanoseconds. - Weight::from_ref_time(15_794_150) - .saturating_add(Weight::from_proof_size(178)) + Weight::from_parts(15_794_150, 0) + .saturating_add(Weight::from_parts(0, 178)) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_477_800).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_477_800, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 7_190 nanoseconds. - Weight::from_ref_time(7_441_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_441_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 7_495 nanoseconds. - Weight::from_ref_time(7_666_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_666_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1171 + c * (48 ±0)` // Estimated: `56784 + c * (49 ±0)` // Minimum execution time: 35_713 nanoseconds. - Weight::from_ref_time(27_978_009) - .saturating_add(Weight::from_proof_size(56784)) + Weight::from_parts(27_978_009, 0) + .saturating_add(Weight::from_parts(0, 56784)) // Standard Error: 1_293 - .saturating_add(Weight::from_ref_time(111_881).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(111_881, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `536 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 27_164 nanoseconds. - Weight::from_ref_time(16_901_858) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(16_901_858, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_312 - .saturating_add(Weight::from_ref_time(108_799).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(108_799, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `135` // Estimated: `5749` // Minimum execution time: 26_007 nanoseconds. - Weight::from_ref_time(26_416_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(26_416_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22784 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2602 ±0)` // Minimum execution time: 16_056 nanoseconds. - Weight::from_ref_time(16_335_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_335_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 806_799 - .saturating_add(Weight::from_ref_time(29_195_677).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(29_195_677, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs index b4b4b6f007f..37355802376 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 12_185 nanoseconds. - Weight::from_ref_time(12_423_059) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_423_059, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(596).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(596, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `311 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_394 nanoseconds. - Weight::from_ref_time(28_339_222) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_339_222, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 525 - .saturating_add(Weight::from_ref_time(76_810).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(76_810, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_641).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_641, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 26_605 nanoseconds. - Weight::from_ref_time(19_882_694) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_882_694, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 486 - .saturating_add(Weight::from_ref_time(73_686).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(73_686, 0).saturating_mul(s.into())) // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_615).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_615, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `448 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 40_558 nanoseconds. - Weight::from_ref_time(31_782_538) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(31_782_538, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 587 - .saturating_add(Weight::from_ref_time(94_913).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(94_913, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_647).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_647, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `318 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 24_889 nanoseconds. - Weight::from_ref_time(27_183_432) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_183_432, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 835 - .saturating_add(Weight::from_ref_time(79_518).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(79_518, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 17_143 nanoseconds. - Weight::from_ref_time(18_532_968) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_532_968, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 632 - .saturating_add(Weight::from_ref_time(75_565).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(75_565, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 26_917 nanoseconds. - Weight::from_ref_time(28_425_612) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_425_612, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 685 - .saturating_add(Weight::from_ref_time(81_581).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(81_581, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs index 8175cbfcd0c..c4c259678fc 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs @@ -55,10 +55,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 15_168 nanoseconds. - Weight::from_ref_time(15_986_761) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(15_986_761, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 2_885 - .saturating_add(Weight::from_ref_time(12_185).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(12_185, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Proxy Proxies (r:1 w:0) @@ -74,12 +74,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `550 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 32_310 nanoseconds. - Weight::from_ref_time(32_466_194) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(32_466_194, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_813 - .saturating_add(Weight::from_ref_time(120_725).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(120_725, 0).saturating_mul(a.into())) // Standard Error: 1_873 - .saturating_add(Weight::from_ref_time(32_578).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(32_578, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,12 +94,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_363 nanoseconds. - Weight::from_ref_time(21_135_277) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_135_277, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_404 - .saturating_add(Weight::from_ref_time(120_045).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(120_045, 0).saturating_mul(a.into())) // Standard Error: 1_450 - .saturating_add(Weight::from_ref_time(8_992).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(8_992, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,12 +114,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_086 nanoseconds. - Weight::from_ref_time(21_145_287) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_145_287, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_612 - .saturating_add(Weight::from_ref_time(113_598).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(113_598, 0).saturating_mul(a.into())) // Standard Error: 1_666 - .saturating_add(Weight::from_ref_time(11_520).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(11_520, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -136,12 +136,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `482 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 27_819 nanoseconds. - Weight::from_ref_time(28_662_588) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(28_662_588, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 2_297 - .saturating_add(Weight::from_ref_time(128_485).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(128_485, 0).saturating_mul(a.into())) // Standard Error: 2_373 - .saturating_add(Weight::from_ref_time(47_044).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(47_044, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -153,10 +153,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 21_187 nanoseconds. - Weight::from_ref_time(22_430_290) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(22_430_290, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 6_530 - .saturating_add(Weight::from_ref_time(43_133).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(43_133, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,10 +168,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 20_985 nanoseconds. - Weight::from_ref_time(21_852_273) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(21_852_273, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_662 - .saturating_add(Weight::from_ref_time(66_644).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(66_644, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -183,10 +183,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 16_958 nanoseconds. - Weight::from_ref_time(17_752_361) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(17_752_361, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_173 - .saturating_add(Weight::from_ref_time(25_691).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(25_691, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,10 +198,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `139` // Estimated: `3716` // Minimum execution time: 23_055 nanoseconds. - Weight::from_ref_time(23_892_965) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(23_892_965, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_390 - .saturating_add(Weight::from_ref_time(16_195).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(16_195, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -213,8 +213,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `196 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 18_344 nanoseconds. - Weight::from_ref_time(20_533_110) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(20_533_110, 0) + .saturating_add(Weight::from_parts(0, 3716)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs index 9bc140dd31e..773068d7e10 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `270` // Estimated: `5490` // Minimum execution time: 15_187 nanoseconds. - Weight::from_ref_time(15_459_000) - .saturating_add(Weight::from_proof_size(5490)) + Weight::from_parts(15_459_000, 0) + .saturating_add(Weight::from_parts(0, 5490)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `2959` // Minimum execution time: 11_795 nanoseconds. - Weight::from_ref_time(11_994_000) - .saturating_add(Weight::from_proof_size(2959)) + Weight::from_parts(11_994_000, 0) + .saturating_add(Weight::from_parts(0, 2959)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs index 08c45bc99fd..0802c0eb098 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `86` // Estimated: `1006` // Minimum execution time: 8_408 nanoseconds. - Weight::from_ref_time(8_706_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(8_706_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_185 nanoseconds. - Weight::from_ref_time(3_282_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_282_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs index 147438f2436..5bd62a1fc8d 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs @@ -56,8 +56,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `177` // Estimated: `2653` // Minimum execution time: 24_517 nanoseconds. - Weight::from_ref_time(24_884_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(24_884_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2653` // Minimum execution time: 13_312 nanoseconds. - Weight::from_ref_time(13_652_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_652_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -99,21 +99,21 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `289 + n * (108 ±0) + m * (56 ±0) + a * (107 ±0)` // Estimated: `5250 + n * (2597 ±0)` // Minimum execution time: 2_287_290 nanoseconds. - Weight::from_ref_time(2_319_526_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(2_319_526_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) // Standard Error: 25_275 - .saturating_add(Weight::from_ref_time(8_587_226).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(8_587_226, 0).saturating_mul(n.into())) // Standard Error: 25_275 - .saturating_add(Weight::from_ref_time(193_381).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(193_381, 0).saturating_mul(m.into())) // Standard Error: 25_275 - .saturating_add(Weight::from_ref_time(296_151).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(296_151, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -128,8 +128,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `7749` // Minimum execution time: 29_225 nanoseconds. - Weight::from_ref_time(29_894_000) - .saturating_add(Weight::from_proof_size(7749)) + Weight::from_parts(29_894_000, 0) + .saturating_add(Weight::from_parts(0, 7749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -146,8 +146,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 30_673 nanoseconds. - Weight::from_ref_time(31_553_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(31_553_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -164,8 +164,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 24_944 nanoseconds. - Weight::from_ref_time(25_233_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(25_233_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -179,15 +179,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `770 + i * (108 ±0)` // Estimated: `2653 + i * (2597 ±0)` // Minimum execution time: 14_364 nanoseconds. - Weight::from_ref_time(14_520_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(14_520_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) // Standard Error: 12_908 - .saturating_add(Weight::from_ref_time(12_176_880).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(12_176_880, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -198,8 +198,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 17_798 nanoseconds. - Weight::from_ref_time(18_009_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(18_009_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -212,8 +212,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 17_924 nanoseconds. - Weight::from_ref_time(18_168_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(18_168_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -224,8 +224,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_425 nanoseconds. - Weight::from_ref_time(13_846_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_846_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -236,8 +236,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_484 nanoseconds. - Weight::from_ref_time(13_715_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_715_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `388` // Estimated: `5180` // Minimum execution time: 21_132 nanoseconds. - Weight::from_ref_time(21_421_000) - .saturating_add(Weight::from_proof_size(5180)) + Weight::from_parts(21_421_000, 0) + .saturating_add(Weight::from_parts(0, 5180)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -264,8 +264,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_763 nanoseconds. - Weight::from_ref_time(14_136_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(14_136_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 16_125 nanoseconds. - Weight::from_ref_time(16_516_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(16_516_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -294,8 +294,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `7962` // Minimum execution time: 34_408 nanoseconds. - Weight::from_ref_time(34_820_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(34_820_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -310,8 +310,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `851` // Estimated: `7962` // Minimum execution time: 33_385 nanoseconds. - Weight::from_ref_time(34_088_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(34_088_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -324,8 +324,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `380` // Estimated: `5315` // Minimum execution time: 27_303 nanoseconds. - Weight::from_ref_time(27_692_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(27_692_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -338,8 +338,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `5315` // Minimum execution time: 27_530 nanoseconds. - Weight::from_ref_time(28_122_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(28_122_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -352,8 +352,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5295` // Minimum execution time: 26_384 nanoseconds. - Weight::from_ref_time(27_285_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(27_285_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -366,8 +366,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `537` // Estimated: `5295` // Minimum execution time: 24_599 nanoseconds. - Weight::from_ref_time(24_992_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(24_992_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -380,8 +380,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 19_754 nanoseconds. - Weight::from_ref_time(20_071_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(20_071_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -394,8 +394,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `525` // Estimated: `5250` // Minimum execution time: 19_376 nanoseconds. - Weight::from_ref_time(19_716_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(19_716_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -406,8 +406,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2527` // Minimum execution time: 15_069 nanoseconds. - Weight::from_ref_time(15_273_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(15_273_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -420,8 +420,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5152` // Minimum execution time: 15_900 nanoseconds. - Weight::from_ref_time(16_182_000) - .saturating_add(Weight::from_proof_size(5152)) + Weight::from_parts(16_182_000, 0) + .saturating_add(Weight::from_parts(0, 5152)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -434,8 +434,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `291` // Estimated: `2597` // Minimum execution time: 15_789 nanoseconds. - Weight::from_ref_time(16_115_000) - .saturating_add(Weight::from_proof_size(2597)) + Weight::from_parts(16_115_000, 0) + .saturating_add(Weight::from_parts(0, 2597)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -452,8 +452,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `636` // Estimated: `7814` // Minimum execution time: 34_557 nanoseconds. - Weight::from_ref_time(34_927_000) - .saturating_add(Weight::from_proof_size(7814)) + Weight::from_parts(34_927_000, 0) + .saturating_add(Weight::from_parts(0, 7814)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs index 32882466136..f0823eb6f87 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_416 nanoseconds. - Weight::from_ref_time(18_983_305) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_983_305, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_082 - .saturating_add(Weight::from_ref_time(4_175_368).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_175_368, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_581 nanoseconds. - Weight::from_ref_time(4_767_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_767_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_279 nanoseconds. - Weight::from_ref_time(21_320_216) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(21_320_216, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_995 - .saturating_add(Weight::from_ref_time(4_376_040).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_376_040, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 8_298 nanoseconds. - Weight::from_ref_time(8_522_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_522_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_311 nanoseconds. - Weight::from_ref_time(16_307_926) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(16_307_926, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_381 - .saturating_add(Weight::from_ref_time(4_172_851).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_172_851, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs index e089359e15d..8863a425c01 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 25_244 nanoseconds. - Weight::from_ref_time(25_671_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(25_671_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 25_183 nanoseconds. - Weight::from_ref_time(25_684_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(25_684_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: ParachainInfo ParachainId (r:1 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 18_819 nanoseconds. - Weight::from_ref_time(19_048_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(19_048_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -106,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_636 nanoseconds. - Weight::from_ref_time(8_906_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_906_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -117,8 +117,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_486 nanoseconds. - Weight::from_ref_time(2_652_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_652_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -142,8 +142,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 29_811 nanoseconds. - Weight::from_ref_time(30_291_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(30_291_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -166,8 +166,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 31_884 nanoseconds. - Weight::from_ref_time(32_567_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(32_567_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -178,8 +178,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 14_098 nanoseconds. - Weight::from_ref_time(14_349_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(14_349_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -190,8 +190,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 14_117 nanoseconds. - Weight::from_ref_time(14_383_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(14_383_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -202,8 +202,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 15_353 nanoseconds. - Weight::from_ref_time(15_558_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(15_558_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -223,8 +223,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 28_752 nanoseconds. - Weight::from_ref_time(29_435_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(29_435_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -235,8 +235,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 7_143 nanoseconds. - Weight::from_ref_time(7_368_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(7_368_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -246,8 +246,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 14_381 nanoseconds. - Weight::from_ref_time(14_582_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(14_582_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -268,8 +268,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 34_190 nanoseconds. - Weight::from_ref_time(34_889_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(34_889_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index ba2370bf055..877a54ba848 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for StatemineXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for StatemineXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 12da500d838..a72d4e04662 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(22_035_000 as u64) + Weight::from_parts(22_035_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(54_300_000 as u64) + Weight::from_parts(54_300_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(78_569_000 as u64) + Weight::from_parts(78_569_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(4_652_000 as u64) + Weight::from_parts(4_652_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(23_684_000 as u64) + Weight::from_parts(23_684_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(45_884_000 as u64) + Weight::from_parts(45_884_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(30_239_000 as u64) + Weight::from_parts(30_239_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index a0638f79ea5..d5d27b41e57 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(450_021_000 as u64) + Weight::from_parts(450_021_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(4_086_000 as u64) + Weight::from_parts(4_086_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(11_290_000 as u64) + Weight::from_parts(11_290_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(13_288_000 as u64) + Weight::from_parts(13_288_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(4_270_000 as u64) + Weight::from_parts(4_270_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(3_205_000 as u64) + Weight::from_parts(3_205_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(3_246_000 as u64) + Weight::from_parts(3_246_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(3_189_000 as u64) + Weight::from_parts(3_189_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(4_222_000 as u64) + Weight::from_parts(4_222_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(3_178_000 as u64) + Weight::from_parts(3_178_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(24_770_000 as u64) + Weight::from_parts(24_770_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(14_967_000 as u64) + Weight::from_parts(14_967_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(3_186_000 as u64) + Weight::from_parts(3_186_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(25_797_000 as u64) + Weight::from_parts(25_797_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(5_170_000 as u64) + Weight::from_parts(5_170_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(508_189_000 as u64) + Weight::from_parts(508_189_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(156_147_000 as u64) + Weight::from_parts(156_147_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(14_507_000 as u64) + Weight::from_parts(14_507_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(3_329_000 as u64) + Weight::from_parts(3_329_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(3_164_000 as u64) + Weight::from_parts(3_164_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(3_415_000 as u64) + Weight::from_parts(3_415_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(27_966_000 as u64) + Weight::from_parts(27_966_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(5_019_000 as u64) + Weight::from_parts(5_019_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(25_097_000 as u64) + Weight::from_parts(25_097_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(3_193_000 as u64) + Weight::from_parts(3_193_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(3_146_000 as u64) + Weight::from_parts(3_146_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(3_178_000 as u64) + Weight::from_parts(3_178_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(3_134_000 as u64) + Weight::from_parts(3_134_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(3_282_000 as u64) + Weight::from_parts(3_282_000 as u64, 0) } } diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 43b1c67f0bd..6711a278509 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -171,6 +162,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | @@ -302,16 +294,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/statemine/tests/tests.rs b/parachains/runtimes/assets/statemine/tests/tests.rs index 9614fd80062..b696e4ef1e3 100644 --- a/parachains/runtimes/assets/statemine/tests/tests.rs +++ b/parachains/runtimes/assets/statemine/tests/tests.rs @@ -1,21 +1,29 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use codec::Encode; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ - assert_noop, assert_ok, - traits::PalletInfo, + assert_noop, assert_ok, sp_io, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, AuraId}; -use statemine_runtime::xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger; +use parachains_common::{AccountId, AuraId, Balance}; +use statemine_runtime::xcm_config::{ + AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, +}; pub use statemine_runtime::{ constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, - Runtime, SessionKeys, System, + ReservedDmpWeight, Runtime, SessionKeys, System, }; use xcm::latest::prelude::*; -use xcm_executor::traits::WeightTrader; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, +}; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -47,22 +55,14 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); + let bought = Weight::from_parts(4_000_000_000u64, 0); // Lets calculate amount needed let asset_amount_needed = @@ -94,12 +94,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -138,18 +141,9 @@ fn test_asset_xcm_trader_with_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(4_000_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -160,7 +154,8 @@ fn test_asset_xcm_trader_with_refund() { assert_ok!(trader.buy_weight(bought, asset.clone().into())); // Make sure again buy_weight does return an error - assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); + // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); // We actually use half of the weight let weight_used = bought / 2; @@ -216,18 +211,9 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy small amount - let bought = Weight::from_ref_time(500_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(500_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -276,18 +262,9 @@ fn test_that_buying_ed_refund_does_not_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are gonna buy ED - let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -357,21 +334,12 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); + let bought = Weight::from_parts(4_000_000_000u64, 0); // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -388,3 +356,120 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { assert_eq!(Assets::total_supply(1), minimum_asset_balance); }); } + +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + +#[test] +fn receive_teleported_asset_works() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let xcm = Xcm(vec![ + ReceiveTeleportedAsset(MultiAssets::from(vec![MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }])), + ClearOrigin, + BuyExecution { + fees: MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }, + weight_limit: Limited(Weight::from_parts(303531000, 65536)), + }, + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: None, + id: [ + 18, 153, 85, 112, 1, 245, 88, 21, 211, 252, 181, 60, 116, 70, 58, + 203, 12, 246, 209, 77, 70, 57, 179, 64, 152, 44, 96, 135, 127, 56, + 70, 9, + ], + }), + }, + }, + ]); + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + let weight_limit = ReservedDmpWeight::get(); + + let outcome = XcmExecutor::::execute_xcm(Parent, xcm, hash, weight_limit); + assert_eq!(outcome.ensure_complete(), Ok(())); + }) +} diff --git a/parachains/runtimes/assets/statemint/Cargo.toml b/parachains/runtimes/assets/statemint/Cargo.toml index 08d3f689152..f6d54cbd85f 100644 --- a/parachains/runtimes/assets/statemint/Cargo.toml +++ b/parachains/runtimes/assets/statemint/Cargo.toml @@ -47,6 +47,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -68,7 +69,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } +assets-common = { path = "../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" @@ -176,4 +177,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index b03c68ada10..c3813d2a7f4 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -93,7 +93,9 @@ use parachains_common::{ Signature, StatemintAuraId as AuraId, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{DotLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + DotLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -117,10 +119,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 11, + transaction_version: 12, state_version: 0, }; @@ -727,6 +729,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { @@ -828,6 +838,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/statemint/src/weights/block_weights.rs b/parachains/runtimes/assets/statemint/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/assets/statemint/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs index c281e25e23a..746387e0796 100644 --- a/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_717 nanoseconds. - Weight::from_ref_time(4_964_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(4_964_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_840 nanoseconds. - Weight::from_ref_time(5_074_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_074_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/statemint/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/statemint/src/weights/frame_system.rs b/parachains/runtimes/assets/statemint/src/weights/frame_system.rs index c490a0fadd4..3475b7980cb 100644 --- a/parachains/runtimes/assets/statemint/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/statemint/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_455 nanoseconds. - Weight::from_ref_time(1_553_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_553_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(368).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(368, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_602 nanoseconds. - Weight::from_ref_time(6_725_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_725_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_715).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_715, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_555 nanoseconds. - Weight::from_ref_time(3_745_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_745_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_690 nanoseconds. - Weight::from_ref_time(1_735_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_735_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_138 - .saturating_add(Weight::from_ref_time(588_449).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(588_449, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_695 nanoseconds. - Weight::from_ref_time(1_771_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_771_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 816 - .saturating_add(Weight::from_ref_time(449_345).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(449_345, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `81 + p * (69 ±0)` // Estimated: `72 + p * (70 ±0)` // Minimum execution time: 3_289 nanoseconds. - Weight::from_ref_time(3_377_000) - .saturating_add(Weight::from_proof_size(72)) + Weight::from_parts(3_377_000, 0) + .saturating_add(Weight::from_parts(0, 72)) // Standard Error: 922 - .saturating_add(Weight::from_ref_time(969_103).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(969_103, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs index d1715011a63..0fc7e6fb0af 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs @@ -56,8 +56,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `141` // Estimated: `5288` // Minimum execution time: 21_786 nanoseconds. - Weight::from_ref_time(22_084_000) - .saturating_add(Weight::from_proof_size(5288)) + Weight::from_parts(22_084_000, 0) + .saturating_add(Weight::from_parts(0, 5288)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `6` // Estimated: `2685` // Minimum execution time: 10_638 nanoseconds. - Weight::from_ref_time(10_889_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(10_889_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 13_146 nanoseconds. - Weight::from_ref_time(13_421_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_421_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -97,15 +97,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `0 + c * (240 ±0)` // Estimated: `5262 + c * (5180 ±0)` // Minimum execution time: 15_962 nanoseconds. - Weight::from_ref_time(16_041_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_041_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) // Standard Error: 9_326 - .saturating_add(Weight::from_ref_time(13_983_529).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(13_983_529, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(5180).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -117,15 +117,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `446 + a * (86 ±0)` // Estimated: `5308 + a * (2623 ±0)` // Minimum execution time: 16_343 nanoseconds. - Weight::from_ref_time(16_490_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(16_490_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) // Standard Error: 7_664 - .saturating_add(Weight::from_ref_time(13_585_881).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(13_585_881, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2623).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -136,8 +136,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 12_531 nanoseconds. - Weight::from_ref_time(13_108_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(13_108_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,8 +150,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5262` // Minimum execution time: 22_604 nanoseconds. - Weight::from_ref_time(22_970_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(22_970_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -164,8 +164,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 28_407 nanoseconds. - Weight::from_ref_time(29_012_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(29_012_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -180,8 +180,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 38_044 nanoseconds. - Weight::from_ref_time(38_562_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(38_562_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -196,8 +196,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 33_946 nanoseconds. - Weight::from_ref_time(34_532_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(34_532_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -212,8 +212,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 38_013 nanoseconds. - Weight::from_ref_time(38_818_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(38_818_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -226,8 +226,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 15_798 nanoseconds. - Weight::from_ref_time(16_178_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_178_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -240,8 +240,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 16_196 nanoseconds. - Weight::from_ref_time(16_525_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_525_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_600 nanoseconds. - Weight::from_ref_time(13_038_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_038_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -264,8 +264,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_433 nanoseconds. - Weight::from_ref_time(12_924_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_924_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 13_754 nanoseconds. - Weight::from_ref_time(14_069_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(14_069_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -290,8 +290,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 12_640 nanoseconds. - Weight::from_ref_time(12_846_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_846_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -306,10 +306,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 22_428 nanoseconds. - Weight::from_ref_time(23_549_955) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_549_955, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 731 - .saturating_add(Weight::from_ref_time(893).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(893, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -322,8 +322,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 22_730 nanoseconds. - Weight::from_ref_time(23_336_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_336_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,10 +338,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `82` // Estimated: `5300` // Minimum execution time: 12_289 nanoseconds. - Weight::from_ref_time(12_841_728) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(12_841_728, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 304 - .saturating_add(Weight::from_ref_time(1_964).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_964, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -354,8 +354,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 23_203 nanoseconds. - Weight::from_ref_time(23_490_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_490_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -366,8 +366,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 12_042 nanoseconds. - Weight::from_ref_time(12_246_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_246_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -380,8 +380,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `5308` // Minimum execution time: 25_898 nanoseconds. - Weight::from_ref_time(26_128_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(26_128_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -398,8 +398,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `553` // Estimated: `13065` // Minimum execution time: 52_087 nanoseconds. - Weight::from_ref_time(52_630_000) - .saturating_add(Weight::from_proof_size(13065)) + Weight::from_parts(52_630_000, 0) + .saturating_add(Weight::from_parts(0, 13065)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -412,8 +412,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 27_731 nanoseconds. - Weight::from_ref_time(28_129_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_129_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -426,9 +426,21 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 27_921 nanoseconds. - Weight::from_ref_time(28_386_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_386_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 16_213 nanoseconds. + Weight::from_parts(16_575_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs index 2f863d7b8a2..3e52431c0d7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1178` // Estimated: `2603` // Minimum execution time: 45_943 nanoseconds. - Weight::from_ref_time(46_894_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(46_894_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1062` // Estimated: `2603` // Minimum execution time: 35_842 nanoseconds. - Weight::from_ref_time(36_089_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(36_089_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `2603` // Minimum execution time: 26_219 nanoseconds. - Weight::from_ref_time(26_783_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_783_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `2603` // Minimum execution time: 29_939 nanoseconds. - Weight::from_ref_time(30_394_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(30_394_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1174` // Estimated: `5206` // Minimum execution time: 46_341 nanoseconds. - Weight::from_ref_time(47_111_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(47_111_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1062` // Estimated: `2603` // Minimum execution time: 41_093 nanoseconds. - Weight::from_ref_time(41_472_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(41_472_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1058` // Estimated: `2603` // Minimum execution time: 22_961 nanoseconds. - Weight::from_ref_time(23_413_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(23_413_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs index 4bbd5b6bba2..c7b4bcfa771 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `178 + b * (78 ±0)` // Estimated: `178 + b * (2554 ±0)` // Minimum execution time: 14_182 nanoseconds. - Weight::from_ref_time(16_174_028) - .saturating_add(Weight::from_proof_size(178)) + Weight::from_parts(16_174_028, 0) + .saturating_add(Weight::from_parts(0, 178)) // Standard Error: 3_951 - .saturating_add(Weight::from_ref_time(2_446_152).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_446_152, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_843 nanoseconds. - Weight::from_ref_time(7_086_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_086_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 7_075 nanoseconds. - Weight::from_ref_time(7_294_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_294_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1171 + c * (48 ±0)` // Estimated: `56784 + c * (49 ±0)` // Minimum execution time: 34_101 nanoseconds. - Weight::from_ref_time(27_254_778) - .saturating_add(Weight::from_proof_size(56784)) + Weight::from_parts(27_254_778, 0) + .saturating_add(Weight::from_parts(0, 56784)) // Standard Error: 1_210 - .saturating_add(Weight::from_ref_time(105_038).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(105_038, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `536 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 26_156 nanoseconds. - Weight::from_ref_time(16_543_802) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(16_543_802, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_209 - .saturating_add(Weight::from_ref_time(102_889).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(102_889, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `135` // Estimated: `5749` // Minimum execution time: 24_859 nanoseconds. - Weight::from_ref_time(25_423_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(25_423_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22784 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2602 ±0)` // Minimum execution time: 16_296 nanoseconds. - Weight::from_ref_time(16_532_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_532_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 758_486 - .saturating_add(Weight::from_ref_time(27_694_526).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(27_694_526, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs index 39393ac6004..a5a5fb3b121 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 11_557 nanoseconds. - Weight::from_ref_time(12_087_731) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_087_731, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(493).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(493, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `311 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_027 nanoseconds. - Weight::from_ref_time(28_254_579) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_254_579, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 541 - .saturating_add(Weight::from_ref_time(73_609).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(73_609, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_530).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_530, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 25_892 nanoseconds. - Weight::from_ref_time(19_974_491) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_974_491, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 382 - .saturating_add(Weight::from_ref_time(67_041).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(67_041, 0).saturating_mul(s.into())) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(1_516).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_516, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `448 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 39_799 nanoseconds. - Weight::from_ref_time(31_172_141) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(31_172_141, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 523 - .saturating_add(Weight::from_ref_time(91_287).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(91_287, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_557).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_557, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `318 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 24_614 nanoseconds. - Weight::from_ref_time(26_554_159) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(26_554_159, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 754 - .saturating_add(Weight::from_ref_time(81_278).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(81_278, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 17_141 nanoseconds. - Weight::from_ref_time(18_191_699) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_191_699, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 546 - .saturating_add(Weight::from_ref_time(74_486).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(74_486, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 25_869 nanoseconds. - Weight::from_ref_time(28_059_249) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_059_249, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 677 - .saturating_add(Weight::from_ref_time(80_187).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(80_187, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs index 87e720632ca..b160090e259 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs @@ -55,10 +55,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 14_405 nanoseconds. - Weight::from_ref_time(15_511_983) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(15_511_983, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 2_104 - .saturating_add(Weight::from_ref_time(19_450).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(19_450, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Proxy Proxies (r:1 w:0) @@ -74,12 +74,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `550 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 31_545 nanoseconds. - Weight::from_ref_time(31_928_375) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(31_928_375, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 2_022 - .saturating_add(Weight::from_ref_time(114_479).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(114_479, 0).saturating_mul(a.into())) // Standard Error: 2_089 - .saturating_add(Weight::from_ref_time(34_696).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(34_696, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,12 +94,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_215 nanoseconds. - Weight::from_ref_time(20_970_496) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(20_970_496, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_277 - .saturating_add(Weight::from_ref_time(111_015).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(111_015, 0).saturating_mul(a.into())) // Standard Error: 1_320 - .saturating_add(Weight::from_ref_time(9_988).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(9_988, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,12 +114,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_153 nanoseconds. - Weight::from_ref_time(21_046_064) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_046_064, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_342 - .saturating_add(Weight::from_ref_time(108_638).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(108_638, 0).saturating_mul(a.into())) // Standard Error: 1_386 - .saturating_add(Weight::from_ref_time(10_617).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_617, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -136,12 +136,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `482 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 27_692 nanoseconds. - Weight::from_ref_time(28_900_223) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(28_900_223, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_751 - .saturating_add(Weight::from_ref_time(100_648).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(100_648, 0).saturating_mul(a.into())) // Standard Error: 1_809 - .saturating_add(Weight::from_ref_time(35_769).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(35_769, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -153,10 +153,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 20_726 nanoseconds. - Weight::from_ref_time(21_849_126) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(21_849_126, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_307 - .saturating_add(Weight::from_ref_time(43_349).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(43_349, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,10 +168,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 20_681 nanoseconds. - Weight::from_ref_time(21_733_251) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(21_733_251, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_555 - .saturating_add(Weight::from_ref_time(59_461).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(59_461, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -183,10 +183,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 16_966 nanoseconds. - Weight::from_ref_time(17_682_078) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(17_682_078, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_110 - .saturating_add(Weight::from_ref_time(28_786).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(28_786, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,10 +198,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `139` // Estimated: `3716` // Minimum execution time: 22_237 nanoseconds. - Weight::from_ref_time(23_324_695) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(23_324_695, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_481 - .saturating_add(Weight::from_ref_time(9_284).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(9_284, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -213,10 +213,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `196 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 18_041 nanoseconds. - Weight::from_ref_time(18_668_925) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(18_668_925, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_209 - .saturating_add(Weight::from_ref_time(29_794).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(29_794, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs index c82ad190408..9ed257e1e80 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `270` // Estimated: `5490` // Minimum execution time: 15_561 nanoseconds. - Weight::from_ref_time(15_843_000) - .saturating_add(Weight::from_proof_size(5490)) + Weight::from_parts(15_843_000, 0) + .saturating_add(Weight::from_parts(0, 5490)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `2959` // Minimum execution time: 11_757 nanoseconds. - Weight::from_ref_time(12_093_000) - .saturating_add(Weight::from_proof_size(2959)) + Weight::from_parts(12_093_000, 0) + .saturating_add(Weight::from_parts(0, 2959)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs index 4f5e507d9a3..b076a1b4d1e 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `86` // Estimated: `1006` // Minimum execution time: 8_399 nanoseconds. - Weight::from_ref_time(8_649_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(8_649_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_277 nanoseconds. - Weight::from_ref_time(3_349_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_349_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs index bfd60c91509..d69f456dc24 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs @@ -56,8 +56,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `177` // Estimated: `2653` // Minimum execution time: 23_738 nanoseconds. - Weight::from_ref_time(24_550_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(24_550_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2653` // Minimum execution time: 13_165 nanoseconds. - Weight::from_ref_time(13_515_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_515_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -99,21 +99,21 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `289 + n * (108 ±0) + m * (56 ±0) + a * (107 ±0)` // Estimated: `5250 + n * (2597 ±0)` // Minimum execution time: 2_258_129 nanoseconds. - Weight::from_ref_time(2_289_592_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(2_289_592_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) // Standard Error: 26_214 - .saturating_add(Weight::from_ref_time(8_416_144).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(8_416_144, 0).saturating_mul(n.into())) // Standard Error: 26_214 - .saturating_add(Weight::from_ref_time(256_638).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(256_638, 0).saturating_mul(m.into())) // Standard Error: 26_214 - .saturating_add(Weight::from_ref_time(274_803).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(274_803, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -128,8 +128,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `7749` // Minimum execution time: 28_974 nanoseconds. - Weight::from_ref_time(29_398_000) - .saturating_add(Weight::from_proof_size(7749)) + Weight::from_parts(29_398_000, 0) + .saturating_add(Weight::from_parts(0, 7749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -146,8 +146,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 30_070 nanoseconds. - Weight::from_ref_time(30_454_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(30_454_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -164,8 +164,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 24_287 nanoseconds. - Weight::from_ref_time(24_509_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(24_509_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -179,15 +179,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `770 + i * (108 ±0)` // Estimated: `2653 + i * (2597 ±0)` // Minimum execution time: 14_231 nanoseconds. - Weight::from_ref_time(14_454_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(14_454_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) // Standard Error: 13_135 - .saturating_add(Weight::from_ref_time(12_152_067).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(12_152_067, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -198,8 +198,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 17_977 nanoseconds. - Weight::from_ref_time(18_415_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(18_415_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -212,8 +212,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 17_421 nanoseconds. - Weight::from_ref_time(17_830_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(17_830_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -224,8 +224,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_199 nanoseconds. - Weight::from_ref_time(13_615_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_615_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -236,8 +236,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_263 nanoseconds. - Weight::from_ref_time(13_575_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_575_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `388` // Estimated: `5180` // Minimum execution time: 20_850 nanoseconds. - Weight::from_ref_time(21_223_000) - .saturating_add(Weight::from_proof_size(5180)) + Weight::from_parts(21_223_000, 0) + .saturating_add(Weight::from_parts(0, 5180)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -264,8 +264,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 14_218 nanoseconds. - Weight::from_ref_time(14_680_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(14_680_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 16_581 nanoseconds. - Weight::from_ref_time(16_856_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(16_856_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -294,8 +294,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `7962` // Minimum execution time: 34_610 nanoseconds. - Weight::from_ref_time(34_994_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(34_994_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -310,8 +310,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `851` // Estimated: `7962` // Minimum execution time: 34_244 nanoseconds. - Weight::from_ref_time(34_542_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(34_542_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -324,8 +324,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `380` // Estimated: `5315` // Minimum execution time: 26_652 nanoseconds. - Weight::from_ref_time(27_013_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(27_013_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -338,8 +338,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `5315` // Minimum execution time: 27_427 nanoseconds. - Weight::from_ref_time(27_985_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(27_985_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -352,8 +352,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5295` // Minimum execution time: 26_557 nanoseconds. - Weight::from_ref_time(26_973_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(26_973_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -366,8 +366,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `537` // Estimated: `5295` // Minimum execution time: 25_091 nanoseconds. - Weight::from_ref_time(25_510_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(25_510_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -380,8 +380,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 19_129 nanoseconds. - Weight::from_ref_time(19_831_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(19_831_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -394,8 +394,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `525` // Estimated: `5250` // Minimum execution time: 19_393 nanoseconds. - Weight::from_ref_time(19_569_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(19_569_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -406,8 +406,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2527` // Minimum execution time: 14_863 nanoseconds. - Weight::from_ref_time(15_066_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(15_066_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -420,8 +420,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5152` // Minimum execution time: 16_144 nanoseconds. - Weight::from_ref_time(16_510_000) - .saturating_add(Weight::from_proof_size(5152)) + Weight::from_parts(16_510_000, 0) + .saturating_add(Weight::from_parts(0, 5152)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -434,8 +434,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `291` // Estimated: `2597` // Minimum execution time: 15_884 nanoseconds. - Weight::from_ref_time(16_215_000) - .saturating_add(Weight::from_proof_size(2597)) + Weight::from_parts(16_215_000, 0) + .saturating_add(Weight::from_parts(0, 2597)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -452,8 +452,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `636` // Estimated: `7814` // Minimum execution time: 34_190 nanoseconds. - Weight::from_ref_time(34_497_000) - .saturating_add(Weight::from_proof_size(7814)) + Weight::from_parts(34_497_000, 0) + .saturating_add(Weight::from_parts(0, 7814)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs index 5f18e40051c..af28e0cec58 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_005 nanoseconds. - Weight::from_ref_time(18_139_015) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_139_015, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_178 - .saturating_add(Weight::from_ref_time(3_979_226).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_979_226, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_441 nanoseconds. - Weight::from_ref_time(4_622_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_622_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_910 nanoseconds. - Weight::from_ref_time(18_908_357) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_908_357, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_920 - .saturating_add(Weight::from_ref_time(4_169_103).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_169_103, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 7_957 nanoseconds. - Weight::from_ref_time(8_145_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_145_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_925 nanoseconds. - Weight::from_ref_time(15_056_349) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(15_056_349, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_987 - .saturating_add(Weight::from_ref_time(3_981_287).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_981_287, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs index a5b6ba47919..70782f0e2c7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 24_132 nanoseconds. - Weight::from_ref_time(24_554_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(24_554_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 22_350 nanoseconds. - Weight::from_ref_time(22_760_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(22_760_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: ParachainInfo ParachainId (r:1 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 17_723 nanoseconds. - Weight::from_ref_time(17_951_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(17_951_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -106,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_641 nanoseconds. - Weight::from_ref_time(8_925_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_925_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -117,8 +117,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_427 nanoseconds. - Weight::from_ref_time(2_598_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_598_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -142,8 +142,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 28_650 nanoseconds. - Weight::from_ref_time(29_035_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(29_035_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -166,8 +166,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 30_797 nanoseconds. - Weight::from_ref_time(31_491_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(31_491_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -178,8 +178,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 13_639 nanoseconds. - Weight::from_ref_time(13_980_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(13_980_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -190,8 +190,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 13_954 nanoseconds. - Weight::from_ref_time(14_276_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(14_276_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -202,8 +202,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 15_217 nanoseconds. - Weight::from_ref_time(15_422_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(15_422_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -223,8 +223,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 27_362 nanoseconds. - Weight::from_ref_time(28_034_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(28_034_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -235,8 +235,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 7_768 nanoseconds. - Weight::from_ref_time(7_890_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(7_890_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -246,8 +246,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 15_165 nanoseconds. - Weight::from_ref_time(15_430_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(15_430_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -268,8 +268,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 35_310 nanoseconds. - Weight::from_ref_time(35_698_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(35_698_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index cf9423bc28e..1b4a2bcfdd7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for StatemintXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for StatemintXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 96127b68069..342b18fc3b7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(21_004_000 as u64) + Weight::from_parts(21_004_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(29_344_000 as u64) + Weight::from_parts(29_344_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(49_988_000 as u64) + Weight::from_parts(49_988_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(4_040_000 as u64) + Weight::from_parts(4_040_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(22_762_000 as u64) + Weight::from_parts(22_762_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(44_404_000 as u64) + Weight::from_parts(44_404_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(28_179_000 as u64) + Weight::from_parts(28_179_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 38dd4d08bde..969589cb086 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(352_828_000 as u64) + Weight::from_parts(352_828_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(3_719_000 as u64) + Weight::from_parts(3_719_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(10_697_000 as u64) + Weight::from_parts(10_697_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(12_215_000 as u64) + Weight::from_parts(12_215_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(3_925_000 as u64) + Weight::from_parts(3_925_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(2_782_000 as u64) + Weight::from_parts(2_782_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(2_765_000 as u64) + Weight::from_parts(2_765_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(2_766_000 as u64) + Weight::from_parts(2_766_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(3_553_000 as u64) + Weight::from_parts(3_553_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(2_732_000 as u64) + Weight::from_parts(2_732_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(23_189_000 as u64) + Weight::from_parts(23_189_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(14_569_000 as u64) + Weight::from_parts(14_569_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(2_759_000 as u64) + Weight::from_parts(2_759_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(24_423_000 as u64) + Weight::from_parts(24_423_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(4_575_000 as u64) + Weight::from_parts(4_575_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(406_184_000 as u64) + Weight::from_parts(406_184_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(125_739_000 as u64) + Weight::from_parts(125_739_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(13_105_000 as u64) + Weight::from_parts(13_105_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(2_823_000 as u64) + Weight::from_parts(2_823_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(2_771_000 as u64) + Weight::from_parts(2_771_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(2_883_000 as u64) + Weight::from_parts(2_883_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(25_695_000 as u64) + Weight::from_parts(25_695_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(4_650_000 as u64) + Weight::from_parts(4_650_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(23_415_000 as u64) + Weight::from_parts(23_415_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(2_756_000 as u64) + Weight::from_parts(2_756_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(2_702_000 as u64) + Weight::from_parts(2_702_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(2_738_000 as u64) + Weight::from_parts(2_738_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(2_700_000 as u64) + Weight::from_parts(2_700_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(2_894_000 as u64) + Weight::from_parts(2_894_000 as u64, 0) } } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 21daa980cc5..0bb2c5ff5a7 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets`` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -171,6 +162,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | @@ -302,16 +294,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/statemint/tests/tests.rs b/parachains/runtimes/assets/statemint/tests/tests.rs index b52383f3d3e..81aa458b476 100644 --- a/parachains/runtimes/assets/statemint/tests/tests.rs +++ b/parachains/runtimes/assets/statemint/tests/tests.rs @@ -1,21 +1,29 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use codec::Encode; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ - assert_noop, assert_ok, - traits::PalletInfo, + assert_noop, assert_ok, sp_io, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, StatemintAuraId as AuraId}; -use statemint_runtime::xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger; +use parachains_common::{AccountId, Balance, StatemintAuraId as AuraId}; +use statemint_runtime::xcm_config::{ + AssetFeeAsExistentialDepositMultiplierFeeCharger, DotLocation, TrustBackedAssetsPalletLocation, +}; pub use statemint_runtime::{ constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, - Runtime, SessionKeys, System, + ReservedDmpWeight, Runtime, SessionKeys, System, }; use xcm::latest::prelude::*; -use xcm_executor::traits::WeightTrader; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, +}; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -47,16 +55,8 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); @@ -65,7 +65,7 @@ fn test_asset_xcm_trader() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = Weight::from_ref_time(400_000_000_000u64); + let bought = Weight::from_parts(400_000_000_000u64, 0); // Lets calculate amount needed let asset_amount_needed = @@ -97,12 +97,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -144,18 +147,9 @@ fn test_asset_xcm_trader_with_refund() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = Weight::from_ref_time(400_000_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(400_000_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -166,7 +160,8 @@ fn test_asset_xcm_trader_with_refund() { assert_ok!(trader.buy_weight(bought, asset.clone().into())); // Make sure again buy_weight does return an error - assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); + // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); // We actually use half of the weight let weight_used = bought / 2; @@ -225,18 +220,9 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = Weight::from_ref_time(50_000_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(50_000_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -285,18 +271,9 @@ fn test_that_buying_ed_refund_does_not_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are gonna buy ED - let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -369,21 +346,12 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = Weight::from_ref_time(400_000_000_000u64); + let bought = Weight::from_parts(400_000_000_000u64, 0); // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -400,3 +368,120 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { assert_eq!(Assets::total_supply(1), minimum_asset_balance); }); } + +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + +#[test] +fn receive_teleported_asset_works() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let xcm = Xcm(vec![ + ReceiveTeleportedAsset(MultiAssets::from(vec![MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }])), + ClearOrigin, + BuyExecution { + fees: MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }, + weight_limit: Limited(Weight::from_parts(303531000, 65536)), + }, + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: None, + id: [ + 18, 153, 85, 112, 1, 245, 88, 21, 211, 252, 181, 60, 116, 70, 58, + 203, 12, 246, 209, 77, 70, 57, 179, 64, 152, 44, 96, 135, 127, 56, + 70, 9, + ], + }), + }, + }, + ]); + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + let weight_limit = ReservedDmpWeight::get(); + + let outcome = XcmExecutor::::execute_xcm(Parent, xcm, hash, weight_limit); + assert_eq!(outcome.ensure_complete(), Ok(())); + }) +} diff --git a/parachains/runtimes/assets/westmint/Cargo.toml b/parachains/runtimes/assets/westmint/Cargo.toml index cabdb3df62b..591c7699f8b 100644 --- a/parachains/runtimes/assets/westmint/Cargo.toml +++ b/parachains/runtimes/assets/westmint/Cargo.toml @@ -49,6 +49,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -70,7 +71,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } +assets-common = { path = "../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" @@ -182,4 +183,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 19b2c1efa1e..74635a2d0db 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -68,7 +68,10 @@ use parachains_common::{ Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + TrustBackedAssetsConvertedConcreteId, WestendLocation, XcmConfig, + XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -90,10 +93,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("westmint"), impl_name: create_runtime_str!("westmint"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 11, + transaction_version: 12, state_version: 0, }; @@ -677,7 +680,7 @@ pub type UncheckedExtrinsic = /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = (pallet_nfts::migration::v1::MigrateToV1,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -745,6 +748,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { @@ -890,6 +901,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/westmint/src/weights/block_weights.rs b/parachains/runtimes/assets/westmint/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/assets/westmint/src/weights/block_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs index b3528805fe9..9de1fa11fa8 100644 --- a/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_844 nanoseconds. - Weight::from_ref_time(5_119_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_119_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 5_017 nanoseconds. - Weight::from_ref_time(5_231_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_231_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs b/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/assets/westmint/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/assets/westmint/src/weights/frame_system.rs b/parachains/runtimes/assets/westmint/src/weights/frame_system.rs index 7e9e0ef19f0..1dfc223ce3a 100644 --- a/parachains/runtimes/assets/westmint/src/weights/frame_system.rs +++ b/parachains/runtimes/assets/westmint/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_737 nanoseconds. - Weight::from_ref_time(1_780_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_780_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(368).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(368, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_941 nanoseconds. - Weight::from_ref_time(6_990_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_990_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_716).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_716, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_697 nanoseconds. - Weight::from_ref_time(3_855_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_855_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_957 nanoseconds. - Weight::from_ref_time(2_009_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_009_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_909 - .saturating_add(Weight::from_ref_time(577_980).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(577_980, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_921 nanoseconds. - Weight::from_ref_time(1_983_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_983_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 841 - .saturating_add(Weight::from_ref_time(443_784).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(443_784, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `84 + p * (69 ±0)` // Estimated: `75 + p * (70 ±0)` // Minimum execution time: 3_576 nanoseconds. - Weight::from_ref_time(3_661_000) - .saturating_add(Weight::from_proof_size(75)) + Weight::from_parts(3_661_000, 0) + .saturating_add(Weight::from_parts(0, 75)) // Standard Error: 919 - .saturating_add(Weight::from_ref_time(955_752).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(955_752, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs index 189a12c05f3..999dfe456b1 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs @@ -56,8 +56,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `141` // Estimated: `5288` // Minimum execution time: 22_825 nanoseconds. - Weight::from_ref_time(26_008_000) - .saturating_add(Weight::from_proof_size(5288)) + Weight::from_parts(26_008_000, 0) + .saturating_add(Weight::from_parts(0, 5288)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `6` // Estimated: `2685` // Minimum execution time: 10_898 nanoseconds. - Weight::from_ref_time(12_626_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_626_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 13_057 nanoseconds. - Weight::from_ref_time(13_932_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_932_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -97,15 +97,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `0 + c * (240 ±0)` // Estimated: `5262 + c * (5180 ±0)` // Minimum execution time: 16_823 nanoseconds. - Weight::from_ref_time(31_002_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(31_002_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) // Standard Error: 10_169 - .saturating_add(Weight::from_ref_time(13_922_578).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(13_922_578, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(5180).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -117,15 +117,15 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `446 + a * (86 ±0)` // Estimated: `5308 + a * (2623 ±0)` // Minimum execution time: 16_683 nanoseconds. - Weight::from_ref_time(16_754_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(16_754_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) // Standard Error: 7_193 - .saturating_add(Weight::from_ref_time(13_722_963).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(13_722_963, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2623).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } /// Storage: Assets Asset (r:1 w:1) /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) @@ -136,8 +136,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 12_892 nanoseconds. - Weight::from_ref_time(13_218_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(13_218_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,8 +150,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5262` // Minimum execution time: 23_073 nanoseconds. - Weight::from_ref_time(23_435_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(23_435_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -164,8 +164,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 29_411 nanoseconds. - Weight::from_ref_time(30_019_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(30_019_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -180,8 +180,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 38_929 nanoseconds. - Weight::from_ref_time(39_602_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(39_602_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -196,8 +196,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 34_910 nanoseconds. - Weight::from_ref_time(35_686_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(35_686_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -212,8 +212,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `10442` // Minimum execution time: 38_959 nanoseconds. - Weight::from_ref_time(39_627_000) - .saturating_add(Weight::from_proof_size(10442)) + Weight::from_parts(39_627_000, 0) + .saturating_add(Weight::from_parts(0, 10442)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -226,8 +226,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 16_367 nanoseconds. - Weight::from_ref_time(16_761_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(16_761_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -240,8 +240,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `383` // Estimated: `5262` // Minimum execution time: 16_361 nanoseconds. - Weight::from_ref_time(18_506_000) - .saturating_add(Weight::from_proof_size(5262)) + Weight::from_parts(18_506_000, 0) + .saturating_add(Weight::from_parts(0, 5262)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_980 nanoseconds. - Weight::from_ref_time(14_272_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(14_272_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -264,8 +264,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `2685` // Minimum execution time: 12_510 nanoseconds. - Weight::from_ref_time(12_996_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_996_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 13_958 nanoseconds. - Weight::from_ref_time(14_458_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(14_458_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -290,8 +290,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 12_820 nanoseconds. - Weight::from_ref_time(13_136_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(13_136_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -306,10 +306,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `5300` // Minimum execution time: 22_433 nanoseconds. - Weight::from_ref_time(23_664_666) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_664_666, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 648 - .saturating_add(Weight::from_ref_time(2_428).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(2_428, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -322,8 +322,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 22_969 nanoseconds. - Weight::from_ref_time(23_330_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_330_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -338,10 +338,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `82` // Estimated: `5300` // Minimum execution time: 11_969 nanoseconds. - Weight::from_ref_time(12_659_111) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(12_659_111, 0) + .saturating_add(Weight::from_parts(0, 5300)) // Standard Error: 345 - .saturating_add(Weight::from_ref_time(1_879).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_879, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -354,8 +354,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `471` // Estimated: `5300` // Minimum execution time: 23_002 nanoseconds. - Weight::from_ref_time(23_320_000) - .saturating_add(Weight::from_proof_size(5300)) + Weight::from_parts(23_320_000, 0) + .saturating_add(Weight::from_parts(0, 5300)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -366,8 +366,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `275` // Estimated: `2685` // Minimum execution time: 11_994 nanoseconds. - Weight::from_ref_time(12_256_000) - .saturating_add(Weight::from_proof_size(2685)) + Weight::from_parts(12_256_000, 0) + .saturating_add(Weight::from_parts(0, 2685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -380,8 +380,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `309` // Estimated: `5308` // Minimum execution time: 26_321 nanoseconds. - Weight::from_ref_time(26_867_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(26_867_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -398,8 +398,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `553` // Estimated: `13065` // Minimum execution time: 52_855 nanoseconds. - Weight::from_ref_time(54_006_000) - .saturating_add(Weight::from_proof_size(13065)) + Weight::from_parts(54_006_000, 0) + .saturating_add(Weight::from_parts(0, 13065)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -412,8 +412,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 28_148 nanoseconds. - Weight::from_ref_time(28_416_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_416_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -426,9 +426,21 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `479` // Estimated: `5308` // Minimum execution time: 28_456 nanoseconds. - Weight::from_ref_time(28_913_000) - .saturating_add(Weight::from_proof_size(5308)) + Weight::from_parts(28_913_000, 0) + .saturating_add(Weight::from_parts(0, 5308)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `3675` + // Minimum execution time: 16_213 nanoseconds. + Weight::from_parts(16_575_000, 0) + .saturating_add(Weight::from_parts(0, 3675)) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs index b01befcc16d..a861e5a7fa4 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1177` // Estimated: `2603` // Minimum execution time: 45_988 nanoseconds. - Weight::from_ref_time(46_507_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(46_507_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1061` // Estimated: `2603` // Minimum execution time: 34_574 nanoseconds. - Weight::from_ref_time(35_575_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(35_575_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1173` // Estimated: `2603` // Minimum execution time: 25_859 nanoseconds. - Weight::from_ref_time(26_467_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_467_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1173` // Estimated: `2603` // Minimum execution time: 28_563 nanoseconds. - Weight::from_ref_time(29_082_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(29_082_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1173` // Estimated: `5206` // Minimum execution time: 45_594 nanoseconds. - Weight::from_ref_time(46_296_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(46_296_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1061` // Estimated: `2603` // Minimum execution time: 40_085 nanoseconds. - Weight::from_ref_time(40_675_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(40_675_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1057` // Estimated: `2603` // Minimum execution time: 22_208 nanoseconds. - Weight::from_ref_time(22_815_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(22_815_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs index e1ea6d9def4..3537559d4ab 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `178 + b * (78 ±0)` // Estimated: `178 + b * (2554 ±0)` // Minimum execution time: 13_864 nanoseconds. - Weight::from_ref_time(14_046_919) - .saturating_add(Weight::from_proof_size(178)) + Weight::from_parts(14_046_919, 0) + .saturating_add(Weight::from_parts(0, 178)) // Standard Error: 4_684 - .saturating_add(Weight::from_ref_time(2_474_689).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_474_689, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_556 nanoseconds. - Weight::from_ref_time(6_751_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_751_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_816 nanoseconds. - Weight::from_ref_time(7_009_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_009_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1171 + c * (48 ±0)` // Estimated: `56784 + c * (49 ±0)` // Minimum execution time: 35_423 nanoseconds. - Weight::from_ref_time(27_578_125) - .saturating_add(Weight::from_proof_size(56784)) + Weight::from_parts(27_578_125, 0) + .saturating_add(Weight::from_parts(0, 56784)) // Standard Error: 1_255 - .saturating_add(Weight::from_ref_time(105_521).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(105_521, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `541 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 24_550 nanoseconds. - Weight::from_ref_time(15_908_548) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(15_908_548, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_238 - .saturating_add(Weight::from_ref_time(105_175).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(105_175, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `135` // Estimated: `5749` // Minimum execution time: 25_675 nanoseconds. - Weight::from_ref_time(26_392_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(26_392_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22756 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2603 ±0)` // Minimum execution time: 16_612 nanoseconds. - Weight::from_ref_time(16_892_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_892_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 755_441 - .saturating_add(Weight::from_ref_time(27_658_379).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(27_658_379, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2603).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs index 61cd280d66b..375ccc70b85 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 11_762 nanoseconds. - Weight::from_ref_time(12_267_870) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_267_870, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(493).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(493, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `311 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_352 nanoseconds. - Weight::from_ref_time(28_499_037) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_499_037, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 1_231 - .saturating_add(Weight::from_ref_time(73_158).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(73_158, 0).saturating_mul(s.into())) // Standard Error: 12 - .saturating_add(Weight::from_ref_time(1_528).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_528, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 26_412 nanoseconds. - Weight::from_ref_time(20_296_722) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(20_296_722, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 402 - .saturating_add(Weight::from_ref_time(67_954).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(67_954, 0).saturating_mul(s.into())) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(1_495).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_495, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `448 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 39_936 nanoseconds. - Weight::from_ref_time(31_699_007) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(31_699_007, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 632 - .saturating_add(Weight::from_ref_time(90_100).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(90_100, 0).saturating_mul(s.into())) // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_544).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_544, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `318 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 25_146 nanoseconds. - Weight::from_ref_time(26_857_601) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(26_857_601, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 669 - .saturating_add(Weight::from_ref_time(76_520).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(76_520, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 17_187 nanoseconds. - Weight::from_ref_time(18_410_072) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_410_072, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 491 - .saturating_add(Weight::from_ref_time(72_318).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(72_318, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 25_956 nanoseconds. - Weight::from_ref_time(28_043_929) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_043_929, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 830 - .saturating_add(Weight::from_ref_time(80_119).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(80_119, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs index 0ba3146782b..d4d05c7ce25 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs @@ -62,8 +62,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `177` // Estimated: `3054` // Minimum execution time: 30_978 nanoseconds. - Weight::from_ref_time(31_489_000) - .saturating_add(Weight::from_proof_size(3054)) + Weight::from_parts(31_489_000, 0) + .saturating_add(Weight::from_parts(0, 3054)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -82,8 +82,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `3054` // Minimum execution time: 20_101 nanoseconds. - Weight::from_ref_time(20_488_000) - .saturating_add(Weight::from_proof_size(3054)) + Weight::from_parts(20_488_000, 0) + .saturating_add(Weight::from_parts(0, 3054)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -115,20 +115,20 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `172673 + m * (206 ±0) + a * (210 ±0)` // Estimated: `3347314 + m * (2694 ±0) + a * (2729 ±0)` // Minimum execution time: 23_505_821 nanoseconds. - Weight::from_ref_time(16_948_157_713) - .saturating_add(Weight::from_proof_size(3347314)) + Weight::from_parts(16_948_157_713, 0) + .saturating_add(Weight::from_parts(0, 3347314)) // Standard Error: 20_494 - .saturating_add(Weight::from_ref_time(7_059_571).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(7_059_571, 0).saturating_mul(m.into())) // Standard Error: 20_494 - .saturating_add(Weight::from_ref_time(8_471_367).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(8_471_367, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1004)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(3005)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2694).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(2729).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2694).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 2729).saturating_mul(a.into())) } /// Storage: Nfts CollectionConfigOf (r:1 w:0) /// Proof: Nfts CollectionConfigOf (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) @@ -147,8 +147,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `448` // Estimated: `13506` // Minimum execution time: 39_850 nanoseconds. - Weight::from_ref_time(40_227_000) - .saturating_add(Weight::from_proof_size(13506)) + Weight::from_parts(40_227_000, 0) + .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -169,8 +169,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `448` // Estimated: `13506` // Minimum execution time: 40_379 nanoseconds. - Weight::from_ref_time(41_110_000) - .saturating_add(Weight::from_proof_size(13506)) + Weight::from_parts(41_110_000, 0) + .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -197,8 +197,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `647` // Estimated: `13652` // Minimum execution time: 43_534 nanoseconds. - Weight::from_ref_time(43_846_000) - .saturating_add(Weight::from_proof_size(13652)) + Weight::from_parts(43_846_000, 0) + .saturating_add(Weight::from_parts(0, 13652)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -225,8 +225,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `811` // Estimated: `16109` // Minimum execution time: 49_184 nanoseconds. - Weight::from_ref_time(49_935_000) - .saturating_add(Weight::from_proof_size(16109)) + Weight::from_parts(49_935_000, 0) + .saturating_add(Weight::from_parts(0, 16109)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -242,14 +242,14 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `756 + i * (140 ±0)` // Estimated: `5103 + i * (3336 ±0)` // Minimum execution time: 15_668 nanoseconds. - Weight::from_ref_time(15_762_000) - .saturating_add(Weight::from_proof_size(5103)) + Weight::from_parts(15_762_000, 0) + .saturating_add(Weight::from_parts(0, 5103)) // Standard Error: 12_791 - .saturating_add(Weight::from_ref_time(12_224_567).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(12_224_567, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_proof_size(3336).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 3336).saturating_mul(i.into())) } /// Storage: Nfts CollectionRoleOf (r:1 w:0) /// Proof: Nfts CollectionRoleOf (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen) @@ -260,8 +260,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `401` // Estimated: `5067` // Minimum execution time: 18_861 nanoseconds. - Weight::from_ref_time(19_195_000) - .saturating_add(Weight::from_proof_size(5067)) + Weight::from_parts(19_195_000, 0) + .saturating_add(Weight::from_parts(0, 5067)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -274,8 +274,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `401` // Estimated: `5067` // Minimum execution time: 18_710 nanoseconds. - Weight::from_ref_time(18_971_000) - .saturating_add(Weight::from_proof_size(5067)) + Weight::from_parts(18_971_000, 0) + .saturating_add(Weight::from_parts(0, 5067)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -288,8 +288,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `289` // Estimated: `5092` // Minimum execution time: 17_067 nanoseconds. - Weight::from_ref_time(17_233_000) - .saturating_add(Weight::from_proof_size(5092)) + Weight::from_parts(17_233_000, 0) + .saturating_add(Weight::from_parts(0, 5092)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -304,8 +304,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `381` // Estimated: `5082` // Minimum execution time: 21_203 nanoseconds. - Weight::from_ref_time(21_468_000) - .saturating_add(Weight::from_proof_size(5082)) + Weight::from_parts(21_468_000, 0) + .saturating_add(Weight::from_parts(0, 5082)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -318,8 +318,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `362` // Estimated: `2555` // Minimum execution time: 24_304 nanoseconds. - Weight::from_ref_time(24_823_000) - .saturating_add(Weight::from_proof_size(2555)) + Weight::from_parts(24_823_000, 0) + .saturating_add(Weight::from_parts(0, 2555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -332,8 +332,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `304` // Estimated: `2555` // Minimum execution time: 17_173 nanoseconds. - Weight::from_ref_time(17_448_000) - .saturating_add(Weight::from_proof_size(2555)) + Weight::from_parts(17_448_000, 0) + .saturating_add(Weight::from_parts(0, 2555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -346,8 +346,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `2555` // Minimum execution time: 13_697 nanoseconds. - Weight::from_ref_time(13_924_000) - .saturating_add(Weight::from_proof_size(2555)) + Weight::from_parts(13_924_000, 0) + .saturating_add(Weight::from_parts(0, 2555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -360,8 +360,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `445` // Estimated: `5078` // Minimum execution time: 18_063 nanoseconds. - Weight::from_ref_time(18_438_000) - .saturating_add(Weight::from_proof_size(5078)) + Weight::from_parts(18_438_000, 0) + .saturating_add(Weight::from_parts(0, 5078)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -378,8 +378,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `474` // Estimated: `10355` // Minimum execution time: 37_582 nanoseconds. - Weight::from_ref_time(38_155_000) - .saturating_add(Weight::from_proof_size(10355)) + Weight::from_parts(38_155_000, 0) + .saturating_add(Weight::from_parts(0, 10355)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -392,8 +392,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `337` // Estimated: `5284` // Minimum execution time: 24_392 nanoseconds. - Weight::from_ref_time(24_787_000) - .saturating_add(Weight::from_proof_size(5284)) + Weight::from_parts(24_787_000, 0) + .saturating_add(Weight::from_parts(0, 5284)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -408,8 +408,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `724` // Estimated: `7807` // Minimum execution time: 34_564 nanoseconds. - Weight::from_ref_time(34_956_000) - .saturating_add(Weight::from_proof_size(7807)) + Weight::from_parts(34_956_000, 0) + .saturating_add(Weight::from_parts(0, 7807)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -422,8 +422,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `379` // Estimated: `6812` // Minimum execution time: 17_194 nanoseconds. - Weight::from_ref_time(17_467_000) - .saturating_add(Weight::from_proof_size(6812)) + Weight::from_parts(17_467_000, 0) + .saturating_add(Weight::from_parts(0, 6812)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -441,15 +441,15 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `828 + n * (204 ±0)` // Estimated: `12144 + n * (2729 ±0)` // Minimum execution time: 25_617 nanoseconds. - Weight::from_ref_time(25_917_000) - .saturating_add(Weight::from_proof_size(12144)) + Weight::from_parts(25_917_000, 0) + .saturating_add(Weight::from_parts(0, 12144)) // Standard Error: 5_524 - .saturating_add(Weight::from_ref_time(7_538_893).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(7_538_893, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_proof_size(2729).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2729).saturating_mul(n.into())) } /// Storage: Nfts Collection (r:1 w:1) /// Proof: Nfts Collection (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) @@ -464,8 +464,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `474` // Estimated: `10320` // Minimum execution time: 32_053 nanoseconds. - Weight::from_ref_time(32_510_000) - .saturating_add(Weight::from_proof_size(10320)) + Weight::from_parts(32_510_000, 0) + .saturating_add(Weight::from_parts(0, 10320)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -480,8 +480,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `688` // Estimated: `7772` // Minimum execution time: 30_654 nanoseconds. - Weight::from_ref_time(31_113_000) - .saturating_add(Weight::from_proof_size(7772)) + Weight::from_parts(31_113_000, 0) + .saturating_add(Weight::from_parts(0, 7772)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -496,8 +496,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `333` // Estimated: `7744` // Minimum execution time: 27_700 nanoseconds. - Weight::from_ref_time(28_291_000) - .saturating_add(Weight::from_proof_size(7744)) + Weight::from_parts(28_291_000, 0) + .saturating_add(Weight::from_parts(0, 7744)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -512,8 +512,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `555` // Estimated: `7744` // Minimum execution time: 27_483 nanoseconds. - Weight::from_ref_time(27_830_000) - .saturating_add(Weight::from_proof_size(7744)) + Weight::from_parts(27_830_000, 0) + .saturating_add(Weight::from_parts(0, 7744)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -528,8 +528,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `466` // Estimated: `8428` // Minimum execution time: 23_623 nanoseconds. - Weight::from_ref_time(24_282_000) - .saturating_add(Weight::from_proof_size(8428)) + Weight::from_parts(24_282_000, 0) + .saturating_add(Weight::from_parts(0, 8428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -542,8 +542,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `474` // Estimated: `5880` // Minimum execution time: 21_115 nanoseconds. - Weight::from_ref_time(22_036_000) - .saturating_add(Weight::from_proof_size(5880)) + Weight::from_parts(22_036_000, 0) + .saturating_add(Weight::from_parts(0, 5880)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -556,8 +556,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `474` // Estimated: `5880` // Minimum execution time: 20_352 nanoseconds. - Weight::from_ref_time(20_627_000) - .saturating_add(Weight::from_proof_size(5880)) + Weight::from_parts(20_627_000, 0) + .saturating_add(Weight::from_parts(0, 5880)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -568,8 +568,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2527` // Minimum execution time: 14_427 nanoseconds. - Weight::from_ref_time(15_169_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(15_169_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -582,8 +582,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `333` // Estimated: `5103` // Minimum execution time: 18_049 nanoseconds. - Weight::from_ref_time(18_431_000) - .saturating_add(Weight::from_proof_size(5103)) + Weight::from_parts(18_431_000, 0) + .saturating_add(Weight::from_parts(0, 5103)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -596,8 +596,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `333` // Estimated: `5103` // Minimum execution time: 17_166 nanoseconds. - Weight::from_ref_time(17_511_000) - .saturating_add(Weight::from_proof_size(5103)) + Weight::from_parts(17_511_000, 0) + .saturating_add(Weight::from_parts(0, 5103)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -614,8 +614,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `516` // Estimated: `8407` // Minimum execution time: 22_556 nanoseconds. - Weight::from_ref_time(22_839_000) - .saturating_add(Weight::from_proof_size(8407)) + Weight::from_parts(22_839_000, 0) + .saturating_add(Weight::from_parts(0, 8407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -640,8 +640,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `897` // Estimated: `16129` // Minimum execution time: 53_554 nanoseconds. - Weight::from_ref_time(54_285_000) - .saturating_add(Weight::from_proof_size(16129)) + Weight::from_parts(54_285_000, 0) + .saturating_add(Weight::from_parts(0, 16129)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -651,10 +651,10 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_031 nanoseconds. - Weight::from_ref_time(3_579_973) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_579_973, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 8_727 - .saturating_add(Weight::from_ref_time(3_165_511).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_165_511, 0).saturating_mul(n.into())) } /// Storage: Nfts Item (r:2 w:0) /// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen) @@ -665,8 +665,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `524` // Estimated: `6672` // Minimum execution time: 20_161 nanoseconds. - Weight::from_ref_time(20_487_000) - .saturating_add(Weight::from_proof_size(6672)) + Weight::from_parts(20_487_000, 0) + .saturating_add(Weight::from_parts(0, 6672)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -679,8 +679,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `511` // Estimated: `5882` // Minimum execution time: 19_470 nanoseconds. - Weight::from_ref_time(19_832_000) - .saturating_add(Weight::from_proof_size(5882)) + Weight::from_parts(19_832_000, 0) + .saturating_add(Weight::from_parts(0, 5882)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -705,8 +705,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `1026` // Estimated: `21970` // Minimum execution time: 78_114 nanoseconds. - Weight::from_ref_time(79_459_000) - .saturating_add(Weight::from_proof_size(21970)) + Weight::from_parts(79_459_000, 0) + .saturating_add(Weight::from_parts(0, 21970)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(11)) } @@ -732,15 +732,15 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `525` // Estimated: `16259 + n * (2729 ±0)` // Minimum execution time: 108_373 nanoseconds. - Weight::from_ref_time(112_094_892) - .saturating_add(Weight::from_proof_size(16259)) + Weight::from_parts(112_094_892, 0) + .saturating_add(Weight::from_parts(0, 16259)) // Standard Error: 27_186 - .saturating_add(Weight::from_ref_time(20_710_983).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(20_710_983, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_proof_size(2729).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2729).saturating_mul(n.into())) } /// Storage: Nfts Item (r:1 w:0) /// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen) @@ -760,14 +760,14 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Measured: `716` // Estimated: `14198 + n * (2921 ±0)` // Minimum execution time: 84_153 nanoseconds. - Weight::from_ref_time(96_401_623) - .saturating_add(Weight::from_proof_size(14198)) + Weight::from_parts(96_401_623, 0) + .saturating_add(Weight::from_parts(0, 14198)) // Standard Error: 70_244 - .saturating_add(Weight::from_ref_time(26_866_222).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(26_866_222, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into())) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs index 8f563c01078..68b69720caf 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs @@ -55,10 +55,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 14_854 nanoseconds. - Weight::from_ref_time(15_600_203) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(15_600_203, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_181 - .saturating_add(Weight::from_ref_time(28_891).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(28_891, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Proxy Proxies (r:1 w:0) @@ -74,12 +74,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `550 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 32_063 nanoseconds. - Weight::from_ref_time(32_624_200) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(32_624_200, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_727 - .saturating_add(Weight::from_ref_time(113_689).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(113_689, 0).saturating_mul(a.into())) // Standard Error: 1_785 - .saturating_add(Weight::from_ref_time(29_618).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(29_618, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,12 +94,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_449 nanoseconds. - Weight::from_ref_time(21_345_957) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_345_957, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_390 - .saturating_add(Weight::from_ref_time(105_313).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(105_313, 0).saturating_mul(a.into())) // Standard Error: 1_436 - .saturating_add(Weight::from_ref_time(9_437).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(9_437, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,12 +114,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_423 nanoseconds. - Weight::from_ref_time(21_290_701) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_290_701, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_398 - .saturating_add(Weight::from_ref_time(110_034).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(110_034, 0).saturating_mul(a.into())) // Standard Error: 1_444 - .saturating_add(Weight::from_ref_time(9_968).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(9_968, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -136,12 +136,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `482 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 28_014 nanoseconds. - Weight::from_ref_time(28_864_371) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(28_864_371, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_933 - .saturating_add(Weight::from_ref_time(109_536).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(109_536, 0).saturating_mul(a.into())) // Standard Error: 1_998 - .saturating_add(Weight::from_ref_time(43_779).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(43_779, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -153,10 +153,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 21_285 nanoseconds. - Weight::from_ref_time(22_065_300) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(22_065_300, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_703 - .saturating_add(Weight::from_ref_time(42_186).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(42_186, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,10 +168,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 20_992 nanoseconds. - Weight::from_ref_time(22_026_633) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(22_026_633, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_663 - .saturating_add(Weight::from_ref_time(60_910).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(60_910, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -183,10 +183,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 16_755 nanoseconds. - Weight::from_ref_time(17_775_492) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(17_775_492, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_281 - .saturating_add(Weight::from_ref_time(28_738).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(28_738, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,8 +198,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `139` // Estimated: `3716` // Minimum execution time: 22_598 nanoseconds. - Weight::from_ref_time(23_639_320) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(23_639_320, 0) + .saturating_add(Weight::from_parts(0, 3716)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -211,10 +211,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `196 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 17_907 nanoseconds. - Weight::from_ref_time(18_737_185) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(18_737_185, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_069 - .saturating_add(Weight::from_ref_time(26_491).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(26_491, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs index a7c3be136f8..5bba2a38022 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `270` // Estimated: `5490` // Minimum execution time: 15_416 nanoseconds. - Weight::from_ref_time(15_764_000) - .saturating_add(Weight::from_proof_size(5490)) + Weight::from_parts(15_764_000, 0) + .saturating_add(Weight::from_parts(0, 5490)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `2959` // Minimum execution time: 11_720 nanoseconds. - Weight::from_ref_time(12_152_000) - .saturating_add(Weight::from_proof_size(2959)) + Weight::from_parts(12_152_000, 0) + .saturating_add(Weight::from_parts(0, 2959)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs index f12d9983ef9..7cb95d8f8e1 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `86` // Estimated: `1006` // Minimum execution time: 8_384 nanoseconds. - Weight::from_ref_time(8_706_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(8_706_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_110 nanoseconds. - Weight::from_ref_time(3_206_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_206_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs index c6d8f5ad71d..624879d8e0b 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs @@ -56,8 +56,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `177` // Estimated: `2653` // Minimum execution time: 23_302 nanoseconds. - Weight::from_ref_time(23_817_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(23_817_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2653` // Minimum execution time: 12_529 nanoseconds. - Weight::from_ref_time(13_079_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_079_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -99,21 +99,21 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `289 + n * (108 ±0) + m * (56 ±0) + a * (107 ±0)` // Estimated: `5250 + n * (2597 ±0)` // Minimum execution time: 2_305_045 nanoseconds. - Weight::from_ref_time(2_312_341_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(2_312_341_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) // Standard Error: 26_047 - .saturating_add(Weight::from_ref_time(8_440_544).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(8_440_544, 0).saturating_mul(n.into())) // Standard Error: 26_047 - .saturating_add(Weight::from_ref_time(223_194).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(223_194, 0).saturating_mul(m.into())) // Standard Error: 26_047 - .saturating_add(Weight::from_ref_time(313_891).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(313_891, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -128,8 +128,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `7749` // Minimum execution time: 28_581 nanoseconds. - Weight::from_ref_time(29_011_000) - .saturating_add(Weight::from_proof_size(7749)) + Weight::from_parts(29_011_000, 0) + .saturating_add(Weight::from_parts(0, 7749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -146,8 +146,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 29_869 nanoseconds. - Weight::from_ref_time(30_206_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(30_206_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -164,8 +164,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 23_945 nanoseconds. - Weight::from_ref_time(24_259_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(24_259_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -179,15 +179,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `770 + i * (108 ±0)` // Estimated: `2653 + i * (2597 ±0)` // Minimum execution time: 13_847 nanoseconds. - Weight::from_ref_time(14_105_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(14_105_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) // Standard Error: 12_887 - .saturating_add(Weight::from_ref_time(12_017_604).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(12_017_604, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_proof_size(2597).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into())) } /// Storage: Uniques Asset (r:1 w:1) /// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) @@ -198,8 +198,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 17_259 nanoseconds. - Weight::from_ref_time(17_731_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(17_731_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -212,8 +212,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 16_951 nanoseconds. - Weight::from_ref_time(17_177_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(17_177_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -224,8 +224,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 12_733 nanoseconds. - Weight::from_ref_time(13_154_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_154_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -236,8 +236,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 12_624 nanoseconds. - Weight::from_ref_time(12_887_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(12_887_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,8 +252,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `388` // Estimated: `5180` // Minimum execution time: 20_089 nanoseconds. - Weight::from_ref_time(20_583_000) - .saturating_add(Weight::from_proof_size(5180)) + Weight::from_parts(20_583_000, 0) + .saturating_add(Weight::from_parts(0, 5180)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -264,8 +264,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 13_647 nanoseconds. - Weight::from_ref_time(13_894_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(13_894_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -278,8 +278,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `2653` // Minimum execution time: 16_035 nanoseconds. - Weight::from_ref_time(16_232_000) - .saturating_add(Weight::from_proof_size(2653)) + Weight::from_parts(16_232_000, 0) + .saturating_add(Weight::from_parts(0, 2653)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -294,8 +294,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `7962` // Minimum execution time: 33_357 nanoseconds. - Weight::from_ref_time(34_794_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(34_794_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -310,8 +310,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `851` // Estimated: `7962` // Minimum execution time: 32_496 nanoseconds. - Weight::from_ref_time(33_068_000) - .saturating_add(Weight::from_proof_size(7962)) + Weight::from_parts(33_068_000, 0) + .saturating_add(Weight::from_parts(0, 7962)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -324,8 +324,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `380` // Estimated: `5315` // Minimum execution time: 25_557 nanoseconds. - Weight::from_ref_time(25_923_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(25_923_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -338,8 +338,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `623` // Estimated: `5315` // Minimum execution time: 26_147 nanoseconds. - Weight::from_ref_time(26_386_000) - .saturating_add(Weight::from_proof_size(5315)) + Weight::from_parts(26_386_000, 0) + .saturating_add(Weight::from_parts(0, 5315)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -352,8 +352,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5295` // Minimum execution time: 25_233 nanoseconds. - Weight::from_ref_time(25_665_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(25_665_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -366,8 +366,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `537` // Estimated: `5295` // Minimum execution time: 24_311 nanoseconds. - Weight::from_ref_time(24_544_000) - .saturating_add(Weight::from_proof_size(5295)) + Weight::from_parts(24_544_000, 0) + .saturating_add(Weight::from_parts(0, 5295)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -380,8 +380,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `492` // Estimated: `5250` // Minimum execution time: 18_197 nanoseconds. - Weight::from_ref_time(18_442_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(18_442_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -394,8 +394,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `525` // Estimated: `5250` // Minimum execution time: 18_606 nanoseconds. - Weight::from_ref_time(19_032_000) - .saturating_add(Weight::from_proof_size(5250)) + Weight::from_parts(19_032_000, 0) + .saturating_add(Weight::from_parts(0, 5250)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -406,8 +406,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `2527` // Minimum execution time: 14_902 nanoseconds. - Weight::from_ref_time(15_216_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(15_216_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -420,8 +420,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `314` // Estimated: `5152` // Minimum execution time: 15_771 nanoseconds. - Weight::from_ref_time(16_013_000) - .saturating_add(Weight::from_proof_size(5152)) + Weight::from_parts(16_013_000, 0) + .saturating_add(Weight::from_parts(0, 5152)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -434,8 +434,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `291` // Estimated: `2597` // Minimum execution time: 15_703 nanoseconds. - Weight::from_ref_time(15_905_000) - .saturating_add(Weight::from_proof_size(2597)) + Weight::from_parts(15_905_000, 0) + .saturating_add(Weight::from_parts(0, 2597)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -452,8 +452,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Measured: `636` // Estimated: `7814` // Minimum execution time: 33_712 nanoseconds. - Weight::from_ref_time(34_365_000) - .saturating_add(Weight::from_proof_size(7814)) + Weight::from_parts(34_365_000, 0) + .saturating_add(Weight::from_parts(0, 7814)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs index e1fb14c18a6..a7fbd58a87d 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_171 nanoseconds. - Weight::from_ref_time(14_264_475) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(14_264_475, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3_826 - .saturating_add(Weight::from_ref_time(4_102_412).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_102_412, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_750 nanoseconds. - Weight::from_ref_time(4_872_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_872_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_448 nanoseconds. - Weight::from_ref_time(20_274_161) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(20_274_161, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 4_587 - .saturating_add(Weight::from_ref_time(4_321_327).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_321_327, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 8_092 nanoseconds. - Weight::from_ref_time(8_417_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_417_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_410 nanoseconds. - Weight::from_ref_time(19_538_670) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(19_538_670, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 4_387 - .saturating_add(Weight::from_ref_time(4_098_456).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_098_456, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs index 53d056e2363..65a8649c5b5 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `75` // Estimated: `4830` // Minimum execution time: 26_692 nanoseconds. - Weight::from_ref_time(27_382_000) - .saturating_add(Weight::from_proof_size(4830)) + Weight::from_parts(27_382_000, 0) + .saturating_add(Weight::from_parts(0, 4830)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 22_056 nanoseconds. - Weight::from_ref_time(22_401_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(22_401_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: ParachainInfo ParachainId (r:1 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `499` // Minimum execution time: 16_901 nanoseconds. - Weight::from_ref_time(17_262_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(17_262_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } fn execute() -> Weight { @@ -94,8 +94,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_467 nanoseconds. - Weight::from_ref_time(8_708_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_708_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -104,8 +104,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_532 nanoseconds. - Weight::from_ref_time(8_766_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_766_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -115,8 +115,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_399 nanoseconds. - Weight::from_ref_time(2_586_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_586_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -140,8 +140,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `75` // Estimated: `8025` // Minimum execution time: 30_956 nanoseconds. - Weight::from_ref_time(31_602_000) - .saturating_add(Weight::from_proof_size(8025)) + Weight::from_parts(31_602_000, 0) + .saturating_add(Weight::from_parts(0, 8025)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -164,8 +164,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `257` // Estimated: `8729` // Minimum execution time: 33_283 nanoseconds. - Weight::from_ref_time(34_433_000) - .saturating_add(Weight::from_proof_size(8729)) + Weight::from_parts(34_433_000, 0) + .saturating_add(Weight::from_parts(0, 8729)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -176,8 +176,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `129` // Estimated: `10029` // Minimum execution time: 17_349 nanoseconds. - Weight::from_ref_time(18_701_000) - .saturating_add(Weight::from_proof_size(10029)) + Weight::from_parts(18_701_000, 0) + .saturating_add(Weight::from_parts(0, 10029)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -188,8 +188,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `133` // Estimated: `10033` // Minimum execution time: 18_574 nanoseconds. - Weight::from_ref_time(19_071_000) - .saturating_add(Weight::from_proof_size(10033)) + Weight::from_parts(19_071_000, 0) + .saturating_add(Weight::from_parts(0, 10033)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -200,8 +200,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `140` // Estimated: `12515` // Minimum execution time: 22_520 nanoseconds. - Weight::from_ref_time(23_083_000) - .saturating_add(Weight::from_proof_size(12515)) + Weight::from_parts(23_083_000, 0) + .saturating_add(Weight::from_parts(0, 12515)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -221,8 +221,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `142` // Estimated: `10257` // Minimum execution time: 39_510 nanoseconds. - Weight::from_ref_time(40_272_000) - .saturating_add(Weight::from_proof_size(10257)) + Weight::from_parts(40_272_000, 0) + .saturating_add(Weight::from_parts(0, 10257)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -233,8 +233,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `172` // Estimated: `7597` // Minimum execution time: 11_057 nanoseconds. - Weight::from_ref_time(11_408_000) - .saturating_add(Weight::from_proof_size(7597)) + Weight::from_parts(11_408_000, 0) + .saturating_add(Weight::from_parts(0, 7597)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -244,8 +244,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `140` // Estimated: `10040` // Minimum execution time: 22_914 nanoseconds. - Weight::from_ref_time(23_231_000) - .saturating_add(Weight::from_proof_size(10040)) + Weight::from_parts(23_231_000, 0) + .saturating_add(Weight::from_parts(0, 10040)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -266,8 +266,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `146` // Estimated: `15231` // Minimum execution time: 47_637 nanoseconds. - Weight::from_ref_time(48_179_000) - .saturating_add(Weight::from_proof_size(15231)) + Weight::from_parts(48_179_000, 0) + .saturating_add(Weight::from_parts(0, 15231)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 7c2454b6443..5daa3acbcce 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for WestmintXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for WestmintXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 1f0c84cf23a..c3317d540aa 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(20_735_000 as u64) + Weight::from_parts(20_735_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(28_940_000 as u64) + Weight::from_parts(28_940_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(50_175_000 as u64) + Weight::from_parts(50_175_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(4_059_000 as u64) + Weight::from_parts(4_059_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(22_181_000 as u64) + Weight::from_parts(22_181_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(45_905_000 as u64) + Weight::from_parts(45_905_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(29_820_000 as u64) + Weight::from_parts(29_820_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 1a00b81bc14..3a0e0efc098 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(360_208_000 as u64) + Weight::from_parts(360_208_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(3_876_000 as u64) + Weight::from_parts(3_876_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(11_240_000 as u64) + Weight::from_parts(11_240_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(12_244_000 as u64) + Weight::from_parts(12_244_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(3_963_000 as u64) + Weight::from_parts(3_963_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(2_871_000 as u64) + Weight::from_parts(2_871_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(2_805_000 as u64) + Weight::from_parts(2_805_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(2_759_000 as u64) + Weight::from_parts(2_759_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(3_596_000 as u64) + Weight::from_parts(3_596_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(2_750_000 as u64) + Weight::from_parts(2_750_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(24_921_000 as u64) + Weight::from_parts(24_921_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(15_880_000 as u64) + Weight::from_parts(15_880_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(2_771_000 as u64) + Weight::from_parts(2_771_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(27_043_000 as u64) + Weight::from_parts(27_043_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(4_668_000 as u64) + Weight::from_parts(4_668_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(399_081_000 as u64) + Weight::from_parts(399_081_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(123_792_000 as u64) + Weight::from_parts(123_792_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(13_056_000 as u64) + Weight::from_parts(13_056_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(2_780_000 as u64) + Weight::from_parts(2_780_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(2_839_000 as u64) + Weight::from_parts(2_839_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(2_951_000 as u64) + Weight::from_parts(2_951_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(28_130_000 as u64) + Weight::from_parts(28_130_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(4_754_000 as u64) + Weight::from_parts(4_754_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(25_584_000 as u64) + Weight::from_parts(25_584_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(2_832_000 as u64) + Weight::from_parts(2_832_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(2_804_000 as u64) + Weight::from_parts(2_804_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(2_747_000 as u64) + Weight::from_parts(2_747_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(2_736_000 as u64) + Weight::from_parts(2_736_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(2_969_000 as u64) + Weight::from_parts(2_969_000 as u64, 0) } } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index fd2e349a2c3..0252e2183f8 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -166,6 +157,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | @@ -297,16 +289,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/westmint/tests/tests.rs b/parachains/runtimes/assets/westmint/tests/tests.rs index 68c6cf670d5..5d7a6187869 100644 --- a/parachains/runtimes/assets/westmint/tests/tests.rs +++ b/parachains/runtimes/assets/westmint/tests/tests.rs @@ -1,21 +1,31 @@ use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use codec::{DecodeLimit, Encode}; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ - assert_noop, assert_ok, - traits::PalletInfo, + assert_noop, assert_ok, sp_io, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, AuraId}; -use westmint_runtime::xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger; +use parachains_common::{AccountId, AuraId, Balance}; pub use westmint_runtime::{ - constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, - Runtime, SessionKeys, System, + constants::fee::WeightToFee, + xcm_config::{TrustBackedAssetsPalletLocation, XcmConfig}, + Assets, Balances, ExistentialDeposit, ReservedDmpWeight, Runtime, SessionKeys, System, +}; +use westmint_runtime::{ + xcm_config::{AssetFeeAsExistentialDepositMultiplierFeeCharger, WestendLocation}, + RuntimeCall, +}; +use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, }; -use xcm::latest::prelude::*; -use xcm_executor::traits::WeightTrader; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -47,22 +57,14 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); + let bought = Weight::from_parts(4_000_000_000u64, 0); // Lets calculate amount needed let asset_amount_needed = @@ -94,12 +96,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -138,17 +143,8 @@ fn test_asset_xcm_trader_with_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(4_000_000_000u64, 0); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -159,7 +155,8 @@ fn test_asset_xcm_trader_with_refund() { assert_ok!(trader.buy_weight(bought, asset.clone().into())); // Make sure again buy_weight does return an error - assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); + // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` tuple chain, which cannot be called twice + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); // We actually use half of the weight let weight_used = bought / 2; @@ -215,18 +212,9 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 5e9 weight - let bought = Weight::from_ref_time(500_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(500_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -274,18 +262,9 @@ fn test_that_buying_ed_refund_does_not_refund() { // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); - let bought = Weight::from_ref_time(500_000_000u64); - - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let bought = Weight::from_parts(500_000_000u64, 0); + + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -355,21 +334,12 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = Weight::from_ref_time(4_000_000_000u64); + let bought = Weight::from_parts(4_000_000_000u64, 0); // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -386,3 +356,148 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { assert_eq!(Assets::total_supply(1), minimum_asset_balance); }); } + +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + +#[test] +fn receive_teleported_asset_works() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let xcm = Xcm(vec![ + ReceiveTeleportedAsset(MultiAssets::from(vec![MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }])), + ClearOrigin, + BuyExecution { + fees: MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(10000000000000), + }, + weight_limit: Limited(Weight::from_parts(303531000, 65536)), + }, + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: MultiLocation { + parents: 0, + interior: X1(AccountId32 { + network: None, + id: [ + 18, 153, 85, 112, 1, 245, 88, 21, 211, 252, 181, 60, 116, 70, 58, + 203, 12, 246, 209, 77, 70, 57, 179, 64, 152, 44, 96, 135, 127, 56, + 70, 9, + ], + }), + }, + }, + ]); + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + let weight_limit = ReservedDmpWeight::get(); + + let outcome = XcmExecutor::::execute_xcm(Parent, xcm, hash, weight_limit); + assert_eq!(outcome.ensure_complete(), Ok(())); + }) +} + +#[test] +fn plain_receive_teleported_asset_works() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let data = hex_literal::hex!("02100204000100000b00a0724e18090a13000100000b00a0724e180901e20f5e480d010004000101001299557001f55815d3fcb53c74463acb0cf6d14d4639b340982c60877f384609").to_vec(); + let message_id = sp_io::hashing::blake2_256(&data); + + let maybe_msg = VersionedXcm::::decode_all_with_depth_limit( + MAX_XCM_DECODE_DEPTH, + &mut data.as_ref(), + ) + .map(xcm::v3::Xcm::::try_from).expect("failed").expect("failed"); + + let weight_limit = ReservedDmpWeight::get(); + + let outcome = + XcmExecutor::::execute_xcm(Parent, maybe_msg, message_id, weight_limit); + assert_eq!(outcome.ensure_complete(), Ok(())); + }) +} diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index 4e53753548a..53a79a09aa5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -127,10 +127,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-kusama"), impl_name: create_runtime_str!("bridge-hub-kusama"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, state_version: 1, }; @@ -475,6 +475,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/block_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/block_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index dd9d3233283..8f8db4b53c5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_956 nanoseconds. - Weight::from_ref_time(5_247_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_247_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_875 nanoseconds. - Weight::from_ref_time(5_123_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_123_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/extrinsic_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs index e5fd70a6dda..0d8b7fd939e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_541 nanoseconds. - Weight::from_ref_time(1_600_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_600_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(368).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(368, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_433 nanoseconds. - Weight::from_ref_time(6_528_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_528_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_718).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_718, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_378 nanoseconds. - Weight::from_ref_time(3_546_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_546_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_595 nanoseconds. - Weight::from_ref_time(1_637_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_637_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_677 - .saturating_add(Weight::from_ref_time(581_830).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(581_830, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_602 nanoseconds. - Weight::from_ref_time(1_645_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_645_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 808 - .saturating_add(Weight::from_ref_time(448_210).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(448_210, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `68 + p * (69 ±0)` // Estimated: `66 + p * (70 ±0)` // Minimum execution time: 3_400 nanoseconds. - Weight::from_ref_time(3_518_000) - .saturating_add(Weight::from_proof_size(66)) + Weight::from_parts(3_518_000, 0) + .saturating_add(Weight::from_parts(0, 66)) // Standard Error: 949 - .saturating_add(Weight::from_ref_time(952_748).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(952_748, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs index 91a3475a2d6..62162cb4dc5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1314` // Estimated: `2603` // Minimum execution time: 45_555 nanoseconds. - Weight::from_ref_time(46_097_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(46_097_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1198` // Estimated: `2603` // Minimum execution time: 34_465 nanoseconds. - Weight::from_ref_time(35_054_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(35_054_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1348` // Estimated: `2603` // Minimum execution time: 25_670 nanoseconds. - Weight::from_ref_time(26_254_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_254_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1348` // Estimated: `2603` // Minimum execution time: 28_919 nanoseconds. - Weight::from_ref_time(29_611_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(29_611_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1310` // Estimated: `5206` // Minimum execution time: 44_604 nanoseconds. - Weight::from_ref_time(45_498_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(45_498_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1198` // Estimated: `2603` // Minimum execution time: 39_412 nanoseconds. - Weight::from_ref_time(40_181_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(40_181_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1232` // Estimated: `2603` // Minimum execution time: 22_520 nanoseconds. - Weight::from_ref_time(23_045_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(23_045_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs index 4930e0cee2d..7dc16ab0f0e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `214 + b * (78 ±0)` // Estimated: `213 + b * (2554 ±0)` // Minimum execution time: 13_768 nanoseconds. - Weight::from_ref_time(15_128_018) - .saturating_add(Weight::from_proof_size(213)) + Weight::from_parts(15_128_018, 0) + .saturating_add(Weight::from_parts(0, 213)) // Standard Error: 3_110 - .saturating_add(Weight::from_ref_time(2_490_861).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_490_861, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_359 nanoseconds. - Weight::from_ref_time(6_591_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_591_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_722 nanoseconds. - Weight::from_ref_time(6_963_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1167 + c * (48 ±0)` // Estimated: `56785 + c * (49 ±0)` // Minimum execution time: 35_190 nanoseconds. - Weight::from_ref_time(27_223_783) - .saturating_add(Weight::from_proof_size(56785)) + Weight::from_parts(27_223_783, 0) + .saturating_add(Weight::from_parts(0, 56785)) // Standard Error: 1_270 - .saturating_add(Weight::from_ref_time(103_824).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(103_824, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `503 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 26_271 nanoseconds. - Weight::from_ref_time(16_336_190) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(16_336_190, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_250 - .saturating_add(Weight::from_ref_time(105_123).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(105_123, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `187` // Estimated: `5749` // Minimum execution time: 26_583 nanoseconds. - Weight::from_ref_time(26_888_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(26_888_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22878 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2602 ±0)` // Minimum execution time: 16_250 nanoseconds. - Weight::from_ref_time(16_601_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_601_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 763_853 - .saturating_add(Weight::from_ref_time(27_869_355).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(27_869_355, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs index 68816d0e58f..0a0445094a1 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 12_039 nanoseconds. - Weight::from_ref_time(12_378_049) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_378_049, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(485).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(485, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `314 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_309 nanoseconds. - Weight::from_ref_time(28_767_595) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_767_595, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 572 - .saturating_add(Weight::from_ref_time(73_429).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(73_429, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_487).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_487, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 26_191 nanoseconds. - Weight::from_ref_time(19_850_530) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_850_530, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 440 - .saturating_add(Weight::from_ref_time(68_426).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(68_426, 0).saturating_mul(s.into())) // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_505).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_505, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `451 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 39_875 nanoseconds. - Weight::from_ref_time(32_057_678) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(32_057_678, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 715 - .saturating_add(Weight::from_ref_time(84_736).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(84_736, 0).saturating_mul(s.into())) // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_511).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_511, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `321 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 25_536 nanoseconds. - Weight::from_ref_time(27_146_180) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_146_180, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 991 - .saturating_add(Weight::from_ref_time(77_408).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(77_408, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 17_409 nanoseconds. - Weight::from_ref_time(18_559_189) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_559_189, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 518 - .saturating_add(Weight::from_ref_time(72_083).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(72_083, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 26_502 nanoseconds. - Weight::from_ref_time(28_258_573) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_258_573, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 819 - .saturating_add(Weight::from_ref_time(78_480).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(78_480, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs index d71a4ff3915..2ec610d8eb1 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `297` // Estimated: `5544` // Minimum execution time: 15_673 nanoseconds. - Weight::from_ref_time(16_101_000) - .saturating_add(Weight::from_proof_size(5544)) + Weight::from_parts(16_101_000, 0) + .saturating_add(Weight::from_parts(0, 5544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `279` // Estimated: `3033` // Minimum execution time: 12_241 nanoseconds. - Weight::from_ref_time(12_552_000) - .saturating_add(Weight::from_proof_size(3033)) + Weight::from_parts(12_552_000, 0) + .saturating_add(Weight::from_parts(0, 3033)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs index ec62b5493f8..47ec5a76e3f 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `49` // Estimated: `1006` // Minimum execution time: 7_105 nanoseconds. - Weight::from_ref_time(7_296_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(7_296_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_270 nanoseconds. - Weight::from_ref_time(3_398_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_398_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs index 306c34b65a9..2e3d628c32d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_752 nanoseconds. - Weight::from_ref_time(15_025_089) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(15_025_089, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_912 - .saturating_add(Weight::from_ref_time(3_735_986).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_735_986, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_237 nanoseconds. - Weight::from_ref_time(4_392_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_392_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_645 nanoseconds. - Weight::from_ref_time(16_082_395) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(16_082_395, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_061 - .saturating_add(Weight::from_ref_time(3_918_503).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_918_503, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 7_613 nanoseconds. - Weight::from_ref_time(7_868_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_868_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_909 nanoseconds. - Weight::from_ref_time(11_406_668) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(11_406_668, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_399 - .saturating_add(Weight::from_ref_time(3_759_278).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_759_278, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index f9e17170186..f625acb21f0 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 23_601 nanoseconds. - Weight::from_ref_time(24_078_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(24_078_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `32` // Estimated: `499` // Minimum execution time: 23_225 nanoseconds. - Weight::from_ref_time(23_887_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(23_887_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Benchmark Override (r:0 w:0) /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -105,8 +105,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_434 nanoseconds. - Weight::from_ref_time(8_839_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_839_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -116,8 +116,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_484 nanoseconds. - Weight::from_ref_time(2_611_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_611_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -141,8 +141,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 28_465 nanoseconds. - Weight::from_ref_time(29_023_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(29_023_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -165,8 +165,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 31_086 nanoseconds. - Weight::from_ref_time(31_385_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(31_385_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -177,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 13_701 nanoseconds. - Weight::from_ref_time(13_987_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(13_987_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -189,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 13_723 nanoseconds. - Weight::from_ref_time(14_166_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(14_166_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -201,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 15_381 nanoseconds. - Weight::from_ref_time(16_770_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(16_770_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -222,8 +222,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 27_952 nanoseconds. - Weight::from_ref_time(28_321_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(28_321_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -234,8 +234,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 8_516 nanoseconds. - Weight::from_ref_time(8_922_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(8_922_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -245,8 +245,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 16_615 nanoseconds. - Weight::from_ref_time(17_074_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(17_074_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -267,8 +267,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 36_726 nanoseconds. - Weight::from_ref_time(37_319_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(37_319_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index 53ceaa231d9..7cf23e0610b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 59808400167..ccc353e62fa 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(18_301_000 as u64) + Weight::from_parts(18_301_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(29_321_000 as u64) + Weight::from_parts(29_321_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(50_754_000 as u64) + Weight::from_parts(50_754_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(3_814_000 as u64) + Weight::from_parts(3_814_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(21_596_000 as u64) + Weight::from_parts(21_596_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(45_534_000 as u64) + Weight::from_parts(45_534_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(26_876_000 as u64) + Weight::from_parts(26_876_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 45bc0952507..91d84385f55 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(30_320_000 as u64) + Weight::from_parts(30_320_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(2_776_000 as u64) + Weight::from_parts(2_776_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(10_396_000 as u64) + Weight::from_parts(10_396_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(11_646_000 as u64) + Weight::from_parts(11_646_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(2_853_000 as u64) + Weight::from_parts(2_853_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(2_746_000 as u64) + Weight::from_parts(2_746_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(2_742_000 as u64) + Weight::from_parts(2_742_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(2_750_000 as u64) + Weight::from_parts(2_750_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(3_512_000 as u64) + Weight::from_parts(3_512_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(2_710_000 as u64) + Weight::from_parts(2_710_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(23_834_000 as u64) + Weight::from_parts(23_834_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(14_091_000 as u64) + Weight::from_parts(14_091_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(2_702_000 as u64) + Weight::from_parts(2_702_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(24_071_000 as u64) + Weight::from_parts(24_071_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(4_648_000 as u64) + Weight::from_parts(4_648_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(26_772_000 as u64) + Weight::from_parts(26_772_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(4_249_000 as u64) + Weight::from_parts(4_249_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(2_860_000 as u64) + Weight::from_parts(2_860_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(2_849_000 as u64) + Weight::from_parts(2_849_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(2_692_000 as u64) + Weight::from_parts(2_692_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(2_886_000 as u64) + Weight::from_parts(2_886_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(28_452_000 as u64) + Weight::from_parts(28_452_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(4_257_000 as u64) + Weight::from_parts(4_257_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(24_235_000 as u64) + Weight::from_parts(24_235_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(2_749_000 as u64) + Weight::from_parts(2_749_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(2_718_000 as u64) + Weight::from_parts(2_718_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(2_685_000 as u64) + Weight::from_parts(2_685_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(2_735_000 as u64) + Weight::from_parts(2_735_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(2_842_000 as u64) + Weight::from_parts(2_842_000 as u64, 0) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index c2e95c6ed4e..20235009772 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs index bf2213a4bbf..60edc40175d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -127,7 +127,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-polkadot"), impl_name: create_runtime_str!("bridge-hub-polkadot"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -473,6 +473,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/block_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/block_weights.rs index 9c3b057ae01..2bd7975bf98 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/block_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 9df3a253378..9ef3bbf0e06 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_798 nanoseconds. - Weight::from_ref_time(5_139_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_139_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_942 nanoseconds. - Weight::from_ref_time(5_056_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_056_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/extrinsic_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/extrinsic_weights.rs index 62543f2b909..898d72ec5b1 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs index 7627e18c453..996fbc01dc8 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_628 nanoseconds. - Weight::from_ref_time(1_691_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_691_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(369).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(369, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_332 nanoseconds. - Weight::from_ref_time(6_564_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_564_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_714).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_714, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_441 nanoseconds. - Weight::from_ref_time(3_684_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_684_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_698 nanoseconds. - Weight::from_ref_time(1_802_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_802_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_738 - .saturating_add(Weight::from_ref_time(576_825).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(576_825, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_782 nanoseconds. - Weight::from_ref_time(1_826_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_826_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 808 - .saturating_add(Weight::from_ref_time(446_795).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(446_795, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `68 + p * (69 ±0)` // Estimated: `66 + p * (70 ±0)` // Minimum execution time: 3_444 nanoseconds. - Weight::from_ref_time(3_538_000) - .saturating_add(Weight::from_proof_size(66)) + Weight::from_parts(3_538_000, 0) + .saturating_add(Weight::from_parts(0, 66)) // Standard Error: 920 - .saturating_add(Weight::from_ref_time(950_898).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(950_898, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs index a9ef15db2b6..832c4dc5a30 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1316` // Estimated: `2603` // Minimum execution time: 44_427 nanoseconds. - Weight::from_ref_time(45_164_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(45_164_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1200` // Estimated: `2603` // Minimum execution time: 34_287 nanoseconds. - Weight::from_ref_time(34_918_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(34_918_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1350` // Estimated: `2603` // Minimum execution time: 25_850 nanoseconds. - Weight::from_ref_time(26_521_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_521_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1350` // Estimated: `2603` // Minimum execution time: 29_118 nanoseconds. - Weight::from_ref_time(29_706_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(29_706_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1312` // Estimated: `5206` // Minimum execution time: 45_010 nanoseconds. - Weight::from_ref_time(45_568_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(45_568_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1200` // Estimated: `2603` // Minimum execution time: 39_332 nanoseconds. - Weight::from_ref_time(40_015_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(40_015_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1234` // Estimated: `2603` // Minimum execution time: 22_710 nanoseconds. - Weight::from_ref_time(23_111_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(23_111_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs index b3bb675c2d4..6140c4de67d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `214 + b * (78 ±0)` // Estimated: `213 + b * (2554 ±0)` // Minimum execution time: 13_937 nanoseconds. - Weight::from_ref_time(14_498_919) - .saturating_add(Weight::from_proof_size(213)) + Weight::from_parts(14_498_919, 0) + .saturating_add(Weight::from_parts(0, 213)) // Standard Error: 2_987 - .saturating_add(Weight::from_ref_time(2_491_437).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_491_437, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_465 nanoseconds. - Weight::from_ref_time(6_739_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_739_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_624 nanoseconds. - Weight::from_ref_time(6_822_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_822_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1167 + c * (48 ±0)` // Estimated: `56785 + c * (49 ±0)` // Minimum execution time: 34_794 nanoseconds. - Weight::from_ref_time(27_197_409) - .saturating_add(Weight::from_proof_size(56785)) + Weight::from_parts(27_197_409, 0) + .saturating_add(Weight::from_parts(0, 56785)) // Standard Error: 1_259 - .saturating_add(Weight::from_ref_time(101_424).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(101_424, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `503 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 26_471 nanoseconds. - Weight::from_ref_time(16_092_836) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(16_092_836, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_283 - .saturating_add(Weight::from_ref_time(103_788).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(103_788, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `187` // Estimated: `5749` // Minimum execution time: 25_597 nanoseconds. - Weight::from_ref_time(25_981_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(25_981_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22878 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2602 ±0)` // Minimum execution time: 15_961 nanoseconds. - Weight::from_ref_time(16_207_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_207_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 748_921 - .saturating_add(Weight::from_ref_time(27_460_211).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(27_460_211, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs index 899d9f50a57..aec763c0d53 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 11_693 nanoseconds. - Weight::from_ref_time(12_218_501) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_218_501, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(479).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(479, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `314 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_181 nanoseconds. - Weight::from_ref_time(28_585_764) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_585_764, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 609 - .saturating_add(Weight::from_ref_time(72_658).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(72_658, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_476).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_476, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 26_110 nanoseconds. - Weight::from_ref_time(19_809_417) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_809_417, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 448 - .saturating_add(Weight::from_ref_time(69_542).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(69_542, 0).saturating_mul(s.into())) // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_514).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_514, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `451 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 39_991 nanoseconds. - Weight::from_ref_time(31_329_529) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(31_329_529, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 567 - .saturating_add(Weight::from_ref_time(90_826).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(90_826, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_527).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_527, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `321 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 25_124 nanoseconds. - Weight::from_ref_time(26_655_548) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(26_655_548, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 743 - .saturating_add(Weight::from_ref_time(78_904).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(78_904, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 16_950 nanoseconds. - Weight::from_ref_time(18_308_894) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_308_894, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 676 - .saturating_add(Weight::from_ref_time(71_574).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(71_574, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 26_127 nanoseconds. - Weight::from_ref_time(27_889_146) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_889_146, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 729 - .saturating_add(Weight::from_ref_time(78_618).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(78_618, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs index 6b0d5a621c4..9008424b30b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `297` // Estimated: `5544` // Minimum execution time: 15_314 nanoseconds. - Weight::from_ref_time(15_944_000) - .saturating_add(Weight::from_proof_size(5544)) + Weight::from_parts(15_944_000, 0) + .saturating_add(Weight::from_parts(0, 5544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `279` // Estimated: `3033` // Minimum execution time: 11_831 nanoseconds. - Weight::from_ref_time(12_113_000) - .saturating_add(Weight::from_proof_size(3033)) + Weight::from_parts(12_113_000, 0) + .saturating_add(Weight::from_parts(0, 3033)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs index 00fca8bf5a6..0d1f0325958 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `49` // Estimated: `1006` // Minimum execution time: 6_885 nanoseconds. - Weight::from_ref_time(7_281_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(7_281_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_222 nanoseconds. - Weight::from_ref_time(3_321_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_321_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs index 8d17c28c9d6..a88680f69c5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_910 nanoseconds. - Weight::from_ref_time(5_269_110) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(5_269_110, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_509 - .saturating_add(Weight::from_ref_time(3_869_188).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_869_188, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_304 nanoseconds. - Weight::from_ref_time(4_463_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_463_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_985 nanoseconds. - Weight::from_ref_time(10_119_502) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(10_119_502, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_585 - .saturating_add(Weight::from_ref_time(4_063_211).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_063_211, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 7_746 nanoseconds. - Weight::from_ref_time(8_027_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_082 nanoseconds. - Weight::from_ref_time(10_385_233) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(10_385_233, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_217 - .saturating_add(Weight::from_ref_time(3_855_940).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_855_940, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 3e98d1aa9b4..c1d015a2442 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 24_136 nanoseconds. - Weight::from_ref_time(24_562_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(24_562_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `32` // Estimated: `499` // Minimum execution time: 23_272 nanoseconds. - Weight::from_ref_time(23_644_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(23_644_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Benchmark Override (r:0 w:0) /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -105,8 +105,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_377 nanoseconds. - Weight::from_ref_time(8_642_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_642_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -116,8 +116,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_435 nanoseconds. - Weight::from_ref_time(2_556_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_556_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -141,8 +141,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 28_539 nanoseconds. - Weight::from_ref_time(29_177_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(29_177_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -165,8 +165,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 30_607 nanoseconds. - Weight::from_ref_time(31_019_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(31_019_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -177,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 13_842 nanoseconds. - Weight::from_ref_time(14_281_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(14_281_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -189,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 13_505 nanoseconds. - Weight::from_ref_time(13_981_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(13_981_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -201,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 16_415 nanoseconds. - Weight::from_ref_time(16_752_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(16_752_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -222,8 +222,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 29_952 nanoseconds. - Weight::from_ref_time(30_592_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(30_592_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -234,8 +234,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 8_259 nanoseconds. - Weight::from_ref_time(8_608_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(8_608_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -245,8 +245,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 16_259 nanoseconds. - Weight::from_ref_time(16_574_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(16_574_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -267,8 +267,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 35_748 nanoseconds. - Weight::from_ref_time(36_667_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(36_667_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs index 133339e1119..e9b1c70bf6a 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } @@ -150,7 +150,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { _xcm: &Xcm<()>, ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); + let hardcoded_weight = Weight::from_parts(200_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 16b450765d1..fd418500c27 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(18_910_000 as u64) + Weight::from_parts(18_910_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(29_462_000 as u64) + Weight::from_parts(29_462_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(51_265_000 as u64) + Weight::from_parts(51_265_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(3_874_000 as u64) + Weight::from_parts(3_874_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(23_139_000 as u64) + Weight::from_parts(23_139_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(49_375_000 as u64) + Weight::from_parts(49_375_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(28_809_000 as u64) + Weight::from_parts(28_809_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 51597a0cca4..261efbeb0f1 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(30_138_000 as u64) + Weight::from_parts(30_138_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(2_860_000 as u64) + Weight::from_parts(2_860_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(10_421_000 as u64) + Weight::from_parts(10_421_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(11_744_000 as u64) + Weight::from_parts(11_744_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(3_024_000 as u64) + Weight::from_parts(3_024_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(2_820_000 as u64) + Weight::from_parts(2_820_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(2_869_000 as u64) + Weight::from_parts(2_869_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(2_838_000 as u64) + Weight::from_parts(2_838_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(3_620_000 as u64) + Weight::from_parts(3_620_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(2_819_000 as u64) + Weight::from_parts(2_819_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(23_931_000 as u64) + Weight::from_parts(23_931_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(13_776_000 as u64) + Weight::from_parts(13_776_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(2_784_000 as u64) + Weight::from_parts(2_784_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(23_940_000 as u64) + Weight::from_parts(23_940_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(4_676_000 as u64) + Weight::from_parts(4_676_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(26_390_000 as u64) + Weight::from_parts(26_390_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(4_435_000 as u64) + Weight::from_parts(4_435_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(2_940_000 as u64) + Weight::from_parts(2_940_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(2_898_000 as u64) + Weight::from_parts(2_898_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(2_795_000 as u64) + Weight::from_parts(2_795_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(2_908_000 as u64) + Weight::from_parts(2_908_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(26_452_000 as u64) + Weight::from_parts(26_452_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(4_303_000 as u64) + Weight::from_parts(4_303_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(23_994_000 as u64) + Weight::from_parts(23_994_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(2_789_000 as u64) + Weight::from_parts(2_789_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(2_789_000 as u64) + Weight::from_parts(2_789_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(2_836_000 as u64) + Weight::from_parts(2_836_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(2_763_000 as u64) + Weight::from_parts(2_763_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(2_872_000 as u64) + Weight::from_parts(2_872_000 as u64, 0) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index c7988e7d99f..99f1047339b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index a545b83f143..bf86b16dcef 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -156,10 +156,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-rococo"), impl_name: create_runtime_str!("bridge-hub-rococo"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, state_version: 1, }; @@ -503,6 +503,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/block_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/block_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_xcmp_queue.rs index 12a6c7a0c82..5b1d95701e3 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_865 nanoseconds. - Weight::from_ref_time(5_007_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_007_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_893 nanoseconds. - Weight::from_ref_time(5_198_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_198_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/extrinsic_weights.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system.rs index 457c5163a0b..612ff1690fb 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_592 nanoseconds. - Weight::from_ref_time(679_524) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(679_524, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(367).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(367, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_673 nanoseconds. - Weight::from_ref_time(6_751_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_751_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_715).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_715, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_408 nanoseconds. - Weight::from_ref_time(3_633_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_633_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_727 nanoseconds. - Weight::from_ref_time(1_753_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_753_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1_876 - .saturating_add(Weight::from_ref_time(581_935).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(581_935, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_743 nanoseconds. - Weight::from_ref_time(1_769_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_769_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 803 - .saturating_add(Weight::from_ref_time(446_779).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(446_779, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `68 + p * (69 ±0)` // Estimated: `66 + p * (70 ±0)` // Minimum execution time: 3_536 nanoseconds. - Weight::from_ref_time(3_649_000) - .saturating_add(Weight::from_proof_size(66)) + Weight::from_parts(3_649_000, 0) + .saturating_add(Weight::from_parts(0, 66)) // Standard Error: 949 - .saturating_add(Weight::from_ref_time(986_632).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(986_632, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_balances.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_balances.rs index 057ad2bb30a..3ad0900fe98 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_balances.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1314` // Estimated: `2603` // Minimum execution time: 47_893 nanoseconds. - Weight::from_ref_time(48_384_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(48_384_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1198` // Estimated: `2603` // Minimum execution time: 35_027 nanoseconds. - Weight::from_ref_time(35_675_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(35_675_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1348` // Estimated: `2603` // Minimum execution time: 26_009 nanoseconds. - Weight::from_ref_time(26_448_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_448_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1348` // Estimated: `2603` // Minimum execution time: 30_006 nanoseconds. - Weight::from_ref_time(30_501_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(30_501_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1310` // Estimated: `5206` // Minimum execution time: 46_787 nanoseconds. - Weight::from_ref_time(47_700_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(47_700_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1198` // Estimated: `2603` // Minimum execution time: 43_890 nanoseconds. - Weight::from_ref_time(44_914_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(44_914_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1232` // Estimated: `2603` // Minimum execution time: 26_785 nanoseconds. - Weight::from_ref_time(27_404_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(27_404_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_collator_selection.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_collator_selection.rs index 38a6e424f87..dcf8f3170b5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `214 + b * (78 ±0)` // Estimated: `213 + b * (2554 ±0)` // Minimum execution time: 14_254 nanoseconds. - Weight::from_ref_time(15_028_628) - .saturating_add(Weight::from_proof_size(213)) + Weight::from_parts(15_028_628, 0) + .saturating_add(Weight::from_parts(0, 213)) // Standard Error: 3_094 - .saturating_add(Weight::from_ref_time(2_490_219).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_490_219, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_548 nanoseconds. - Weight::from_ref_time(6_775_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_775_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_922 nanoseconds. - Weight::from_ref_time(7_184_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_184_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1167 + c * (48 ±0)` // Estimated: `56785 + c * (49 ±0)` // Minimum execution time: 35_329 nanoseconds. - Weight::from_ref_time(27_879_325) - .saturating_add(Weight::from_proof_size(56785)) + Weight::from_parts(27_879_325, 0) + .saturating_add(Weight::from_parts(0, 56785)) // Standard Error: 1_269 - .saturating_add(Weight::from_ref_time(108_458).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(108_458, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `503 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 27_322 nanoseconds. - Weight::from_ref_time(16_354_913) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(16_354_913, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_399 - .saturating_add(Weight::from_ref_time(108_840).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(108_840, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `187` // Estimated: `5749` // Minimum execution time: 26_074 nanoseconds. - Weight::from_ref_time(26_574_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(26_574_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22878 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + r * (2602 ±0) + c * (2519 ±0)` // Minimum execution time: 15_727 nanoseconds. - Weight::from_ref_time(16_001_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_001_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 792_964 - .saturating_add(Weight::from_ref_time(28_827_951).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(28_827_951, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_multisig.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_multisig.rs index 956c3264f1d..c39e4a6bd31 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 11_903 nanoseconds. - Weight::from_ref_time(12_398_025) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_398_025, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(550).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(550, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `314 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 35_780 nanoseconds. - Weight::from_ref_time(29_310_705) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(29_310_705, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 602 - .saturating_add(Weight::from_ref_time(70_837).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(70_837, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_545).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_545, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 26_552 nanoseconds. - Weight::from_ref_time(19_998_713) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_998_713, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 711 - .saturating_add(Weight::from_ref_time(72_463).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(72_463, 0).saturating_mul(s.into())) // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_573).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_573, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `451 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 40_836 nanoseconds. - Weight::from_ref_time(32_275_692) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(32_275_692, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 673 - .saturating_add(Weight::from_ref_time(92_895).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(92_895, 0).saturating_mul(s.into())) // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_569).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_569, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `321 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 26_440 nanoseconds. - Weight::from_ref_time(27_434_937) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_434_937, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 725 - .saturating_add(Weight::from_ref_time(80_283).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(80_283, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 17_335 nanoseconds. - Weight::from_ref_time(18_873_349) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_873_349, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 490 - .saturating_add(Weight::from_ref_time(74_017).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(74_017, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 26_731 nanoseconds. - Weight::from_ref_time(28_534_422) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(28_534_422, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 740 - .saturating_add(Weight::from_ref_time(78_223).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(78_223, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_session.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_session.rs index 8df3cd5efd4..136f7ec532e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_session.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `297` // Estimated: `5544` // Minimum execution time: 15_721 nanoseconds. - Weight::from_ref_time(16_081_000) - .saturating_add(Weight::from_proof_size(5544)) + Weight::from_parts(16_081_000, 0) + .saturating_add(Weight::from_parts(0, 5544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `279` // Estimated: `3033` // Minimum execution time: 12_031 nanoseconds. - Weight::from_ref_time(12_339_000) - .saturating_add(Weight::from_proof_size(3033)) + Weight::from_parts(12_339_000, 0) + .saturating_add(Weight::from_parts(0, 3033)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_timestamp.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_timestamp.rs index 279ec36c698..d3db098c7f7 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `49` // Estimated: `1006` // Minimum execution time: 7_216 nanoseconds. - Weight::from_ref_time(7_445_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(7_445_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_181 nanoseconds. - Weight::from_ref_time(3_322_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_322_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_utility.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_utility.rs index 48ecc23b037..ad7c0b79161 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_utility.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_179 nanoseconds. - Weight::from_ref_time(19_315_482) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(19_315_482, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3_383 - .saturating_add(Weight::from_ref_time(4_126_811).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_126_811, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_474 nanoseconds. - Weight::from_ref_time(4_666_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_666_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_210 nanoseconds. - Weight::from_ref_time(12_190_913) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_190_913, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_328 - .saturating_add(Weight::from_ref_time(4_370_533).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_370_533, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 8_194 nanoseconds. - Weight::from_ref_time(8_300_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_300_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_207 nanoseconds. - Weight::from_ref_time(9_704_236) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(9_704_236, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 4_155 - .saturating_add(Weight::from_ref_time(4_130_222).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_130_222, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs index 35426f96261..d640aa27a07 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 25_656 nanoseconds. - Weight::from_ref_time(25_942_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(25_942_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `32` // Estimated: `499` // Minimum execution time: 26_559 nanoseconds. - Weight::from_ref_time(27_040_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(27_040_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Benchmark Override (r:0 w:0) /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -105,8 +105,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 9_204 nanoseconds. - Weight::from_ref_time(9_400_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(9_400_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -116,8 +116,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_652 nanoseconds. - Weight::from_ref_time(2_790_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_790_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -141,8 +141,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 29_636 nanoseconds. - Weight::from_ref_time(30_041_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(30_041_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -165,8 +165,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 31_854 nanoseconds. - Weight::from_ref_time(32_416_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(32_416_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -177,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 13_994 nanoseconds. - Weight::from_ref_time(14_361_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(14_361_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -189,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 14_337 nanoseconds. - Weight::from_ref_time(14_651_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(14_651_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -201,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 15_624 nanoseconds. - Weight::from_ref_time(15_936_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(15_936_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -222,8 +222,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 26_774 nanoseconds. - Weight::from_ref_time(27_140_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(27_140_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -234,8 +234,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 7_233 nanoseconds. - Weight::from_ref_time(7_487_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(7_487_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -245,8 +245,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 14_801 nanoseconds. - Weight::from_ref_time(15_090_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(15_090_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -267,8 +267,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 32_613 nanoseconds. - Weight::from_ref_time(32_978_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(32_978_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index e1aa203fbf2..b05c554580d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -28,7 +28,7 @@ trait WeighMultiAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } -const MAX_ASSETS: u32 = 100; +const MAX_ASSETS: u64 = 100; impl WeighMultiAssets for MultiAssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { @@ -36,7 +36,7 @@ impl WeighMultiAssets for MultiAssetFilter { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(asset) => match asset { - All => weight.saturating_mul(MAX_ASSETS as u64), + All => weight.saturating_mul(MAX_ASSETS), AllOf { fun, .. } => match fun { WildFungibility::Fungible => weight, // Magic number 2 has to do with the fact that we could have up to 2 times @@ -44,8 +44,8 @@ impl WeighMultiAssets for MultiAssetFilter { WildFungibility::NonFungible => weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), }, - AllCounted(count) => weight.saturating_mul(*count as u64), - AllOfCounted { count, .. } => weight.saturating_mul(*count as u64), + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), }, } } @@ -65,7 +65,7 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_ref_time(1_000_000_000 as u64) + Weight::from_parts(1_000_000_000 as u64, 0) } fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) @@ -123,7 +123,7 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); + let hardcoded_weight = Weight::from_parts(1_000_000_000 as u64, 0); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); hardcoded_weight.min(weight) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 9ead53ab152..6bc6c282c6b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -51,14 +51,14 @@ impl WeightInfo { // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(20_377_000 as u64) + Weight::from_parts(20_377_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(31_004_000 as u64) + Weight::from_parts(31_004_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,17 +77,17 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(54_173_000 as u64) + Weight::from_parts(54_173_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(4_635_000 as u64) + Weight::from_parts(4_635_000 as u64, 0) } // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(23_155_000 as u64) + Weight::from_parts(23_155_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,7 +106,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(52_599_000 as u64) + Weight::from_parts(52_599_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,7 +123,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(34_004_000 as u64) + Weight::from_parts(34_004_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 0555fabf4de..9f225ab514f 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -61,39 +61,39 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(32_598_000 as u64) + Weight::from_parts(32_598_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(3_195_000 as u64) + Weight::from_parts(3_195_000 as u64, 0) } // Storage: PolkadotXcm Queries (r:1 w:0) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(10_939_000 as u64) + Weight::from_parts(10_939_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(12_473_000 as u64) + Weight::from_parts(12_473_000 as u64, 0) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(3_458_000 as u64) + Weight::from_parts(3_458_000 as u64, 0) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(3_252_000 as u64) + Weight::from_parts(3_252_000 as u64, 0) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(3_249_000 as u64) + Weight::from_parts(3_249_000 as u64, 0) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(3_190_000 as u64) + Weight::from_parts(3_190_000 as u64, 0) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(4_268_000 as u64) + Weight::from_parts(4_268_000 as u64, 0) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(3_255_000 as u64) + Weight::from_parts(3_255_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -108,19 +108,19 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(25_755_000 as u64) + Weight::from_parts(25_755_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) // Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(15_124_000 as u64) + Weight::from_parts(15_124_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(3_164_000 as u64) + Weight::from_parts(3_164_000 as u64, 0) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) @@ -135,14 +135,14 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(25_329_000 as u64) + Weight::from_parts(25_329_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(5_253_000 as u64) + Weight::from_parts(5_253_000 as u64, 0) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -158,24 +158,24 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(29_304_000 as u64) + Weight::from_parts(29_304_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn burn_asset() -> Weight { - Weight::from_ref_time(5_275_000 as u64) + Weight::from_parts(5_275_000 as u64, 0) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(3_355_000 as u64) + Weight::from_parts(3_355_000 as u64, 0) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(3_391_000 as u64) + Weight::from_parts(3_391_000 as u64, 0) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(3_192_000 as u64) + Weight::from_parts(3_192_000 as u64, 0) } pub(crate) fn expect_transact_status() -> Weight { - Weight::from_ref_time(3_342_000 as u64) + Weight::from_parts(3_342_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -190,12 +190,12 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(28_426_000 as u64) + Weight::from_parts(28_426_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn expect_pallet() -> Weight { - Weight::from_ref_time(4_826_000 as u64) + Weight::from_parts(4_826_000 as u64, 0) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -210,23 +210,23 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn report_transact_status() -> Weight { - Weight::from_ref_time(26_238_000 as u64) + Weight::from_parts(26_238_000 as u64, 0) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn clear_transact_status() -> Weight { - Weight::from_ref_time(3_240_000 as u64) + Weight::from_parts(3_240_000 as u64, 0) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(3_181_000 as u64) + Weight::from_parts(3_181_000 as u64, 0) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(3_142_000 as u64) + Weight::from_parts(3_142_000 as u64, 0) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(3_216_000 as u64) + Weight::from_parts(3_216_000 as u64, 0) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(3_394_000 as u64) + Weight::from_parts(3_394_000 as u64, 0) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 5e2511d6eb5..3067cb3f507 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index a1c6560b396..4dbfc911a8e 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -102,10 +102,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 2, + transaction_version: 3, state_version: 0, }; @@ -615,6 +615,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index b22d572bdc5..1d777ad3d11 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -54,8 +54,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 4_808 nanoseconds. - Weight::from_ref_time(4_966_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(4_966_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `76` // Estimated: `571` // Minimum execution time: 5_014 nanoseconds. - Weight::from_ref_time(5_135_000) - .saturating_add(Weight::from_proof_size(571)) + Weight::from_parts(5_135_000, 0) + .saturating_add(Weight::from_parts(0, 571)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs index 8ea3fd852fa..763568d1811 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/frame_system.rs @@ -53,10 +53,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_643 nanoseconds. - Weight::from_ref_time(1_672_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_672_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(368).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(368, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_679 nanoseconds. - Weight::from_ref_time(6_737_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_737_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_714).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_714, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -78,8 +78,8 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `495` // Minimum execution time: 3_675 nanoseconds. - Weight::from_ref_time(3_915_000) - .saturating_add(Weight::from_proof_size(495)) + Weight::from_parts(3_915_000, 0) + .saturating_add(Weight::from_parts(0, 495)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,10 +91,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_789 nanoseconds. - Weight::from_ref_time(1_840_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_840_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_081 - .saturating_add(Weight::from_ref_time(587_667).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(587_667, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -105,10 +105,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 1_849 nanoseconds. - Weight::from_ref_time(1_915_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(1_915_000, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 798 - .saturating_add(Weight::from_ref_time(446_723).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(446_723, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -119,11 +119,11 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `68 + p * (69 ±0)` // Estimated: `69 + p * (70 ±0)` // Minimum execution time: 3_503 nanoseconds. - Weight::from_ref_time(3_574_000) - .saturating_add(Weight::from_proof_size(69)) + Weight::from_parts(3_574_000, 0) + .saturating_add(Weight::from_parts(0, 69)) // Standard Error: 948 - .saturating_add(Weight::from_ref_time(949_091).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(949_091, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(70).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs index 066b8d36986..7016937d11c 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_alliance.rs @@ -65,18 +65,18 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `502 + m * (32 ±0) + p * (36 ±0)` // Estimated: `10983 + m * (128 ±0) + p * (144 ±0)` // Minimum execution time: 26_997 nanoseconds. - Weight::from_ref_time(28_875_691) - .saturating_add(Weight::from_proof_size(10983)) + Weight::from_parts(28_875_691, 0) + .saturating_add(Weight::from_parts(0, 10983)) // Standard Error: 65 - .saturating_add(Weight::from_ref_time(235).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(235, 0).saturating_mul(b.into())) // Standard Error: 683 - .saturating_add(Weight::from_ref_time(17_740).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(17_740, 0).saturating_mul(m.into())) // Standard Error: 675 - .saturating_add(Weight::from_ref_time(88_731).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(88_731, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_proof_size(128).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(144).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) } /// Storage: Alliance Members (r:1 w:0) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -88,13 +88,13 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `932 + m * (64 ±0)` // Estimated: `9092 + m * (64 ±0)` // Minimum execution time: 23_241 nanoseconds. - Weight::from_ref_time(23_786_275) - .saturating_add(Weight::from_proof_size(9092)) + Weight::from_parts(23_786_275, 0) + .saturating_add(Weight::from_parts(0, 9092)) // Standard Error: 563 - .saturating_add(Weight::from_ref_time(44_164).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(44_164, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } /// Storage: Alliance Members (r:1 w:0) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -113,16 +113,16 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `438 + m * (96 ±0) + p * (36 ±0)` // Estimated: `11067 + m * (388 ±0) + p * (144 ±0)` // Minimum execution time: 32_551 nanoseconds. - Weight::from_ref_time(30_322_236) - .saturating_add(Weight::from_proof_size(11067)) + Weight::from_parts(30_322_236, 0) + .saturating_add(Weight::from_parts(0, 11067)) // Standard Error: 695 - .saturating_add(Weight::from_ref_time(44_336).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(44_336, 0).saturating_mul(m.into())) // Standard Error: 678 - .saturating_add(Weight::from_ref_time(83_273).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(83_273, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(388).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(144).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) } /// Storage: Alliance Members (r:1 w:0) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -142,16 +142,16 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `923 + m * (96 ±0) + p * (41 ±0)` // Estimated: `15422 + m * (388 ±0) + p * (160 ±0)` // Minimum execution time: 42_592 nanoseconds. - Weight::from_ref_time(42_349_696) - .saturating_add(Weight::from_proof_size(15422)) + Weight::from_parts(42_349_696, 0) + .saturating_add(Weight::from_parts(0, 15422)) // Standard Error: 1_776 - .saturating_add(Weight::from_ref_time(53_830).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(53_830, 0).saturating_mul(m.into())) // Standard Error: 1_731 - .saturating_add(Weight::from_ref_time(94_827).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(94_827, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(388).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(160).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) } /// Storage: Alliance Members (r:1 w:0) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -174,16 +174,16 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `677 + m * (96 ±0) + p * (41 ±0)` // Estimated: `14232 + m * (507 ±0) + p * (202 ±0)` // Minimum execution time: 39_735 nanoseconds. - Weight::from_ref_time(42_276_266) - .saturating_add(Weight::from_proof_size(14232)) + Weight::from_parts(42_276_266, 0) + .saturating_add(Weight::from_parts(0, 14232)) // Standard Error: 3_451 - .saturating_add(Weight::from_ref_time(94_755).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(94_755, 0).saturating_mul(m.into())) // Standard Error: 3_409 - .saturating_add(Weight::from_ref_time(108_485).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(108_485, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_proof_size(507).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(202).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 507).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 202).saturating_mul(p.into())) } /// Storage: Alliance Members (r:1 w:0) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -205,16 +205,16 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `545 + m * (96 ±0) + p * (36 ±0)` // Estimated: `12436 + m * (480 ±0) + p * (180 ±0)` // Minimum execution time: 33_604 nanoseconds. - Weight::from_ref_time(32_382_610) - .saturating_add(Weight::from_proof_size(12436)) + Weight::from_parts(32_382_610, 0) + .saturating_add(Weight::from_parts(0, 12436)) // Standard Error: 564 - .saturating_add(Weight::from_ref_time(41_625).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(41_625, 0).saturating_mul(m.into())) // Standard Error: 544 - .saturating_add(Weight::from_ref_time(80_954).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(80_954, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(480).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(180).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 480).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } /// Storage: Alliance Members (r:2 w:2) /// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen) @@ -227,12 +227,12 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `12` // Estimated: `11879` // Minimum execution time: 27_970 nanoseconds. - Weight::from_ref_time(16_763_631) - .saturating_add(Weight::from_proof_size(11879)) + Weight::from_parts(16_763_631, 0) + .saturating_add(Weight::from_parts(0, 11879)) // Standard Error: 496 - .saturating_add(Weight::from_ref_time(130_747).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(130_747, 0).saturating_mul(m.into())) // Standard Error: 490 - .saturating_add(Weight::from_ref_time(112_074).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(112_074, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -256,23 +256,23 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `0 + x * (52 ±0) + y * (53 ±0) + z * (282 ±0)` // Estimated: `31580 + x * (2590 ±0) + y * (2590 ±0) + z * (3200 ±1)` // Minimum execution time: 221_464 nanoseconds. - Weight::from_ref_time(223_114_000) - .saturating_add(Weight::from_proof_size(31580)) + Weight::from_parts(223_114_000, 0) + .saturating_add(Weight::from_parts(0, 31580)) // Standard Error: 19_600 - .saturating_add(Weight::from_ref_time(471_527).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(471_527, 0).saturating_mul(x.into())) // Standard Error: 19_506 - .saturating_add(Weight::from_ref_time(424_033).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(424_033, 0).saturating_mul(y.into())) // Standard Error: 38_976 - .saturating_add(Weight::from_ref_time(9_666_599).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(9_666_599, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(z.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(z.into()))) - .saturating_add(Weight::from_proof_size(2590).saturating_mul(x.into())) - .saturating_add(Weight::from_proof_size(2590).saturating_mul(y.into())) - .saturating_add(Weight::from_proof_size(3200).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(0, 2590).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 2590).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3200).saturating_mul(z.into())) } /// Storage: Alliance Rule (r:0 w:1) /// Proof: Alliance Rule (max_values: Some(1), max_size: Some(87), added: 582, mode: MaxEncodedLen) @@ -281,8 +281,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_585 nanoseconds. - Weight::from_ref_time(8_746_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_746_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Alliance Announcements (r:1 w:1) @@ -292,8 +292,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `76` // Estimated: `9197` // Minimum execution time: 10_728 nanoseconds. - Weight::from_ref_time(10_974_000) - .saturating_add(Weight::from_proof_size(9197)) + Weight::from_parts(10_974_000, 0) + .saturating_add(Weight::from_parts(0, 9197)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -304,8 +304,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `181` // Estimated: `9197` // Minimum execution time: 11_751 nanoseconds. - Weight::from_ref_time(12_205_000) - .saturating_add(Weight::from_proof_size(9197)) + Weight::from_parts(12_205_000, 0) + .saturating_add(Weight::from_parts(0, 9197)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -322,8 +322,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `388` // Estimated: `23358` // Minimum execution time: 38_798 nanoseconds. - Weight::from_ref_time(39_255_000) - .saturating_add(Weight::from_proof_size(23358)) + Weight::from_parts(39_255_000, 0) + .saturating_add(Weight::from_parts(0, 23358)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -336,8 +336,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `255` // Estimated: `20755` // Minimum execution time: 27_702 nanoseconds. - Weight::from_ref_time(28_189_000) - .saturating_add(Weight::from_proof_size(20755)) + Weight::from_parts(28_189_000, 0) + .saturating_add(Weight::from_parts(0, 20755)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -354,8 +354,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `298` // Estimated: `12761` // Minimum execution time: 23_033 nanoseconds. - Weight::from_ref_time(23_589_000) - .saturating_add(Weight::from_proof_size(12761)) + Weight::from_parts(23_589_000, 0) + .saturating_add(Weight::from_parts(0, 12761)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -374,8 +374,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `298` // Estimated: `24133` // Minimum execution time: 31_352 nanoseconds. - Weight::from_ref_time(31_848_000) - .saturating_add(Weight::from_proof_size(24133)) + Weight::from_parts(31_848_000, 0) + .saturating_add(Weight::from_parts(0, 24133)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -392,8 +392,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `580` // Estimated: `13355` // Minimum execution time: 31_872 nanoseconds. - Weight::from_ref_time(32_156_000) - .saturating_add(Weight::from_proof_size(13355)) + Weight::from_parts(32_156_000, 0) + .saturating_add(Weight::from_parts(0, 13355)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -426,8 +426,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `716` // Estimated: `35980` // Minimum execution time: 115_869 nanoseconds. - Weight::from_ref_time(116_954_000) - .saturating_add(Weight::from_proof_size(35980)) + Weight::from_parts(116_954_000, 0) + .saturating_add(Weight::from_parts(0, 35980)) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -442,12 +442,12 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `76` // Estimated: `29894` // Minimum execution time: 6_956 nanoseconds. - Weight::from_ref_time(7_074_000) - .saturating_add(Weight::from_proof_size(29894)) + Weight::from_parts(7_074_000, 0) + .saturating_add(Weight::from_parts(0, 29894)) // Standard Error: 2_782 - .saturating_add(Weight::from_ref_time(1_178_647).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_178_647, 0).saturating_mul(n.into())) // Standard Error: 1_089 - .saturating_add(Weight::from_ref_time(65_684).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(65_684, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -462,12 +462,12 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `0 + n * (289 ±0) + l * (100 ±0)` // Estimated: `29894` // Minimum execution time: 6_939 nanoseconds. - Weight::from_ref_time(7_100_000) - .saturating_add(Weight::from_proof_size(29894)) + Weight::from_parts(7_100_000, 0) + .saturating_add(Weight::from_parts(0, 29894)) // Standard Error: 170_977 - .saturating_add(Weight::from_ref_time(13_668_797).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(13_668_797, 0).saturating_mul(n.into())) // Standard Error: 66_962 - .saturating_add(Weight::from_ref_time(451_782).saturating_mul(l.into())) + .saturating_add(Weight::from_parts(451_782, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -484,8 +484,8 @@ impl pallet_alliance::WeightInfo for WeightInfo { // Measured: `298` // Estimated: `18447` // Minimum execution time: 29_564 nanoseconds. - Weight::from_ref_time(30_313_000) - .saturating_add(Weight::from_proof_size(18447)) + Weight::from_parts(30_313_000, 0) + .saturating_add(Weight::from_parts(0, 18447)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs index 6835ca14078..711ee8eaf60 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -54,8 +54,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1176` // Estimated: `2603` // Minimum execution time: 45_207 nanoseconds. - Weight::from_ref_time(45_620_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(45_620_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1060` // Estimated: `2603` // Minimum execution time: 35_103 nanoseconds. - Weight::from_ref_time(35_730_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(35_730_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1172` // Estimated: `2603` // Minimum execution time: 26_007 nanoseconds. - Weight::from_ref_time(26_347_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(26_347_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,8 +90,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1172` // Estimated: `2603` // Minimum execution time: 28_971 nanoseconds. - Weight::from_ref_time(29_435_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(29_435_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1172` // Estimated: `5206` // Minimum execution time: 45_554 nanoseconds. - Weight::from_ref_time(46_156_000) - .saturating_add(Weight::from_proof_size(5206)) + Weight::from_parts(46_156_000, 0) + .saturating_add(Weight::from_parts(0, 5206)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,8 +114,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1060` // Estimated: `2603` // Minimum execution time: 40_290 nanoseconds. - Weight::from_ref_time(40_805_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(40_805_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -126,8 +126,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `1056` // Estimated: `2603` // Minimum execution time: 22_459 nanoseconds. - Weight::from_ref_time(23_037_000) - .saturating_add(Weight::from_proof_size(2603)) + Weight::from_parts(23_037_000, 0) + .saturating_add(Weight::from_parts(0, 2603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index 86e158cc480..2eb232574ce 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -57,13 +57,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `178 + b * (78 ±0)` // Estimated: `178 + b * (2554 ±0)` // Minimum execution time: 13_471 nanoseconds. - Weight::from_ref_time(13_949_440) - .saturating_add(Weight::from_proof_size(178)) + Weight::from_parts(13_949_440, 0) + .saturating_add(Weight::from_parts(0, 178)) // Standard Error: 3_549 - .saturating_add(Weight::from_ref_time(2_497_077).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_497_077, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(2554).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 2554).saturating_mul(b.into())) } /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -72,8 +72,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_444 nanoseconds. - Weight::from_ref_time(6_763_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_763_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) @@ -83,8 +83,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 6_610 nanoseconds. - Weight::from_ref_time(6_807_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(6_807_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: CollatorSelection Candidates (r:1 w:1) @@ -105,13 +105,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `1171 + c * (48 ±0)` // Estimated: `56784 + c * (49 ±0)` // Minimum execution time: 35_411 nanoseconds. - Weight::from_ref_time(26_990_808) - .saturating_add(Weight::from_proof_size(56784)) + Weight::from_parts(26_990_808, 0) + .saturating_add(Weight::from_parts(0, 56784)) // Standard Error: 1_294 - .saturating_add(Weight::from_ref_time(107_975).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(107_975, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_proof_size(49).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 49).saturating_mul(c.into())) } /// Storage: CollatorSelection Candidates (r:1 w:1) /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(48002), added: 48497, mode: MaxEncodedLen) @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `536 + c * (48 ±0)` // Estimated: `48497` // Minimum execution time: 25_912 nanoseconds. - Weight::from_ref_time(15_664_296) - .saturating_add(Weight::from_proof_size(48497)) + Weight::from_parts(15_664_296, 0) + .saturating_add(Weight::from_parts(0, 48497)) // Standard Error: 1_292 - .saturating_add(Weight::from_ref_time(105_672).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(105_672, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,8 +141,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `135` // Estimated: `5749` // Minimum execution time: 24_773 nanoseconds. - Weight::from_ref_time(25_088_000) - .saturating_add(Weight::from_proof_size(5749)) + Weight::from_parts(25_088_000, 0) + .saturating_add(Weight::from_parts(0, 5749)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,15 +163,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Measured: `22784 + r * (148 ±0) + c * (97 ±0)` // Estimated: `52737 + c * (2519 ±0) + r * (2602 ±0)` // Minimum execution time: 16_174 nanoseconds. - Weight::from_ref_time(16_337_000) - .saturating_add(Weight::from_proof_size(52737)) + Weight::from_parts(16_337_000, 0) + .saturating_add(Weight::from_parts(0, 52737)) // Standard Error: 759_621 - .saturating_add(Weight::from_ref_time(27_780_906).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(27_780_906, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_proof_size(2519).saturating_mul(c.into())) - .saturating_add(Weight::from_proof_size(2602).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into())) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collective.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collective.rs index 085d93f8c08..38369b02f26 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collective.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_collective.rs @@ -63,18 +63,18 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `0 + m * (3233 ±0) + p * (3223 ±0)` // Estimated: `15906 + m * (7809 ±23) + p * (10238 ±23)` // Minimum execution time: 15_797 nanoseconds. - Weight::from_ref_time(16_028_000) - .saturating_add(Weight::from_proof_size(15906)) + Weight::from_parts(16_028_000, 0) + .saturating_add(Weight::from_parts(0, 15906)) // Standard Error: 70_308 - .saturating_add(Weight::from_ref_time(5_642_347).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(5_642_347, 0).saturating_mul(m.into())) // Standard Error: 70_308 - .saturating_add(Weight::from_ref_time(8_133_950).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(8_133_950, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_proof_size(7809).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(10238).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 7809).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 10238).saturating_mul(p.into())) } /// Storage: AllianceMotion Members (r:1 w:0) /// Proof Skipped: AllianceMotion Members (max_values: Some(1), max_size: None, mode: Measured) @@ -85,14 +85,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `64 + m * (32 ±0)` // Estimated: `560 + m * (32 ±0)` // Minimum execution time: 14_039 nanoseconds. - Weight::from_ref_time(13_145_821) - .saturating_add(Weight::from_proof_size(560)) + Weight::from_parts(13_145_821, 0) + .saturating_add(Weight::from_parts(0, 560)) // Standard Error: 24 - .saturating_add(Weight::from_ref_time(1_434).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(b.into())) // Standard Error: 248 - .saturating_add(Weight::from_ref_time(14_559).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(14_559, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_proof_size(32).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } /// Storage: AllianceMotion Members (r:1 w:0) /// Proof Skipped: AllianceMotion Members (max_values: Some(1), max_size: None, mode: Measured) @@ -105,14 +105,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `64 + m * (32 ±0)` // Estimated: `3100 + m * (64 ±0)` // Minimum execution time: 16_235 nanoseconds. - Weight::from_ref_time(14_913_854) - .saturating_add(Weight::from_proof_size(3100)) + Weight::from_parts(14_913_854, 0) + .saturating_add(Weight::from_parts(0, 3100)) // Standard Error: 26 - .saturating_add(Weight::from_ref_time(1_744).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_744, 0).saturating_mul(b.into())) // Standard Error: 273 - .saturating_add(Weight::from_ref_time(23_908).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(23_908, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_proof_size(64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } /// Storage: AllianceMotion Members (r:1 w:0) /// Proof Skipped: AllianceMotion Members (max_values: Some(1), max_size: None, mode: Measured) @@ -132,18 +132,18 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `386 + m * (32 ±0) + p * (36 ±0)` // Estimated: `5505 + m * (165 ±0) + p * (180 ±0)` // Minimum execution time: 21_595 nanoseconds. - Weight::from_ref_time(23_162_876) - .saturating_add(Weight::from_proof_size(5505)) + Weight::from_parts(23_162_876, 0) + .saturating_add(Weight::from_parts(0, 5505)) // Standard Error: 76 - .saturating_add(Weight::from_ref_time(2_647).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(2_647, 0).saturating_mul(b.into())) // Standard Error: 797 - .saturating_add(Weight::from_ref_time(19_673).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(19_673, 0).saturating_mul(m.into())) // Standard Error: 787 - .saturating_add(Weight::from_ref_time(95_242).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(95_242, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_proof_size(165).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(180).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } /// Storage: AllianceMotion Members (r:1 w:0) /// Proof Skipped: AllianceMotion Members (max_values: Some(1), max_size: None, mode: Measured) @@ -155,13 +155,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `836 + m * (64 ±0)` // Estimated: `4640 + m * (128 ±0)` // Minimum execution time: 20_793 nanoseconds. - Weight::from_ref_time(21_342_865) - .saturating_add(Weight::from_proof_size(4640)) + Weight::from_parts(21_342_865, 0) + .saturating_add(Weight::from_parts(0, 4640)) // Standard Error: 394 - .saturating_add(Weight::from_ref_time(43_236).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(43_236, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_proof_size(128).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into())) } /// Storage: AllianceMotion Voting (r:1 w:1) /// Proof Skipped: AllianceMotion Voting (max_values: None, max_size: None, mode: Measured) @@ -178,16 +178,16 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `456 + m * (64 ±0) + p * (36 ±0)` // Estimated: `5213 + m * (260 ±0) + p * (144 ±0)` // Minimum execution time: 24_859 nanoseconds. - Weight::from_ref_time(26_156_065) - .saturating_add(Weight::from_proof_size(5213)) + Weight::from_parts(26_156_065, 0) + .saturating_add(Weight::from_parts(0, 5213)) // Standard Error: 737 - .saturating_add(Weight::from_ref_time(20_578).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(20_578, 0).saturating_mul(m.into())) // Standard Error: 718 - .saturating_add(Weight::from_ref_time(86_327).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(86_327, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(260).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(144).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into())) } /// Storage: AllianceMotion Voting (r:1 w:1) /// Proof Skipped: AllianceMotion Voting (max_values: None, max_size: None, mode: Measured) @@ -205,19 +205,19 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `792 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` // Estimated: `8484 + b * (4 ±0) + m * (264 ±0) + p * (160 ±0)` // Minimum execution time: 34_729 nanoseconds. - Weight::from_ref_time(36_499_058) - .saturating_add(Weight::from_proof_size(8484)) + Weight::from_parts(36_499_058, 0) + .saturating_add(Weight::from_parts(0, 8484)) // Standard Error: 84 - .saturating_add(Weight::from_ref_time(1_409).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_409, 0).saturating_mul(b.into())) // Standard Error: 893 - .saturating_add(Weight::from_ref_time(14_167).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(14_167, 0).saturating_mul(m.into())) // Standard Error: 871 - .saturating_add(Weight::from_ref_time(101_999).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(101_999, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(4).saturating_mul(b.into())) - .saturating_add(Weight::from_proof_size(264).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(160).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into())) } /// Storage: AllianceMotion Voting (r:1 w:1) /// Proof Skipped: AllianceMotion Voting (max_values: None, max_size: None, mode: Measured) @@ -236,16 +236,16 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `553 + m * (48 ±0) + p * (36 ±0)` // Estimated: `6605 + m * (245 ±0) + p * (180 ±0)` // Minimum execution time: 27_113 nanoseconds. - Weight::from_ref_time(28_105_174) - .saturating_add(Weight::from_proof_size(6605)) + Weight::from_parts(28_105_174, 0) + .saturating_add(Weight::from_parts(0, 6605)) // Standard Error: 686 - .saturating_add(Weight::from_ref_time(20_379).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(20_379, 0).saturating_mul(m.into())) // Standard Error: 669 - .saturating_add(Weight::from_ref_time(89_284).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(89_284, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(245).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(180).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 245).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into())) } /// Storage: AllianceMotion Voting (r:1 w:1) /// Proof Skipped: AllianceMotion Voting (max_values: None, max_size: None, mode: Measured) @@ -265,19 +265,19 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `812 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` // Estimated: `9715 + b * (5 ±0) + m * (330 ±0) + p * (200 ±0)` // Minimum execution time: 37_242 nanoseconds. - Weight::from_ref_time(38_722_168) - .saturating_add(Weight::from_proof_size(9715)) + Weight::from_parts(38_722_168, 0) + .saturating_add(Weight::from_parts(0, 9715)) // Standard Error: 89 - .saturating_add(Weight::from_ref_time(1_419).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_419, 0).saturating_mul(b.into())) // Standard Error: 947 - .saturating_add(Weight::from_ref_time(15_417).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(15_417, 0).saturating_mul(m.into())) // Standard Error: 923 - .saturating_add(Weight::from_ref_time(103_094).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(103_094, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(5).saturating_mul(b.into())) - .saturating_add(Weight::from_proof_size(330).saturating_mul(m.into())) - .saturating_add(Weight::from_proof_size(200).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into())) } /// Storage: AllianceMotion Proposals (r:1 w:1) /// Proof Skipped: AllianceMotion Proposals (max_values: Some(1), max_size: None, mode: Measured) @@ -291,12 +291,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `221 + p * (32 ±0)` // Estimated: `1158 + p * (96 ±0)` // Minimum execution time: 13_173 nanoseconds. - Weight::from_ref_time(14_787_145) - .saturating_add(Weight::from_proof_size(1158)) + Weight::from_parts(14_787_145, 0) + .saturating_add(Weight::from_parts(0, 1158)) // Standard Error: 614 - .saturating_add(Weight::from_ref_time(81_286).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(81_286, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_proof_size(96).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into())) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs index cefa35fca2c..e5fa9b0aaea 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_multisig.rs @@ -53,10 +53,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 11_628 nanoseconds. - Weight::from_ref_time(12_058_313) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(12_058_313, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(500).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(500, 0).saturating_mul(z.into())) } /// Storage: Multisig Multisigs (r:1 w:1) /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `311 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 34_764 nanoseconds. - Weight::from_ref_time(27_813_109) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_813_109, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 630 - .saturating_add(Weight::from_ref_time(73_821).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(73_821, 0).saturating_mul(s.into())) // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_542).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_542, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -85,12 +85,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 25_932 nanoseconds. - Weight::from_ref_time(19_364_026) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(19_364_026, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 490 - .saturating_add(Weight::from_ref_time(69_834).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(69_834, 0).saturating_mul(s.into())) // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_520).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_520, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -105,12 +105,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `448 + s * (33 ±0)` // Estimated: `8424` // Minimum execution time: 39_495 nanoseconds. - Weight::from_ref_time(31_235_649) - .saturating_add(Weight::from_proof_size(8424)) + Weight::from_parts(31_235_649, 0) + .saturating_add(Weight::from_parts(0, 8424)) // Standard Error: 570 - .saturating_add(Weight::from_ref_time(88_719).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(88_719, 0).saturating_mul(s.into())) // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_523).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_523, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,10 +122,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `318 + s * (2 ±0)` // Estimated: `5821` // Minimum execution time: 24_708 nanoseconds. - Weight::from_ref_time(26_673_173) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(26_673_173, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 863 - .saturating_add(Weight::from_ref_time(81_459).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(81_459, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,10 +137,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `313` // Estimated: `5821` // Minimum execution time: 16_520 nanoseconds. - Weight::from_ref_time(18_123_705) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(18_123_705, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 661 - .saturating_add(Weight::from_ref_time(74_405).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(74_405, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -152,10 +152,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `517 + s * (1 ±0)` // Estimated: `5821` // Minimum execution time: 25_476 nanoseconds. - Weight::from_ref_time(27_845_581) - .saturating_add(Weight::from_proof_size(5821)) + Weight::from_parts(27_845_581, 0) + .saturating_add(Weight::from_parts(0, 5821)) // Standard Error: 868 - .saturating_add(Weight::from_ref_time(77_797).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(77_797, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs index bcde1caf8ba..4eb83d8067f 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_proxy.rs @@ -55,10 +55,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 14_443 nanoseconds. - Weight::from_ref_time(15_158_969) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(15_158_969, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_249 - .saturating_add(Weight::from_ref_time(33_941).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(33_941, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Proxy Proxies (r:1 w:0) @@ -74,12 +74,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `550 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 32_060 nanoseconds. - Weight::from_ref_time(32_192_294) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(32_192_294, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_900 - .saturating_add(Weight::from_ref_time(109_332).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(109_332, 0).saturating_mul(a.into())) // Standard Error: 1_963 - .saturating_add(Weight::from_ref_time(39_154).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(39_154, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,12 +94,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_084 nanoseconds. - Weight::from_ref_time(21_187_531) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_187_531, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_412 - .saturating_add(Weight::from_ref_time(112_601).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(112_601, 0).saturating_mul(a.into())) // Standard Error: 1_458 - .saturating_add(Weight::from_ref_time(6_862).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(6_862, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -114,12 +114,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `433 + a * (68 ±0)` // Estimated: `7311` // Minimum execution time: 20_658 nanoseconds. - Weight::from_ref_time(21_184_810) - .saturating_add(Weight::from_proof_size(7311)) + Weight::from_parts(21_184_810, 0) + .saturating_add(Weight::from_parts(0, 7311)) // Standard Error: 1_259 - .saturating_add(Weight::from_ref_time(112_012).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(112_012, 0).saturating_mul(a.into())) // Standard Error: 1_301 - .saturating_add(Weight::from_ref_time(10_767).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_767, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -136,12 +136,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `482 + a * (68 ±0) + p * (37 ±0)` // Estimated: `11027` // Minimum execution time: 28_670 nanoseconds. - Weight::from_ref_time(29_411_875) - .saturating_add(Weight::from_proof_size(11027)) + Weight::from_parts(29_411_875, 0) + .saturating_add(Weight::from_parts(0, 11027)) // Standard Error: 1_864 - .saturating_add(Weight::from_ref_time(94_146).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(94_146, 0).saturating_mul(a.into())) // Standard Error: 1_926 - .saturating_add(Weight::from_ref_time(36_523).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(36_523, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -153,10 +153,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 21_273 nanoseconds. - Weight::from_ref_time(22_137_672) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(22_137_672, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_345 - .saturating_add(Weight::from_ref_time(44_075).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(44_075, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,10 +168,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 20_888 nanoseconds. - Weight::from_ref_time(22_120_940) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(22_120_940, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_516 - .saturating_add(Weight::from_ref_time(55_407).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(55_407, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -183,10 +183,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `159 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 17_007 nanoseconds. - Weight::from_ref_time(17_746_585) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(17_746_585, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_201 - .saturating_add(Weight::from_ref_time(22_307).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(22_307, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,10 +198,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `139` // Estimated: `3716` // Minimum execution time: 22_625 nanoseconds. - Weight::from_ref_time(23_598_172) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(23_598_172, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_668 - .saturating_add(Weight::from_ref_time(113).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(113, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -213,10 +213,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `196 + p * (37 ±0)` // Estimated: `3716` // Minimum execution time: 17_969 nanoseconds. - Weight::from_ref_time(18_830_934) - .saturating_add(Weight::from_proof_size(3716)) + Weight::from_parts(18_830_934, 0) + .saturating_add(Weight::from_parts(0, 3716)) // Standard Error: 1_340 - .saturating_add(Weight::from_ref_time(23_749).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(23_749, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs index 89168ddc3c9..f5e7b9f2dde 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_session.rs @@ -56,8 +56,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `270` // Estimated: `5490` // Minimum execution time: 15_653 nanoseconds. - Weight::from_ref_time(16_004_000) - .saturating_add(Weight::from_proof_size(5490)) + Weight::from_parts(16_004_000, 0) + .saturating_add(Weight::from_parts(0, 5490)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -70,8 +70,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `2959` // Minimum execution time: 11_729 nanoseconds. - Weight::from_ref_time(12_081_000) - .saturating_add(Weight::from_proof_size(2959)) + Weight::from_parts(12_081_000, 0) + .saturating_add(Weight::from_parts(0, 2959)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs index 4681ee9d609..9bebfff45ef 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_timestamp.rs @@ -56,8 +56,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `49` // Estimated: `1006` // Minimum execution time: 6_995 nanoseconds. - Weight::from_ref_time(7_169_000) - .saturating_add(Weight::from_proof_size(1006)) + Weight::from_parts(7_169_000, 0) + .saturating_add(Weight::from_parts(0, 1006)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,7 +66,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Measured: `57` // Estimated: `0` // Minimum execution time: 3_166 nanoseconds. - Weight::from_ref_time(3_331_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(3_331_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs index bf727a4dc97..bf25e13c752 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_utility.rs @@ -53,18 +53,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_987 nanoseconds. - Weight::from_ref_time(19_221_047) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(19_221_047, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_233 - .saturating_add(Weight::from_ref_time(3_808_598).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_808_598, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 4_203 nanoseconds. - Weight::from_ref_time(4_337_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(4_337_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { @@ -72,18 +72,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_986 nanoseconds. - Weight::from_ref_time(14_991_349) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(14_991_349, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_440 - .saturating_add(Weight::from_ref_time(4_032_363).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(4_032_363, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 7_768 nanoseconds. - Weight::from_ref_time(7_998_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(7_998_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { @@ -91,9 +91,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_906 nanoseconds. - Weight::from_ref_time(16_782_253) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(16_782_253, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 2_131 - .saturating_add(Weight::from_ref_time(3_780_339).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(3_780_339, 0).saturating_mul(c.into())) } } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 1a61209c8ed..b257834df07 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -62,8 +62,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `4645` // Minimum execution time: 23_618 nanoseconds. - Weight::from_ref_time(24_118_000) - .saturating_add(Weight::from_proof_size(4645)) + Weight::from_parts(24_118_000, 0) + .saturating_add(Weight::from_parts(0, 4645)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -74,8 +74,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `32` // Estimated: `499` // Minimum execution time: 23_764 nanoseconds. - Weight::from_ref_time(24_114_000) - .saturating_add(Weight::from_proof_size(499)) + Weight::from_parts(24_114_000, 0) + .saturating_add(Weight::from_parts(0, 499)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: Benchmark Override (r:0 w:0) @@ -85,8 +85,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: Benchmark Override (r:0 w:0) /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 18_446_744_073_709_551 nanoseconds. - Weight::from_ref_time(18_446_744_073_709_551_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) @@ -105,8 +105,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 8_266 nanoseconds. - Weight::from_ref_time(8_578_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(8_578_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) @@ -116,8 +116,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_289 nanoseconds. - Weight::from_ref_time(2_382_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(2_382_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -141,8 +141,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `38` // Estimated: `7729` // Minimum execution time: 28_592 nanoseconds. - Weight::from_ref_time(29_116_000) - .saturating_add(Weight::from_proof_size(7729)) + Weight::from_parts(29_116_000, 0) + .saturating_add(Weight::from_parts(0, 7729)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -165,8 +165,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `220` // Estimated: `8470` // Minimum execution time: 30_604 nanoseconds. - Weight::from_ref_time(31_361_000) - .saturating_add(Weight::from_proof_size(8470)) + Weight::from_parts(31_361_000, 0) + .saturating_add(Weight::from_parts(0, 8470)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -177,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `95` // Estimated: `9995` // Minimum execution time: 13_750 nanoseconds. - Weight::from_ref_time(14_051_000) - .saturating_add(Weight::from_proof_size(9995)) + Weight::from_parts(14_051_000, 0) + .saturating_add(Weight::from_parts(0, 9995)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -189,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `99` // Estimated: `9999` // Minimum execution time: 13_897 nanoseconds. - Weight::from_ref_time(14_080_000) - .saturating_add(Weight::from_proof_size(9999)) + Weight::from_parts(14_080_000, 0) + .saturating_add(Weight::from_parts(0, 9999)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -201,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `12481` // Minimum execution time: 16_364 nanoseconds. - Weight::from_ref_time(16_867_000) - .saturating_add(Weight::from_proof_size(12481)) + Weight::from_parts(16_867_000, 0) + .saturating_add(Weight::from_parts(0, 12481)) .saturating_add(T::DbWeight::get().reads(5)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -222,8 +222,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10041` // Minimum execution time: 27_372 nanoseconds. - Weight::from_ref_time(28_128_000) - .saturating_add(Weight::from_proof_size(10041)) + Weight::from_parts(28_128_000, 0) + .saturating_add(Weight::from_parts(0, 10041)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -234,8 +234,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `7561` // Minimum execution time: 7_804 nanoseconds. - Weight::from_ref_time(8_096_000) - .saturating_add(Weight::from_proof_size(7561)) + Weight::from_parts(8_096_000, 0) + .saturating_add(Weight::from_parts(0, 7561)) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) @@ -245,8 +245,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `10006` // Minimum execution time: 14_948 nanoseconds. - Weight::from_ref_time(15_422_000) - .saturating_add(Weight::from_proof_size(10006)) + Weight::from_parts(15_422_000, 0) + .saturating_add(Weight::from_parts(0, 10006)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -267,8 +267,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Measured: `112` // Estimated: `15027` // Minimum execution time: 33_791 nanoseconds. - Weight::from_ref_time(34_282_000) - .saturating_add(Weight::from_proof_size(15027)) + Weight::from_parts(34_282_000, 0) + .saturating_add(Weight::from_parts(0, 15027)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 4eb123d6802..5c6332472aa 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -151,6 +151,7 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | @@ -178,8 +179,7 @@ impl Contains for SafeCallFilter { pallet_collective::Call::close_old_weight { .. } | pallet_collective::Call::disapprove_proposal { .. } | pallet_collective::Call::close { .. }, - ) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) => true, + ) => true, _ => false, } } diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 468168ce6e9..50199229e98 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -120,10 +120,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("contracts-rococo"), impl_name: create_runtime_str!("contracts-rococo"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 4, + transaction_version: 5, state_version: 1, }; @@ -413,6 +413,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/contracts/contracts-rococo/src/weights/block_weights.rs b/parachains/runtimes/contracts/contracts-rococo/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/weights/block_weights.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/contracts/contracts-rococo/src/weights/extrinsic_weights.rs b/parachains/runtimes/contracts/contracts-rococo/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/starters/seedling/src/lib.rs b/parachains/runtimes/starters/seedling/src/lib.rs index bd2e594ea43..a1754002cd9 100644 --- a/parachains/runtimes/starters/seedling/src/lib.rs +++ b/parachains/runtimes/starters/seedling/src/lib.rs @@ -67,7 +67,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("seedling"), impl_name: create_runtime_str!("seedling"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -256,6 +256,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/starters/shell/src/lib.rs b/parachains/runtimes/starters/shell/src/lib.rs index 2b7d7501e4b..a05a78863c4 100644 --- a/parachains/runtimes/starters/shell/src/lib.rs +++ b/parachains/runtimes/starters/shell/src/lib.rs @@ -287,6 +287,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/lib.rs b/parachains/runtimes/testing/penpal/src/lib.rs index 5cee12df959..a727bb27dba 100644 --- a/parachains/runtimes/testing/penpal/src/lib.rs +++ b/parachains/runtimes/testing/penpal/src/lib.rs @@ -193,7 +193,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("penpal-parachain"), impl_name: create_runtime_str!("penpal-parachain"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -599,6 +599,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/weights/block_weights.rs b/parachains/runtimes/testing/penpal/src/weights/block_weights.rs index ea8a341b58b..b2092d875c8 100644 --- a/parachains/runtimes/testing/penpal/src/weights/block_weights.rs +++ b/parachains/runtimes/testing/penpal/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/testing/penpal/src/weights/extrinsic_weights.rs b/parachains/runtimes/testing/penpal/src/weights/extrinsic_weights.rs index 0512efb60e2..332c3b324bb 100644 --- a/parachains/runtimes/testing/penpal/src/weights/extrinsic_weights.rs +++ b/parachains/runtimes/testing/penpal/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index afefa492002..34baf99b189 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -101,10 +101,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("test-parachain"), impl_name: create_runtime_str!("test-parachain"), authoring_version: 1, - spec_version: 9370, + spec_version: 9381, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 4, + transaction_version: 5, state_version: 0, }; @@ -646,6 +646,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/polkadot-parachain/Cargo.toml b/polkadot-parachain/Cargo.toml index 8e5e7bb1814..fb5448c3d54 100644 --- a/polkadot-parachain/Cargo.toml +++ b/polkadot-parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-parachain-bin" -version = "0.9.370" +version = "0.9.380" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -11,8 +11,8 @@ name = "polkadot-parachain" path = "src/main.rs" [dependencies] -async-trait = "0.1.63" -clap = { version = "4.1.6", features = ["derive"] } +async-trait = "0.1.66" +clap = { version = "4.1.8", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0" } futures = "0.3.26" hex-literal = "0.3.4" @@ -41,7 +41,6 @@ frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", bran sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -52,7 +51,7 @@ sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "mast sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -85,7 +84,6 @@ cumulus-client-consensus-aura = { path = "../client/consensus/aura" } cumulus-client-consensus-relay-chain = { path = "../client/consensus/relay-chain" } cumulus-client-consensus-common = { path = "../client/consensus/common" } cumulus-client-service = { path = "../client/service" } -cumulus-client-network = { path = "../client/network" } cumulus-primitives-core = { path = "../primitives/core" } cumulus-primitives-parachain-inherent = { path = "../primitives/parachain-inherent" } cumulus-relay-chain-interface = { path = "../client/relay-chain-interface" } @@ -96,8 +94,8 @@ substrate-build-script-utils = { git = "https://github.com/paritytech/substrate" [dev-dependencies] assert_cmd = "2.0" nix = { version = "0.26.1", features = ["signal"] } -tempfile = "3.3.0" -tokio = { version = "1.25.0", features = ["macros", "time", "parking_lot"] } +tempfile = "3.4.0" +tokio = { version = "1.26.0", features = ["macros", "time", "parking_lot"] } wait-timeout = "0.2" # purge_chain_works works with rococo-local and needs to allow this polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master", features = ["rococo-native"] } @@ -109,6 +107,14 @@ runtime-benchmarks = [ "statemint-runtime/runtime-benchmarks", "statemine-runtime/runtime-benchmarks", "westmint-runtime/runtime-benchmarks", + "bridge-hub-rococo-runtime/runtime-benchmarks", + "bridge-hub-kusama-runtime/runtime-benchmarks", + "bridge-hub-polkadot-runtime/runtime-benchmarks", + "collectives-polkadot-runtime/runtime-benchmarks", + "rococo-parachain-runtime/runtime-benchmarks", + "contracts-rococo-runtime/runtime-benchmarks", + "contracts-rococo-runtime/runtime-benchmarks", + "penpal-runtime/runtime-benchmarks", ] try-runtime = [ "statemint-runtime/try-runtime", diff --git a/polkadot-parachain/src/service.rs b/polkadot-parachain/src/service.rs index 398a212993a..2f9c21e1116 100644 --- a/polkadot-parachain/src/service.rs +++ b/polkadot-parachain/src/service.rs @@ -28,7 +28,7 @@ use cumulus_primitives_core::{ relay_chain::{Hash as PHash, PersistedValidationData}, ParaId, }; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; +use cumulus_relay_chain_interface::RelayChainInterface; use sp_core::Pair; use jsonrpsee::RpcModule; @@ -43,12 +43,11 @@ use sc_consensus::{ BlockImportParams, ImportQueue, }; use sc_executor::WasmExecutor; -use sc_network::NetworkService; -use sc_network_common::service::NetworkBlock; +use sc_network::NetworkBlock; +use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::{ApiExt, ConstructRuntimeApi}; -use sp_consensus::CacheKeyId; use sp_consensus_aura::AuraApi; use sp_keystore::SyncCryptoStorePtr; use sp_runtime::{ @@ -359,7 +358,7 @@ where &TaskManager, Arc, Arc>>, - Arc>, + Arc>, SyncCryptoStorePtr, bool, ) -> Result>, sc_service::Error>, @@ -383,10 +382,7 @@ where hwbench.clone(), ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); @@ -394,7 +390,7 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { parachain_config: ¶chain_config, client: client.clone(), @@ -418,6 +414,7 @@ where keystore: params.keystore_container.sync_keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), @@ -440,8 +437,8 @@ where } let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); @@ -459,7 +456,7 @@ where &task_manager, relay_chain_interface.clone(), transaction_pool, - network, + sync_service, params.keystore_container.sync_keystore(), force_authoring, )?; @@ -549,7 +546,7 @@ where &TaskManager, Arc, Arc>>, - Arc>, + Arc>, SyncCryptoStorePtr, bool, ) -> Result>, sc_service::Error>, @@ -572,10 +569,7 @@ where hwbench.clone(), ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); @@ -583,8 +577,8 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = - build_network(cumulus_client_service::BuildNetworkParams { + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = + build_network(BuildNetworkParams { parachain_config: ¶chain_config, client: client.clone(), transaction_pool: transaction_pool.clone(), @@ -620,6 +614,7 @@ where keystore: params.keystore_container.sync_keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), @@ -642,8 +637,8 @@ where } let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); @@ -660,7 +655,7 @@ where &task_manager, relay_chain_interface.clone(), transaction_pool, - network, + sync_service, params.keystore_container.sync_keystore(), force_authoring, )?; @@ -1032,7 +1027,7 @@ where async fn verify( &mut self, block_import: BlockImportParams, - ) -> Result<(BlockImportParams, Option)>>), String> { + ) -> Result, String> { if self .client .runtime_api() @@ -1321,7 +1316,7 @@ where &TaskManager, Arc, Arc>>, - Arc>, + Arc>, SyncCryptoStorePtr, bool, ) -> Result>, sc_service::Error>, @@ -1344,10 +1339,7 @@ where hwbench.clone(), ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); @@ -1355,7 +1347,7 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { parachain_config: ¶chain_config, client: client.clone(), @@ -1391,6 +1383,7 @@ where keystore: params.keystore_container.sync_keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), @@ -1413,8 +1406,8 @@ where } let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); @@ -1431,7 +1424,7 @@ where &task_manager, relay_chain_interface.clone(), transaction_pool, - network, + sync_service, params.keystore_container.sync_keystore(), force_authoring, )?; diff --git a/primitives/parachain-inherent/Cargo.toml b/primitives/parachain-inherent/Cargo.toml index b12e37b1a14..d34d68868ff 100644 --- a/primitives/parachain-inherent/Cargo.toml +++ b/primitives/parachain-inherent/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = { version = "0.1.63", optional = true } +async-trait = { version = "0.1.66", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive" ] } scale-info = { version = "2.3.1", default-features = false, features = ["derive"] } tracing = { version = "0.1.37", optional = true } diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index c9747b67db6..75ad7f417eb 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -315,6 +315,13 @@ pub trait ChargeWeightInFungibles(dest.into(), message) ); } + + #[test] + fn take_first_asset_trader_buy_weight_called_twice_throws_error() { + const AMOUNT: u128 = 100; + + // prepare prerequisites to instantiate `TakeFirstAssetTrader` + type TestAccountId = u32; + type TestAssetId = u32; + type TestBalance = u128; + struct TestAssets; + impl MatchesFungibles for TestAssets { + fn matches_fungibles(a: &MultiAsset) -> Result<(TestAssetId, TestBalance), Error> { + match a { + MultiAsset { fun: Fungible(amount), id: Concrete(_id) } => Ok((1, *amount)), + _ => Err(Error::AssetNotHandled), + } + } + } + impl fungibles::Inspect for TestAssets { + type AssetId = TestAssetId; + type Balance = TestBalance; + + fn total_issuance(_: Self::AssetId) -> Self::Balance { + todo!() + } + + fn minimum_balance(_: Self::AssetId) -> Self::Balance { + 0 + } + + fn balance(_: Self::AssetId, _: &TestAccountId) -> Self::Balance { + todo!() + } + + fn reducible_balance(_: Self::AssetId, _: &TestAccountId, _: bool) -> Self::Balance { + todo!() + } + + fn can_deposit( + _: Self::AssetId, + _: &TestAccountId, + _: Self::Balance, + _: bool, + ) -> DepositConsequence { + todo!() + } + + fn can_withdraw( + _: Self::AssetId, + _: &TestAccountId, + _: Self::Balance, + ) -> WithdrawConsequence { + todo!() + } + + fn asset_exists(_: Self::AssetId) -> bool { + todo!() + } + } + impl fungibles::Mutate for TestAssets { + fn mint_into(_: Self::AssetId, _: &TestAccountId, _: Self::Balance) -> DispatchResult { + todo!() + } + + fn burn_from( + _: Self::AssetId, + _: &TestAccountId, + _: Self::Balance, + ) -> Result { + todo!() + } + } + impl fungibles::Transfer for TestAssets { + fn transfer( + _: Self::AssetId, + _: &TestAccountId, + _: &TestAccountId, + _: Self::Balance, + _: bool, + ) -> Result { + todo!() + } + } + impl fungibles::Unbalanced for TestAssets { + fn set_balance( + _: Self::AssetId, + _: &TestAccountId, + _: Self::Balance, + ) -> DispatchResult { + todo!() + } + + fn set_total_issuance(_: Self::AssetId, _: Self::Balance) { + todo!() + } + } + + struct FeeChargerAssetsHandleRefund; + impl ChargeWeightInFungibles for FeeChargerAssetsHandleRefund { + fn charge_weight_in_fungibles( + _: >::AssetId, + _: Weight, + ) -> Result<>::Balance, XcmError> { + Ok(AMOUNT) + } + } + impl TakeRevenue for FeeChargerAssetsHandleRefund { + fn take_revenue(_: MultiAsset) {} + } + + // create new instance + type Trader = TakeFirstAssetTrader< + TestAccountId, + FeeChargerAssetsHandleRefund, + TestAssets, + TestAssets, + FeeChargerAssetsHandleRefund, + >; + let mut trader = ::new(); + + // prepare test data + let asset: MultiAsset = (Here, AMOUNT).into(); + let payment = Assets::from(asset.clone()); + let weight_to_buy = Weight::from_parts(1_000, 1_000); + + // lets do first call (success) + assert_ok!(trader.buy_weight(weight_to_buy, payment.clone())); + + // lets do second call (error) + assert_eq!( + trader.buy_weight(weight_to_buy, payment.clone()), + Err(XcmError::NotWithdrawable) + ); + } } diff --git a/scripts/ci/gitlab/pipeline/benchmarks.yml b/scripts/ci/gitlab/pipeline/benchmarks.yml index 2b6455cd90d..d1fdd64c341 100644 --- a/scripts/ci/gitlab/pipeline/benchmarks.yml +++ b/scripts/ci/gitlab/pipeline/benchmarks.yml @@ -3,7 +3,7 @@ # Work only on release-parachains-v* branches benchmarks-build: - stage: benchmarks-build + stage: benchmarks-build extends: - .docker-env - .collect-artifacts @@ -14,8 +14,8 @@ benchmarks-build: - cp target/production/polkadot-parachain ./artifacts/ benchmarks-assets: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs @@ -37,8 +37,8 @@ benchmarks-assets: - weights benchmarks-collectives: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs @@ -58,8 +58,8 @@ benchmarks-collectives: - weights benchmarks-bridge-hubs: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index 2b6a284ee11..a60ef29c9a0 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -2,7 +2,7 @@ # Here are all jobs that are executed during "build" stage build-linux-stable: - stage: build + stage: build extends: - .docker-env - .common-refs @@ -13,8 +13,8 @@ build-linux-stable: RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo build --release --locked --bin polkadot-parachain @@ -25,7 +25,7 @@ build-linux-stable: - echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION build-test-parachain: - stage: build + stage: build extends: - .docker-env - .common-refs @@ -33,11 +33,11 @@ build-test-parachain: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo +nightly build --release --locked --bin test-parachain @@ -48,25 +48,25 @@ build-test-parachain: - mv ./target/release/wbuild/cumulus-test-runtime/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm ./artifacts/zombienet/. # build runtime only if files in $RUNTIME_PATH/$RUNTIME_NAME were changed -.build-runtime-template: &build-runtime-template - stage: build +.build-runtime-template: &build-runtime-template + stage: build extends: - .docker-env - .pr-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false variables: - RUNTIME_PATH: "parachains/runtimes/assets" + RUNTIME_PATH: "parachains/runtimes/assets" script: - cd ${RUNTIME_PATH} - for directory in $(echo */); do - echo "_____Running cargo check for ${directory} ______"; - cd ${directory}; - pwd; - SKIP_WASM_BUILD=1 cargo check; - cd ..; + echo "_____Running cargo check for ${directory} ______"; + cd ${directory}; + pwd; + SKIP_WASM_BUILD=1 cargo check; + cd ..; done # DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-bridge-hubs @@ -75,49 +75,49 @@ build-test-parachain: build-runtime-assets: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/assets" + RUNTIME_PATH: "parachains/runtimes/assets" build-runtime-collectives: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/collectives" + RUNTIME_PATH: "parachains/runtimes/collectives" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-assets - artifacts: false + - job: build-runtime-assets + artifacts: false build-runtime-bridge-hubs: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/bridge-hubs" + RUNTIME_PATH: "parachains/runtimes/bridge-hubs" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-collectives - artifacts: false + - job: build-runtime-collectives + artifacts: false build-runtime-contracts: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/contracts" + RUNTIME_PATH: "parachains/runtimes/contracts" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-collectives - artifacts: false + - job: build-runtime-collectives + artifacts: false build-runtime-starters: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/starters" + RUNTIME_PATH: "parachains/runtimes/starters" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-assets - artifacts: false + - job: build-runtime-assets + artifacts: false build-runtime-testing: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/testing" + RUNTIME_PATH: "parachains/runtimes/testing" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-starters - artifacts: false + - job: build-runtime-starters + artifacts: false diff --git a/scripts/ci/gitlab/pipeline/publish.yml b/scripts/ci/gitlab/pipeline/publish.yml index 81e034e06fa..84f0a576e3b 100644 --- a/scripts/ci/gitlab/pipeline/publish.yml +++ b/scripts/ci/gitlab/pipeline/publish.yml @@ -2,69 +2,69 @@ # Here are all jobs that are executed during "publish" stage .build-push-image: - image: quay.io/buildah/stable:v1.27 + image: quay.io/buildah/stable:v1.27 variables: - DOCKERFILE: "" # docker/path-to.Dockerfile - IMAGE_NAME: "" # docker.io/paritypr/image_name - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "" # docker/path-to.Dockerfile + IMAGE_NAME: "" # docker.io/paritypr/image_name + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" script: - test "$PARITYPR_USER" -a "$PARITYPR_PASS" || - ( echo "no docker credentials provided"; exit 1 ) + ( echo "no docker credentials provided"; exit 1 ) - buildah bud - --format=docker - --build-arg VCS_REF="${CI_COMMIT_SHA}" - --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" - --build-arg IMAGE_NAME="${IMAGE_NAME}" - --tag "$IMAGE_NAME:$VERSION" - --file ${DOCKERFILE} . + --format=docker + --build-arg VCS_REF="${CI_COMMIT_SHA}" + --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" + --build-arg IMAGE_NAME="${IMAGE_NAME}" + --tag "$IMAGE_NAME:$VERSION" + --file ${DOCKERFILE} . - echo "$PARITYPR_PASS" | - buildah login --username "$PARITYPR_USER" --password-stdin docker.io + buildah login --username "$PARITYPR_USER" --password-stdin docker.io - buildah info - buildah push --format=v2s2 "$IMAGE_NAME:$VERSION" after_script: - buildah logout --all build-push-image-polkadot-parachain-debug: - stage: publish + stage: publish extends: - .kubernetes-env - .common-refs - .build-push-image needs: - - job: build-linux-stable - artifacts: true + - job: build-linux-stable + artifacts: true variables: - DOCKERFILE: "docker/polkadot-parachain-debug_unsigned_injected.Dockerfile" - IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug" - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "docker/polkadot-parachain-debug_unsigned_injected.Dockerfile" + IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug" + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" build-push-image-test-parachain: - stage: publish + stage: publish extends: - .kubernetes-env - .common-refs - .build-push-image needs: - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true variables: - DOCKERFILE: "docker/test-parachain_injected.Dockerfile" - IMAGE_NAME: "docker.io/paritypr/test-parachain" - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "docker/test-parachain_injected.Dockerfile" + IMAGE_NAME: "docker.io/paritypr/test-parachain" + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" publish-s3: - stage: publish + stage: publish extends: - .kubernetes-env - .publish-refs - image: paritytech/awscli:latest + image: paritytech/awscli:latest needs: - - job: build-linux-stable - artifacts: true + - job: build-linux-stable + artifacts: true variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/${ARCH}-${DOCKER_OS}" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/${ARCH}-${DOCKER_OS}" script: - echo "___Publishing a binary with debug assertions!___" - echo "___VERSION = $(cat ./artifacts/VERSION) ___" @@ -73,21 +73,21 @@ publish-s3: - aws s3 sync s3://${BUCKET}/${PREFIX}/$(cat ./artifacts/VERSION)/ s3://${BUCKET}/${PREFIX}/latest/ after_script: - aws s3 ls s3://${BUCKET}/${PREFIX}/latest/ - --recursive --human-readable --summarize + --recursive --human-readable --summarize -publish-benchmarks-assets-s3: &publish-benchmarks - stage: publish +publish-benchmarks-assets-s3: &publish-benchmarks + stage: publish extends: - .kubernetes-env - .benchmarks-refs - image: paritytech/awscli:latest + image: paritytech/awscli:latest needs: - - job: benchmarks-assets - artifacts: true + - job: benchmarks-assets + artifacts: true variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-assets" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-assets" script: - echo "___Publishing benchmark results___" - aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/ @@ -95,11 +95,11 @@ publish-benchmarks-assets-s3: &publish-benchmarks - aws s3 ls s3://${BUCKET}/${PREFIX}/ --recursive --human-readable --summarize publish-benchmarks-collectives-s3: - <<: *publish-benchmarks + <<: *publish-benchmarks variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-collectives" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-collectives" needs: - - job: benchmarks-collectives - artifacts: true + - job: benchmarks-collectives + artifacts: true diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 2761ed6055d..765a80b7b60 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -3,26 +3,26 @@ # It's more like a check, but we want to run this job with real tests in parallel find-fail-ci-phrase: - stage: test + stage: test variables: - CI_IMAGE: "paritytech/tools:latest" - ASSERT_REGEX: "FAIL-CI" - GIT_DEPTH: 1 + CI_IMAGE: "paritytech/tools:latest" + ASSERT_REGEX: "FAIL-CI" + GIT_DEPTH: 1 extends: - .kubernetes-env script: - set +e - rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$? - - if [ $exit_status -eq 0 ]; then - echo "$ASSERT_REGEX was found, exiting with 1"; - exit 1; + - if [ $exit_status -eq 0 ]; then + echo "$ASSERT_REGEX was found, exiting with 1"; + exit 1; else - echo "No $ASSERT_REGEX was found, exiting with 0"; - exit 0; + echo "No $ASSERT_REGEX was found, exiting with 0"; + exit 0; fi test-linux-stable: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -38,7 +38,7 @@ test-linux-stable: - time cargo nextest run --all --release --locked --run-ignored all test-doc: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -50,7 +50,7 @@ test-doc: - time cargo test --doc check-runtime-benchmarks: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -61,14 +61,14 @@ check-runtime-benchmarks: - time cargo check -p parachain-template-node --features runtime-benchmarks cargo-check-try-runtime: - stage: test + stage: test extends: - .docker-env - .common-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-runtime-benchmarks - artifacts: false + - job: check-runtime-benchmarks + artifacts: false script: # Check that the node will compile with `try-runtime` feature flag. - time cargo check --all --features try-runtime @@ -76,24 +76,24 @@ cargo-check-try-runtime: - time cargo check -p parachain-template-node --features try-runtime check-rustdoc: - stage: test + stage: test extends: - .docker-env - .common-refs variables: - SKIP_WASM_BUILD: 1 - RUSTDOCFLAGS: "-Dwarnings" + SKIP_WASM_BUILD: 1 + RUSTDOCFLAGS: "-Dwarnings" script: - time cargo +nightly doc --workspace --all-features --verbose --no-deps cargo-check-benches: - stage: test + stage: test extends: - .docker-env - .common-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - time cargo check --all --benches diff --git a/scripts/ci/gitlab/pipeline/zombienet.yml b/scripts/ci/gitlab/pipeline/zombienet.yml index 808edcfb52f..d76531b19e7 100644 --- a/scripts/ci/gitlab/pipeline/zombienet.yml +++ b/scripts/ci/gitlab/pipeline/zombienet.yml @@ -19,23 +19,23 @@ # common settings for all zombienet jobs .zombienet-common: - stage: zombienet - image: "${ZOMBIENET_IMAGE}" + stage: zombienet + image: "${ZOMBIENET_IMAGE}" needs: - - job: build-push-image-test-parachain - artifacts: true + - job: build-push-image-test-parachain + artifacts: true variables: - POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:master" - GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet/tests" - COL_IMAGE: "docker.io/paritypr/test-parachain:${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:master" + GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet/tests" + COL_IMAGE: "docker.io/paritypr/test-parachain:${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: always - expire_in: 2 days + name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" + when: always + expire_in: 2 days paths: - ./zombienet-logs - allow_failure: true + allow_failure: true retry: 2 tags: - zombienet-polkadot-integration-test @@ -48,9 +48,9 @@ zombienet-0001-sync_blocks_from_tip_without_connected_collator: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" zombienet-0002-pov_recovery: extends: @@ -60,9 +60,9 @@ zombienet-0002-pov_recovery: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0002-pov_recovery.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0002-pov_recovery.zndsl" zombienet-0003-full_node_catching_up: extends: @@ -72,9 +72,9 @@ zombienet-0003-full_node_catching_up: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0003-full_node_catching_up.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0003-full_node_catching_up.zndsl" zombienet-0004-runtime_upgrade: extends: @@ -84,8 +84,8 @@ zombienet-0004-runtime_upgrade: - .zombienet-after-script needs: - !reference [.zombienet-common, needs] - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true before_script: - ls -ltr * - cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/ @@ -93,9 +93,9 @@ zombienet-0004-runtime_upgrade: - !reference [.zombienet-before-script, before_script] script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0004-runtime_upgrade.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0004-runtime_upgrade.zndsl" zombienet-0005-migrate_solo_to_para: extends: @@ -105,16 +105,16 @@ zombienet-0005-migrate_solo_to_para: - .zombienet-after-script needs: - !reference [.zombienet-common, needs] - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true before_script: - ls -ltr * - !reference [.zombienet-before-script, before_script] script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0005-migrate_solo_to_para.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0005-migrate_solo_to_para.zndsl" zombienet-0006-rpc_collator_builds_blocks: extends: @@ -124,9 +124,9 @@ zombienet-0006-rpc_collator_builds_blocks: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0006-rpc_collator_builds_blocks.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0006-rpc_collator_builds_blocks.zndsl" zombienet-0007-full_node_warp_sync: extends: @@ -136,6 +136,6 @@ zombienet-0007-full_node_warp_sync: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0007-full_node_warp_sync.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0007-full_node_warp_sync.zndsl" diff --git a/scripts/ci/gitlab/prettier.sh b/scripts/ci/gitlab/prettier.sh new file mode 100755 index 00000000000..299bbee179d --- /dev/null +++ b/scripts/ci/gitlab/prettier.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# meant to be installed via +# git config filter.ci-prettier.clean "scripts/ci/gitlab/prettier.sh" + +prettier --parser yaml diff --git a/test/runtime/src/lib.rs b/test/runtime/src/lib.rs index 6ee6afd4608..f07535c9682 100644 --- a/test/runtime/src/lib.rs +++ b/test/runtime/src/lib.rs @@ -352,7 +352,7 @@ pub struct TestOnRuntimeUpgrade; impl OnRuntimeUpgrade for TestOnRuntimeUpgrade { fn on_runtime_upgrade() -> frame_support::weights::Weight { assert_eq!(sp_io::storage::get(TEST_RUNTIME_UPGRADE_KEY), Some(vec![1, 2, 3, 4].into())); - Weight::from_ref_time(1) + Weight::from_parts(1, 0) } } @@ -382,6 +382,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { diff --git a/test/runtime/src/test_pallet.rs b/test/runtime/src/test_pallet.rs index 59b82bd256e..bc72ef19505 100644 --- a/test/runtime/src/test_pallet.rs +++ b/test/runtime/src/test_pallet.rs @@ -23,7 +23,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/test/service/Cargo.toml b/test/service/Cargo.toml index 97c6ab1d157..e6b356a81bb 100644 --- a/test/service/Cargo.toml +++ b/test/service/Cargo.toml @@ -9,14 +9,14 @@ name = "test-parachain" path = "src/main.rs" [dependencies] -async-trait = "0.1.63" -clap = { version = "4.1.6", features = ["derive"] } +async-trait = "0.1.66" +clap = { version = "4.1.8", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0" } criterion = { version = "0.4.0", features = [ "async_tokio" ] } jsonrpsee = { version = "0.16.2", features = ["server"] } rand = "0.8.5" serde = { version = "1.0.152", features = ["derive"] } -tokio = { version = "1.25.0", features = ["macros"] } +tokio = { version = "1.26.0", features = ["macros"] } tracing = "0.1.37" url = "2.3.1" @@ -30,7 +30,6 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -62,13 +61,11 @@ cumulus-client-cli = { path = "../../client/cli" } parachains-common = { path = "../../parachains/common" } cumulus-client-consensus-common = { path = "../../client/consensus/common" } cumulus-client-consensus-relay-chain = { path = "../../client/consensus/relay-chain" } -cumulus-client-network = { path = "../../client/network" } cumulus-client-service = { path = "../../client/service" } cumulus-primitives-core = { path = "../../primitives/core" } cumulus-primitives-parachain-inherent = { path = "../../primitives/parachain-inherent" } cumulus-relay-chain-inprocess-interface = { path = "../../client/relay-chain-inprocess-interface" } cumulus-relay-chain-interface = { path = "../../client/relay-chain-interface" } -cumulus-relay-chain-rpc-interface = { path = "../../client/relay-chain-rpc-interface" } cumulus-test-relay-validation-worker-provider = { path = "../relay-validation-worker-provider" } cumulus-test-runtime = { path = "../runtime" } cumulus-relay-chain-minimal-node = { path = "../../client/relay-chain-minimal-node" } diff --git a/test/service/src/lib.rs b/test/service/src/lib.rs index 35758b0d7ef..0349597f44a 100644 --- a/test/service/src/lib.rs +++ b/test/service/src/lib.rs @@ -52,8 +52,9 @@ use polkadot_primitives::{CollatorPair, Hash as PHash, PersistedValidationData}; use polkadot_service::ProvideRuntimeApi; use sc_client_api::execution_extensions::ExecutionStrategies; use sc_consensus::ImportQueue; -use sc_network::{multiaddr, NetworkBlock, NetworkService}; -use sc_network_common::{config::TransportConfig, service::NetworkStateInfo}; +use sc_network::{ + config::TransportConfig, multiaddr, NetworkBlock, NetworkService, NetworkStateInfo, +}; use sc_service::{ config::{ BlocksPruning, DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, NetworkConfiguration, @@ -252,14 +253,15 @@ async fn build_relay_chain_interface( polkadot_service::IsCollator::Yes(CollatorPair::generate().0) }, None, - )?; + ) + .map_err(|e| RelayChainError::Application(Box::new(e) as Box<_>))?; task_manager.add_child(relay_chain_full_node.task_manager); tracing::info!("Using inprocess node."); Ok(Arc::new(RelayChainInProcessInterface::new( relay_chain_full_node.client.clone(), relay_chain_full_node.backend.clone(), - Arc::new(relay_chain_full_node.network.clone()), + relay_chain_full_node.sync_service.clone(), relay_chain_full_node.overseer_handle.ok_or(RelayChainError::GenericError( "Overseer should be running in full node.".to_string(), ))?, @@ -309,14 +311,10 @@ where &mut task_manager, ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let import_queue_service = params.import_queue.service(); - - let (network, system_rpc_tx, tx_handler_controller, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = build_network(BuildNetworkParams { parachain_config: ¶chain_config, client: client.clone(), @@ -344,14 +342,15 @@ where keystore: params.keystore_container.sync_keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: None, })?; let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let announce_block = wrap_announce_block @@ -700,7 +699,7 @@ pub fn node_config( if nodes_exlusive { network_config.default_peers_set.reserved_nodes = nodes; network_config.default_peers_set.non_reserved_mode = - sc_network_common::config::NonReservedPeerMode::Deny; + sc_network::config::NonReservedPeerMode::Deny; } else { network_config.boot_nodes = nodes; } @@ -792,7 +791,7 @@ impl TestNode { self.send_extrinsic( runtime::SudoCall::sudo_unchecked_weight { call: Box::new(call.into()), - weight: Weight::from_ref_time(1_000), + weight: Weight::from_parts(1_000, 0), }, Sr25519Keyring::Alice, )