diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000000..66b28b3485d8 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,32 @@ +# +# An auto defined `clippy` feature was introduced, +# but it was found to clash with user defined features, +# so was renamed to `cargo-clippy`. +# +# If you want standard clippy run: +# RUSTFLAGS= cargo clippy +[target.'cfg(feature = "cargo-clippy")'] +rustflags = [ + "-Aclippy::all", + "-Dclippy::correctness", + "-Aclippy::if-same-then-else", + "-Aclippy::clone-double-ref", + "-Dclippy::complexity", + "-Aclippy::zero-prefixed-literal", # 00_1000_000 + "-Aclippy::type_complexity", # raison d'etre + "-Aclippy::nonminimal-bool", # maybe + "-Aclippy::borrowed-box", # Reasonable to fix this one + "-Aclippy::too-many-arguments", # (Turning this on would lead to) + "-Aclippy::unnecessary_cast", # Types may change + "-Aclippy::identity-op", # One case where we do 0 + + "-Aclippy::useless_conversion", # Types may change + "-Aclippy::unit_arg", # styalistic. + "-Aclippy::option-map-unit-fn", # styalistic + "-Aclippy::bind_instead_of_map", # styalistic + "-Aclippy::erasing_op", # E.g. 0 * DOLLARS + "-Aclippy::eq_op", # In tests we test equality. + "-Aclippy::while_immutable_condition", # false positives + "-Aclippy::needless_option_as_deref", # false positives + "-Aclippy::derivable_impls", # false positives + "-Aclippy::stable_sort_primitive", # prefer stable sort +] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b49246776c54..665e9417256a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: - dependency-name: "sp-*" - dependency-name: "frame-*" - dependency-name: "fork-tree" - - dependency-name: "remote-externalities" + - dependency-name: "frame-remote-externalities" - dependency-name: "pallet-*" - dependency-name: "beefy-*" - dependency-name: "try-runtime-*" @@ -21,6 +21,6 @@ updates: interval: "daily" - package-ecosystem: github-actions directory: '/' - labels: ["A2-insubstantial", "B0-silent", "C1-low 📌", "E3-dependencies"] + labels: ["A2-insubstantial", "B0-silent", "C1-low 📌", "E2-dependencies"] schedule: interval: daily diff --git a/.gitignore b/.gitignore index 5ea0458ddfc8..f9ab33eb63f3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,4 @@ polkadot.* !polkadot.service !.rpm/* .DS_Store -.cargo .env diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8f70394cd5c..6d9300ba93a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,13 +33,20 @@ variables: GIT_DEPTH: 100 CI_SERVER_NAME: "GitLab CI" CI_IMAGE: "paritytech/ci-linux:production" + BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27" DOCKER_OS: "debian:stretch" ARCH: "x86_64" ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.78" - PIPELINE_SCRIPTS_TAG: "v0.4" default: cache: {} + retry: + max: 2 + when: + - runner_system_failure + - unknown_failure + - api_failure + interruptible: true .collect-artifacts: artifacts: @@ -61,6 +68,7 @@ default: # 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 @@ -71,34 +79,29 @@ default: reports: dotenv: pipeline-stopper.env +.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 + .kubernetes-env: - retry: - max: 2 - when: - - runner_system_failure - - unknown_failure - - api_failure - interruptible: true + image: "${CI_IMAGE}" + before_script: + - !reference [.job-switcher, before_script] tags: - kubernetes-parity-build .docker-env: image: "${CI_IMAGE}" - retry: - max: 2 - when: - - runner_system_failure - - unknown_failure - - api_failure - interruptible: true + before_script: + - !reference [.job-switcher, before_script] tags: - - linux-docker + - linux-docker-vm-c2 .compiler-info: before_script: + - !reference [.job-switcher, before_script] - rustup show - cargo --version - - sccache -s .test-refs: rules: @@ -150,10 +153,8 @@ default: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 .build-push-image: - extends: - - .kubernetes-env - image: quay.io/buildah/stable:v1.27 before_script: + - !reference [.job-switcher, before_script] - test -s ./artifacts/VERSION || exit 1 - test -s ./artifacts/EXTRATAG || exit 1 - VERSION="$(cat ./artifacts/VERSION)" @@ -196,8 +197,6 @@ include: # zombienet jobs - scripts/ci/gitlab/pipeline/zombienet.yml - - #### stage: .post deploy-parity-testnet: @@ -242,7 +241,6 @@ remove-cancel-pipeline-message: PR_NUM: "${CI_COMMIT_REF_NAME}" trigger: project: "parity/infrastructure/ci_cd/pipeline-stopper" - branch: "as-improve" cancel-pipeline-test-linux-stable: extends: .cancel-pipeline-template diff --git a/Cargo.lock b/Cargo.lock index 716d9a0caf02..9ba7e0feacf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -290,7 +290,6 @@ dependencies = [ "async-global-executor", "async-io", "async-lock", - "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -307,21 +306,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "async-std-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "socket2", - "trust-dns-resolver", -] - [[package]] name = "async-task" version = "4.0.3" @@ -330,9 +314,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" dependencies = [ "proc-macro2", "quote", @@ -371,9 +355,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -432,21 +416,17 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "async-trait", - "beefy-primitives", "fnv", "futures", - "futures-timer", "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-finality-grandpa", "sc-keystore", "sc-network", "sc-network-common", @@ -455,6 +435,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-arithmetic", + "sp-beefy", "sp-blockchain", "sp-consensus", "sp-core", @@ -469,18 +450,17 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "beefy-gadget", - "beefy-primitives", "futures", "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", "sc-rpc", - "sc-utils", "serde", + "sp-beefy", "sp-core", "sp-runtime", "thiserror", @@ -489,30 +469,13 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "beefy-primitives", "sp-api", + "sp-beefy", "sp-runtime", ] -[[package]] -name = "beefy-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", -] - [[package]] name = "bincode" version = "1.3.3" @@ -1087,6 +1050,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "cpufeatures" version = "0.2.1" @@ -1682,9 +1655,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.3.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e1069e39f1454367eb2de793ed062fac4c35c2934b76a81d90dd9abcd28816" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ "signature", ] @@ -2107,7 +2080,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", ] @@ -2131,7 +2104,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -2154,7 +2127,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "Inflector", "array-bytes", @@ -2166,16 +2139,13 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "hash-db", "itertools", - "kvdb", "lazy_static", "linked-hash-map", "log", - "memory-db", "parity-scale-codec", "rand 0.8.5", - "rand_pcg 0.3.1", + "rand_pcg", "sc-block-builder", "sc-cli", "sc-client-api", @@ -2185,7 +2155,6 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "serde_nanos", "sp-api", "sp-blockchain", "sp-core", @@ -2198,7 +2167,6 @@ dependencies = [ "sp-std", "sp-storage", "sp-trie", - "tempfile", "thiserror", "thousands", ] @@ -2206,7 +2174,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2217,7 +2185,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2225,6 +2193,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2233,7 +2202,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -2259,10 +2228,26 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "substrate-rpc-client", + "tokio", +] + [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "bitflags", "frame-metadata", @@ -2294,7 +2279,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "Inflector", "cfg-expr", @@ -2308,7 +2293,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2320,7 +2305,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro2", "quote", @@ -2330,7 +2315,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2353,7 +2338,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -2364,7 +2349,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "log", @@ -2382,7 +2367,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2397,7 +2382,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -2406,7 +2391,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "parity-scale-codec", @@ -2577,7 +2562,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "chrono", "frame-election-provider-support", @@ -2586,7 +2571,6 @@ dependencies = [ "git2", "num-format", "pallet-staking", - "sp-io", ] [[package]] @@ -2625,10 +2609,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2885,15 +2867,21 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", "pin-project-lite 0.2.7", ] +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + [[package]] name = "httparse" version = "1.6.0" @@ -3147,24 +3135,23 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-server", "jsonrpsee-proc-macros", + "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "jsonrpsee-ws-server", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", @@ -3183,9 +3170,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3196,10 +3183,8 @@ dependencies = [ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3209,45 +3194,48 @@ dependencies = [ "thiserror", "tokio", "tracing", - "tracing-futures", - "unicase", ] [[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" +name = "jsonrpsee-proc-macros" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" +checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" dependencies = [ "futures-channel", "futures-util", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", + "soketto", "tokio", + "tokio-stream", + "tokio-util 0.7.1", + "tower", "tracing", - "tracing-futures", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", ] [[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" dependencies = [ "anyhow", "beef", @@ -3259,9 +3247,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3269,26 +3257,6 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util 0.7.1", - "tracing", - "tracing-futures", -] - [[package]] name = "k256" version = "0.11.6" @@ -3309,13 +3277,13 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -3338,13 +3306,13 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", "pallet-fast-unstake", - "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-multisig", + "pallet-nis", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", "pallet-nomination-pools-runtime-api", @@ -3374,7 +3342,6 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -3385,6 +3352,7 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -3413,13 +3381,15 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -3433,35 +3403,31 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" +checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" dependencies = [ "kvdb", - "log", "num_cpus", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -3470,9 +3436,9 @@ dependencies = [ [[package]] name = "kvdb-shared-tests" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de82a1adb7ade192c0090dd56d059a626191c0638c795eb68aff4b0bd2c1f9be" +checksum = "64d3b4e3e80c369f1b5364b6acdeba9b8a02285e91a5570f7c0404b7f9024541" dependencies = [ "kvdb", ] @@ -3596,7 +3562,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ - "async-std-resolver", "futures", "libp2p-core", "log", @@ -3660,7 +3625,6 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ - "async-io", "data-encoding", "dns-parser", "futures", @@ -3671,6 +3635,7 @@ dependencies = [ "rand 0.8.5", "smallvec", "socket2", + "tokio", "void", ] @@ -3799,7 +3764,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ - "async-io", "futures", "futures-timer", "if-watch", @@ -3807,6 +3771,7 @@ dependencies = [ "libp2p-core", "log", "socket2", + "tokio", ] [[package]] @@ -4118,22 +4083,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ "hash-db", "hashbrown", - "parity-util-mem", -] - -[[package]] -name = "memory-lru" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" -dependencies = [ - "lru", ] [[package]] @@ -4189,25 +4144,49 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", + "windows-sys 0.42.0", ] [[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +name = "mmr-gadget" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "winapi", + "futures", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-beefy", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mmr-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", ] [[package]] @@ -4493,15 +4472,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num-bigint" version = "0.4.3" @@ -4654,9 +4624,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.2" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aab54694ddaa8a9b703724c6ef04272b2d27bc32d2c855aae5cdd1857216b43" +checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" dependencies = [ "async-trait", "dyn-clonable", @@ -4671,9 +4641,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.2" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a702b2f6bf592b3eb06c00d80d05afaf7a8eff6b41bb361e397d799acc21b45a" +checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" dependencies = [ "expander 0.0.6", "itertools", @@ -4717,13 +4687,14 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -4731,7 +4702,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -4747,7 +4718,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -4762,7 +4733,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4786,7 +4757,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4806,15 +4777,15 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-election-provider-support", + "frame-remote-externalities", "frame-support", "frame-system", "log", "pallet-bags-list", "pallet-staking", - "remote-externalities", "sp-core", "sp-runtime", "sp-std", @@ -4825,7 +4796,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4840,15 +4811,15 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-runtime", "sp-std", ] @@ -4856,11 +4827,10 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "beefy-merkle-tree", - "beefy-primitives", "frame-support", "frame-system", "log", @@ -4870,6 +4840,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-core", "sp-io", "sp-runtime", @@ -4879,7 +4850,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4897,7 +4868,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4916,7 +4887,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4933,7 +4904,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -4950,7 +4921,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4968,7 +4939,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4977,7 +4948,7 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "sp-arithmetic", "sp-core", @@ -4985,14 +4956,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "static_assertions", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5005,7 +4975,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5023,7 +4993,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5038,25 +5008,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-gilt" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5079,7 +5034,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5095,7 +5050,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5115,7 +5070,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5132,7 +5087,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5149,9 +5104,8 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", @@ -5165,33 +5119,33 @@ dependencies = [ ] [[package]] -name = "pallet-mmr-rpc" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +name = "pallet-multisig" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "anyhow", - "jsonrpsee", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", + "scale-info", + "sp-io", "sp-runtime", + "sp-std", ] [[package]] -name = "pallet-multisig" +name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", - "sp-io", + "sp-arithmetic", + "sp-core", "sp-runtime", "sp-std", ] @@ -5199,7 +5153,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5216,7 +5170,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5236,7 +5190,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -5246,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5263,7 +5217,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5286,7 +5240,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5303,7 +5257,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5318,7 +5272,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5336,7 +5290,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5351,12 +5305,13 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "serde", @@ -5369,7 +5324,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5380,12 +5335,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5406,14 +5362,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.7.3", + "rand 0.8.5", "sp-runtime", "sp-session", "sp-std", @@ -5422,7 +5378,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5436,7 +5392,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5459,7 +5415,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5470,7 +5426,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "log", "sp-arithmetic", @@ -5479,7 +5435,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5496,7 +5452,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5510,7 +5466,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5528,7 +5484,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5547,7 +5503,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-support", "frame-system", @@ -5563,7 +5519,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5579,7 +5535,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5591,7 +5547,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5608,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5624,7 +5580,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5639,7 +5595,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5653,7 +5609,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -5675,7 +5631,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-support", @@ -5750,35 +5706,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "hashbrown", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types", - "smallvec", - "tikv-jemalloc-ctl", - "tikv-jemallocator", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn", - "synstructure", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -5847,20 +5774,20 @@ checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "pbkdf2" -version = "0.4.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac 0.11.1", ] [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac 0.11.1", + "digest 0.10.3", ] [[package]] @@ -5990,22 +5917,22 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_cmd", "color-eyre", "nix 0.24.1", - "parity-util-mem", "polkadot-cli", "polkadot-core-primitives", "substrate-rpc-client", "tempfile", + "tikv-jemallocator", "tokio", ] [[package]] name = "polkadot-approval-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "env_logger 0.9.0", @@ -6029,7 +5956,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -6054,7 +5981,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "derive_more", @@ -6083,7 +6010,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "env_logger 0.9.0", @@ -6112,7 +6039,7 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap 4.0.15", "frame-benchmarking-cli", @@ -6125,12 +6052,13 @@ dependencies = [ "polkadot-service", "pyroscope", "sc-cli", + "sc-executor", "sc-service", "sc-sysinfo", "sc-tracing", "sp-core", + "sp-io", "sp-keyring", - "sp-trie", "substrate-build-script-utils", "thiserror", "try-runtime-cli", @@ -6138,13 +6066,14 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", + "async-trait", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", "frame-system-rpc-runtime-api", + "futures", "kusama-runtime", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -6160,6 +6089,7 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -6180,7 +6110,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.31" +version = "0.9.33" dependencies = [ "always-assert", "assert_matches", @@ -6209,10 +6139,9 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", - "parity-util-mem", "scale-info", "sp-core", "sp-runtime", @@ -6221,7 +6150,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6253,7 +6182,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.31" +version = "0.9.33" dependencies = [ "criterion", "parity-scale-codec", @@ -6267,7 +6196,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6294,7 +6223,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.31" +version = "0.9.33" dependencies = [ "always-assert", "assert_matches", @@ -6323,7 +6252,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "parity-scale-codec", @@ -6342,7 +6271,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6381,7 +6310,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -6409,7 +6338,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -6435,7 +6364,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "polkadot-node-subsystem", @@ -6451,7 +6380,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6474,7 +6403,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "maplit", @@ -6493,7 +6422,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "futures", @@ -6514,7 +6443,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "fatality", @@ -6541,23 +6470,23 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "futures", "futures-timer", "polkadot-node-subsystem", + "polkadot-overseer", "polkadot-primitives", "sp-blockchain", "sp-inherents", - "sp-runtime", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.31" +version = "0.9.33" dependencies = [ "bitvec", "fatality", @@ -6578,12 +6507,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.31" +version = "0.9.33" dependencies = [ "always-assert", "assert_matches", "async-process", "async-std", + "cpu-time", "futures", "futures-timer", "hex-literal", @@ -6612,7 +6542,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "futures-timer", @@ -6635,11 +6565,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", - "memory-lru", - "parity-util-mem", + "lru", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6657,9 +6586,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "async-std", "lazy_static", "log", "mick-jaeger", @@ -6670,11 +6598,12 @@ dependencies = [ "sc-network", "sp-core", "thiserror", + "tokio", ] [[package]] name = "polkadot-node-metrics" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_cmd", "bs58", @@ -6702,7 +6631,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "derive_more", @@ -6725,7 +6654,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.31" +version = "0.9.33" dependencies = [ "bounded-vec", "futures", @@ -6747,7 +6676,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -6756,7 +6685,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "futures", @@ -6774,7 +6703,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "derive_more", @@ -6796,7 +6725,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6813,7 +6742,6 @@ dependencies = [ "lru", "parity-db", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.11.2", "pin-project", "polkadot-node-jaeger", @@ -6837,7 +6765,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6846,7 +6774,6 @@ dependencies = [ "futures-timer", "lru", "orchestra", - "parity-util-mem", "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -6858,17 +6785,17 @@ dependencies = [ "sc-client-api", "sp-api", "sp-core", + "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain" -version = "0.9.31" +version = "0.9.33" dependencies = [ "derive_more", "frame-support", "parity-scale-codec", - "parity-util-mem", "polkadot-core-primitives", "scale-info", "serde", @@ -6879,7 +6806,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.31" +version = "0.9.33" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -6893,12 +6820,11 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.31" +version = "0.9.33" dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", "scale-info", @@ -6919,7 +6845,7 @@ dependencies = [ [[package]] name = "polkadot-primitives-test-helpers" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -6931,12 +6857,12 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.31" +version = "0.9.33" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "jsonrpsee", - "pallet-mmr-rpc", + "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", "sc-chain-spec", @@ -6962,13 +6888,13 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -7020,7 +6946,6 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -7030,6 +6955,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -7058,9 +6984,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -7095,6 +7020,7 @@ dependencies = [ "serde_json", "slot-range-helper", "sp-api", + "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -7110,18 +7036,20 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" -version = "0.9.31" +version = "0.9.33" dependencies = [ "bs58", "parity-scale-codec", @@ -7132,7 +7060,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitflags", @@ -7184,12 +7112,11 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", "beefy-gadget", - "beefy-primitives", "env_logger 0.9.0", "frame-support", "frame-system-rpc-runtime-api", @@ -7201,6 +7128,7 @@ dependencies = [ "kvdb-rocksdb", "log", "lru", + "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -7269,6 +7197,7 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7278,6 +7207,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-keystore", + "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", @@ -7296,7 +7226,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "arrayvec 0.5.2", "assert_matches", @@ -7327,7 +7257,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7336,7 +7266,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "parity-scale-codec", @@ -7362,7 +7292,7 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -7370,7 +7300,6 @@ dependencies = [ "color-eyre", "futures", "futures-timer", - "parity-util-mem", "polkadot-cli", "polkadot-erasure-coding", "polkadot-node-core-backing", @@ -7391,9 +7320,8 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", "bitvec", "frame-election-provider-support", "frame-executive", @@ -7431,6 +7359,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -7456,7 +7385,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-system", @@ -7511,7 +7440,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap 4.0.15", "generate-bags", @@ -7690,9 +7619,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -7882,7 +7811,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg 0.2.1", ] [[package]] @@ -7953,15 +7881,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_pcg" version = "0.3.1" @@ -8094,7 +8013,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remote-ext-tests-bags-list" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap 4.0.15", "frame-system", @@ -8111,23 +8030,6 @@ dependencies = [ "westend-runtime-constants", ] -[[package]] -name = "remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" -dependencies = [ - "env_logger 0.9.0", - "log", - "parity-scale-codec", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", - "substrate-rpc-client", -] - [[package]] name = "remove_dir_all" version = "0.5.3" @@ -8222,10 +8124,9 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ "beefy-merkle-tree", - "beefy-primitives", "frame-benchmarking", "frame-executive", "frame-support", @@ -8245,7 +8146,6 @@ dependencies = [ "pallet-collective", "pallet-democracy", "pallet-elections-phragmen", - "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -8253,6 +8153,7 @@ dependencies = [ "pallet-membership", "pallet-mmr", "pallet-multisig", + "pallet-nis", "pallet-offences", "pallet-preimage", "pallet-proxy", @@ -8286,6 +8187,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8311,13 +8213,15 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -8454,7 +8358,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "log", "sp-core", @@ -8465,7 +8369,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", @@ -8476,7 +8380,7 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", "sc-network-common", "sp-api", @@ -8492,7 +8396,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "futures-timer", @@ -8515,7 +8419,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8531,11 +8435,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", "sc-chain-spec-derive", "sc-network-common", "sc-telemetry", @@ -8548,7 +8450,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8559,7 +8461,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "chrono", @@ -8570,7 +8472,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", @@ -8599,11 +8501,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "fnv", "futures", - "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8620,14 +8521,13 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-storage", - "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "hash-db", "kvdb", @@ -8652,13 +8552,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -8676,7 +8577,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "fork-tree", @@ -8695,7 +8596,6 @@ dependencies = [ "sc-keystore", "sc-telemetry", "schnorrkel", - "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -8706,10 +8606,8 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -8717,7 +8615,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "jsonrpsee", @@ -8739,7 +8637,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8752,7 +8650,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", @@ -8770,15 +8668,13 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "lazy_static", "lru", "parity-scale-codec", "parking_lot 0.12.1", @@ -8787,7 +8683,6 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -8802,13 +8697,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "environmental", - "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -8818,14 +8710,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "log", - "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmi", ] @@ -8833,19 +8723,16 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "cfg-if", "libc", "log", "once_cell", - "parity-scale-codec", - "parity-wasm", "rustix", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmtime", ] @@ -8853,7 +8740,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ahash", "array-bytes", @@ -8871,7 +8758,6 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-network-gossip", @@ -8894,7 +8780,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "finality-grandpa", "futures", @@ -8905,7 +8791,6 @@ dependencies = [ "sc-finality-grandpa", "sc-rpc", "serde", - "serde_json", "sp-blockchain", "sp-core", "sp-runtime", @@ -8915,16 +8800,14 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ansi_term", "futures", "futures-timer", "log", - "parity-util-mem", "sc-client-api", "sc-network-common", - "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -8932,7 +8815,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "async-trait", @@ -8947,30 +8830,24 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "async-trait", "asynchronous-codec", - "bitflags", "bytes", - "cid", "either", "fnv", - "fork-tree", "futures", "futures-timer", "ip_network", "libp2p", - "linked-hash-map", - "linked_hash_set", "log", "lru", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prost", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -8994,7 +8871,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "cid", "futures", @@ -9008,13 +8885,12 @@ dependencies = [ "sp-runtime", "thiserror", "unsigned-varint", - "void", ] [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "bitflags", @@ -9040,7 +8916,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ahash", "futures", @@ -9058,7 +8934,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "futures", @@ -9079,9 +8955,10 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", + "async-trait", "fork-tree", "futures", "libp2p", @@ -9103,17 +8980,17 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "futures", - "hex", "libp2p", "log", "parity-scale-codec", @@ -9128,7 +9005,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "bytes", @@ -9142,7 +9019,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", "sc-network-common", "sc-peerset", @@ -9158,7 +9035,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "libp2p", @@ -9171,7 +9048,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9180,10 +9057,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", @@ -9210,13 +9086,10 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "futures", "jsonrpsee", - "log", "parity-scale-codec", - "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -9225,7 +9098,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", "sp-version", "thiserror", ] @@ -9233,53 +9105,60 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "futures", + "http", "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", ] [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ + "array-bytes", "futures", + "futures-util", "hex", "jsonrpsee", + "log", "parity-scale-codec", + "parking_lot 0.12.1", "sc-chain-spec", + "sc-client-api", "sc-transaction-pool-api", "serde", "sp-api", "sp-blockchain", "sp-core", "sp-runtime", + "sp-version", "thiserror", + "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "directories", "exit-future", "futures", "futures-timer", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -9307,19 +9186,15 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-application-crypto", - "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", "sp-storage", - "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -9336,21 +9211,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "log", "parity-scale-codec", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", - "sc-client-api", "sp-core", ] [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9369,13 +9241,13 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "libc", "log", - "rand 0.7.3", - "rand_pcg 0.2.1", + "rand 0.8.5", + "rand_pcg", "regex", "sc-telemetry", "serde", @@ -9388,7 +9260,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "chrono", "futures", @@ -9396,7 +9268,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_json", "thiserror", @@ -9406,7 +9278,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ansi_term", "atty", @@ -9437,7 +9309,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9448,7 +9320,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", @@ -9456,7 +9328,6 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -9475,7 +9346,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", @@ -9489,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "futures-timer", @@ -9709,15 +9580,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_nanos" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -9894,7 +9756,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.31" +version = "0.9.33" dependencies = [ "enumn", "parity-scale-codec", @@ -9961,6 +9823,7 @@ dependencies = [ "bytes", "flate2", "futures", + "http", "httparse", "log", "rand 0.8.5", @@ -9970,7 +9833,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "hash-db", "log", @@ -9988,7 +9851,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "blake2", "proc-macro-crate", @@ -10000,7 +9863,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10013,14 +9876,13 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", "sp-std", "static_assertions", ] @@ -10028,7 +9890,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10041,7 +9903,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "parity-scale-codec", @@ -10050,10 +9912,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -10065,7 +9944,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "log", @@ -10083,11 +9962,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", - "futures-timer", "log", "parity-scale-codec", "sp-core", @@ -10102,7 +9980,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "merlin", @@ -10125,13 +10003,11 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-runtime", "sp-std", "sp-timestamp", ] @@ -10139,7 +10015,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10152,13 +10028,12 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "base58", "bitflags", "blake2", - "byteorder", "dyn-clonable", "ed25519-zebra", "futures", @@ -10169,11 +10044,10 @@ dependencies = [ "libsecp256k1", "log", "merlin", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "primitive-types", - "rand 0.7.3", + "rand 0.8.5", "regex", "scale-info", "schnorrkel", @@ -10190,14 +10064,13 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "blake2", "byteorder", @@ -10211,7 +10084,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro2", "quote", @@ -10222,7 +10095,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10231,7 +10104,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro2", "quote", @@ -10241,7 +10114,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "environmental", "parity-scale-codec", @@ -10252,7 +10125,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "finality-grandpa", "log", @@ -10270,7 +10143,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10284,15 +10157,15 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "bytes", + "ed25519", + "ed25519-dalek", "futures", - "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -10302,15 +10175,14 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "lazy_static", "sp-core", @@ -10321,7 +10193,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures", @@ -10338,7 +10210,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "thiserror", "zstd", @@ -10347,8 +10219,9 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ + "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", @@ -10364,7 +10237,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10378,7 +10251,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "sp-api", "sp-core", @@ -10388,7 +10261,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "backtrace", "lazy_static", @@ -10398,7 +10271,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "rustc-hash", "serde", @@ -10408,16 +10281,15 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", @@ -10431,7 +10303,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10449,7 +10321,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "Inflector", "proc-macro-crate", @@ -10458,24 +10330,10 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" -dependencies = [ - "log", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10489,10 +10347,11 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -10500,14 +10359,13 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "hash-db", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", @@ -10516,18 +10374,17 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-root", ] [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10540,13 +10397,12 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", - "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -10556,7 +10412,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "sp-std", @@ -10568,7 +10424,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "sp-api", "sp-runtime", @@ -10577,7 +10433,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "log", @@ -10593,7 +10449,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ahash", "hash-db", @@ -10616,7 +10472,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10633,7 +10489,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10644,7 +10500,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "impl-trait-for-tuples", "log", @@ -10657,9 +10513,8 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -10688,9 +10543,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.34.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a9821878e1f13aba383aa40a86fb1b33c7265774ec91e32563cb1dd1577496" +checksum = "23d92659e7d18d82b803824a9ba5a6022cff101c3491d027c1c1d8d30e749284" dependencies = [ "Inflector", "num-format", @@ -10709,12 +10564,13 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staking-miner" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_cmd", "clap 4.0.15", "exitcode", "frame-election-provider-support", + "frame-remote-externalities", "frame-support", "frame-system", "futures-util", @@ -10730,7 +10586,6 @@ dependencies = [ "polkadot-core-primitives", "polkadot-runtime", "polkadot-runtime-common", - "remote-externalities", "sc-transaction-pool-api", "serde", "serde_json", @@ -10872,7 +10727,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "platforms", ] @@ -10880,17 +10735,15 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "frame-system-rpc-runtime-api", "futures", "jsonrpsee", "log", "parity-scale-codec", - "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -10901,9 +10754,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ - "futures-util", "hyper", "log", "prometheus", @@ -10914,7 +10766,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "async-trait", "jsonrpsee", @@ -10927,7 +10779,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "jsonrpsee", "log", @@ -10937,10 +10789,8 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", "sp-trie", "trie-db", ] @@ -10948,7 +10798,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "array-bytes", "async-trait", @@ -10974,7 +10824,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10984,7 +10834,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10995,7 +10845,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "ansi_term", "build-helper", @@ -11049,9 +10899,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.98" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", @@ -11134,7 +10984,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-parachain-adder" -version = "0.9.31" +version = "0.9.33" dependencies = [ "dlmalloc", "parity-scale-codec", @@ -11147,7 +10997,7 @@ dependencies = [ [[package]] name = "test-parachain-adder-collator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap 4.0.15", "futures", @@ -11173,14 +11023,14 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "0.9.31" +version = "0.9.33" dependencies = [ "substrate-wasm-builder", ] [[package]] name = "test-parachain-undying" -version = "0.9.31" +version = "0.9.33" dependencies = [ "dlmalloc", "log", @@ -11194,7 +11044,7 @@ dependencies = [ [[package]] name = "test-parachain-undying-collator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap 4.0.15", "futures", @@ -11220,7 +11070,7 @@ dependencies = [ [[package]] name = "test-parachains" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", "sp-core", @@ -11231,13 +11081,15 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -11348,17 +11200,17 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ "anyhow", - "hmac 0.8.1", + "hmac 0.12.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.11.0", + "rand 0.8.5", "rustc-hash", - "sha2 0.9.8", + "sha2 0.10.2", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -11401,16 +11253,16 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.19.2" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" +checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", - "once_cell", "parking_lot 0.12.1", "pin-project-lite 0.2.7", "signal-hook-registry", @@ -11460,6 +11312,7 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.7", "tokio", + "tokio-util 0.7.1", ] [[package]] @@ -11511,6 +11364,41 @@ dependencies = [ "serde", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.7", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.1" @@ -11524,6 +11412,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", + "log", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -11562,7 +11451,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -11572,7 +11461,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "expander 0.0.6", @@ -11686,6 +11575,7 @@ dependencies = [ "smallvec", "thiserror", "tinyvec", + "tokio", "tracing", "url", ] @@ -11705,6 +11595,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", + "tokio", "tracing", "trust-dns-proto", ] @@ -11718,22 +11609,25 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +source = "git+https://github.com/paritytech/substrate?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" dependencies = [ "clap 4.0.15", + "frame-remote-externalities", "frame-try-runtime", + "hex", "log", "parity-scale-codec", - "remote-externalities", - "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "sp-api", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", @@ -11819,15 +11713,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.7" @@ -12390,13 +12275,13 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -12449,7 +12334,6 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "serde", @@ -12458,6 +12342,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -12486,13 +12371,15 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -12582,6 +12469,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +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_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.32.0" @@ -12600,6 +12508,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.32.0" @@ -12618,6 +12532,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.32.0" @@ -12636,6 +12556,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.32.0" @@ -12654,6 +12580,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.32.0" @@ -12672,6 +12610,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" version = "0.7.0" @@ -12712,7 +12656,7 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.31" +version = "0.9.33" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12725,7 +12669,7 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12748,7 +12692,7 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-support", @@ -12765,7 +12709,7 @@ dependencies = [ [[package]] name = "xcm-executor-integration-tests" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12785,7 +12729,7 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.31" +version = "0.9.33" dependencies = [ "Inflector", "proc-macro2", @@ -12795,7 +12739,7 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "parity-scale-codec", @@ -12811,7 +12755,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12834,7 +12778,7 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12893,7 +12837,7 @@ dependencies = [ [[package]] name = "zombienet-backchannel" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures-util", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index 4b0e2047bf64..6d01e2b25553 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,25 +6,31 @@ path = "src/main.rs" name = "polkadot" description = "Implementation of a `https://polkadot.network` node in Rust based on the Substrate framework." license = "GPL-3.0-only" -version = "0.9.31" +rust-version = "1.64.0" # workspace properties +readme = "README.md" +authors.workspace = true +edition.workspace = true +version.workspace = true + +[workspace.package] authors = ["Parity Technologies "] edition = "2021" -rust-version = "1.57.0" # custom profiles -readme = "README.md" +repository = "https://github.com/paritytech/polkadot.git" +version = "0.9.33" [dependencies] polkadot-cli = { path = "cli", features = [ "kusama-native", "westend-native", "rococo-native" ] } color-eyre = { version = "0.6.1", default-features = false } -parity-util-mem = { version = "0.12.0", default-features = false, features = ["jemalloc-global"] } +tikv-jemallocator = "0.5.0" [dev-dependencies] assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" -tokio = "1.19.2" +tokio = "1.22.0" substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-core-primitives = { path = "core-primitives" } - + [workspace] members = [ "cli", diff --git a/README.md b/README.md index 55b66f6ea619..319e1714fd7b 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ cargo build # Builds all native code You can run the tests if you like: ```bash -cargo test --all --release +cargo test --workspace --release ``` You can start a development chain with: diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c1fe95795328..0d1c55187400 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-cli" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Polkadot Relay-chain Client Node" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [package.metadata.wasm-pack.profile.release] # `wasm-opt` has some problems on Linux, see @@ -26,6 +26,7 @@ polkadot-node-core-pvf = { path = "../node/core/pvf", optional = true } polkadot-performance-test = { path = "../node/test/performance-test", optional = true } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } @@ -34,17 +35,13 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master polkadot-node-metrics = { path = "../node/metrics" } sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } - -# this crate is used only to enable `trie-memory-tracker` feature -# see https://github.com/paritytech/substrate/pull/6745 -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } [build-dependencies] substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] -default = ["wasmtime", "db", "cli", "hostperfcheck", "full-node", "trie-memory-tracker", "polkadot-native"] -wasmtime = ["sc-cli/wasmtime"] +default = ["db", "cli", "hostperfcheck", "full-node", "polkadot-native"] db = ["service/db"] cli = [ "clap", @@ -61,7 +58,6 @@ runtime-benchmarks = [ "polkadot-node-metrics/runtime-benchmarks", "polkadot-performance-test?/runtime-benchmarks" ] -trie-memory-tracker = ["sp-trie/memory-tracker"] full-node = ["service/full-node"] try-runtime = ["service/try-runtime", "try-runtime-cli/try-runtime"] fast-runtime = ["service/fast-runtime"] diff --git a/cli/src/command.rs b/cli/src/command.rs index 5ce7c05162c1..d7a66bb9d711 100644 --- a/cli/src/command.rs +++ b/cli/src/command.rs @@ -541,7 +541,7 @@ pub fn run() -> Result<()> { ensure_dev(chain_spec).map_err(Error::Other)?; runner.sync_run(|mut config| { let (client, _, _, _) = service::new_chain_ops(&mut config, None)?; - let header = client.header(BlockId::Number(0_u32.into())).unwrap().unwrap(); + let header = client.header(client.info().genesis_hash).unwrap().unwrap(); let inherent_data = benchmark_inherent_data(header) .map_err(|e| format!("generating inherent data: {:?}", e))?; let remark_builder = RemarkBuilder::new(client.clone()); @@ -591,27 +591,27 @@ pub fn run() -> Result<()> { #[cfg(feature = "kusama-native")] if chain_spec.is_kusama() { - return Ok(runner.sync_run(|config| { + return runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - })?) + }) } #[cfg(feature = "westend-native")] if chain_spec.is_westend() { - return Ok(runner.sync_run(|config| { + return runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - })?) + }) } // else we assume it is polkadot. #[cfg(feature = "polkadot-native")] { - return Ok(runner.sync_run(|config| { + return runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - })?) + }) } #[cfg(not(feature = "polkadot-native"))] @@ -638,9 +638,14 @@ pub fn run() -> Result<()> { Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?), #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { + use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; let runner = cli.create_runner(cmd)?; let chain_spec = &runner.config().chain_spec; set_default_ss58_version(chain_spec); + type HostFunctionsOf = ExtendedHostFunctions< + sp_io::SubstrateHostFunctions, + ::ExtendHostFunctions, + >; use sc_service::TaskManager; let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry); @@ -651,10 +656,9 @@ pub fn run() -> Result<()> { #[cfg(feature = "kusama-native")] if chain_spec.is_kusama() { - return runner.async_run(|config| { + return runner.async_run(|_| { Ok(( - cmd.run::( - config, + cmd.run::>( ) .map_err(Error::SubstrateCli), task_manager, @@ -664,10 +668,9 @@ pub fn run() -> Result<()> { #[cfg(feature = "westend-native")] if chain_spec.is_westend() { - return runner.async_run(|config| { + return runner.async_run(|_| { Ok(( - cmd.run::( - config, + cmd.run::>( ) .map_err(Error::SubstrateCli), task_manager, @@ -677,10 +680,9 @@ pub fn run() -> Result<()> { // else we assume it is polkadot. #[cfg(feature = "polkadot-native")] { - return runner.async_run(|config| { + return runner.async_run(|_| { Ok(( - cmd.run::( - config, + cmd.run::>( ) .map_err(Error::SubstrateCli), task_manager, diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index 2c6fe070522d..bad5533f9d1d 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-core-primitives" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -10,7 +10,6 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", d sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } -parity-util-mem = { version = "0.12.0", default-features = false, optional = true } [features] default = [ "std" ] @@ -21,5 +20,4 @@ std = [ "sp-std/std", "scale-info/std", "parity-scale-codec/std", - "parity-util-mem", ] diff --git a/core-primitives/src/lib.rs b/core-primitives/src/lib.rs index bd0256dc7c9e..ca4d2372db38 100644 --- a/core-primitives/src/lib.rs +++ b/core-primitives/src/lib.rs @@ -21,8 +21,6 @@ //! These core Polkadot types are used by the relay chain and the Parachains. use parity_scale_codec::{Decode, Encode}; -#[cfg(feature = "std")] -use parity_util_mem::MallocSizeOf; use scale_info::TypeInfo; use sp_runtime::{ generic, @@ -66,7 +64,6 @@ pub type Hash = sp_core::H256; /// /// This type makes it easy to enforce that a hash is a candidate hash on the type level. #[derive(Clone, Copy, Encode, Decode, Hash, Eq, PartialEq, Default, PartialOrd, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct CandidateHash(pub Hash); #[cfg(feature = "std")] @@ -127,7 +124,6 @@ pub type DownwardMessage = sp_std::vec::Vec; /// A wrapped version of `DownwardMessage`. The difference is that it has attached the block number when /// the message was sent. #[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct InboundDownwardMessage { /// The block number at which these messages were put into the downward message queue. pub sent_at: BlockNumber, @@ -137,7 +133,6 @@ pub struct InboundDownwardMessage { /// An HRMP message seen from the perspective of a recipient. #[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct InboundHrmpMessage { /// The block number at which this message was sent. /// Specifically, it is the block number at which the candidate that sends this message was @@ -149,7 +144,6 @@ pub struct InboundHrmpMessage { /// An HRMP message seen from the perspective of a sender. #[derive(Encode, Decode, Clone, sp_runtime::RuntimeDebug, PartialEq, Eq, Hash, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct OutboundHrmpMessage { /// The para that will get this message in its downward message queue. pub recipient: Id, diff --git a/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index 8bf5b7c6a959..868d1197efd7 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-erasure-coding" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] polkadot-primitives = { path = "../primitives" } diff --git a/erasure-coding/fuzzer/Cargo.toml b/erasure-coding/fuzzer/Cargo.toml index 6c8ad88e3955..bd8632a185f5 100644 --- a/erasure-coding/fuzzer/Cargo.toml +++ b/erasure-coding/fuzzer/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "erasure_coding_fuzzer" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] polkadot-erasure-coding = { path = ".." } diff --git a/erasure-coding/src/lib.rs b/erasure-coding/src/lib.rs index 5e85809f4117..6abd7dce4dd3 100644 --- a/erasure-coding/src/lib.rs +++ b/erasure-coding/src/lib.rs @@ -216,7 +216,7 @@ pub struct Branches<'a, I> { impl<'a, I: AsRef<[u8]>> Branches<'a, I> { /// Get the trie root. pub fn root(&self) -> H256 { - self.root.clone() + self.root } } diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 4889ecb6ecef..b07447ef3396 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "polkadot-client" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] +async-trait = "0.1.57" +futures = "0.3.21" frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -35,7 +37,7 @@ sc-executor = { git = "https://github.com/paritytech/substrate", branch = "maste sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" } # Polkadot Runtimes polkadot-runtime = { path = "../../runtime/polkadot", optional = true } diff --git a/node/client/src/benchmarking.rs b/node/client/src/benchmarking.rs index 7990bc88d218..17ef63f4ba6e 100644 --- a/node/client/src/benchmarking.rs +++ b/node/client/src/benchmarking.rs @@ -165,7 +165,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis.clone(), + genesis, genesis, (), (), @@ -220,7 +220,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis.clone(), + genesis, genesis, (), (), @@ -274,7 +274,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis.clone(), + genesis, genesis, (), (), @@ -328,7 +328,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis.clone(), + genesis, genesis, (), (), @@ -359,7 +359,7 @@ pub fn benchmark_inherent_data( // Assume that all runtimes have the `timestamp` pallet. let d = std::time::Duration::from_millis(0); let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); - timestamp.provide_inherent_data(&mut inherent_data)?; + futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data))?; let para_data = polkadot_primitives::v2::InherentData { bitfields: Vec::new(), @@ -368,8 +368,7 @@ pub fn benchmark_inherent_data( parent_header: header, }; - polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::from_data(para_data) - .provide_inherent_data(&mut inherent_data)?; + inherent_data.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, ¶_data)?; Ok(inherent_data) } diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index d2c119ba04a8..fcadc5b59932 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -560,12 +560,12 @@ impl sc_client_api::StorageProvider for Client { } impl sp_blockchain::HeaderBackend for Client { - fn header(&self, id: BlockId) -> sp_blockchain::Result> { + fn header(&self, hash: Hash) -> sp_blockchain::Result> { with_client! { self, client, { - client.header(&id) + client.header(hash) } } } @@ -580,12 +580,12 @@ impl sp_blockchain::HeaderBackend for Client { } } - fn status(&self, id: BlockId) -> sp_blockchain::Result { + fn status(&self, hash: Hash) -> sp_blockchain::Result { with_client! { self, client, { - client.status(id) + client.status(hash) } } } diff --git a/node/collation-generation/Cargo.toml b/node/collation-generation/Cargo.toml index 46eaf83b4498..93b06f315b5f 100644 --- a/node/collation-generation/Cargo.toml +++ b/node/collation-generation/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-collation-generation" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index bf580c3bf348..b73c4b97eb1b 100644 --- a/node/core/approval-voting/Cargo.toml +++ b/node/core/approval-voting/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-approval-voting" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" @@ -13,7 +13,7 @@ bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } lru = "0.8" merlin = "2.0" schnorrkel = "0.9.1" -kvdb = "0.12.0" +kvdb = "0.13.0" derive_more = "0.99.17" thiserror = "1.0.31" @@ -40,5 +40,5 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } assert_matches = "1.4.0" -kvdb-memorydb = "0.12.0" +kvdb-memorydb = "0.13.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/approval-voting/src/approval_checking.rs b/node/core/approval-voting/src/approval_checking.rs index b513c18895b3..82a9a8c89bf5 100644 --- a/node/core/approval-voting/src/approval_checking.rs +++ b/node/core/approval-voting/src/approval_checking.rs @@ -282,8 +282,8 @@ impl State { /// Constructs an infinite iterator from an array of `TrancheEntry` values. Any missing tranches /// are filled with empty assignments, as they are needed to compute the approved tranches. -fn filled_tranche_iterator<'a>( - tranches: &'a [TrancheEntry], +fn filled_tranche_iterator( + tranches: &[TrancheEntry], ) -> impl Iterator { let mut gap_end = None; diff --git a/node/core/approval-voting/src/criteria.rs b/node/core/approval-voting/src/criteria.rs index fea71d79c098..520a1a745056 100644 --- a/node/core/approval-voting/src/criteria.rs +++ b/node/core/approval-voting/src/criteria.rs @@ -155,10 +155,10 @@ impl<'a> From<&'a SessionInfo> for Config { Config { assignment_keys: s.assignment_keys.clone(), validator_groups: s.validator_groups.clone(), - n_cores: s.n_cores.clone(), - zeroth_delay_tranche_width: s.zeroth_delay_tranche_width.clone(), - relay_vrf_modulo_samples: s.relay_vrf_modulo_samples.clone(), - n_delay_tranches: s.n_delay_tranches.clone(), + n_cores: s.n_cores, + zeroth_delay_tranche_width: s.zeroth_delay_tranche_width, + relay_vrf_modulo_samples: s.relay_vrf_modulo_samples, + n_delay_tranches: s.n_delay_tranches, } } } diff --git a/node/core/approval-voting/src/import.rs b/node/core/approval-voting/src/import.rs index 20629dd022d4..2331b50b6bb1 100644 --- a/node/core/approval-voting/src/import.rs +++ b/node/core/approval-voting/src/import.rs @@ -415,11 +415,8 @@ pub(crate) async fn handle_new_head( Err(error) => { // It's possible that we've lost a race with finality. let (tx, rx) = oneshot::channel(); - ctx.send_message(ChainApiMessage::FinalizedBlockHash( - block_header.number.clone(), - tx, - )) - .await; + ctx.send_message(ChainApiMessage::FinalizedBlockHash(block_header.number, tx)) + .await; let lost_to_finality = match rx.await { Ok(Ok(Some(h))) if h != block_hash => true, diff --git a/node/core/approval-voting/src/lib.rs b/node/core/approval-voting/src/lib.rs index bc63549795c2..14fc87761c42 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -621,10 +621,7 @@ impl CurrentlyCheckingSet { .candidate_hash_map .remove(&approval_state.candidate_hash) .unwrap_or_default(); - approvals_cache.put( - approval_state.candidate_hash.clone(), - approval_state.approval_outcome.clone(), - ); + approvals_cache.put(approval_state.candidate_hash, approval_state.approval_outcome); return (out, approval_state) } } @@ -768,7 +765,7 @@ async fn run( where B: Backend, { - if let Err(err) = db_sanity_check(subsystem.db.clone(), subsystem.db_config.clone()) { + if let Err(err) = db_sanity_check(subsystem.db.clone(), subsystem.db_config) { gum::warn!(target: LOG_TARGET, ?err, "Could not run approval vote DB sanity check"); } @@ -1278,7 +1275,7 @@ async fn get_approval_signatures_for_candidate( Some(e) => e, }; - let relay_hashes = entry.block_assignments.iter().map(|(relay_hash, _)| relay_hash); + let relay_hashes = entry.block_assignments.keys(); let mut candidate_indices = HashSet::new(); // Retrieve `CoreIndices`/`CandidateIndices` as required by approval-distribution: @@ -1330,6 +1327,11 @@ async fn get_approval_signatures_for_candidate( // No need to block subsystem on this (also required to break cycle). // We should not be sending this message frequently - caller must make sure this is bounded. + gum::trace!( + target: LOG_TARGET, + ?candidate_hash, + "Spawning task for fetching sinatures from approval-distribution" + ); ctx.spawn("get-approval-signatures", Box::pin(get_approvals)) } @@ -2502,7 +2504,7 @@ async fn issue_approval( }; let candidate_hash = match block_entry.candidate(candidate_index as usize) { - Some((_, h)) => h.clone(), + Some((_, h)) => *h, None => { gum::warn!( target: LOG_TARGET, diff --git a/node/core/av-store/Cargo.toml b/node/core/av-store/Cargo.toml index a4a39df77668..73cdb72d8012 100644 --- a/node/core/av-store/Cargo.toml +++ b/node/core/av-store/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "polkadot-node-core-av-store" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" futures-timer = "3.0.2" -kvdb = "0.12.0" +kvdb = "0.13.0" thiserror = "1.0.31" gum = { package = "tracing-gum", path = "../../gum" } bitvec = "1.0.0" @@ -24,7 +24,7 @@ polkadot-node-primitives = { path = "../../primitives" } log = "0.4.17" env_logger = "0.9.0" assert_matches = "1.4.0" -kvdb-memorydb = "0.12.0" +kvdb-memorydb = "0.13.0" sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } diff --git a/node/core/av-store/src/lib.rs b/node/core/av-store/src/lib.rs index 4fbbf3740ab0..cbbbf2bbd7dc 100644 --- a/node/core/av-store/src/lib.rs +++ b/node/core/av-store/src/lib.rs @@ -61,7 +61,7 @@ const PRUNE_BY_TIME_PREFIX: &[u8; 13] = b"prune_by_time"; // We have some keys we want to map to empty values because existence of the key is enough. We use this because // rocksdb doesn't support empty values. -const TOMBSTONE_VALUE: &[u8] = &*b" "; +const TOMBSTONE_VALUE: &[u8] = b" "; /// Unavailable blocks are kept for 1 hour. const KEEP_UNAVAILABLE_FOR: Duration = Duration::from_secs(60 * 60); diff --git a/node/core/av-store/src/metrics.rs b/node/core/av-store/src/metrics.rs index c50932c6173e..fedeb2b7d0e5 100644 --- a/node/core/av-store/src/metrics.rs +++ b/node/core/av-store/src/metrics.rs @@ -140,10 +140,16 @@ impl metrics::Metrics for Metrics { registry, )?, get_chunk: prometheus::register( - prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( - "polkadot_parachain_av_store_get_chunk", - "Time spent fetching requested chunks.`", - ))?, + prometheus::Histogram::with_opts( + prometheus::HistogramOpts::new( + "polkadot_parachain_av_store_get_chunk", + "Time spent fetching requested chunks.`", + ) + .buckets(vec![ + 0.000625, 0.00125, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25, + 0.5, 1.0, 2.5, 5.0, 10.0, + ]), + )?, registry, )?, }; diff --git a/node/core/backing/Cargo.toml b/node/core/backing/Cargo.toml index bf52d54167fc..7428372eec62 100644 --- a/node/core/backing/Cargo.toml +++ b/node/core/backing/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-backing" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index a9ae518e3103..2f8aa4490f27 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -482,9 +482,7 @@ impl TableContextTrait for TableContext { } fn is_member_of(&self, authority: &ValidatorIndex, group: &ParaId) -> bool { - self.groups - .get(group) - .map_or(false, |g| g.iter().position(|a| a == authority).is_some()) + self.groups.get(group).map_or(false, |g| g.iter().any(|a| a == authority)) } fn requisite_votes(&self, group: &ParaId) -> usize { @@ -499,7 +497,7 @@ struct InvalidErasureRoot; fn primitive_statement_to_table(s: &SignedFullStatement) -> TableSignedStatement { let statement = match s.payload() { Statement::Seconded(c) => TableStatement::Seconded(c.clone()), - Statement::Valid(h) => TableStatement::Valid(h.clone()), + Statement::Valid(h) => TableStatement::Valid(*h), }; TableSignedStatement { diff --git a/node/core/bitfield-signing/Cargo.toml b/node/core/bitfield-signing/Cargo.toml index 54aa27766b7b..b94cc6708c74 100644 --- a/node/core/bitfield-signing/Cargo.toml +++ b/node/core/bitfield-signing/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-bitfield-signing" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/core/bitfield-signing/src/metrics.rs b/node/core/bitfield-signing/src/metrics.rs index ab4e73be0eeb..571a0c335bd7 100644 --- a/node/core/bitfield-signing/src/metrics.rs +++ b/node/core/bitfield-signing/src/metrics.rs @@ -50,10 +50,16 @@ impl metrics::Metrics for Metrics { registry, )?, run: prometheus::register( - prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( - "polkadot_parachain_bitfield_signing_run", - "Time spent within `bitfield_signing::run`", - ))?, + prometheus::Histogram::with_opts( + prometheus::HistogramOpts::new( + "polkadot_parachain_bitfield_signing_run", + "Time spent within `bitfield_signing::run`", + ) + .buckets(vec![ + 0.000625, 0.00125, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25, + 0.5, 1.0, 2.5, 5.0, 10.0, + ]), + )?, registry, )?, }; diff --git a/node/core/candidate-validation/Cargo.toml b/node/core/candidate-validation/Cargo.toml index 105d7c1a21dc..56fa0e08115d 100644 --- a/node/core/candidate-validation/Cargo.toml +++ b/node/core/candidate-validation/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-candidate-validation" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] async-trait = "0.1.57" diff --git a/node/core/candidate-validation/src/lib.rs b/node/core/candidate-validation/src/lib.rs index 7d9db4f3d794..70fc24eacade 100644 --- a/node/core/candidate-validation/src/lib.rs +++ b/node/core/candidate-validation/src/lib.rs @@ -320,12 +320,12 @@ where match validation_backend.precheck_pvf(validation_code).await { Ok(_) => PreCheckOutcome::Valid, - Err(prepare_err) => match prepare_err { - PrepareError::Prevalidation(_) | - PrepareError::Preparation(_) | - PrepareError::Panic(_) => PreCheckOutcome::Invalid, - PrepareError::TimedOut | PrepareError::DidNotMakeIt => PreCheckOutcome::Failed, - }, + Err(prepare_err) => + if prepare_err.is_deterministic() { + PreCheckOutcome::Invalid + } else { + PreCheckOutcome::Failed + }, } } @@ -502,7 +502,7 @@ async fn validate_candidate_exhaustive( let _timer = metrics.time_validate_candidate_exhaustive(); let validation_code_hash = validation_code.hash(); - let para_id = candidate_receipt.descriptor.para_id.clone(); + let para_id = candidate_receipt.descriptor.para_id; gum::debug!( target: LOG_TARGET, ?validation_code_hash, @@ -513,7 +513,7 @@ async fn validate_candidate_exhaustive( if let Err(e) = perform_basic_checks( &candidate_receipt.descriptor, persisted_validation_data.max_pov_size, - &*pov, + &pov, &validation_code_hash, ) { gum::info!(target: LOG_TARGET, ?para_id, "Invalid candidate (basic checks)"); @@ -638,7 +638,7 @@ trait ValidationBackend { } } - async fn precheck_pvf(&mut self, pvf: Pvf) -> Result<(), PrepareError>; + async fn precheck_pvf(&mut self, pvf: Pvf) -> Result; } #[async_trait] @@ -664,13 +664,14 @@ impl ValidationBackend for ValidationHost { .map_err(|_| ValidationError::InternalError("validation was cancelled".into()))? } - async fn precheck_pvf(&mut self, pvf: Pvf) -> Result<(), PrepareError> { + async fn precheck_pvf(&mut self, pvf: Pvf) -> Result { let (tx, rx) = oneshot::channel(); if let Err(_) = self.precheck_pvf(pvf, tx).await { - return Err(PrepareError::DidNotMakeIt) + // Return an IO error if there was an error communicating with the host. + return Err(PrepareError::IoErr) } - let precheck_result = rx.await.or(Err(PrepareError::DidNotMakeIt))?; + let precheck_result = rx.await.or(Err(PrepareError::IoErr))?; precheck_result } diff --git a/node/core/candidate-validation/src/tests.rs b/node/core/candidate-validation/src/tests.rs index cf467cd5c057..c6003c734973 100644 --- a/node/core/candidate-validation/src/tests.rs +++ b/node/core/candidate-validation/src/tests.rs @@ -377,7 +377,7 @@ impl ValidationBackend for MockValidateCandidateBackend { result } - async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result<(), PrepareError> { + async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result { unreachable!() } } @@ -894,11 +894,11 @@ fn pov_decompression_failure_is_invalid() { } struct MockPreCheckBackend { - result: Result<(), PrepareError>, + result: Result, } impl MockPreCheckBackend { - fn with_hardcoded_result(result: Result<(), PrepareError>) -> Self { + fn with_hardcoded_result(result: Result) -> Self { Self { result } } } @@ -914,7 +914,7 @@ impl ValidationBackend for MockPreCheckBackend { unreachable!() } - async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result<(), PrepareError> { + async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result { self.result.clone() } } @@ -931,7 +931,7 @@ fn precheck_works() { let (check_fut, check_result) = precheck_pvf( ctx.sender(), - MockPreCheckBackend::with_hardcoded_result(Ok(())), + MockPreCheckBackend::with_hardcoded_result(Ok(Duration::default())), relay_parent, validation_code_hash, ) @@ -977,7 +977,7 @@ fn precheck_invalid_pvf_blob_compression() { let (check_fut, check_result) = precheck_pvf( ctx.sender(), - MockPreCheckBackend::with_hardcoded_result(Ok(())), + MockPreCheckBackend::with_hardcoded_result(Ok(Duration::default())), relay_parent, validation_code_hash, ) @@ -1053,5 +1053,5 @@ fn precheck_properly_classifies_outcomes() { inner(Err(PrepareError::Panic("baz".to_owned())), PreCheckOutcome::Invalid); inner(Err(PrepareError::TimedOut), PreCheckOutcome::Failed); - inner(Err(PrepareError::DidNotMakeIt), PreCheckOutcome::Failed); + inner(Err(PrepareError::IoErr), PreCheckOutcome::Failed); } diff --git a/node/core/chain-api/Cargo.toml b/node/core/chain-api/Cargo.toml index 19cff83c9fdf..571b840120f7 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-chain-api" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/core/chain-api/src/lib.rs b/node/core/chain-api/src/lib.rs index 7205527982c1..b218c00c57e5 100644 --- a/node/core/chain-api/src/lib.rs +++ b/node/core/chain-api/src/lib.rs @@ -41,7 +41,7 @@ use polkadot_node_subsystem::{ messages::ChainApiMessage, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; -use polkadot_primitives::v2::{Block, BlockId}; +use polkadot_primitives::v2::Block; mod metrics; use self::metrics::Metrics; @@ -99,10 +99,7 @@ where }, ChainApiMessage::BlockHeader(hash, response_channel) => { let _timer = subsystem.metrics.time_block_header(); - let result = subsystem - .client - .header(BlockId::Hash(hash)) - .map_err(|e| e.to_string().into()); + let result = subsystem.client.header(hash).map_err(|e| e.to_string().into()); subsystem.metrics.on_request(result.is_ok()); let _ = response_channel.send(result); }, @@ -134,7 +131,7 @@ where let mut hash = hash; let next_parent = core::iter::from_fn(|| { - let maybe_header = subsystem.client.header(BlockId::Hash(hash)); + let maybe_header = subsystem.client.header(hash); match maybe_header { // propagate the error Err(e) => { diff --git a/node/core/chain-api/src/tests.rs b/node/core/chain-api/src/tests.rs index aa24b3621200..654458757e70 100644 --- a/node/core/chain-api/src/tests.rs +++ b/node/core/chain-api/src/tests.rs @@ -6,7 +6,7 @@ use std::collections::BTreeMap; use polkadot_node_primitives::BlockWeight; use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle}; -use polkadot_primitives::v2::{BlockId, BlockNumber, Hash, Header}; +use polkadot_primitives::v2::{BlockNumber, Hash, Header}; use sp_blockchain::Info as BlockInfo; use sp_core::testing::TaskExecutor; @@ -117,16 +117,14 @@ impl HeaderBackend for TestClient { fn hash(&self, number: BlockNumber) -> sp_blockchain::Result> { Ok(self.finalized_blocks.get(&number).copied()) } - fn header(&self, id: BlockId) -> sp_blockchain::Result> { - match id { - // for error path testing - BlockId::Hash(hash) if hash.is_zero() => - Err(sp_blockchain::Error::Backend("Zero hashes are illegal!".into())), - BlockId::Hash(hash) => Ok(self.headers.get(&hash).cloned()), - _ => unreachable!(), + fn header(&self, hash: Hash) -> sp_blockchain::Result> { + if hash.is_zero() { + Err(sp_blockchain::Error::Backend("Zero hashes are illegal!".into())) + } else { + Ok(self.headers.get(&hash).cloned()) } } - fn status(&self, _id: BlockId) -> sp_blockchain::Result { + fn status(&self, _hash: Hash) -> sp_blockchain::Result { unimplemented!() } } @@ -203,10 +201,8 @@ fn request_block_header() { test_harness(|client, mut sender| { async move { const NOT_HERE: Hash = Hash::repeat_byte(0x5); - let test_cases = [ - (TWO, client.header(BlockId::Hash(TWO)).unwrap()), - (NOT_HERE, client.header(BlockId::Hash(NOT_HERE)).unwrap()), - ]; + let test_cases = + [(TWO, client.header(TWO).unwrap()), (NOT_HERE, client.header(NOT_HERE).unwrap())]; for (hash, expected) in &test_cases { let (tx, rx) = oneshot::channel(); diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index 1e505a4df98d..8d4145461b94 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-core-chain-selection" description = "Chain Selection Subsystem" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" @@ -13,7 +13,7 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -kvdb = "0.12.0" +kvdb = "0.13.0" thiserror = "1.0.31" parity-scale-codec = "3.1.5" @@ -22,4 +22,4 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } parking_lot = "0.12.0" assert_matches = "1" -kvdb-memorydb = "0.12.0" +kvdb-memorydb = "0.13.0" diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index e5ffe6811d6e..786454fb9891 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -381,6 +381,7 @@ async fn run( ) where B: Backend, { + #![allow(clippy::all)] loop { let res = run_until_error( &mut ctx, diff --git a/node/core/dispute-coordinator/Cargo.toml b/node/core/dispute-coordinator/Cargo.toml index 19eff42d4ad3..2ecc4d5e331f 100644 --- a/node/core/dispute-coordinator/Cargo.toml +++ b/node/core/dispute-coordinator/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } parity-scale-codec = "3.1.5" -kvdb = "0.12.0" +kvdb = "0.13.0" thiserror = "1.0.31" lru = "0.8.0" fatality = "0.0.6" @@ -22,7 +22,7 @@ sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "maste [dev-dependencies] -kvdb-memorydb = "0.12.0" +kvdb-memorydb = "0.13.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/dispute-coordinator/src/db/v1.rs b/node/core/dispute-coordinator/src/db/v1.rs index bb1456a59745..ab571108af37 100644 --- a/node/core/dispute-coordinator/src/db/v1.rs +++ b/node/core/dispute-coordinator/src/db/v1.rs @@ -32,7 +32,7 @@ use crate::{ backend::{Backend, BackendWriteOp, OverlayedBackend}, error::{FatalError, FatalResult}, metrics::Metrics, - DISPUTE_WINDOW, LOG_TARGET, + LOG_TARGET, }; const RECENT_DISPUTES_KEY: &[u8; 15] = b"recent-disputes"; @@ -318,25 +318,24 @@ pub(crate) fn load_recent_disputes( /// /// If one or more ancient sessions are pruned, all metadata on candidates within the ancient /// session will be deleted. -pub(crate) fn note_current_session( +pub(crate) fn note_earliest_session( overlay_db: &mut OverlayedBackend<'_, impl Backend>, - current_session: SessionIndex, + new_earliest_session: SessionIndex, ) -> SubsystemResult<()> { - let new_earliest = current_session.saturating_sub(DISPUTE_WINDOW.get()); match overlay_db.load_earliest_session()? { None => { // First launch - write new-earliest. - overlay_db.write_earliest_session(new_earliest); + overlay_db.write_earliest_session(new_earliest_session); }, - Some(prev_earliest) if new_earliest > prev_earliest => { + Some(prev_earliest) if new_earliest_session > prev_earliest => { // Prune all data in the outdated sessions. - overlay_db.write_earliest_session(new_earliest); + overlay_db.write_earliest_session(new_earliest_session); // Clear recent disputes metadata. { let mut recent_disputes = overlay_db.load_recent_disputes()?.unwrap_or_default(); - let lower_bound = (new_earliest, CandidateHash(Hash::repeat_byte(0x00))); + let lower_bound = (new_earliest_session, CandidateHash(Hash::repeat_byte(0x00))); let new_recent_disputes = recent_disputes.split_off(&lower_bound); // Any remanining disputes are considered ancient and must be pruned. @@ -373,6 +372,7 @@ mod tests { use super::*; use ::test_helpers::{dummy_candidate_receipt, dummy_hash}; + use polkadot_node_primitives::DISPUTE_WINDOW; use polkadot_primitives::v2::{Hash, Id as ParaId}; fn make_db() -> DbBackend { @@ -422,7 +422,7 @@ mod tests { let mut overlay_db = OverlayedBackend::new(&backend); gum::trace!(target: LOG_TARGET, ?current_session, "Noting current session"); - note_current_session(&mut overlay_db, current_session).unwrap(); + note_earliest_session(&mut overlay_db, earliest_session).unwrap(); let write_ops = overlay_db.into_write_ops(); backend.write(write_ops).unwrap(); @@ -442,7 +442,7 @@ mod tests { let current_session = current_session + 1; let earliest_session = earliest_session + 1; - note_current_session(&mut overlay_db, current_session).unwrap(); + note_earliest_session(&mut overlay_db, earliest_session).unwrap(); let write_ops = overlay_db.into_write_ops(); backend.write(write_ops).unwrap(); @@ -599,7 +599,7 @@ mod tests { } #[test] - fn note_current_session_prunes_old() { + fn note_earliest_session_prunes_old() { let mut backend = make_db(); let hash_a = CandidateHash(Hash::repeat_byte(0x0a)); @@ -648,7 +648,7 @@ mod tests { backend.write(write_ops).unwrap(); let mut overlay_db = OverlayedBackend::new(&backend); - note_current_session(&mut overlay_db, current_session).unwrap(); + note_earliest_session(&mut overlay_db, new_earliest_session).unwrap(); assert_eq!(overlay_db.load_earliest_session().unwrap(), Some(new_earliest_session)); diff --git a/node/core/dispute-coordinator/src/import.rs b/node/core/dispute-coordinator/src/import.rs index c0f0d3d9e009..84adae167c7a 100644 --- a/node/core/dispute-coordinator/src/import.rs +++ b/node/core/dispute-coordinator/src/import.rs @@ -28,7 +28,9 @@ use std::collections::{BTreeMap, HashMap, HashSet}; -use polkadot_node_primitives::{CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp}; +use polkadot_node_primitives::{ + disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp, +}; use polkadot_node_subsystem_util::rolling_session_window::RollingSessionWindow; use polkadot_primitives::v2::{ CandidateReceipt, DisputeStatement, IndexedVec, SessionIndex, SessionInfo, @@ -101,7 +103,7 @@ impl OwnVoteState { let mut our_valid_votes = env .controlled_indices() .iter() - .filter_map(|i| votes.valid.get_key_value(i)) + .filter_map(|i| votes.valid.raw().get_key_value(i)) .peekable(); let mut our_invalid_votes = env.controlled_indices.iter().filter_map(|i| votes.invalid.get_key_value(i)); @@ -163,13 +165,16 @@ impl CandidateVoteState { /// /// in case there have not been any previous votes. pub fn new_from_receipt(candidate_receipt: CandidateReceipt) -> Self { - let votes = - CandidateVotes { candidate_receipt, valid: BTreeMap::new(), invalid: BTreeMap::new() }; + let votes = CandidateVotes { + candidate_receipt, + valid: ValidCandidateVotes::new(), + invalid: BTreeMap::new(), + }; Self { votes, own_vote: OwnVoteState::NoVote, dispute_status: None } } /// Create a new `CandidateVoteState` from already existing votes. - pub fn new<'a>(votes: CandidateVotes, env: &CandidateEnvironment<'a>, now: Timestamp) -> Self { + pub fn new(votes: CandidateVotes, env: &CandidateEnvironment, now: Timestamp) -> Self { let own_vote = OwnVoteState::new(&votes, env); let n_validators = env.validators().len(); @@ -178,7 +183,7 @@ impl CandidateVoteState { polkadot_primitives::v2::supermajority_threshold(n_validators); // We have a dispute, if we have votes on both sides: - let is_disputed = !votes.invalid.is_empty() && !votes.valid.is_empty(); + let is_disputed = !votes.invalid.is_empty() && !votes.valid.raw().is_empty(); let dispute_status = if is_disputed { let mut status = DisputeStatus::active(); @@ -187,7 +192,7 @@ impl CandidateVoteState { if is_confirmed { status = status.confirm(); }; - let concluded_for = votes.valid.len() >= supermajority_threshold; + let concluded_for = votes.valid.raw().len() >= supermajority_threshold; if concluded_for { status = status.conclude_for(now); }; @@ -262,25 +267,20 @@ impl CandidateVoteState { match statement.statement() { DisputeStatement::Valid(valid_kind) => { - let fresh = insert_into_statements( - &mut votes.valid, - *valid_kind, + let fresh = votes.valid.insert_vote( val_index, + *valid_kind, statement.into_validator_signature(), ); - if fresh { imported_valid_votes += 1; } }, DisputeStatement::Invalid(invalid_kind) => { - let fresh = insert_into_statements( - &mut votes.invalid, - *invalid_kind, - val_index, - statement.into_validator_signature(), - ); - + let fresh = votes + .invalid + .insert(val_index, (*invalid_kind, statement.into_validator_signature())) + .is_none(); if fresh { new_invalid_voters.push(val_index); imported_invalid_votes += 1; @@ -481,12 +481,7 @@ impl ImportResult { }, "Signature check for imported approval votes failed! This is a serious bug. Session: {:?}, candidate hash: {:?}, validator index: {:?}", env.session_index(), votes.candidate_receipt.hash(), index ); - if insert_into_statements( - &mut votes.valid, - ValidDisputeStatementKind::ApprovalChecking, - index, - sig, - ) { + if votes.valid.insert_vote(index, ValidDisputeStatementKind::ApprovalChecking, sig) { imported_valid_votes += 1; imported_approval_votes += 1; } @@ -535,14 +530,3 @@ fn find_controlled_validator_indices( controlled } - -// Returns 'true' if no other vote by that validator was already -// present and 'false' otherwise. Same semantics as `HashSet`. -fn insert_into_statements( - m: &mut BTreeMap, - tag: T, - val_index: ValidatorIndex, - val_signature: ValidatorSignature, -) -> bool { - m.insert(val_index, (tag, val_signature)).is_none() -} diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index ab9faca39868..9f4415ba36a6 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -26,8 +26,8 @@ use futures::{ use sc_keystore::LocalKeystore; use polkadot_node_primitives::{ - CandidateVotes, DisputeMessage, DisputeMessageCheckError, DisputeStatus, - SignedDisputeStatement, Timestamp, DISPUTE_WINDOW, + disputes::ValidCandidateVotes, CandidateVotes, DisputeMessage, DisputeMessageCheckError, + DisputeStatus, SignedDisputeStatement, Timestamp, }; use polkadot_node_subsystem::{ messages::{ @@ -269,8 +269,13 @@ impl Initialized { update: ActiveLeavesUpdate, now: u64, ) -> Result<()> { - let on_chain_votes = + let scraped_updates = self.scraper.process_active_leaves_update(ctx.sender(), &update).await?; + log_error( + self.participation + .bump_to_priority_for_candidates(ctx, &scraped_updates.included_receipts) + .await, + )?; self.participation.process_active_leaves_update(ctx, &update).await?; if let Some(new_leaf) = update.activated { @@ -299,7 +304,7 @@ impl Initialized { self.highest_session = session; - db::v1::note_current_session(overlay_db, session)?; + db::v1::note_earliest_session(overlay_db, new_window_start)?; self.spam_slots.prune_old(new_window_start); } }, @@ -308,7 +313,7 @@ impl Initialized { // The `runtime-api` subsystem has an internal queue which serializes the execution, // so there is no point in running these in parallel. - for votes in on_chain_votes { + for votes in scraped_updates.on_chain_votes { let _ = self.process_on_chain_votes(ctx, overlay_db, votes, now).await.map_err( |error| { gum::warn!( @@ -416,6 +421,8 @@ impl Initialized { }) .collect(); + // Importantly, handling import statements for backing votes also + // clears spam slots for any newly backed candidates let import_result = self .handle_import_statements( ctx, @@ -708,25 +715,27 @@ impl Initialized { now: Timestamp, ) -> Result { gum::trace!(target: LOG_TARGET, ?statements, "In handle import statements"); - if session + DISPUTE_WINDOW.get() < self.highest_session { - // It is not valid to participate in an ancient dispute (spam?). + if !self.rolling_session_window.contains(session) { + // It is not valid to participate in an ancient dispute (spam?) or too new. return Ok(ImportStatementsResult::InvalidImport) } - let env = - match CandidateEnvironment::new(&*self.keystore, &self.rolling_session_window, session) - { - None => { - gum::warn!( - target: LOG_TARGET, - session, - "We are lacking a `SessionInfo` for handling import of statements." - ); + let env = match CandidateEnvironment::new( + &self.keystore, + &self.rolling_session_window, + session, + ) { + None => { + gum::warn!( + target: LOG_TARGET, + session, + "We are lacking a `SessionInfo` for handling import of statements." + ); - return Ok(ImportStatementsResult::InvalidImport) - }, - Some(env) => env, - }; + return Ok(ImportStatementsResult::InvalidImport) + }, + Some(env) => env, + }; let candidate_hash = candidate_receipt.hash(); @@ -805,7 +814,14 @@ impl Initialized { ); intermediate_result }, - Ok(votes) => intermediate_result.import_approval_votes(&env, votes, now), + Ok(votes) => { + gum::trace!( + target: LOG_TARGET, + count = votes.len(), + "Successfully received approval votes." + ); + intermediate_result.import_approval_votes(&env, votes, now) + }, } } else { gum::trace!( @@ -828,8 +844,15 @@ impl Initialized { let new_state = import_result.new_state(); let is_included = self.scraper.is_candidate_included(&candidate_hash); - - let potential_spam = !is_included && !new_state.is_confirmed() && !new_state.has_own_vote(); + let is_backed = self.scraper.is_candidate_backed(&candidate_hash); + let has_own_vote = new_state.has_own_vote(); + let is_disputed = new_state.is_disputed(); + let has_controlled_indices = !env.controlled_indices().is_empty(); + let is_confirmed = new_state.is_confirmed(); + let potential_spam = + !is_included && !is_backed && !new_state.is_confirmed() && !new_state.has_own_vote(); + // We participate only in disputes which are included, backed or confirmed + let allow_participation = is_included || is_backed || is_confirmed; gum::trace!( target: LOG_TARGET, @@ -842,8 +865,11 @@ impl Initialized { "Is spam?" ); + // This check is responsible for all clearing of spam slots. It runs + // whenever a vote is imported from on or off chain, and decrements + // slots whenever a candidate is newly backed, confirmed, or has our + // own vote. if !potential_spam { - // Former spammers have not been spammers after all: self.spam_slots.clear(&(session, candidate_hash)); // Potential spam: @@ -871,14 +897,6 @@ impl Initialized { } } - let has_own_vote = new_state.has_own_vote(); - let is_disputed = new_state.is_disputed(); - let has_controlled_indices = !env.controlled_indices().is_empty(); - let is_backed = self.scraper.is_candidate_backed(&candidate_hash); - let is_confirmed = new_state.is_confirmed(); - // We participate only in disputes which are included, backed or confirmed - let allow_participation = is_included || is_backed || is_confirmed; - // Participate in dispute if we did not cast a vote before and actually have keys to cast a // local vote. Disputes should fall in one of the categories below, otherwise we will refrain // from participation: @@ -1022,7 +1040,7 @@ impl Initialized { imported_approval_votes = ?import_result.imported_approval_votes(), imported_valid_votes = ?import_result.imported_valid_votes(), imported_invalid_votes = ?import_result.imported_invalid_votes(), - total_valid_votes = ?import_result.new_state().votes().valid.len(), + total_valid_votes = ?import_result.new_state().votes().valid.raw().len(), total_invalid_votes = ?import_result.new_state().votes().invalid.len(), confirmed = ?import_result.new_state().is_confirmed(), "Import summary" @@ -1075,27 +1093,29 @@ impl Initialized { "Issuing local statement for candidate!" ); // Load environment: - let env = - match CandidateEnvironment::new(&*self.keystore, &self.rolling_session_window, session) - { - None => { - gum::warn!( - target: LOG_TARGET, - session, - "Missing info for session which has an active dispute", - ); + let env = match CandidateEnvironment::new( + &self.keystore, + &self.rolling_session_window, + session, + ) { + None => { + gum::warn!( + target: LOG_TARGET, + session, + "Missing info for session which has an active dispute", + ); - return Ok(()) - }, - Some(env) => env, - }; + return Ok(()) + }, + Some(env) => env, + }; let votes = overlay_db .load_candidate_votes(session, &candidate_hash)? .map(CandidateVotes::from) .unwrap_or_else(|| CandidateVotes { candidate_receipt: candidate_receipt.clone(), - valid: BTreeMap::new(), + valid: ValidCandidateVotes::new(), invalid: BTreeMap::new(), }); @@ -1257,7 +1277,7 @@ fn make_dispute_message( votes.invalid.iter().next().ok_or(DisputeMessageCreationError::NoOppositeVote)?; let other_vote = SignedDisputeStatement::new_checked( DisputeStatement::Invalid(*statement_kind), - our_vote.candidate_hash().clone(), + *our_vote.candidate_hash(), our_vote.session_index(), validators .get(*validator_index) @@ -1268,11 +1288,15 @@ fn make_dispute_message( .map_err(|()| DisputeMessageCreationError::InvalidStoredStatement)?; (our_vote, our_index, other_vote, *validator_index) } else { - let (validator_index, (statement_kind, validator_signature)) = - votes.valid.iter().next().ok_or(DisputeMessageCreationError::NoOppositeVote)?; + let (validator_index, (statement_kind, validator_signature)) = votes + .valid + .raw() + .iter() + .next() + .ok_or(DisputeMessageCreationError::NoOppositeVote)?; let other_vote = SignedDisputeStatement::new_checked( DisputeStatement::Valid(*statement_kind), - our_vote.candidate_hash().clone(), + *our_vote.candidate_hash(), our_vote.session_index(), validators .get(*validator_index) diff --git a/node/core/dispute-coordinator/src/lib.rs b/node/core/dispute-coordinator/src/lib.rs index 09d6c621b999..e7ac66ce2ece 100644 --- a/node/core/dispute-coordinator/src/lib.rs +++ b/node/core/dispute-coordinator/src/lib.rs @@ -30,7 +30,7 @@ use futures::FutureExt; use sc_keystore::LocalKeystore; -use polkadot_node_primitives::{CandidateVotes, DISPUTE_WINDOW}; +use polkadot_node_primitives::CandidateVotes; use polkadot_node_subsystem::{ overseer, ActivatedLeaf, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; @@ -272,7 +272,7 @@ impl DisputeCoordinatorSubsystem { ChainScraper, )> { // Prune obsolete disputes: - db::v1::note_current_session(overlay_db, rolling_session_window.latest_session())?; + db::v1::note_earliest_session(overlay_db, rolling_session_window.earliest_session())?; let active_disputes = match overlay_db.load_recent_disputes() { Ok(Some(disputes)) => diff --git a/node/core/dispute-coordinator/src/participation/mod.rs b/node/core/dispute-coordinator/src/participation/mod.rs index 874f37e63213..7167bc7e26e8 100644 --- a/node/core/dispute-coordinator/src/participation/mod.rs +++ b/node/core/dispute-coordinator/src/participation/mod.rs @@ -51,7 +51,10 @@ pub use queues::{ParticipationPriority, ParticipationRequest, QueueError}; /// This should be a relatively low value, while we might have a speedup once we fetched the data, /// due to multi-core architectures, but the fetching itself can not be improved by parallel /// requests. This means that higher numbers make it harder for a single dispute to resolve fast. +#[cfg(not(test))] const MAX_PARALLEL_PARTICIPATIONS: usize = 3; +#[cfg(test)] +pub(crate) const MAX_PARALLEL_PARTICIPATIONS: usize = 1; /// Keep track of disputes we need to participate in. /// @@ -212,6 +215,19 @@ impl Participation { Ok(()) } + /// Moving any request concerning the given candidates from best-effort to + /// priority, ignoring any candidates that don't have any queued participation requests. + pub async fn bump_to_priority_for_candidates( + &mut self, + ctx: &mut Context, + included_receipts: &Vec, + ) -> Result<()> { + for receipt in included_receipts { + self.queue.prioritize_if_present(ctx.sender(), receipt).await?; + } + Ok(()) + } + /// Dequeue until `MAX_PARALLEL_PARTICIPATIONS` is reached. async fn dequeue_until_capacity( &mut self, @@ -235,7 +251,7 @@ impl Participation { req: ParticipationRequest, recent_head: Hash, ) -> FatalResult<()> { - if self.running_participations.insert(req.candidate_hash().clone()) { + if self.running_participations.insert(*req.candidate_hash()) { let sender = ctx.sender().clone(); ctx.spawn( "participation-worker", diff --git a/node/core/dispute-coordinator/src/participation/queues/mod.rs b/node/core/dispute-coordinator/src/participation/queues/mod.rs index 3ec217628625..3452470efcb5 100644 --- a/node/core/dispute-coordinator/src/participation/queues/mod.rs +++ b/node/core/dispute-coordinator/src/participation/queues/mod.rs @@ -14,10 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use std::{ - cmp::Ordering, - collections::{BTreeMap, HashMap}, -}; +use std::{cmp::Ordering, collections::BTreeMap}; use futures::channel::oneshot; use polkadot_node_subsystem::{messages::ChainApiMessage, overseer}; @@ -50,25 +47,14 @@ const PRIORITY_QUEUE_SIZE: usize = 20_000; #[cfg(test)] const PRIORITY_QUEUE_SIZE: usize = 2; -/// Type for counting how often a candidate was added to the best effort queue. -type BestEffortCount = u32; - /// Queues for dispute participation. +/// In both queues we have a strict ordering of candidates and participation will +/// happen in that order. Refer to `CandidateComparator` for details on the ordering. pub struct Queues { /// Set of best effort participation requests. - /// - /// Note that as size is limited to `BEST_EFFORT_QUEUE_SIZE` we simply do a linear search for - /// the entry with the highest `added_count` to determine what dispute to participate next in. - /// - /// This mechanism leads to an amplifying effect - the more validators already participated, - /// the more likely it becomes that more validators will participate soon, which should lead to - /// a quick resolution of disputes, even in the best effort queue. - best_effort: HashMap, + best_effort: BTreeMap, /// Priority queue. - /// - /// In the priority queue, we have a strict ordering of candidates and participation will - /// happen in that order. priority: BTreeMap, } @@ -143,14 +129,13 @@ impl ParticipationRequest { impl Queues { /// Create new `Queues`. pub fn new() -> Self { - Self { best_effort: HashMap::new(), priority: BTreeMap::new() } + Self { best_effort: BTreeMap::new(), priority: BTreeMap::new() } } /// Will put message in queue, either priority or best effort depending on priority. /// /// If the message was already previously present on best effort, it will be moved to priority - /// if it considered priority now, otherwise the `added_count` on the best effort queue will be - /// bumped. + /// if it is considered priority now. /// /// Returns error in case a queue was found full already. pub async fn queue( @@ -159,94 +144,101 @@ impl Queues { priority: ParticipationPriority, req: ParticipationRequest, ) -> Result<()> { - let comparator = match priority { - ParticipationPriority::BestEffort => None, - ParticipationPriority::Priority => - CandidateComparator::new(sender, &req.candidate_receipt).await?, - }; - self.queue_with_comparator(comparator, req)?; + let comparator = CandidateComparator::new(sender, &req.candidate_receipt).await?; + + self.queue_with_comparator(comparator, priority, req)?; Ok(()) } - /// Get the next best request for dispute participation - /// - /// if any. Priority queue is always considered first, then the best effort queue based on - /// `added_count`. + /// Get the next best request for dispute participation if any. + /// First the priority queue is considered and then the best effort one. pub fn dequeue(&mut self) -> Option { if let Some(req) = self.pop_priority() { - // In case a candidate became best effort over time, we might have it also queued in - // the best effort queue - get rid of any such entry: - self.best_effort.remove(req.candidate_hash()); - return Some(req) + return Some(req.1) } - self.pop_best_effort() + self.pop_best_effort().map(|d| d.1) + } + + /// Reprioritizes any participation requests pertaining to the + /// passed candidates from best effort to priority. + pub async fn prioritize_if_present( + &mut self, + sender: &mut impl overseer::DisputeCoordinatorSenderTrait, + receipt: &CandidateReceipt, + ) -> Result<()> { + let comparator = CandidateComparator::new(sender, receipt).await?; + self.prioritize_with_comparator(comparator)?; + Ok(()) + } + + fn prioritize_with_comparator( + &mut self, + comparator: CandidateComparator, + ) -> std::result::Result<(), QueueError> { + if self.priority.len() >= PRIORITY_QUEUE_SIZE { + return Err(QueueError::PriorityFull) + } + if let Some(request) = self.best_effort.remove(&comparator) { + self.priority.insert(comparator, request); + } + Ok(()) } fn queue_with_comparator( &mut self, - comparator: Option, + comparator: CandidateComparator, + priority: ParticipationPriority, req: ParticipationRequest, ) -> std::result::Result<(), QueueError> { - if let Some(comparator) = comparator { + if priority.is_priority() { if self.priority.len() >= PRIORITY_QUEUE_SIZE { return Err(QueueError::PriorityFull) } // Remove any best effort entry: - self.best_effort.remove(&req.candidate_hash); + self.best_effort.remove(&comparator); self.priority.insert(comparator, req); } else { + if self.priority.contains_key(&comparator) { + // The candidate is already in priority queue - don't + // add in in best effort too. + return Ok(()) + } if self.best_effort.len() >= BEST_EFFORT_QUEUE_SIZE { return Err(QueueError::BestEffortFull) } - // Note: The request might have been added to priority in a previous call already, we - // take care of that case in `dequeue` (more efficient). - self.best_effort - .entry(req.candidate_hash) - .or_insert(BestEffortEntry { req, added_count: 0 }) - .added_count += 1; + self.best_effort.insert(comparator, req); } Ok(()) } - /// Get the next best from the best effort queue. - /// - /// If there are multiple best - just pick one. - fn pop_best_effort(&mut self) -> Option { - let best = self.best_effort.iter().reduce(|(hash1, entry1), (hash2, entry2)| { - if entry1.added_count > entry2.added_count { - (hash1, entry1) - } else { - (hash2, entry2) - } - }); - if let Some((best_hash, _)) = best { - let best_hash = best_hash.clone(); - self.best_effort.remove(&best_hash).map(|e| e.req) - } else { - None - } + /// Get best from the best effort queue. + fn pop_best_effort(&mut self) -> Option<(CandidateComparator, ParticipationRequest)> { + return Self::pop_impl(&mut self.best_effort) } /// Get best priority queue entry. - fn pop_priority(&mut self) -> Option { + fn pop_priority(&mut self) -> Option<(CandidateComparator, ParticipationRequest)> { + return Self::pop_impl(&mut self.priority) + } + + // `pop_best_effort` and `pop_priority` do the same but on different `BTreeMap`s. This function has + // the extracted implementation + fn pop_impl( + target: &mut BTreeMap, + ) -> Option<(CandidateComparator, ParticipationRequest)> { // Once https://github.com/rust-lang/rust/issues/62924 is there, we can use a simple: - // priority.pop_first(). - if let Some((comparator, _)) = self.priority.iter().next() { - let comparator = comparator.clone(); - self.priority.remove(&comparator) + // target.pop_first(). + if let Some((comparator, _)) = target.iter().next() { + let comparator = *comparator; + target + .remove(&comparator) + .map(|participation_request| (comparator, participation_request)) } else { None } } } -/// Entry for the best effort queue. -struct BestEffortEntry { - req: ParticipationRequest, - /// How often was the above request added to the queue. - added_count: BestEffortCount, -} - /// `Comparator` for ordering of disputes for candidates. /// /// This `comparator` makes it possible to order disputes based on age and to ensure some fairness @@ -266,9 +258,12 @@ struct BestEffortEntry { #[derive(Copy, Clone)] #[cfg_attr(test, derive(Debug))] struct CandidateComparator { - /// Block number of the relay parent. + /// Block number of the relay parent. It's wrapped in an `Option<>` because there are cases when + /// it can't be obtained. For example when the node is lagging behind and new leaves are received + /// with a slight delay. Candidates with unknown relay parent are treated with the lowest priority. /// - /// Important, so we will be participating in oldest disputes first. + /// The order enforced by `CandidateComparator` is important because we want to participate in + /// the oldest disputes first. /// /// Note: In theory it would make more sense to use the `BlockNumber` of the including /// block, as inclusion time is the actual relevant event when it comes to ordering. The @@ -277,8 +272,10 @@ struct CandidateComparator { /// just using the lowest `BlockNumber` of all available including blocks - the problem is, /// that is not stable. If a new fork appears after the fact, we would start ordering the same /// candidate differently, which would result in the same candidate getting queued twice. - relay_parent_block_number: BlockNumber, - /// By adding the `CandidateHash`, we can guarantee a unique ordering across candidates. + relay_parent_block_number: Option, + /// By adding the `CandidateHash`, we can guarantee a unique ordering across candidates with the + /// same relay parent block number. Candidates without `relay_parent_block_number` are ordered by + /// the `candidate_hash` (and treated with the lowest priority, as already mentioned). candidate_hash: CandidateHash, } @@ -287,33 +284,35 @@ impl CandidateComparator { /// /// Useful for testing. #[cfg(test)] - pub fn new_dummy(block_number: BlockNumber, candidate_hash: CandidateHash) -> Self { + pub fn new_dummy(block_number: Option, candidate_hash: CandidateHash) -> Self { Self { relay_parent_block_number: block_number, candidate_hash } } /// Create a candidate comparator for a given candidate. /// /// Returns: - /// `Ok(None)` in case we could not lookup the candidate's relay parent, returns a - /// `FatalError` in case the chain API call fails with an unexpected error. + /// - `Ok(CandidateComparator{Some(relay_parent_block_number), candidate_hash})` when the + /// relay parent can be obtained. This is the happy case. + /// - `Ok(CandidateComparator{None, candidate_hash})` in case the candidate's relay parent + /// can't be obtained. + /// - `FatalError` in case the chain API call fails with an unexpected error. pub async fn new( sender: &mut impl overseer::DisputeCoordinatorSenderTrait, candidate: &CandidateReceipt, - ) -> FatalResult> { + ) -> FatalResult { let candidate_hash = candidate.hash(); - let n = match get_block_number(sender, candidate.descriptor().relay_parent).await? { - None => { - gum::warn!( - target: LOG_TARGET, - candidate_hash = ?candidate_hash, - "Candidate's relay_parent could not be found via chain API - `CandidateComparator could not be provided!" - ); - return Ok(None) - }, - Some(n) => n, - }; + let n = get_block_number(sender, candidate.descriptor().relay_parent).await?; + + if n.is_none() { + gum::warn!( + target: LOG_TARGET, + candidate_hash = ?candidate_hash, + "Candidate's relay_parent could not be found via chain API - `CandidateComparator` \ + with an empty relay parent block number will be provided!" + ); + } - Ok(Some(CandidateComparator { relay_parent_block_number: n, candidate_hash })) + Ok(CandidateComparator { relay_parent_block_number: n, candidate_hash }) } } @@ -333,11 +332,28 @@ impl PartialOrd for CandidateComparator { impl Ord for CandidateComparator { fn cmp(&self, other: &Self) -> Ordering { - match self.relay_parent_block_number.cmp(&other.relay_parent_block_number) { - Ordering::Equal => (), - o => return o, + return match (self.relay_parent_block_number, other.relay_parent_block_number) { + (None, None) => { + // No relay parents for both -> compare hashes + self.candidate_hash.cmp(&other.candidate_hash) + }, + (Some(self_relay_parent_block_num), Some(other_relay_parent_block_num)) => { + match self_relay_parent_block_num.cmp(&other_relay_parent_block_num) { + // if the relay parent is the same for both -> compare hashes + Ordering::Equal => self.candidate_hash.cmp(&other.candidate_hash), + // if not - return the result from comparing the relay parent block numbers + o => return o, + } + }, + (Some(_), None) => { + // Candidates with known relay parents are always with priority + Ordering::Less + }, + (None, Some(_)) => { + // Ditto + Ordering::Greater + }, } - self.candidate_hash.cmp(&other.candidate_hash) } } diff --git a/node/core/dispute-coordinator/src/participation/queues/tests.rs b/node/core/dispute-coordinator/src/participation/queues/tests.rs index 4e9019ebb499..b6af4bd2b55a 100644 --- a/node/core/dispute-coordinator/src/participation/queues/tests.rs +++ b/node/core/dispute-coordinator/src/participation/queues/tests.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +use crate::ParticipationPriority; use ::test_helpers::{dummy_candidate_receipt, dummy_hash}; use assert_matches::assert_matches; use polkadot_primitives::v2::{BlockNumber, Hash}; @@ -31,15 +32,16 @@ fn make_participation_request(hash: Hash) -> ParticipationRequest { /// Make dummy comparator for request, based on the given block number. fn make_dummy_comparator( req: &ParticipationRequest, - relay_parent: BlockNumber, + relay_parent: Option, ) -> CandidateComparator { CandidateComparator::new_dummy(relay_parent, *req.candidate_hash()) } /// Check that dequeuing acknowledges order. /// -/// Any priority item will be dequeued before any best effort items, priority items will be -/// processed in order. Best effort items, based on how often they have been added. +/// Any priority item will be dequeued before any best effort items, priority and best effort with +/// known parent block number items will be processed in order. Best effort items without known parent +/// block number should be treated with lowest priority. #[test] fn ordering_works_as_expected() { let mut queue = Queues::new(); @@ -47,36 +49,69 @@ fn ordering_works_as_expected() { let req_prio = make_participation_request(Hash::repeat_byte(0x02)); let req3 = make_participation_request(Hash::repeat_byte(0x03)); let req_prio_2 = make_participation_request(Hash::repeat_byte(0x04)); - let req5 = make_participation_request(Hash::repeat_byte(0x05)); + let req5_unknown_parent = make_participation_request(Hash::repeat_byte(0x05)); let req_full = make_participation_request(Hash::repeat_byte(0x06)); let req_prio_full = make_participation_request(Hash::repeat_byte(0x07)); - queue.queue_with_comparator(None, req1.clone()).unwrap(); queue - .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) + .queue_with_comparator( + make_dummy_comparator(&req1, Some(1)), + ParticipationPriority::BestEffort, + req1.clone(), + ) + .unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req_prio, Some(1)), + ParticipationPriority::Priority, + req_prio.clone(), + ) .unwrap(); - queue.queue_with_comparator(None, req3.clone()).unwrap(); queue - .queue_with_comparator(Some(make_dummy_comparator(&req_prio_2, 2)), req_prio_2.clone()) + .queue_with_comparator( + make_dummy_comparator(&req3, Some(2)), + ParticipationPriority::BestEffort, + req3.clone(), + ) + .unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req_prio_2, Some(2)), + ParticipationPriority::Priority, + req_prio_2.clone(), + ) + .unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req5_unknown_parent, None), + ParticipationPriority::BestEffort, + req5_unknown_parent.clone(), + ) .unwrap(); - queue.queue_with_comparator(None, req3.clone()).unwrap(); - queue.queue_with_comparator(None, req5.clone()).unwrap(); assert_matches!( - queue.queue_with_comparator(Some(make_dummy_comparator(&req_prio_full, 3)), req_prio_full), + queue.queue_with_comparator( + make_dummy_comparator(&req_prio_full, Some(3)), + ParticipationPriority::Priority, + req_prio_full + ), Err(QueueError::PriorityFull) ); - assert_matches!(queue.queue_with_comparator(None, req_full), Err(QueueError::BestEffortFull)); + assert_matches!( + queue.queue_with_comparator( + make_dummy_comparator(&req_full, Some(3)), + ParticipationPriority::BestEffort, + req_full + ), + Err(QueueError::BestEffortFull) + ); + // Prioritized queue is ordered correctly assert_eq!(queue.dequeue(), Some(req_prio)); assert_eq!(queue.dequeue(), Some(req_prio_2)); + // So is the best-effort + assert_eq!(queue.dequeue(), Some(req1)); assert_eq!(queue.dequeue(), Some(req3)); - assert_matches!( - queue.dequeue(), - Some(r) => { assert!(r == req1 || r == req5) } - ); - assert_matches!( - queue.dequeue(), - Some(r) => { assert!(r == req1 || r == req5) } - ); + assert_eq!(queue.dequeue(), Some(req5_unknown_parent)); + assert_matches!(queue.dequeue(), None); } @@ -89,23 +124,50 @@ fn candidate_is_only_dequeued_once() { let req_best_effort_then_prio = make_participation_request(Hash::repeat_byte(0x03)); let req_prio_then_best_effort = make_participation_request(Hash::repeat_byte(0x04)); - queue.queue_with_comparator(None, req1.clone()).unwrap(); queue - .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) + .queue_with_comparator( + make_dummy_comparator(&req1, None), + ParticipationPriority::BestEffort, + req1.clone(), + ) + .unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req_prio, Some(1)), + ParticipationPriority::Priority, + req_prio.clone(), + ) .unwrap(); // Insert same best effort again: - queue.queue_with_comparator(None, req1.clone()).unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req1, None), + ParticipationPriority::BestEffort, + req1.clone(), + ) + .unwrap(); // insert same prio again: queue - .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) + .queue_with_comparator( + make_dummy_comparator(&req_prio, Some(1)), + ParticipationPriority::Priority, + req_prio.clone(), + ) .unwrap(); // Insert first as best effort: - queue.queue_with_comparator(None, req_best_effort_then_prio.clone()).unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req_best_effort_then_prio, Some(2)), + ParticipationPriority::BestEffort, + req_best_effort_then_prio.clone(), + ) + .unwrap(); // Then as prio: queue .queue_with_comparator( - Some(make_dummy_comparator(&req_best_effort_then_prio, 2)), + make_dummy_comparator(&req_best_effort_then_prio, Some(2)), + ParticipationPriority::Priority, req_best_effort_then_prio.clone(), ) .unwrap(); @@ -116,12 +178,19 @@ fn candidate_is_only_dequeued_once() { // Insert first as prio: queue .queue_with_comparator( - Some(make_dummy_comparator(&req_prio_then_best_effort, 3)), + make_dummy_comparator(&req_prio_then_best_effort, Some(3)), + ParticipationPriority::Priority, req_prio_then_best_effort.clone(), ) .unwrap(); // Then as best effort: - queue.queue_with_comparator(None, req_prio_then_best_effort.clone()).unwrap(); + queue + .queue_with_comparator( + make_dummy_comparator(&req_prio_then_best_effort, Some(3)), + ParticipationPriority::BestEffort, + req_prio_then_best_effort.clone(), + ) + .unwrap(); assert_eq!(queue.dequeue(), Some(req_best_effort_then_prio)); assert_eq!(queue.dequeue(), Some(req_prio_then_best_effort)); diff --git a/node/core/dispute-coordinator/src/participation/tests.rs b/node/core/dispute-coordinator/src/participation/tests.rs index 03772b1918dc..bf149a87286f 100644 --- a/node/core/dispute-coordinator/src/participation/tests.rs +++ b/node/core/dispute-coordinator/src/participation/tests.rs @@ -29,7 +29,10 @@ use parity_scale_codec::Encode; use polkadot_node_primitives::{AvailableData, BlockData, InvalidCandidate, PoV}; use polkadot_node_subsystem::{ jaeger, - messages::{AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest}, + messages::{ + AllMessages, ChainApiMessage, DisputeCoordinatorMessage, RuntimeApiMessage, + RuntimeApiRequest, + }, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; use polkadot_node_subsystem_test_helpers::{ @@ -221,9 +224,9 @@ fn same_req_wont_get_queued_if_participation_is_already_running() { #[test] fn reqs_get_queued_when_out_of_capacity() { - futures::executor::block_on(async { - let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); + let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); + let test = async { let (sender, mut worker_receiver) = mpsc::channel(1); let mut participation = Participation::new(sender); activate_leaf(&mut ctx, &mut participation, 10).await.unwrap(); @@ -239,43 +242,81 @@ fn reqs_get_queued_when_out_of_capacity() { } for _ in 0..MAX_PARALLEL_PARTICIPATIONS + 1 { - assert_matches!( - ctx_handle.recv().await, - AllMessages::AvailabilityRecovery( - AvailabilityRecoveryMessage::RecoverAvailableData(_, _, _, tx) - ) => { - tx.send(Err(RecoveryError::Unavailable)).unwrap(); - }, - "overseer did not receive recover available data message", - ); - let result = participation .get_participation_result(&mut ctx, worker_receiver.next().await.unwrap()) .await .unwrap(); - assert_matches!( result.outcome, ParticipationOutcome::Unavailable => {} ); } + // we should not have any further recovery requests: + assert_matches!(worker_receiver.next().timeout(Duration::from_millis(10)).await, None); + }; + + let request_handler = async { + let mut recover_available_data_msg_count = 0; + let mut block_number_msg_count = 0; + + while recover_available_data_msg_count < MAX_PARALLEL_PARTICIPATIONS + 1 || + block_number_msg_count < 1 + { + match ctx_handle.recv().await { + AllMessages::AvailabilityRecovery( + AvailabilityRecoveryMessage::RecoverAvailableData(_, _, _, tx), + ) => { + tx.send(Err(RecoveryError::Unavailable)).unwrap(); + recover_available_data_msg_count += 1; + }, + AllMessages::ChainApi(ChainApiMessage::BlockNumber(_, tx)) => { + tx.send(Ok(None)).unwrap(); + block_number_msg_count += 1; + }, + _ => assert!(false, "Received unexpected message"), + } + } - // we should not have any further results nor recovery requests: + // we should not have any further results assert_matches!(ctx_handle.recv().timeout(Duration::from_millis(10)).await, None); - assert_matches!(worker_receiver.next().timeout(Duration::from_millis(10)).await, None); - }) + }; + + futures::executor::block_on(async { + futures::join!(test, request_handler); + }); } #[test] fn reqs_get_queued_on_no_recent_block() { - futures::executor::block_on(async { - let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); - + let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); + let (mut unblock_test, mut wait_for_verification) = mpsc::channel(0); + let test = async { let (sender, _worker_receiver) = mpsc::channel(1); let mut participation = Participation::new(sender); participate(&mut ctx, &mut participation).await.unwrap(); - assert!(ctx_handle.recv().timeout(Duration::from_millis(10)).await.is_none()); + + // We have initiated participation but we'll block `active_leaf` so that we can check that + // the participation is queued in race-free way + let _ = wait_for_verification.next().await.unwrap(); + activate_leaf(&mut ctx, &mut participation, 10).await.unwrap(); + }; + + // Responds to messages from the test and verifies its behaviour + let request_handler = async { + // If we receive `BlockNumber` request this implicitly proves that the participation is queued + assert_matches!( + ctx_handle.recv().await, + AllMessages::ChainApi(ChainApiMessage::BlockNumber(_, tx)) => { + tx.send(Ok(None)).unwrap(); + }, + "overseer did not receive `ChainApiMessage::BlockNumber` message", + ); + + assert!(ctx_handle.recv().timeout(Duration::from_millis(10)).await.is_none()); + + // No activity so the participation is queued => unblock the test + unblock_test.send(()).await.unwrap(); // after activating at least one leaf the recent block // state should be available which should lead to trying @@ -288,7 +329,11 @@ fn reqs_get_queued_on_no_recent_block() { )), "overseer did not receive recover available data message", ); - }) + }; + + futures::executor::block_on(async { + futures::join!(test, request_handler); + }); } #[test] diff --git a/node/core/dispute-coordinator/src/scraping/mod.rs b/node/core/dispute-coordinator/src/scraping/mod.rs index 99a6e68cdfb5..29b217e46e4a 100644 --- a/node/core/dispute-coordinator/src/scraping/mod.rs +++ b/node/core/dispute-coordinator/src/scraping/mod.rs @@ -19,14 +19,14 @@ use std::num::NonZeroUsize; use futures::channel::oneshot; use lru::LruCache; -use polkadot_node_primitives::MAX_FINALITY_LAG; +use polkadot_node_primitives::{DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION, MAX_FINALITY_LAG}; use polkadot_node_subsystem::{ messages::ChainApiMessage, overseer, ActivatedLeaf, ActiveLeavesUpdate, ChainApiError, SubsystemSender, }; use polkadot_node_subsystem_util::runtime::{get_candidate_events, get_on_chain_votes}; use polkadot_primitives::v2::{ - BlockNumber, CandidateEvent, CandidateHash, Hash, ScrapedOnChainVotes, + BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, Hash, ScrapedOnChainVotes, }; use crate::{ @@ -51,6 +51,24 @@ const LRU_OBSERVED_BLOCKS_CAPACITY: NonZeroUsize = match NonZeroUsize::new(20) { None => panic!("Observed blocks cache size must be non-zero"), }; +/// ScrapedUpdates +/// +/// Updates to on_chain_votes and included receipts for new active leaf and its unprocessed +/// ancestors. +/// +/// on_chain_votes: New votes as seen on chain +/// included_receipts: Newly included parachain block candidate receipts as seen on chain +pub struct ScrapedUpdates { + pub on_chain_votes: Vec, + pub included_receipts: Vec, +} + +impl ScrapedUpdates { + pub fn new() -> Self { + Self { on_chain_votes: Vec::new(), included_receipts: Vec::new() } + } +} + /// Chain scraper /// /// Scrapes unfinalized chain in order to collect information from blocks. @@ -65,7 +83,7 @@ const LRU_OBSERVED_BLOCKS_CAPACITY: NonZeroUsize = match NonZeroUsize::new(20) { /// With this information it provides a `CandidateComparator` and as a return value of /// `process_active_leaves_update` any scraped votes. /// -/// Scraped candidates are available `CANDIDATE_LIFETIME_AFTER_FINALIZATION` more blocks +/// Scraped candidates are available `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` more blocks /// after finalization as a precaution not to prune them prematurely. pub struct ChainScraper { /// All candidates we have seen included, which not yet have been finalized. @@ -87,16 +105,6 @@ impl ChainScraper { /// As long as we have `MAX_FINALITY_LAG` this makes sense as a value. pub(crate) const ANCESTRY_SIZE_LIMIT: u32 = MAX_FINALITY_LAG; - /// How many blocks after finalization a backed/included candidate should be kept. - /// We don't want to remove scraped candidates on finalization because we want to - /// be sure that disputes will conclude on abandoned forks. - /// Removing the candidate on finalization creates a possibility for an attacker to - /// avoid slashing. If a bad fork is abandoned too quickly because in the same another - /// better one gets finalized the entries for the bad fork will be pruned and we - /// will never participate in a dispute for it. We want such disputes to conclude - /// in a timely manner so that the offenders are slashed. - pub(crate) const CANDIDATE_LIFETIME_AFTER_FINALIZATION: BlockNumber = 2; - /// Create a properly initialized `OrderingProvider`. /// /// Returns: `Self` and any scraped votes. @@ -114,8 +122,8 @@ impl ChainScraper { }; let update = ActiveLeavesUpdate { activated: Some(initial_head), deactivated: Default::default() }; - let votes = s.process_active_leaves_update(sender, &update).await?; - Ok((s, votes)) + let updates = s.process_active_leaves_update(sender, &update).await?; + Ok((s, updates.on_chain_votes)) } /// Check whether we have seen a candidate included on any chain. @@ -132,18 +140,19 @@ impl ChainScraper { /// /// and updates current heads, so we can query candidates for all non finalized blocks. /// - /// Returns: On chain vote for the leaf and any ancestors we might not yet have seen. + /// Returns: On chain votes and included candidate receipts for the leaf and any + /// ancestors we might not yet have seen. pub async fn process_active_leaves_update( &mut self, sender: &mut Sender, update: &ActiveLeavesUpdate, - ) -> Result> + ) -> Result where Sender: overseer::DisputeCoordinatorSenderTrait, { let activated = match update.activated.as_ref() { Some(activated) => activated, - None => return Ok(Vec::new()), + None => return Ok(ScrapedUpdates::new()), }; // Fetch ancestry up to last finalized block. @@ -157,30 +166,33 @@ impl ChainScraper { let block_hashes = std::iter::once(activated.hash).chain(ancestors); - let mut on_chain_votes = Vec::new(); + let mut scraped_updates = ScrapedUpdates::new(); for (block_number, block_hash) in block_numbers.zip(block_hashes) { gum::trace!(?block_number, ?block_hash, "In ancestor processing."); - self.process_candidate_events(sender, block_number, block_hash).await?; + let receipts_for_block = + self.process_candidate_events(sender, block_number, block_hash).await?; + scraped_updates.included_receipts.extend(receipts_for_block); if let Some(votes) = get_on_chain_votes(sender, block_hash).await? { - on_chain_votes.push(votes); + scraped_updates.on_chain_votes.push(votes); } } self.last_observed_blocks.put(activated.hash, ()); - Ok(on_chain_votes) + Ok(scraped_updates) } /// Prune finalized candidates. /// - /// We keep each candidate for `CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks after finalization. + /// We keep each candidate for `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks after finalization. /// After that we treat it as low priority. pub fn process_finalized_block(&mut self, finalized_block_number: &BlockNumber) { - // `CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1` because `finalized_block_number`counts to the + // `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1` because `finalized_block_number`counts to the // candidate lifetime. - match finalized_block_number.checked_sub(Self::CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1) { + match finalized_block_number.checked_sub(DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1) + { Some(key_to_prune) => { self.backed_candidates.remove_up_to_height(&key_to_prune); self.included_candidates.remove_up_to_height(&key_to_prune); @@ -196,17 +208,21 @@ impl ChainScraper { /// Process candidate events of a block. /// /// Keep track of all included and backed candidates. + /// + /// Returns freshly included candidate receipts async fn process_candidate_events( &mut self, sender: &mut Sender, block_number: BlockNumber, block_hash: Hash, - ) -> Result<()> + ) -> Result> where Sender: overseer::DisputeCoordinatorSenderTrait, { + let events = get_candidate_events(sender, block_hash).await?; + let mut included_receipts: Vec = Vec::new(); // Get included and backed events: - for ev in get_candidate_events(sender, block_hash).await? { + for ev in events { match ev { CandidateEvent::CandidateIncluded(receipt, _, _, _) => { let candidate_hash = receipt.hash(); @@ -217,6 +233,7 @@ impl ChainScraper { "Processing included event" ); self.included_candidates.insert(block_number, candidate_hash); + included_receipts.push(receipt); }, CandidateEvent::CandidateBacked(receipt, _, _, _) => { let candidate_hash = receipt.hash(); @@ -233,7 +250,7 @@ impl ChainScraper { }, } } - Ok(()) + Ok(included_receipts) } /// Returns ancestors of `head` in the descending order, stopping diff --git a/node/core/dispute-coordinator/src/scraping/tests.rs b/node/core/dispute-coordinator/src/scraping/tests.rs index 6251891af5a3..3a6befa2002d 100644 --- a/node/core/dispute-coordinator/src/scraping/tests.rs +++ b/node/core/dispute-coordinator/src/scraping/tests.rs @@ -23,6 +23,7 @@ use parity_scale_codec::Encode; use sp_core::testing::TaskExecutor; use ::test_helpers::{dummy_collator, dummy_collator_signature, dummy_hash}; +use polkadot_node_primitives::DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; use polkadot_node_subsystem::{ jaeger, messages::{ @@ -452,9 +453,9 @@ fn scraper_prunes_finalized_candidates() { let candidate = make_candidate_receipt(get_block_number_hash(TEST_TARGET_BLOCK_NUMBER)); - // After `CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks the candidate should be removed + // After `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks the candidate should be removed finalized_block_number = - TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION; + TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; process_finalized_block(&mut scraper, &finalized_block_number); assert!(!scraper.is_candidate_backed(&candidate.hash())); @@ -512,10 +513,10 @@ fn scraper_handles_backed_but_not_included_candidate() { // The candidate should be removed. assert!( finalized_block_number < - TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION + TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION ); finalized_block_number += - TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION; + TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; process_finalized_block(&mut scraper, &finalized_block_number); assert!(!scraper.is_candidate_included(&candidate.hash())); @@ -562,7 +563,7 @@ fn scraper_handles_the_same_candidate_incuded_in_two_different_block_heights() { // Finalize blocks to enforce pruning of scraped events. // The magic candidate was added twice, so it shouldn't be removed if we finalize two more blocks. finalized_block_number = test_targets.first().expect("there are two block nums") + - ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION; + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; process_finalized_block(&mut scraper, &finalized_block_number); let magic_candidate = make_candidate_receipt(get_magic_candidate_hash()); diff --git a/node/core/dispute-coordinator/src/tests.rs b/node/core/dispute-coordinator/src/tests.rs index d44f46ec3442..023c95d5e23c 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -57,7 +57,9 @@ use polkadot_node_subsystem::{ messages::{AllMessages, BlockDescription, RuntimeApiMessage, RuntimeApiRequest}, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, }; -use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle}; +use polkadot_node_subsystem_test_helpers::{ + make_buffered_subsystem_context, TestSubsystemContextHandle, +}; use polkadot_primitives::v2::{ ApprovalVote, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, CandidateReceipt, CoreIndex, DisputeStatement, GroupIndex, Hash, HeadData, Header, IndexedVec, @@ -102,6 +104,38 @@ async fn overseer_recv(virtual_overseer: &mut VirtualOverseer) -> AllMessages { .expect("overseer `recv` timed out") } +enum VoteType { + Backing, + Explicit, +} + +/// Helper to condense repeated code that creates vote pairs, one valid and one +/// invalid. Optionally the valid vote of the pair can be made a backing vote. +async fn generate_opposing_votes_pair( + test_state: &TestState, + valid_voter_idx: ValidatorIndex, + invalid_voter_idx: ValidatorIndex, + candidate_hash: CandidateHash, + session: SessionIndex, + valid_vote_type: VoteType, +) -> (SignedDisputeStatement, SignedDisputeStatement) { + let valid_vote = match valid_vote_type { + VoteType::Backing => + test_state + .issue_backing_statement_with_index(valid_voter_idx, candidate_hash, session) + .await, + VoteType::Explicit => + test_state + .issue_explicit_statement_with_index(valid_voter_idx, candidate_hash, session, true) + .await, + }; + let invalid_vote = test_state + .issue_explicit_statement_with_index(invalid_voter_idx, candidate_hash, session, false) + .await; + + (valid_vote, invalid_vote) +} + #[derive(Clone)] struct MockClock { time: Arc, @@ -135,6 +169,7 @@ struct TestState { config: Config, clock: MockClock, headers: HashMap, + block_num_to_header: HashMap, last_block: Hash, // last session the subsystem knows about. known_session: Option, @@ -191,6 +226,8 @@ impl Default for TestState { let mut headers = HashMap::new(); let _ = headers.insert(last_block, genesis_header.clone()); + let mut block_num_to_header = HashMap::new(); + let _ = block_num_to_header.insert(genesis_header.number, last_block); TestState { validators: validators.into_iter().map(|(pair, _)| pair).collect(), @@ -202,6 +239,7 @@ impl Default for TestState { config, clock: MockClock::default(), headers, + block_num_to_header, last_block, known_session: None, } @@ -228,6 +266,7 @@ impl TestState { let block_hash = block_header.hash(); let _ = self.headers.insert(block_hash, block_header.clone()); + let _ = self.block_num_to_header.insert(block_header.number, block_hash); self.last_block = block_hash; gum::debug!(?block_number, "Activating block in activate_leaf_at_session."); @@ -356,6 +395,27 @@ impl TestState { ); finished_steps.got_scraping_information = true; tx.send(Ok(0)).unwrap(); + + // If the activated block number is > 1 the scraper will ask for block ancestors. Handle this case. + if block_number > 1 { + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::ChainApi(ChainApiMessage::Ancestors{ + hash, + k, + response_channel, + }) => { + assert_eq!(hash, block_hash); // A bit restrictive, remove if it causes problems. + let target_header = self.headers.get(&hash).expect("The function is called for this block so it should exist"); + let mut response = Vec::new(); + for i in target_header.number.saturating_sub(k as u32)..target_header.number { + response.push(self.block_num_to_header.get(&i).expect("headers and block_num_to_header should always be in sync").clone()); + } + let _ = response_channel.send(Ok(response)); + } + ); + } + assert_matches!( overseer_recv(virtual_overseer).await, AllMessages::RuntimeApi(RuntimeApiMessage::Request( @@ -382,6 +442,10 @@ impl TestState { ); gum::trace!("After answering runtime API request (votes)"); }, + AllMessages::ChainApi(ChainApiMessage::BlockNumber(hash, tx)) => { + let block_num = self.headers.get(&hash).map(|header| header.number); + tx.send(Ok(block_num)).unwrap(); + }, msg => { panic!("Received unexpected message in `handle_sync_queries`: {:?}", msg); }, @@ -521,7 +585,7 @@ impl TestState { F: FnOnce(TestState, VirtualOverseer) -> BoxFuture<'static, TestState>, { self.known_session = None; - let (ctx, ctx_handle) = make_subsystem_context(TaskExecutor::new()); + let (ctx, ctx_handle) = make_buffered_subsystem_context(TaskExecutor::new(), 1); let subsystem = DisputeCoordinatorSubsystem::new( self.db.clone(), self.config.clone(), @@ -542,7 +606,34 @@ fn test_harness(test: F) -> TestState where F: FnOnce(TestState, VirtualOverseer) -> BoxFuture<'static, TestState>, { - TestState::default().resume(test) + let mut test_state = TestState::default(); + + // Add two more blocks after the genesis (which is created in `default()`) + let h1 = Header { + parent_hash: test_state.last_block.clone(), + number: 1, + digest: dummy_digest(), + state_root: dummy_hash(), + extrinsics_root: dummy_hash(), + }; + let h1_hash = h1.hash(); + test_state.headers.insert(h1_hash.clone(), h1); + test_state.block_num_to_header.insert(1, h1_hash.clone()); + test_state.last_block = h1_hash; + + let h2 = Header { + parent_hash: test_state.last_block.clone(), + number: 2, + digest: dummy_digest(), + state_root: dummy_hash(), + extrinsics_root: dummy_hash(), + }; + let h2_hash = h2.hash(); + test_state.headers.insert(h2_hash.clone(), h2); + test_state.block_num_to_header.insert(2, h2_hash.clone()); + test_state.last_block = h2_hash; + + test_state.resume(test) } /// Handle participation messages. @@ -610,6 +701,18 @@ pub async fn handle_approval_vote_request( ); } +/// Handle block number request. In the context of these tests this message is required for +/// handling comparator creation for enqueuing participations. +async fn handle_get_block_number(ctx_handle: &mut VirtualOverseer, test_state: &TestState) { + assert_matches!( + ctx_handle.recv().await, + AllMessages::ChainApi( + ChainApiMessage::BlockNumber(hash, tx)) => { + tx.send(Ok(test_state.headers.get(&hash).map(|r| r.number))).unwrap(); + } + ) +} + #[test] fn too_many_unconfirmed_statements_are_considered_spam() { test_harness(|mut test_state, mut virtual_overseer| { @@ -627,31 +730,25 @@ fn too_many_unconfirmed_statements_are_considered_spam() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote1 = test_state - .issue_backing_statement_with_index(ValidatorIndex(3), candidate_hash1, session) - .await; - - let invalid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash1, - session, - false, - ) - .await; - - let valid_vote2 = test_state - .issue_backing_statement_with_index(ValidatorIndex(3), candidate_hash2, session) - .await; + let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash1, + session, + VoteType::Backing, + ) + .await; - let invalid_vote2 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash2, - session, - false, - ) - .await; + let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash2, + session, + VoteType::Backing, + ) + .await; gum::trace!("Before sending `ImportStatements`"); virtual_overseer @@ -700,7 +797,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 1); + assert_eq!(votes.valid.raw().len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -764,18 +861,15 @@ fn approval_vote_import_works() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote1 = test_state - .issue_backing_statement_with_index(ValidatorIndex(3), candidate_hash1, session) - .await; - - let invalid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash1, - session, - false, - ) - .await; + let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash1, + session, + VoteType::Backing, + ) + .await; let approval_vote = test_state.issue_approval_vote_with_index( ValidatorIndex(4), @@ -833,8 +927,11 @@ fn approval_vote_import_works() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); - assert!(votes.valid.get(&ValidatorIndex(4)).is_some(), "Approval vote is missing!"); + assert_eq!(votes.valid.raw().len(), 2); + assert!( + votes.valid.raw().get(&ValidatorIndex(4)).is_some(), + "Approval vote is missing!" + ); assert_eq!(votes.invalid.len(), 1); } @@ -873,41 +970,25 @@ fn dispute_gets_confirmed_via_participation() { ) .await; - let valid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash1, - session, - true, - ) - .await; - - let invalid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash1, - session, - false, - ) - .await; - - let valid_vote2 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash2, - session, - true, - ) - .await; + let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash1, + session, + VoteType::Explicit, + ) + .await; - let invalid_vote2 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash2, - session, - false, - ) - .await; + let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash2, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -958,7 +1039,7 @@ fn dispute_gets_confirmed_via_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert_eq!(votes.invalid.len(), 1); } @@ -993,7 +1074,7 @@ fn dispute_gets_confirmed_via_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 1); + assert_eq!(votes.valid.raw().len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -1027,59 +1108,35 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash1, - session, - true, - ) - .await; - - let invalid_vote1 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash1, - session, - false, - ) - .await; - - let valid_vote1a = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(4), - candidate_hash1, - session, - true, - ) - .await; - - let invalid_vote1a = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(5), - candidate_hash1, - session, - false, - ) - .await; + let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash1, + session, + VoteType::Explicit, + ) + .await; - let valid_vote2 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash2, - session, - true, - ) - .await; + let (valid_vote1a, invalid_vote1a) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(4), + ValidatorIndex(5), + candidate_hash1, + session, + VoteType::Explicit, + ) + .await; - let invalid_vote2 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash2, - session, - false, - ) - .await; + let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash2, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1126,7 +1183,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert_eq!(votes.invalid.len(), 2); } @@ -1161,7 +1218,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 1); + assert_eq!(votes.valid.raw().len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -1240,7 +1297,7 @@ fn backing_statements_import_works_and_no_spam() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert_eq!(votes.invalid.len(), 0); } @@ -1281,7 +1338,7 @@ fn backing_statements_import_works_and_no_spam() { }) .await; - // Result should be valid, because our node participated, so spam slots are cleared: + // Import should be valid, as spam slots were not filled assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; @@ -1314,23 +1371,15 @@ fn conflicting_votes_lead_to_dispute_participation() { ) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let invalid_vote_2 = test_state .issue_explicit_statement_with_index( @@ -1388,7 +1437,7 @@ fn conflicting_votes_lead_to_dispute_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert_eq!(votes.invalid.len(), 1); } @@ -1415,7 +1464,7 @@ fn conflicting_votes_lead_to_dispute_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert_eq!(votes.invalid.len(), 2); } @@ -1499,7 +1548,7 @@ fn positive_votes_dont_trigger_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 1); + assert_eq!(votes.valid.raw().len(), 1); assert!(votes.invalid.is_empty()); } @@ -1535,7 +1584,7 @@ fn positive_votes_dont_trigger_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); + assert_eq!(votes.valid.raw().len(), 2); assert!(votes.invalid.is_empty()); } @@ -1564,23 +1613,15 @@ fn wrong_validator_index_is_ignored() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1649,23 +1690,15 @@ fn finality_votes_ignore_disputed_candidates() { ) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1769,23 +1802,15 @@ fn supermajority_valid_dispute_may_be_finalized() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1916,23 +1941,15 @@ fn concluded_supermajority_for_non_active_after_time() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -2041,23 +2058,15 @@ fn concluded_supermajority_against_non_active_after_time() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2164,23 +2173,15 @@ fn resume_dispute_without_local_statement() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2239,68 +2240,27 @@ fn resume_dispute_without_local_statement() { ) .await; - let valid_vote0 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(0), - candidate_hash, - session, - true, - ) - .await; - let valid_vote3 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(3), - candidate_hash, - session, - true, - ) - .await; - let valid_vote4 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(4), - candidate_hash, - session, - true, - ) - .await; - let valid_vote5 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(5), - candidate_hash, - session, - true, - ) - .await; - let valid_vote6 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(6), - candidate_hash, - session, - true, - ) - .await; - let valid_vote7 = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(7), - candidate_hash, - session, - true, - ) - .await; + let mut statements = Vec::new(); + // Getting votes for supermajority. Should already have two valid votes. + for i in vec![3, 4, 5, 6, 7] { + let vote = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(i), + candidate_hash, + session, + true, + ) + .await; + + statements.push((vote, ValidatorIndex(i as _))); + } virtual_overseer .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_receipt: candidate_receipt.clone(), session, - statements: vec![ - (valid_vote0, ValidatorIndex(0)), - (valid_vote3, ValidatorIndex(3)), - (valid_vote4, ValidatorIndex(4)), - (valid_vote5, ValidatorIndex(5)), - (valid_vote6, ValidatorIndex(6)), - (valid_vote7, ValidatorIndex(7)), - ], + statements, pending_confirmation: None, }, }) @@ -2361,23 +2321,15 @@ fn resume_dispute_with_local_statement() { ) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2453,23 +2405,15 @@ fn resume_dispute_without_local_statement_or_local_key() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2557,23 +2501,15 @@ fn resume_dispute_with_local_statement_without_local_key() { ) .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2753,22 +2689,15 @@ fn own_approval_vote_gets_distributed_on_dispute() { .await; // Trigger dispute: - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - false, - ) - .await; - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - true, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(2), + ValidatorIndex(1), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; let (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2838,6 +2767,12 @@ fn negative_issue_local_statement_only_triggers_import() { }) .await; + // Assert that subsystem is not participating. + assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); + + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; + assert!(virtual_overseer.try_recv().await.is_none()); + let backend = DbBackend::new( test_state.db.clone(), test_state.config.column_config(), @@ -2851,12 +2786,6 @@ fn negative_issue_local_statement_only_triggers_import() { let disputes = backend.load_recent_disputes().unwrap(); assert_eq!(disputes, None); - // Assert that subsystem is not participating. - assert!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await.is_none()); - - virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; - assert!(virtual_overseer.try_recv().await.is_none()); - test_state }) }); @@ -3013,23 +2942,15 @@ fn refrain_from_participation() { .await; // generate two votes - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -3069,7 +2990,7 @@ fn refrain_from_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 1); + assert_eq!(votes.valid.raw().len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -3113,23 +3034,15 @@ fn participation_for_included_candidates() { .await; // generate two votes - let valid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(1), - candidate_hash, - session, - true, - ) - .await; - - let invalid_vote = test_state - .issue_explicit_statement_with_index( - ValidatorIndex(2), - candidate_hash, - session, - false, - ) - .await; + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -3165,7 +3078,7 @@ fn participation_for_included_candidates() { assert_eq!(rx.await.unwrap().len(), 1); - // check if we have participated (casted a vote) + // check if we have participated (cast a vote) let (tx, rx) = oneshot::channel(); virtual_overseer .send(FromOrchestra::Communication { @@ -3177,7 +3090,7 @@ fn participation_for_included_candidates() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.len(), 2); // 2 => we have participated + assert_eq!(votes.valid.raw().len(), 2); // 2 => we have participated assert_eq!(votes.invalid.len(), 1); } @@ -3187,3 +3100,252 @@ fn participation_for_included_candidates() { }) }); } + +/// Shows that importing backing votes when a backing event is being processed +/// results in participation. +#[test] +fn local_participation_in_dispute_for_backed_candidate() { + test_harness(|mut test_state, mut virtual_overseer| { + Box::pin(async move { + let session = 1; + + test_state.handle_resume_sync(&mut virtual_overseer, session).await; + + let candidate_receipt = make_valid_candidate_receipt(); + let candidate_hash = candidate_receipt.hash(); + + // Step 1: Show that we don't participate when not backed, confirmed, or included + + // activate leaf - without candidate backed event + test_state + .activate_leaf_at_session(&mut virtual_overseer, session, 1, vec![]) + .await; + + // generate two votes + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt.clone(), + session, + statements: vec![ + (valid_vote, ValidatorIndex(1)), + (invalid_vote, ValidatorIndex(2)), + ], + pending_confirmation: None, + }, + }) + .await; + + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash, HashMap::new()) + .await; + + assert_matches!(virtual_overseer.recv().timeout(TEST_TIMEOUT).await, None); + + // Step 2: Show that once backing votes are processed we participate + + // Activate leaf: With candidate backed event + test_state + .activate_leaf_at_session( + &mut virtual_overseer, + session, + 1, + vec![make_candidate_backed_event(candidate_receipt.clone())], + ) + .await; + + let backing_valid = test_state + .issue_backing_statement_with_index(ValidatorIndex(3), candidate_hash, session) + .await; + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt.clone(), + session, + statements: vec![(backing_valid, ValidatorIndex(3))], + pending_confirmation: None, + }, + }) + .await; + + participation_with_distribution( + &mut virtual_overseer, + &candidate_hash, + candidate_receipt.commitments_hash, + ) + .await; + + // Check for our 1 active dispute + let (tx, rx) = oneshot::channel(); + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ActiveDisputes(tx), + }) + .await; + + assert_eq!(rx.await.unwrap().len(), 1); + + // check if we have participated (casted a vote) + let (tx, rx) = oneshot::channel(); + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::QueryCandidateVotes( + vec![(session, candidate_hash)], + tx, + ), + }) + .await; + + let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); + assert_eq!(votes.valid.raw().len(), 3); // 3 => 1 initial vote, 1 backing vote, and our vote + assert_eq!(votes.invalid.len(), 1); + + // Wrap up + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; + + test_state + }) + }); +} + +/// Shows that when a candidate_included event is scraped from the chain we +/// reprioritize any participation requests pertaining to that candidate. +/// This involves moving the request for this candidate from the best effort +/// queue to the priority queue. +#[test] +fn participation_requests_reprioritized_for_newly_included() { + test_harness(|mut test_state, mut virtual_overseer| { + Box::pin(async move { + let session = 1; + test_state.handle_resume_sync(&mut virtual_overseer, session).await; + let mut receipts: Vec = Vec::new(); + + // Generate all receipts + for repetition in 1..=3u8 { + // Building candidate receipts + let mut candidate_receipt = make_valid_candidate_receipt(); + candidate_receipt.descriptor.pov_hash = Hash::from( + [repetition; 32], // Altering this receipt so its hash will be changed + ); + // Set consecutive parents (starting from zero). They will order the candidates for participation. + let parent_block_num: BlockNumber = repetition as BlockNumber - 1; + candidate_receipt.descriptor.relay_parent = + test_state.block_num_to_header.get(&parent_block_num).unwrap().clone(); + receipts.push(candidate_receipt.clone()); + } + + // Mark all candidates as backed, so their participation requests make it to best effort. + // These calls must all occur before including the candidates due to test overseer + // oddities. + let mut candidate_events = Vec::new(); + for r in receipts.iter() { + candidate_events.push(make_candidate_backed_event(r.clone())) + } + test_state + .activate_leaf_at_session(&mut virtual_overseer, session, 1, candidate_events) + .await; + + for (idx, candidate_receipt) in receipts.iter().enumerate() { + let candidate_hash = candidate_receipt.hash(); + + // Create votes for candidates + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash, + session, + VoteType::Explicit, + ) + .await; + + // Import votes for candidates + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt.clone(), + session, + statements: vec![ + (valid_vote, ValidatorIndex(1)), + (invalid_vote, ValidatorIndex(2)), + ], + pending_confirmation: None, + }, + }) + .await; + + // Handle corresponding messages to unblock import + // we need to handle `ApprovalVotingMessage::GetApprovalSignaturesForCandidate` for import + handle_approval_vote_request( + &mut virtual_overseer, + &candidate_hash, + HashMap::new(), + ) + .await; + + // We'll trigger participation for the first `MAX_PARALLEL_PARTICIPATIONS` candidates. + // The rest will be queued => we need to handle `ChainApiMessage::BlockNumber` for them. + if idx >= crate::participation::MAX_PARALLEL_PARTICIPATIONS { + // We send the `idx` as parent block number, because it is used for ordering. + // This way we get predictable ordering and participation. + handle_get_block_number(&mut virtual_overseer, &test_state).await; + } + } + + // Generate included event for one of the candidates here + test_state + .activate_leaf_at_session( + &mut virtual_overseer, + session, + 2, + vec![make_candidate_included_event( + receipts.last().expect("There is more than one candidate").clone(), + )], + ) + .await; + + // NB: The checks below are a bit racy. In theory candidate 2 can be processed even before candidate 0 and this is okay. If any + // of the asserts in the two functions after this comment fail -> rework `participation_with_distribution` to expect a set of + // commitment hashes instead of just one. + + // This is the candidate for which participation was started initially (`MAX_PARALLEL_PARTICIPATIONS` threshold was not yet hit) + participation_with_distribution( + &mut virtual_overseer, + &receipts.get(0).expect("There is more than one candidate").hash(), + receipts.first().expect("There is more than one candidate").commitments_hash, + ) + .await; + + // This one should have been prioritized + participation_with_distribution( + &mut virtual_overseer, + &receipts.get(2).expect("There is more than one candidate").hash(), + receipts.last().expect("There is more than one candidate").commitments_hash, + ) + .await; + + // And this is the last one + participation_with_distribution( + &mut virtual_overseer, + &receipts.get(1).expect("There is more than one candidate").hash(), + receipts.first().expect("There is more than one candidate").commitments_hash, + ) + .await; + + // Wrap up + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; + + test_state + }) + }); +} diff --git a/node/core/parachains-inherent/Cargo.toml b/node/core/parachains-inherent/Cargo.toml index c38b45944d5b..d4301cb22270 100644 --- a/node/core/parachains-inherent/Cargo.toml +++ b/node/core/parachains-inherent/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-parachains-inherent" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" @@ -11,7 +11,7 @@ gum = { package = "tracing-gum", path = "../../gum" } thiserror = "1.0.31" async-trait = "0.1.57" polkadot-node-subsystem = { path = "../../subsystem" } +polkadot-overseer = { path = "../../overseer" } polkadot-primitives = { path = "../../../primitives" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/parachains-inherent/src/lib.rs b/node/core/parachains-inherent/src/lib.rs index e9441d21aefe..a4df582b17a8 100644 --- a/node/core/parachains-inherent/src/lib.rs +++ b/node/core/parachains-inherent/src/lib.rs @@ -29,9 +29,7 @@ use polkadot_node_subsystem::{ errors::SubsystemError, messages::ProvisionerMessage, overseer::Handle, }; use polkadot_primitives::v2::{Block, Hash, InherentData as ParachainsInherentData}; -use sp_blockchain::HeaderBackend; -use sp_runtime::generic::BlockId; -use std::time; +use std::{sync::Arc, time}; pub(crate) const LOG_TARGET: &str = "parachain::parachains-inherent"; @@ -39,22 +37,24 @@ pub(crate) const LOG_TARGET: &str = "parachain::parachains-inherent"; const PROVISIONER_TIMEOUT: time::Duration = core::time::Duration::from_millis(2500); /// Provides the parachains inherent data. -pub struct ParachainsInherentDataProvider { - inherent_data: ParachainsInherentData, +pub struct ParachainsInherentDataProvider> { + pub client: Arc, + pub overseer: polkadot_overseer::Handle, + pub parent: Hash, } -impl ParachainsInherentDataProvider { - /// Create a [`Self`] directly from some [`ParachainsInherentData`]. - pub fn from_data(inherent_data: ParachainsInherentData) -> Self { - Self { inherent_data } +impl> ParachainsInherentDataProvider { + /// Create a new [`Self`]. + pub fn new(client: Arc, overseer: polkadot_overseer::Handle, parent: Hash) -> Self { + ParachainsInherentDataProvider { client, overseer, parent } } /// Create a new instance of the [`ParachainsInherentDataProvider`]. - pub async fn create>( - client: &C, + pub async fn create( + client: Arc, mut overseer: Handle, parent: Hash, - ) -> Result { + ) -> Result { let pid = async { let (sender, receiver) = futures::channel::oneshot::channel(); gum::trace!( @@ -86,7 +86,7 @@ impl ParachainsInherentDataProvider { let mut timeout = futures_timer::Delay::new(PROVISIONER_TIMEOUT).fuse(); - let parent_header = match client.header(BlockId::Hash(parent)) { + let parent_header = match client.header(parent) { Ok(Some(h)) => h, Ok(None) => return Err(Error::ParentHeaderNotFound(parent)), Err(err) => return Err(Error::Blockchain(err)), @@ -119,18 +119,28 @@ impl ParachainsInherentDataProvider { }, }; - Ok(Self { inherent_data }) + Ok(inherent_data) } } #[async_trait::async_trait] -impl sp_inherents::InherentDataProvider for ParachainsInherentDataProvider { - fn provide_inherent_data( +impl> sp_inherents::InherentDataProvider + for ParachainsInherentDataProvider +{ + async fn provide_inherent_data( &self, dst_inherent_data: &mut sp_inherents::InherentData, ) -> Result<(), sp_inherents::Error> { + let inherent_data = ParachainsInherentDataProvider::create( + self.client.clone(), + self.overseer.clone(), + self.parent, + ) + .await + .map_err(|e| sp_inherents::Error::Application(Box::new(e)))?; + dst_inherent_data - .put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &self.inherent_data) + .put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &inherent_data) } async fn try_handle_error( diff --git a/node/core/provisioner/Cargo.toml b/node/core/provisioner/Cargo.toml index 6fbdc8cf0435..c6d78582cfc9 100644 --- a/node/core/provisioner/Cargo.toml +++ b/node/core/provisioner/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-provisioner" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/node/core/provisioner/src/disputes/prioritized_selection/mod.rs b/node/core/provisioner/src/disputes/prioritized_selection/mod.rs index dcfcd0d1c2f0..7d8e52ccf19b 100644 --- a/node/core/provisioner/src/disputes/prioritized_selection/mod.rs +++ b/node/core/provisioner/src/disputes/prioritized_selection/mod.rs @@ -99,7 +99,7 @@ where ); // Fetch the onchain disputes. We'll do a prioritization based on them. - let onchain = match get_onchain_disputes(sender, leaf.hash.clone()).await { + let onchain = match get_onchain_disputes(sender, leaf.hash).await { Ok(r) => r, Err(GetOnchainDisputesError::NotSupported(runtime_api_err, relay_parent)) => { // Runtime version is checked before calling this method, so the error below should never happen! @@ -216,9 +216,11 @@ where // Check if votes are within the limit for (session_index, candidate_hash, selected_votes) in votes { - let votes_len = selected_votes.valid.len() + selected_votes.invalid.len(); + let votes_len = selected_votes.valid.raw().len() + selected_votes.invalid.len(); if votes_len + total_votes_len > MAX_DISPUTE_VOTES_FORWARDED_TO_RUNTIME { - // we are done - no more votes can be added + // we are done - no more votes can be added. Importantly, we don't add any votes for a dispute here + // if we can't fit them all. This gives us an important invariant, that backing votes for + // disputes make it into the provisioned vote set. return result } result.insert((session_index, candidate_hash), selected_votes); diff --git a/node/core/provisioner/src/disputes/prioritized_selection/tests.rs b/node/core/provisioner/src/disputes/prioritized_selection/tests.rs index 1f8d4f180263..982d19356e6a 100644 --- a/node/core/provisioner/src/disputes/prioritized_selection/tests.rs +++ b/node/core/provisioner/src/disputes/prioritized_selection/tests.rs @@ -393,7 +393,9 @@ impl TestDisputes { ValidDisputeStatementKind::Explicit, 0, local_votes_count, - ), + ) + .into_iter() + .collect(), invalid: BTreeMap::new(), }, ); diff --git a/node/core/provisioner/src/lib.rs b/node/core/provisioner/src/lib.rs index 0530d48aabda..fcb65d66f286 100644 --- a/node/core/provisioner/src/lib.rs +++ b/node/core/provisioner/src/lib.rs @@ -373,7 +373,7 @@ async fn send_inherent_data( let disputes = match has_required_runtime( from_job, - leaf.hash.clone(), + leaf.hash, PRIORITIZED_SELECTION_RUNTIME_VERSION_REQUIREMENT, ) .await @@ -506,7 +506,7 @@ fn select_availability_bitfields( bitfields.len() ); - selected.into_iter().map(|(_, b)| b).collect() + selected.into_values().collect() } /// Determine which cores are free, and then to the degree possible, pick a candidate appropriate to each free core. diff --git a/node/core/pvf-checker/Cargo.toml b/node/core/pvf-checker/Cargo.toml index b0881042e957..d41955d9bac5 100644 --- a/node/core/pvf-checker/Cargo.toml +++ b/node/core/pvf-checker/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-pvf-checker" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index 8bcecf55475e..2aaf408ae56d 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-pvf" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [[bin]] name = "puppet_worker" @@ -13,6 +13,7 @@ always-assert = "0.1" async-std = { version = "1.11.0", features = ["attributes"] } async-process = "1.3.0" assert_matches = "1.4.0" +cpu-time = "1.0.0" futures = "0.3.21" futures-timer = "3.0.2" slotmap = "1.0" @@ -21,10 +22,13 @@ pin-project = "1.0.9" rand = "0.8.5" tempfile = "3.3.0" rayon = "1.5.1" + parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } + polkadot-parachain = { path = "../../../parachain" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-node-metrics = { path = "../../metrics"} + sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/pvf/src/artifacts.rs b/node/core/pvf/src/artifacts.rs index 038d8e803299..413d73b4c558 100644 --- a/node/core/pvf/src/artifacts.rs +++ b/node/core/pvf/src/artifacts.rs @@ -101,6 +101,8 @@ pub enum ArtifactState { /// This is updated when we get the heads up for this artifact or when we just discover /// this file. last_time_needed: SystemTime, + /// The CPU time that was taken preparing this artifact. + cpu_time_elapsed: Duration, }, /// A task to prepare this artifact is scheduled. Preparing { @@ -171,11 +173,16 @@ impl Artifacts { /// This function must be used only for brand-new artifacts and should never be used for /// replacing existing ones. #[cfg(test)] - pub fn insert_prepared(&mut self, artifact_id: ArtifactId, last_time_needed: SystemTime) { + pub fn insert_prepared( + &mut self, + artifact_id: ArtifactId, + last_time_needed: SystemTime, + cpu_time_elapsed: Duration, + ) { // See the precondition. always!(self .artifacts - .insert(artifact_id, ArtifactState::Prepared { last_time_needed }) + .insert(artifact_id, ArtifactState::Prepared { last_time_needed, cpu_time_elapsed }) .is_none()); } diff --git a/node/core/pvf/src/error.rs b/node/core/pvf/src/error.rs index 4aca2da4b3ba..01d8c78d39ca 100644 --- a/node/core/pvf/src/error.rs +++ b/node/core/pvf/src/error.rs @@ -15,10 +15,11 @@ // along with Polkadot. If not, see . use parity_scale_codec::{Decode, Encode}; -use std::any::Any; +use std::{any::Any, fmt, time::Duration}; -/// Result of PVF preparation performed by the validation host. -pub type PrepareResult = Result<(), PrepareError>; +/// Result of PVF preparation performed by the validation host. Contains the elapsed CPU time if +/// successful +pub type PrepareResult = Result; /// An error that occurred during the prepare part of the PVF pipeline. #[derive(Debug, Clone, Encode, Decode)] @@ -31,9 +32,46 @@ pub enum PrepareError { Panic(String), /// Failed to prepare the PVF due to the time limit. TimedOut, - /// This state indicates that the process assigned to prepare the artifact wasn't responsible - /// or were killed. This state is reported by the validation host (not by the worker). - DidNotMakeIt, + /// An IO error occurred while receiving the result from the worker process. This state is reported by the + /// validation host (not by the worker). + IoErr, + /// The temporary file for the artifact could not be created at the given cache path. This state is reported by the + /// validation host (not by the worker). + CreateTmpFileErr(String), + /// The response from the worker is received, but the file cannot be renamed (moved) to the final destination + /// location. This state is reported by the validation host (not by the worker). + RenameTmpFileErr(String), +} + +impl PrepareError { + /// Returns whether this is a deterministic error, i.e. one that should trigger reliably. Those + /// errors depend on the PVF itself and the sc-executor/wasmtime logic. + /// + /// Non-deterministic errors can happen spuriously. Typically, they occur due to resource + /// starvation, e.g. under heavy load or memory pressure. Those errors are typically transient + /// but may persist e.g. if the node is run by overwhelmingly underpowered machine. + pub fn is_deterministic(&self) -> bool { + use PrepareError::*; + match self { + Prevalidation(_) | Preparation(_) | Panic(_) => true, + TimedOut | IoErr | CreateTmpFileErr(_) | RenameTmpFileErr(_) => false, + } + } +} + +impl fmt::Display for PrepareError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + use PrepareError::*; + match self { + Prevalidation(err) => write!(f, "prevalidation: {}", err), + Preparation(err) => write!(f, "preparation: {}", err), + Panic(err) => write!(f, "panic: {}", err), + TimedOut => write!(f, "prepare: timeout"), + IoErr => write!(f, "prepare: io error while receiving response"), + CreateTmpFileErr(err) => write!(f, "prepare: error creating tmp file: {}", err), + RenameTmpFileErr(err) => write!(f, "prepare: error renaming tmp file: {}", err), + } + } } /// A error raised during validation of the candidate. @@ -80,32 +118,17 @@ pub enum InvalidCandidate { impl From for ValidationError { fn from(error: PrepareError) -> Self { // Here we need to classify the errors into two errors: deterministic and non-deterministic. + // See [`PrepareError::is_deterministic`]. // - // Non-deterministic errors can happen spuriously. Typically, they occur due to resource - // starvation, e.g. under heavy load or memory pressure. Those errors are typically transient - // but may persist e.g. if the node is run by overwhelmingly underpowered machine. - // - // Deterministic errors should trigger reliably. Those errors depend on the PVF itself and - // the sc-executor/wasmtime logic. - // - // For now, at least until the PVF pre-checking lands, the deterministic errors will be - // treated as `InvalidCandidate`. Should those occur they could potentially trigger disputes. + // We treat the deterministic errors as `InvalidCandidate`. Should those occur they could + // potentially trigger disputes. // // All non-deterministic errors are qualified as `InternalError`s and will not trigger // disputes. - match error { - PrepareError::Prevalidation(err) => ValidationError::InvalidCandidate( - InvalidCandidate::PrepareError(format!("prevalidation: {}", err)), - ), - PrepareError::Preparation(err) => ValidationError::InvalidCandidate( - InvalidCandidate::PrepareError(format!("preparation: {}", err)), - ), - PrepareError::Panic(err) => ValidationError::InvalidCandidate( - InvalidCandidate::PrepareError(format!("panic: {}", err)), - ), - PrepareError::TimedOut => ValidationError::InternalError("prepare: timeout".to_owned()), - PrepareError::DidNotMakeIt => - ValidationError::InternalError("prepare: did not make it".to_owned()), + if error.is_deterministic() { + ValidationError::InvalidCandidate(InvalidCandidate::PrepareError(error.to_string())) + } else { + ValidationError::InternalError(error.to_string()) } } } diff --git a/node/core/pvf/src/execute/mod.rs b/node/core/pvf/src/execute/mod.rs index 86e1d79fc951..bc7f035a8b40 100644 --- a/node/core/pvf/src/execute/mod.rs +++ b/node/core/pvf/src/execute/mod.rs @@ -24,4 +24,4 @@ mod queue; mod worker; pub use queue::{start, ToQueue}; -pub use worker::worker_entrypoint; +pub use worker::{worker_entrypoint, Response as ExecuteResponse}; diff --git a/node/core/pvf/src/execute/queue.rs b/node/core/pvf/src/execute/queue.rs index b4c6a66b7719..72b6e450351b 100644 --- a/node/core/pvf/src/execute/queue.rs +++ b/node/core/pvf/src/execute/queue.rs @@ -225,9 +225,8 @@ fn handle_job_finish( result_tx: ResultSender, ) { let (idle_worker, result) = match outcome { - Outcome::Ok { result_descriptor, duration_ms, idle_worker } => { + Outcome::Ok { result_descriptor, duration: _, idle_worker } => { // TODO: propagate the soft timeout - drop(duration_ms); (Some(idle_worker), Ok(result_descriptor)) }, diff --git a/node/core/pvf/src/execute/worker.rs b/node/core/pvf/src/execute/worker.rs index a0b8337ddc4a..105accf18e2b 100644 --- a/node/core/pvf/src/execute/worker.rs +++ b/node/core/pvf/src/execute/worker.rs @@ -18,8 +18,9 @@ use crate::{ artifacts::ArtifactPathId, executor_intf::Executor, worker_common::{ - bytes_to_path, framed_recv, framed_send, path_to_bytes, spawn_with_program_path, - worker_event_loop, IdleWorker, SpawnErr, WorkerHandle, + bytes_to_path, cpu_time_monitor_loop, framed_recv, framed_send, path_to_bytes, + spawn_with_program_path, worker_event_loop, IdleWorker, JobKind, SpawnErr, WorkerHandle, + JOB_TIMEOUT_WALL_CLOCK_FACTOR, }, LOG_TARGET, }; @@ -27,12 +28,21 @@ use async_std::{ io, os::unix::net::UnixStream, path::{Path, PathBuf}, + task, }; +use cpu_time::ProcessTime; use futures::FutureExt; use futures_timer::Delay; use parity_scale_codec::{Decode, Encode}; use polkadot_parachain::primitives::ValidationResult; -use std::time::{Duration, Instant}; +use std::{ + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, + thread, + time::Duration, +}; /// Spawns a new worker with the given program path that acts as the worker and the spawn timeout. /// @@ -48,7 +58,7 @@ pub async fn spawn( pub enum Outcome { /// PVF execution completed successfully and the result is returned. The worker is ready for /// another job. - Ok { result_descriptor: ValidationResult, duration_ms: u64, idle_worker: IdleWorker }, + Ok { result_descriptor: ValidationResult, duration: Duration, idle_worker: IdleWorker }, /// The candidate validation failed. It may be for example because the wasm execution triggered a trap. /// Errors related to the preparation process are not expected to be encountered by the execution workers. InvalidCandidate { err: String, idle_worker: IdleWorker }, @@ -64,6 +74,8 @@ pub enum Outcome { /// Given the idle token of a worker and parameters of work, communicates with the worker and /// returns the outcome. +/// +/// NOTE: Returning the `HardTimeout` or `IoErr` errors will trigger the child process being killed. pub async fn start_work( worker: IdleWorker, artifact: ArtifactPathId, @@ -80,7 +92,9 @@ pub async fn start_work( artifact.path.display(), ); - if let Err(error) = send_request(&mut stream, &artifact.path, &validation_params).await { + if let Err(error) = + send_request(&mut stream, &artifact.path, &validation_params, execution_timeout).await + { gum::warn!( target: LOG_TARGET, worker_pid = %pid, @@ -91,6 +105,12 @@ pub async fn start_work( return Outcome::IoErr } + // We use a generous timeout here. This is in addition to the one in the child process, in + // case the child stalls. We have a wall clock timeout here in the host, but a CPU timeout + // in the child. We want to use CPU time because it varies less than wall clock time under + // load, but the CPU resources of the child can only be measured from the parent after the + // child process terminates. + let timeout = execution_timeout * JOB_TIMEOUT_WALL_CLOCK_FACTOR; let response = futures::select! { response = recv_response(&mut stream).fuse() => { match response { @@ -104,25 +124,47 @@ pub async fn start_work( ); return Outcome::IoErr }, - Ok(response) => response, + Ok(response) => { + if let Response::Ok{duration, ..} = response { + if duration > execution_timeout { + // The job didn't complete within the timeout. + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "execute job took {}ms cpu time, exceeded execution timeout {}ms.", + duration.as_millis(), + execution_timeout.as_millis(), + ); + + // Return a timeout error. + return Outcome::HardTimeout; + } + } + + response + }, } }, - _ = Delay::new(execution_timeout).fuse() => { + _ = Delay::new(timeout).fuse() => { gum::warn!( target: LOG_TARGET, worker_pid = %pid, validation_code_hash = ?artifact.id.code_hash, - "execution worker exceeded alloted time for execution", + "execution worker exceeded allotted time for execution", ); - return Outcome::HardTimeout; + // TODO: This case is not really a hard timeout as the timeout here in the host is + // lenient. Should fix this as part of + // https://github.com/paritytech/polkadot/issues/3754. + Response::TimedOut }, }; match response { - Response::Ok { result_descriptor, duration_ms } => - Outcome::Ok { result_descriptor, duration_ms, idle_worker: IdleWorker { stream, pid } }, + Response::Ok { result_descriptor, duration } => + Outcome::Ok { result_descriptor, duration, idle_worker: IdleWorker { stream, pid } }, Response::InvalidCandidate(err) => Outcome::InvalidCandidate { err, idle_worker: IdleWorker { stream, pid } }, + Response::TimedOut => Outcome::HardTimeout, Response::InternalError(err) => Outcome::InternalError { err, idle_worker: IdleWorker { stream, pid } }, } @@ -132,12 +174,14 @@ async fn send_request( stream: &mut UnixStream, artifact_path: &Path, validation_params: &[u8], + execution_timeout: Duration, ) -> io::Result<()> { framed_send(stream, path_to_bytes(artifact_path)).await?; - framed_send(stream, validation_params).await + framed_send(stream, validation_params).await?; + framed_send(stream, &execution_timeout.encode()).await } -async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec)> { +async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec, Duration)> { let artifact_path = framed_recv(stream).await?; let artifact_path = bytes_to_path(&artifact_path).ok_or_else(|| { io::Error::new( @@ -146,7 +190,14 @@ async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec)> ) })?; let params = framed_recv(stream).await?; - Ok((artifact_path, params)) + let execution_timeout = framed_recv(stream).await?; + let execution_timeout = Duration::decode(&mut &execution_timeout[..]).map_err(|_| { + io::Error::new( + io::ErrorKind::Other, + "execute pvf recv_request: failed to decode duration".to_string(), + ) + })?; + Ok((artifact_path, params, execution_timeout)) } async fn send_response(stream: &mut UnixStream, response: Response) -> io::Result<()> { @@ -164,9 +215,10 @@ async fn recv_response(stream: &mut UnixStream) -> io::Result { } #[derive(Encode, Decode)] -enum Response { - Ok { result_descriptor: ValidationResult, duration_ms: u64 }, +pub enum Response { + Ok { result_descriptor: ValidationResult, duration: Duration }, InvalidCandidate(String), + TimedOut, InternalError(String), } @@ -187,15 +239,53 @@ pub fn worker_entrypoint(socket_path: &str) { let executor = Executor::new().map_err(|e| { io::Error::new(io::ErrorKind::Other, format!("cannot create executor: {}", e)) })?; + loop { - let (artifact_path, params) = recv_request(&mut stream).await?; + let (artifact_path, params, execution_timeout) = recv_request(&mut stream).await?; gum::debug!( target: LOG_TARGET, worker_pid = %std::process::id(), "worker: validating artifact {}", artifact_path.display(), ); - let response = validate_using_artifact(&artifact_path, ¶ms, &executor).await; + + // Create a lock flag. We set it when either thread finishes. + let lock = Arc::new(AtomicBool::new(false)); + let cpu_time_start = ProcessTime::now(); + + // Spawn a new thread that runs the CPU time monitor. Continuously wakes up from + // sleeping and then either sleeps for the remaining CPU time, or kills the process if + // we exceed the CPU timeout. + let (stream_2, cpu_time_start_2, execution_timeout_2, lock_2) = + (stream.clone(), cpu_time_start, execution_timeout, lock.clone()); + let handle = + thread::Builder::new().name("CPU time monitor".into()).spawn(move || { + task::block_on(async { + cpu_time_monitor_loop( + JobKind::Execute, + stream_2, + cpu_time_start_2, + execution_timeout_2, + lock_2, + ) + .await; + }) + })?; + + let response = + validate_using_artifact(&artifact_path, ¶ms, &executor, cpu_time_start).await; + + let lock_result = + lock.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed); + if lock_result.is_err() { + // The other thread is still sending an error response over the socket. Wait on it + // and return. + let _ = handle.join(); + // Monitor thread detected timeout and likely already terminated the process, + // nothing to do. + continue + } + send_response(&mut stream, response).await?; } }); @@ -205,19 +295,19 @@ async fn validate_using_artifact( artifact_path: &Path, params: &[u8], executor: &Executor, + cpu_time_start: ProcessTime, ) -> Response { - let validation_started_at = Instant::now(); let descriptor_bytes = match unsafe { // SAFETY: this should be safe since the compiled artifact passed here comes from the // file created by the prepare workers. These files are obtained by calling // [`executor_intf::prepare`]. executor.execute(artifact_path.as_ref(), params) } { - Err(err) => return Response::format_invalid("execute", &err.to_string()), + Err(err) => return Response::format_invalid("execute", &err), Ok(d) => d, }; - let duration_ms = validation_started_at.elapsed().as_millis() as u64; + let duration = cpu_time_start.elapsed(); let result_descriptor = match ValidationResult::decode(&mut &descriptor_bytes[..]) { Err(err) => @@ -225,5 +315,5 @@ async fn validate_using_artifact( Ok(r) => r, }; - Response::Ok { result_descriptor, duration_ms } + Response::Ok { result_descriptor, duration } } diff --git a/node/core/pvf/src/executor_intf.rs b/node/core/pvf/src/executor_intf.rs index 6827fb636eac..c5578f5f81ad 100644 --- a/node/core/pvf/src/executor_intf.rs +++ b/node/core/pvf/src/executor_intf.rs @@ -96,7 +96,7 @@ pub fn prevalidate(code: &[u8]) -> Result Result, sc_executor_common::error::WasmError> { sc_executor_wasmtime::prepare_runtime_artifact(blob, &CONFIG.semantics) } @@ -424,7 +424,7 @@ impl sp_core::traits::ReadRuntimeVersion for ReadRuntimeVersion { use parity_scale_codec::Encode; Ok(version.encode()) }, - None => Err(format!("runtime version section is not found")), + None => Err("runtime version section is not found".to_string()), } } } diff --git a/node/core/pvf/src/host.rs b/node/core/pvf/src/host.rs index 5c29072da1c3..d7823ac44c77 100644 --- a/node/core/pvf/src/host.rs +++ b/node/core/pvf/src/host.rs @@ -218,7 +218,7 @@ pub fn start(config: Config, metrics: Metrics) -> (ValidationHost, impl Future { let from_queue = break_if_fatal!(from_prepare_queue.ok_or(Fatal)); - // Note that preparation always succeeds. + // Note that the preparation outcome is always reported as concluded. // // That's because the error conditions are written into the artifact and will be // reported at the time of the execution. It potentially, but not necessarily, can @@ -443,7 +443,7 @@ async fn handle_to_host( /// Handles PVF prechecking requests. /// -/// This tries to prepare the PVF by compiling the WASM blob within a given timeout ([`PRECHECK_COMPILATION_TIMEOUT`]). +/// This tries to prepare the PVF by compiling the WASM blob within a given timeout ([`PRECHECK_PREPARATION_TIMEOUT`]). /// /// If the prepare job failed previously, we may retry it under certain conditions. async fn handle_precheck_pvf( @@ -456,9 +456,9 @@ async fn handle_precheck_pvf( if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { match state { - ArtifactState::Prepared { last_time_needed } => { + ArtifactState::Prepared { last_time_needed, cpu_time_elapsed } => { *last_time_needed = SystemTime::now(); - let _ = result_sender.send(Ok(())); + let _ = result_sender.send(Ok(*cpu_time_elapsed)); }, ArtifactState::Preparing { waiting_for_response, num_failures: _ } => waiting_for_response.push(result_sender), @@ -490,7 +490,7 @@ async fn handle_precheck_pvf( /// /// If the prepare job failed previously, we may retry it under certain conditions. /// -/// When preparing for execution, we use a more lenient timeout ([`EXECUTE_COMPILATION_TIMEOUT`]) +/// When preparing for execution, we use a more lenient timeout ([`EXECUTE_PREPARATION_TIMEOUT`]) /// than when prechecking. async fn handle_execute_pvf( cache_path: &Path, @@ -505,7 +505,7 @@ async fn handle_execute_pvf( if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { match state { - ArtifactState::Prepared { last_time_needed } => { + ArtifactState::Prepared { last_time_needed, .. } => { *last_time_needed = SystemTime::now(); // This artifact has already been prepared, send it to the execute queue. @@ -563,7 +563,7 @@ async fn handle_execute_pvf( awaiting_prepare.add(artifact_id, execution_timeout, params, result_tx); } - return Ok(()) + Ok(()) } async fn handle_heads_up( @@ -701,11 +701,12 @@ async fn handle_prepare_done( } *state = match result { - Ok(()) => ArtifactState::Prepared { last_time_needed: SystemTime::now() }, + Ok(cpu_time_elapsed) => + ArtifactState::Prepared { last_time_needed: SystemTime::now(), cpu_time_elapsed }, Err(error) => ArtifactState::FailedToProcess { last_time_failed: SystemTime::now(), num_failures: *num_failures + 1, - error: error.clone(), + error, }, }; @@ -775,16 +776,15 @@ fn can_retry_prepare_after_failure( num_failures: u32, error: &PrepareError, ) -> bool { - use PrepareError::*; - match error { - // Gracefully returned an error, so it will probably be reproducible. Don't retry. - Prevalidation(_) | Preparation(_) => false, - // Retry if the retry cooldown has elapsed and if we have already retried less than - // `NUM_PREPARE_RETRIES` times. - Panic(_) | TimedOut | DidNotMakeIt => - SystemTime::now() >= last_time_failed + PREPARE_FAILURE_COOLDOWN && - num_failures <= NUM_PREPARE_RETRIES, + if error.is_deterministic() { + // This error is considered deterministic, so it will probably be reproducible. Don't retry. + return false } + + // Retry if the retry cooldown has elapsed and if we have already retried less than `NUM_PREPARE_RETRIES` times. IO + // errors may resolve themselves. + SystemTime::now() >= last_time_failed + PREPARE_FAILURE_COOLDOWN && + num_failures <= NUM_PREPARE_RETRIES } /// A stream that yields a pulse continuously at a given interval. @@ -1016,8 +1016,8 @@ mod tests { let mut builder = Builder::default(); builder.cleanup_pulse_interval = Duration::from_millis(100); builder.artifact_ttl = Duration::from_millis(500); - builder.artifacts.insert_prepared(artifact_id(1), mock_now); - builder.artifacts.insert_prepared(artifact_id(2), mock_now); + builder.artifacts.insert_prepared(artifact_id(1), mock_now, Duration::default()); + builder.artifacts.insert_prepared(artifact_id(2), mock_now, Duration::default()); let mut test = builder.build(); let mut host = test.host_handle(); @@ -1087,7 +1087,10 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) + .send(prepare::FromQueue { + artifact_id: artifact_id(1), + result: Ok(Duration::default()), + }) .await .unwrap(); let result_tx_pvf_1_1 = assert_matches!( @@ -1100,7 +1103,10 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { artifact_id: artifact_id(2), result: Ok(()) }) + .send(prepare::FromQueue { + artifact_id: artifact_id(2), + result: Ok(Duration::default()), + }) .await .unwrap(); let result_tx_pvf_2 = assert_matches!( @@ -1149,13 +1155,16 @@ mod tests { ); // Send `Ok` right away and poll the host. test.from_prepare_queue_tx - .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) + .send(prepare::FromQueue { + artifact_id: artifact_id(1), + result: Ok(Duration::default()), + }) .await .unwrap(); // No pending execute requests. test.poll_ensure_to_execute_queue_is_empty().await; // Received the precheck result. - assert_matches!(result_rx.now_or_never().unwrap().unwrap(), Ok(())); + assert_matches!(result_rx.now_or_never().unwrap().unwrap(), Ok(_)); // Send multiple requests for the same PVF. let mut precheck_receivers = Vec::new(); @@ -1253,7 +1262,10 @@ mod tests { prepare::ToQueue::Enqueue { .. } ); test.from_prepare_queue_tx - .send(prepare::FromQueue { artifact_id: artifact_id(2), result: Ok(()) }) + .send(prepare::FromQueue { + artifact_id: artifact_id(2), + result: Ok(Duration::default()), + }) .await .unwrap(); // The execute queue receives new request, preckecking is finished and we can @@ -1263,7 +1275,7 @@ mod tests { execute::ToQueue::Enqueue { .. } ); for result_rx in precheck_receivers { - assert_matches!(result_rx.now_or_never().unwrap().unwrap(), Ok(())); + assert_matches!(result_rx.now_or_never().unwrap().unwrap(), Ok(_)); } } @@ -1511,7 +1523,10 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) + .send(prepare::FromQueue { + artifact_id: artifact_id(1), + result: Ok(Duration::default()), + }) .await .unwrap(); diff --git a/node/core/pvf/src/lib.rs b/node/core/pvf/src/lib.rs index ef5f31889237..1aabb1100437 100644 --- a/node/core/pvf/src/lib.rs +++ b/node/core/pvf/src/lib.rs @@ -16,18 +16,27 @@ #![warn(missing_docs)] -//! A crate that implements PVF validation host. +//! A crate that implements the PVF validation host. +//! +//! For more background, refer to the Implementer's Guide: [PVF +//! Pre-checking](https://paritytech.github.io/polkadot/book/pvf-prechecking.html) and [Candidate +//! Validation](https://paritytech.github.io/polkadot/book/node/utility/candidate-validation.html#pvf-host). +//! +//! # Entrypoint //! //! This crate provides a simple API. You first [`start`] the validation host, which gives you the //! [handle][`ValidationHost`] and the future you need to poll. //! -//! Then using the handle the client can send two types of requests: +//! Then using the handle the client can send three types of requests: +//! +//! (a) PVF pre-checking. This takes the PVF [code][`Pvf`] and tries to prepare it (verify and +//! compile) in order to pre-check its validity. //! -//! (a) PVF execution. This accepts the PVF [`params`][`polkadot_parachain::primitives::ValidationParams`] +//! (b) PVF execution. This accepts the PVF [`params`][`polkadot_parachain::primitives::ValidationParams`] //! and the PVF [code][`Pvf`], prepares (verifies and compiles) the code, and then executes PVF //! with the `params`. //! -//! (b) Heads up. This request allows to signal that the given PVF may be needed soon and that it +//! (c) Heads up. This request allows to signal that the given PVF may be needed soon and that it //! should be prepared for execution. //! //! The preparation results are cached for some time after they either used or was signaled in heads up. @@ -39,7 +48,7 @@ //! PVF execution requests can specify the [priority][`Priority`] with which the given request should //! be handled. Different priority levels have different effects. This is discussed below. //! -//! Preparation started by a heads up signal always starts in with the background priority. If there +//! Preparation started by a heads up signal always starts with the background priority. If there //! is already a request for that PVF preparation under way the priority is inherited. If after heads //! up, a new PVF execution request comes in with a higher priority, then the original task's priority //! will be adjusted to match the new one if it's larger. @@ -48,6 +57,8 @@ //! //! # Under the hood //! +//! ## The flow +//! //! Under the hood, the validation host is built using a bunch of communicating processes, not //! dissimilar to actors. Each of such "processes" is a future task that contains an event loop that //! processes incoming messages, potentially delegating sub-tasks to other "processes". @@ -55,11 +66,13 @@ //! Two of these processes are queues. The first one is for preparation jobs and the second one is for //! execution. Both of the queues are backed by separate pools of workers of different kind. //! -//! Preparation workers handle preparation requests by preverifying and instrumenting PVF wasm code, +//! Preparation workers handle preparation requests by prevalidating and instrumenting PVF wasm code, //! and then passing it into the compiler, to prepare the artifact. //! -//! Artifact is a final product of preparation. If the preparation succeeded, then the artifact will -//! contain the compiled code usable for quick execution by a worker later on. +//! ## Artifacts +//! +//! An artifact is the final product of preparation. If the preparation succeeded, then the artifact +//! will contain the compiled code usable for quick execution by a worker later on. //! //! If the preparation failed, then the worker will still write the artifact with the error message. //! We save the artifact with the error so that we don't try to prepare the artifacts that are broken @@ -68,12 +81,14 @@ //! The artifact is saved on disk and is also tracked by an in memory table. This in memory table //! doesn't contain the artifact contents though, only a flag that the given artifact is compiled. //! +//! A pruning task will run at a fixed interval of time. This task will remove all artifacts that +//! weren't used or received a heads up signal for a while. +//! +//! ## Execution +//! //! The execute workers will be fed by the requests from the execution queue, which is basically a //! combination of a path to the compiled artifact and the //! [`params`][`polkadot_parachain::primitives::ValidationParams`]. -//! -//! Each fixed interval of time a pruning task will run. This task will remove all artifacts that -//! weren't used or received a heads up signal for a while. mod artifacts; mod error; diff --git a/node/core/pvf/src/metrics.rs b/node/core/pvf/src/metrics.rs index 20965ec7dbd7..8db105d895ea 100644 --- a/node/core/pvf/src/metrics.rs +++ b/node/core/pvf/src/metrics.rs @@ -183,6 +183,9 @@ impl metrics::Metrics for Metrics { ).buckets(vec![ // This is synchronized with `APPROVAL_EXECUTION_TIMEOUT` and // `BACKING_EXECUTION_TIMEOUT` constants in `node/primitives/src/lib.rs` + 0.01, + 0.025, + 0.05, 0.1, 0.25, 0.5, @@ -192,6 +195,9 @@ impl metrics::Metrics for Metrics { 4.0, 5.0, 6.0, + 8.0, + 10.0, + 12.0, ]), )?, registry, diff --git a/node/core/pvf/src/prepare/pool.rs b/node/core/pvf/src/prepare/pool.rs index 9ba64be97555..3319d44e7fb4 100644 --- a/node/core/pvf/src/prepare/pool.rs +++ b/node/core/pvf/src/prepare/pool.rs @@ -22,7 +22,6 @@ use crate::{ LOG_TARGET, }; use always_assert::never; -use assert_matches::assert_matches; use async_std::path::{Path, PathBuf}; use futures::{ channel::mpsc, future::BoxFuture, stream::FuturesUnordered, Future, FutureExt, StreamExt, @@ -232,7 +231,7 @@ fn handle_to_pool( // items concluded; // thus idle token is Some; // qed. - never!("unexpected abscence of the idle token in prepare pool"); + never!("unexpected absence of the idle token in prepare pool"); } } else { // That's a relatively normal situation since the queue may send `start_work` and @@ -294,26 +293,28 @@ fn handle_mux( Ok(()) }, PoolEvent::StartWork(worker, outcome) => { + // If we receive an outcome that the worker is unreachable or that an error occurred on + // the worker, we attempt to kill the worker process. match outcome { - Outcome::Concluded { worker: idle, result } => { - let data = match spawned.get_mut(worker) { - None => { - // Perhaps the worker was killed meanwhile and the result is no longer - // relevant. - return Ok(()) - }, - Some(data) => data, - }; - - // We just replace the idle worker that was loaned from this option during - // the work starting. - let old = data.idle.replace(idle); - assert_matches!(old, None, "attempt to overwrite an idle worker"); - - reply(from_pool, FromPool::Concluded { worker, rip: false, result })?; - - Ok(()) - }, + Outcome::Concluded { worker: idle, result } => + handle_concluded_no_rip(from_pool, spawned, worker, idle, result), + // Return `Concluded`, but do not kill the worker since the error was on the host side. + Outcome::CreateTmpFileErr { worker: idle, err } => handle_concluded_no_rip( + from_pool, + spawned, + worker, + idle, + Err(PrepareError::CreateTmpFileErr(err)), + ), + // Return `Concluded`, but do not kill the worker since the error was on the host side. + Outcome::RenameTmpFileErr { worker: idle, result: _, err } => + handle_concluded_no_rip( + from_pool, + spawned, + worker, + idle, + Err(PrepareError::RenameTmpFileErr(err)), + ), Outcome::Unreachable => { if attempt_retire(metrics, spawned, worker) { reply(from_pool, FromPool::Rip(worker))?; @@ -321,14 +322,14 @@ fn handle_mux( Ok(()) }, - Outcome::DidNotMakeIt => { + Outcome::IoErr => { if attempt_retire(metrics, spawned, worker) { reply( from_pool, FromPool::Concluded { worker, rip: true, - result: Err(PrepareError::DidNotMakeIt), + result: Err(PrepareError::IoErr), }, )?; } @@ -377,6 +378,40 @@ fn attempt_retire( } } +/// Handles the case where we received a response. There potentially was an error, but not the fault +/// of the worker as far as we know, so the worker should not be killed. +/// +/// This function tries to put the idle worker back into the pool and then replies with +/// `FromPool::Concluded` with `rip: false`. +fn handle_concluded_no_rip( + from_pool: &mut mpsc::UnboundedSender, + spawned: &mut HopSlotMap, + worker: Worker, + idle: IdleWorker, + result: PrepareResult, +) -> Result<(), Fatal> { + let data = match spawned.get_mut(worker) { + None => { + // Perhaps the worker was killed meanwhile and the result is no longer relevant. We + // already send `Rip` when purging if we detect that the worker is dead. + return Ok(()) + }, + Some(data) => data, + }; + + // We just replace the idle worker that was loaned from this option during + // the work starting. + let old = data.idle.replace(idle); + never!( + old.is_some(), + "old idle worker was taken out when starting work; we only replace it here; qed" + ); + + reply(from_pool, FromPool::Concluded { worker, rip: false, result })?; + + Ok(()) +} + /// Spins up the pool and returns the future that should be polled to make the pool functional. pub fn start( metrics: Metrics, diff --git a/node/core/pvf/src/prepare/queue.rs b/node/core/pvf/src/prepare/queue.rs index ae0757d80461..e78351af9839 100644 --- a/node/core/pvf/src/prepare/queue.rs +++ b/node/core/pvf/src/prepare/queue.rs @@ -364,16 +364,14 @@ async fn handle_worker_concluded( // the pool up to the hard cap. spawn_extra_worker(queue, false).await?; } + } else if queue.limits.should_cull(queue.workers.len() + queue.spawn_inflight) { + // We no longer need services of this worker. Kill it. + queue.workers.remove(worker); + send_pool(&mut queue.to_pool_tx, pool::ToPool::Kill(worker)).await?; } else { - if queue.limits.should_cull(queue.workers.len() + queue.spawn_inflight) { - // We no longer need services of this worker. Kill it. - queue.workers.remove(worker); - send_pool(&mut queue.to_pool_tx, pool::ToPool::Kill(worker)).await?; - } else { - // see if there are more work available and schedule it. - if let Some(job) = queue.unscheduled.next() { - assign(queue, worker, job).await?; - } + // see if there are more work available and schedule it. + if let Some(job) = queue.unscheduled.next() { + assign(queue, worker, job).await?; } } @@ -618,7 +616,11 @@ mod tests { let w = test.workers.insert(()); test.send_from_pool(pool::FromPool::Spawned(w)); - test.send_from_pool(pool::FromPool::Concluded { worker: w, rip: false, result: Ok(()) }); + test.send_from_pool(pool::FromPool::Concluded { + worker: w, + rip: false, + result: Ok(Duration::default()), + }); assert_eq!(test.poll_and_recv_from_queue().await.artifact_id, pvf(1).as_artifact_id()); } @@ -647,7 +649,11 @@ mod tests { assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. }); assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. }); - test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: false, result: Ok(()) }); + test.send_from_pool(pool::FromPool::Concluded { + worker: w1, + rip: false, + result: Ok(Duration::default()), + }); assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. }); @@ -693,7 +699,11 @@ mod tests { // That's a bit silly in this context, but in production there will be an entire pool up // to the `soft_capacity` of workers and it doesn't matter which one to cull. Either way, // we just check that edge case of an edge case works. - test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: false, result: Ok(()) }); + test.send_from_pool(pool::FromPool::Concluded { + worker: w1, + rip: false, + result: Ok(Duration::default()), + }); assert_eq!(test.poll_and_recv_to_pool().await, pool::ToPool::Kill(w1)); } @@ -719,7 +729,11 @@ mod tests { assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. }); // Conclude worker 1 and rip it. - test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: true, result: Ok(()) }); + test.send_from_pool(pool::FromPool::Concluded { + worker: w1, + rip: true, + result: Ok(Duration::default()), + }); // Since there is still work, the queue requested one extra worker to spawn to handle the // remaining enqueued work items. @@ -747,7 +761,7 @@ mod tests { test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: true, - result: Err(PrepareError::DidNotMakeIt), + result: Err(PrepareError::IoErr), }); test.poll_ensure_to_pool_is_empty().await; } diff --git a/node/core/pvf/src/prepare/worker.rs b/node/core/pvf/src/prepare/worker.rs index 1cf512894740..5b4212e1e313 100644 --- a/node/core/pvf/src/prepare/worker.rs +++ b/node/core/pvf/src/prepare/worker.rs @@ -18,8 +18,9 @@ use crate::{ artifacts::CompiledArtifact, error::{PrepareError, PrepareResult}, worker_common::{ - bytes_to_path, framed_recv, framed_send, path_to_bytes, spawn_with_program_path, - tmpfile_in, worker_event_loop, IdleWorker, SpawnErr, WorkerHandle, + bytes_to_path, cpu_time_monitor_loop, framed_recv, framed_send, path_to_bytes, + spawn_with_program_path, tmpfile_in, worker_event_loop, IdleWorker, JobKind, SpawnErr, + WorkerHandle, JOB_TIMEOUT_WALL_CLOCK_FACTOR, }, LOG_TARGET, }; @@ -27,10 +28,20 @@ use async_std::{ io, os::unix::net::UnixStream, path::{Path, PathBuf}, + task, }; +use cpu_time::ProcessTime; use parity_scale_codec::{Decode, Encode}; use sp_core::hexdisplay::HexDisplay; -use std::{panic, sync::Arc, time::Duration}; +use std::{ + panic, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, + thread, + time::Duration, +}; /// Spawns a new worker with the given program path that acts as the worker and the spawn timeout. /// @@ -48,18 +59,26 @@ pub enum Outcome { /// The host tried to reach the worker but failed. This is most likely because the worked was /// killed by the system. Unreachable, + /// The temporary file for the artifact could not be created at the given cache path. + CreateTmpFileErr { worker: IdleWorker, err: String }, + /// The response from the worker is received, but the file cannot be renamed (moved) to the + /// final destination location. + RenameTmpFileErr { worker: IdleWorker, result: PrepareResult, err: String }, /// The worker failed to finish the job until the given deadline. /// /// The worker is no longer usable and should be killed. TimedOut, - /// The execution was interrupted abruptly and the worker is not available anymore. + /// An IO error occurred while receiving the result from the worker process. /// /// This doesn't return an idle worker instance, thus this worker is no longer usable. - DidNotMakeIt, + IoErr, } /// Given the idle token of a worker and parameters of work, communicates with the worker and /// returns the outcome. +/// +/// NOTE: Returning the `TimedOut`, `IoErr` or `Unreachable` outcomes will trigger the child process +/// being killed. pub async fn start_work( worker: IdleWorker, code: Arc>, @@ -76,8 +95,8 @@ pub async fn start_work( artifact_path.display(), ); - with_tmp_file(pid, cache_path, |tmp_file| async move { - if let Err(err) = send_request(&mut stream, code, &tmp_file).await { + with_tmp_file(stream.clone(), pid, cache_path, |tmp_file| async move { + if let Err(err) = send_request(&mut stream, code, &tmp_file, preparation_timeout).await { gum::warn!( target: LOG_TARGET, worker_pid = %pid, @@ -88,92 +107,134 @@ pub async fn start_work( } // Wait for the result from the worker, keeping in mind that there may be a timeout, the - // worker may get killed, or something along these lines. + // worker may get killed, or something along these lines. In that case we should propagate + // the error to the pool. // - // In that case we should propagate the error to the pool. - - #[derive(Debug)] - enum Selected { - Done(PrepareResult), - IoErr, - Deadline, - } - - let selected = - match async_std::future::timeout(preparation_timeout, framed_recv(&mut stream)).await { - Ok(Ok(response_bytes)) => { - // Received bytes from worker within the time limit. - // By convention we expect encoded `PrepareResult`. - if let Ok(result) = PrepareResult::decode(&mut response_bytes.as_slice()) { - if result.is_ok() { - gum::debug!( - target: LOG_TARGET, - worker_pid = %pid, - "promoting WIP artifact {} to {}", - tmp_file.display(), - artifact_path.display(), - ); - - async_std::fs::rename(&tmp_file, &artifact_path) - .await - .map(|_| Selected::Done(result)) - .unwrap_or_else(|err| { - gum::warn!( - target: LOG_TARGET, - worker_pid = %pid, - "failed to rename the artifact from {} to {}: {:?}", - tmp_file.display(), - artifact_path.display(), - err, - ); - Selected::IoErr - }) - } else { - Selected::Done(result) - } - } else { - // We received invalid bytes from the worker. - let bound_bytes = &response_bytes[..response_bytes.len().min(4)]; - gum::warn!( - target: LOG_TARGET, - worker_pid = %pid, - "received unexpected response from the prepare worker: {}", - HexDisplay::from(&bound_bytes), - ); - Selected::IoErr - } - }, - Ok(Err(err)) => { - // Communication error within the time limit. - gum::warn!( - target: LOG_TARGET, - worker_pid = %pid, - "failed to recv a prepare response: {:?}", - err, - ); - Selected::IoErr - }, - Err(_) => { - // Timed out. - Selected::Deadline - }, - }; + // We use a generous timeout here. This is in addition to the one in the child process, in + // case the child stalls. We have a wall clock timeout here in the host, but a CPU timeout + // in the child. We want to use CPU time because it varies less than wall clock time under + // load, but the CPU resources of the child can only be measured from the parent after the + // child process terminates. + let timeout = preparation_timeout * JOB_TIMEOUT_WALL_CLOCK_FACTOR; + let result = async_std::future::timeout(timeout, framed_recv(&mut stream)).await; - match selected { - Selected::Done(result) => - Outcome::Concluded { worker: IdleWorker { stream, pid }, result }, - Selected::Deadline => Outcome::TimedOut, - Selected::IoErr => Outcome::DidNotMakeIt, + match result { + // Received bytes from worker within the time limit. + Ok(Ok(response_bytes)) => + handle_response_bytes( + IdleWorker { stream, pid }, + response_bytes, + pid, + tmp_file, + artifact_path, + preparation_timeout, + ) + .await, + Ok(Err(err)) => { + // Communication error within the time limit. + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "failed to recv a prepare response: {:?}", + err, + ); + Outcome::IoErr + }, + Err(_) => { + // Timed out here on the host. + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "did not recv a prepare response within the time limit", + ); + Outcome::TimedOut + }, } }) .await } +/// Handles the case where we successfully received response bytes on the host from the child. +/// +/// NOTE: Here we know the artifact exists, but is still located in a temporary file which will be +/// cleared by `with_tmp_file`. +async fn handle_response_bytes( + worker: IdleWorker, + response_bytes: Vec, + pid: u32, + tmp_file: PathBuf, + artifact_path: PathBuf, + preparation_timeout: Duration, +) -> Outcome { + // By convention we expect encoded `PrepareResult`. + let result = match PrepareResult::decode(&mut response_bytes.as_slice()) { + Ok(result) => result, + Err(_) => { + // We received invalid bytes from the worker. + let bound_bytes = &response_bytes[..response_bytes.len().min(4)]; + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "received unexpected response from the prepare worker: {}", + HexDisplay::from(&bound_bytes), + ); + return Outcome::IoErr + }, + }; + let cpu_time_elapsed = match result { + Ok(result) => result, + // Timed out on the child. This should already be logged by the child. + Err(PrepareError::TimedOut) => return Outcome::TimedOut, + Err(_) => return Outcome::Concluded { worker, result }, + }; + + if cpu_time_elapsed > preparation_timeout { + // The job didn't complete within the timeout. + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "prepare job took {}ms cpu time, exceeded preparation timeout {}ms. Clearing WIP artifact {}", + cpu_time_elapsed.as_millis(), + preparation_timeout.as_millis(), + tmp_file.display(), + ); + + // Return a timeout error. + // + // NOTE: The artifact exists, but is located in a temporary file which + // will be cleared by `with_tmp_file`. + return Outcome::TimedOut + } + + gum::debug!( + target: LOG_TARGET, + worker_pid = %pid, + "promoting WIP artifact {} to {}", + tmp_file.display(), + artifact_path.display(), + ); + + match async_std::fs::rename(&tmp_file, &artifact_path).await { + Ok(_) => Outcome::Concluded { worker, result }, + Err(err) => { + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + "failed to rename the artifact from {} to {}: {:?}", + tmp_file.display(), + artifact_path.display(), + err, + ); + Outcome::RenameTmpFileErr { worker, result, err: format!("{:?}", err) } + }, + } +} + /// Create a temporary file for an artifact at the given cache path and execute the given /// future/closure passing the file path in. /// /// The function will try best effort to not leave behind the temporary file. -async fn with_tmp_file(pid: u32, cache_path: &Path, f: F) -> Outcome +async fn with_tmp_file(stream: UnixStream, pid: u32, cache_path: &Path, f: F) -> Outcome where Fut: futures::Future, F: FnOnce(PathBuf) -> Fut, @@ -187,7 +248,10 @@ where "failed to create a temp file for the artifact: {:?}", err, ); - return Outcome::DidNotMakeIt + return Outcome::CreateTmpFileErr { + worker: IdleWorker { stream, pid }, + err: format!("{:?}", err), + } }, }; @@ -218,13 +282,15 @@ async fn send_request( stream: &mut UnixStream, code: Arc>, tmp_file: &Path, + preparation_timeout: Duration, ) -> io::Result<()> { - framed_send(stream, &*code).await?; + framed_send(stream, &code).await?; framed_send(stream, path_to_bytes(tmp_file)).await?; + framed_send(stream, &preparation_timeout.encode()).await?; Ok(()) } -async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf)> { +async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf, Duration)> { let code = framed_recv(stream).await?; let tmp_file = framed_recv(stream).await?; let tmp_file = bytes_to_path(&tmp_file).ok_or_else(|| { @@ -233,7 +299,14 @@ async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf)> "prepare pvf recv_request: non utf-8 artifact path".to_string(), ) })?; - Ok((code, tmp_file)) + let preparation_timeout = framed_recv(stream).await?; + let preparation_timeout = Duration::decode(&mut &preparation_timeout[..]).map_err(|_| { + io::Error::new( + io::ErrorKind::Other, + "prepare pvf recv_request: failed to decode duration".to_string(), + ) + })?; + Ok((code, tmp_file, preparation_timeout)) } /// The entrypoint that the spawned prepare worker should start with. The `socket_path` specifies @@ -241,7 +314,7 @@ async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf)> pub fn worker_entrypoint(socket_path: &str) { worker_event_loop("prepare", socket_path, |mut stream| async move { loop { - let (code, dest) = recv_request(&mut stream).await?; + let (code, dest, preparation_timeout) = recv_request(&mut stream).await?; gum::debug!( target: LOG_TARGET, @@ -249,18 +322,54 @@ pub fn worker_entrypoint(socket_path: &str) { "worker: preparing artifact", ); - let result = match prepare_artifact(&code) { + // Create a lock flag. We set it when either thread finishes. + let lock = Arc::new(AtomicBool::new(false)); + let cpu_time_start = ProcessTime::now(); + + // Spawn a new thread that runs the CPU time monitor. Continuously wakes up from + // sleeping and then either sleeps for the remaining CPU time, or kills the process if + // we exceed the CPU timeout. + let (stream_2, cpu_time_start_2, preparation_timeout_2, lock_2) = + (stream.clone(), cpu_time_start, preparation_timeout, lock.clone()); + let handle = + thread::Builder::new().name("CPU time monitor".into()).spawn(move || { + task::block_on(async { + cpu_time_monitor_loop( + JobKind::Prepare, + stream_2, + cpu_time_start_2, + preparation_timeout_2, + lock_2, + ) + .await; + }) + })?; + + // Prepares the artifact in a separate thread. + let result = match prepare_artifact(&code).await { Err(err) => { // Serialized error will be written into the socket. Err(err) }, Ok(compiled_artifact) => { + let cpu_time_elapsed = cpu_time_start.elapsed(); + + let lock_result = + lock.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed); + if lock_result.is_err() { + // The other thread is still sending an error response over the socket. Wait on it and + // return. + let _ = handle.join(); + // Monitor thread detected timeout and likely already terminated the + // process, nothing to do. + continue + } + // Write the serialized artifact into a temp file. - // PVF host only keeps artifacts statuses in its memory, - // successfully compiled code gets stored on the disk (and - // consequently deserialized by execute-workers). The prepare - // worker is only required to send an empty `Ok` to the pool - // to indicate the success. + // + // PVF host only keeps artifacts statuses in its memory, successfully compiled code gets stored + // on the disk (and consequently deserialized by execute-workers). The prepare worker is only + // required to send `Ok` to the pool to indicate the success. gum::debug!( target: LOG_TARGET, @@ -270,7 +379,7 @@ pub fn worker_entrypoint(socket_path: &str) { ); async_std::fs::write(&dest, &compiled_artifact).await?; - Ok(()) + Ok(cpu_time_elapsed) }, }; @@ -279,7 +388,7 @@ pub fn worker_entrypoint(socket_path: &str) { }); } -fn prepare_artifact(code: &[u8]) -> Result { +async fn prepare_artifact(code: &[u8]) -> Result { panic::catch_unwind(|| { let blob = match crate::executor_intf::prevalidate(code) { Err(err) => return Err(PrepareError::Prevalidation(format!("{:?}", err))), diff --git a/node/core/pvf/src/priority.rs b/node/core/pvf/src/priority.rs index de169be0696b..b80c9195832a 100644 --- a/node/core/pvf/src/priority.rs +++ b/node/core/pvf/src/priority.rs @@ -24,7 +24,7 @@ pub enum Priority { Normal, /// This priority is used for requests that are required to be processed as soon as possible. /// - /// For example, backing is on critical path and require execution as soon as possible. + /// For example, backing is on a critical path and requires execution as soon as possible. Critical, } diff --git a/node/core/pvf/src/testing.rs b/node/core/pvf/src/testing.rs index 3b64d130fc6a..cbd37b06d403 100644 --- a/node/core/pvf/src/testing.rs +++ b/node/core/pvf/src/testing.rs @@ -34,7 +34,7 @@ pub fn validate_candidate( let code = sp_maybe_compressed_blob::decompress(code, 10 * 1024 * 1024) .expect("Decompressing code failed"); - let blob = prevalidate(&*code)?; + let blob = prevalidate(&code)?; let artifact = prepare(blob)?; let tmpdir = tempfile::tempdir()?; let artifact_path = tmpdir.path().join("blob"); diff --git a/node/core/pvf/src/worker_common.rs b/node/core/pvf/src/worker_common.rs index 572e3717832b..e052bd77ed06 100644 --- a/node/core/pvf/src/worker_common.rs +++ b/node/core/pvf/src/worker_common.rs @@ -16,25 +16,55 @@ //! Common logic for implementation of worker processes. -use crate::LOG_TARGET; +use crate::{execute::ExecuteResponse, PrepareError, LOG_TARGET}; use async_std::{ io, + net::Shutdown, os::unix::net::{UnixListener, UnixStream}, path::{Path, PathBuf}, }; +use cpu_time::ProcessTime; use futures::{ never::Never, AsyncRead, AsyncReadExt as _, AsyncWrite, AsyncWriteExt as _, FutureExt as _, }; use futures_timer::Delay; +use parity_scale_codec::Encode; use pin_project::pin_project; use rand::Rng; use std::{ fmt, mem, pin::Pin, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, task::{Context, Poll}, time::Duration, }; +/// A multiple of the job timeout (in CPU time) for which we are willing to wait on the host (in +/// wall clock time). This is lenient because CPU time may go slower than wall clock time. +pub const JOB_TIMEOUT_WALL_CLOCK_FACTOR: u32 = 4; + +/// Some allowed overhead that we account for in the "CPU time monitor" thread's sleeps, on the +/// child process. +pub const JOB_TIMEOUT_OVERHEAD: Duration = Duration::from_millis(50); + +#[derive(Copy, Clone, Debug)] +pub enum JobKind { + Prepare, + Execute, +} + +impl fmt::Display for JobKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Prepare => write!(f, "prepare"), + Self::Execute => write!(f, "execute"), + } + } +} + /// This is publicly exposed only for integration tests. #[doc(hidden)] pub async fn spawn_with_program_path( @@ -156,7 +186,19 @@ where let stream = UnixStream::connect(socket_path).await?; let _ = async_std::fs::remove_file(socket_path).await; - event_loop(stream).await + let result = event_loop(stream.clone()).await; + + if let Err(err) = stream.shutdown(Shutdown::Both) { + // Log, but don't return error here, as it may shadow any error from `event_loop`. + gum::debug!( + target: LOG_TARGET, + "error shutting down stream at path {}: {}", + socket_path, + err + ); + } + + result }) .unwrap_err(); // it's never `Ok` because it's `Ok(Never)` @@ -169,6 +211,75 @@ where ); } +/// Loop that runs in the CPU time monitor thread on prepare and execute jobs. Continuously wakes up +/// from sleeping and then either sleeps for the remaining CPU time, or sends back a timeout error +/// if we exceed the CPU timeout. +/// +/// NOTE: If the job completes and this thread is still sleeping, it will continue sleeping in the +/// background. When it wakes, it will see that the flag has been set and return. +pub async fn cpu_time_monitor_loop( + job_kind: JobKind, + mut stream: UnixStream, + cpu_time_start: ProcessTime, + timeout: Duration, + lock: Arc, +) { + loop { + let cpu_time_elapsed = cpu_time_start.elapsed(); + + // Treat the timeout as CPU time, which is less subject to variance due to load. + if cpu_time_elapsed > timeout { + let result = lock.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed); + if result.is_err() { + // Hit the job-completed case first, return from this thread. + return + } + + // Log if we exceed the timeout. + gum::warn!( + target: LOG_TARGET, + worker_pid = %std::process::id(), + "{job_kind} job took {}ms cpu time, exceeded {job_kind} timeout {}ms", + cpu_time_elapsed.as_millis(), + timeout.as_millis(), + ); + + // Send back a `TimedOut` error. + // + // NOTE: This will cause the worker, whether preparation or execution, to be killed by + // the host. We do not kill the process here because it would interfere with the proper + // handling of this error. + let encoded_result = match job_kind { + JobKind::Prepare => { + let result: Result<(), PrepareError> = Err(PrepareError::TimedOut); + result.encode() + }, + JobKind::Execute => { + let result = ExecuteResponse::TimedOut; + result.encode() + }, + }; + // If we error here there is nothing we can do apart from log it. The receiving side + // will just have to time out. + if let Err(err) = framed_send(&mut stream, encoded_result.as_slice()).await { + gum::warn!( + target: LOG_TARGET, + worker_pid = %std::process::id(), + "{job_kind} worker -> pvf host: error sending result over the socket: {:?}", + err + ); + } + + return + } + + // Sleep for the remaining CPU time, plus a bit to account for overhead. Note that the sleep + // is wall clock time. The CPU clock may be slower than the wall clock. + let sleep_interval = timeout - cpu_time_elapsed + JOB_TIMEOUT_OVERHEAD; + std::thread::sleep(sleep_interval); + } +} + /// A struct that represents an idle worker. /// /// This struct is supposed to be used as a token that is passed by move into a subroutine that @@ -200,8 +311,8 @@ pub enum SpawnErr { /// This is a representation of a potentially running worker. Drop it and the process will be killed. /// /// A worker's handle is also a future that resolves when it's detected that the worker's process -/// has been terminated. Since the worker is running in another process it is obviously not necessary -/// to poll this future to make the worker run, it's only for termination detection. +/// has been terminated. Since the worker is running in another process it is obviously not +/// necessary to poll this future to make the worker run, it's only for termination detection. /// /// This future relies on the fact that a child process's stdout `fd` is closed upon it's termination. #[pin_project] diff --git a/node/core/pvf/tests/it/adder.rs b/node/core/pvf/tests/it/adder.rs index 83cbd27b6ed5..69b6b7d21979 100644 --- a/node/core/pvf/tests/it/adder.rs +++ b/node/core/pvf/tests/it/adder.rs @@ -23,7 +23,7 @@ use polkadot_parachain::primitives::{ }; #[async_std::test] -async fn execute_good_on_parent() { +async fn execute_good_block_on_parent() { let parent_head = HeadData { number: 0, parent_hash: [0; 32], post_state: hash_state(0) }; let block_data = BlockData { state: 0, add: 512 }; @@ -89,7 +89,7 @@ async fn execute_good_chain_on_parent() { } #[async_std::test] -async fn execute_bad_on_parent() { +async fn execute_bad_block_on_parent() { let parent_head = HeadData { number: 0, parent_hash: [0; 32], post_state: hash_state(0) }; let block_data = BlockData { diff --git a/node/core/pvf/tests/it/main.rs b/node/core/pvf/tests/it/main.rs index bf0983d50874..a6aaf5d369d4 100644 --- a/node/core/pvf/tests/it/main.rs +++ b/node/core/pvf/tests/it/main.rs @@ -101,6 +101,7 @@ async fn terminates_on_timeout() { #[async_std::test] async fn parallel_execution() { + // Run some jobs that do not complete, thus timing out. let host = TestHost::new(); let execute_pvf_future_1 = host.validate_candidate( halt::wasm_binary_unwrap(), @@ -124,11 +125,14 @@ async fn parallel_execution() { let start = std::time::Instant::now(); let (_, _) = futures::join!(execute_pvf_future_1, execute_pvf_future_2); - // total time should be < 2 x EXECUTION_TIMEOUT_SEC - const EXECUTION_TIMEOUT_SEC: u64 = 3; + // Total time should be < 2 x TEST_EXECUTION_TIMEOUT (two workers run in parallel). + let duration = std::time::Instant::now().duration_since(start); + let max_duration = 2 * TEST_EXECUTION_TIMEOUT; assert!( - std::time::Instant::now().duration_since(start) < - std::time::Duration::from_secs(EXECUTION_TIMEOUT_SEC * 2) + duration < max_duration, + "Expected duration {}ms to be less than {}ms", + duration.as_millis(), + max_duration.as_millis() ); } @@ -141,6 +145,7 @@ async fn execute_queue_doesnt_stall_if_workers_died() { // Here we spawn 8 validation jobs for the `halt` PVF and share those between 5 workers. The // first five jobs should timeout and the workers killed. For the next 3 jobs a new batch of // workers should be spun up. + let start = std::time::Instant::now(); futures::future::join_all((0u8..=8).map(|_| { host.validate_candidate( halt::wasm_binary_unwrap(), @@ -153,4 +158,15 @@ async fn execute_queue_doesnt_stall_if_workers_died() { ) })) .await; + + // Total time should be >= 2 x TEST_EXECUTION_TIMEOUT (two separate sets of workers that should + // both timeout). + let duration = std::time::Instant::now().duration_since(start); + let max_duration = 2 * TEST_EXECUTION_TIMEOUT; + assert!( + duration >= max_duration, + "Expected duration {}ms to be greater than or equal to {}ms", + duration.as_millis(), + max_duration.as_millis() + ); } diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index ff7ea662603c..b342e8aad980 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -1,14 +1,13 @@ [package] name = "polkadot-node-core-runtime-api" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } -memory-lru = "0.1.1" -parity-util-mem = { version = "0.12.0", default-features = false } +lru = "0.8" sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/runtime-api/src/cache.rs b/node/core/runtime-api/src/cache.rs index 0fe9b74dc86d..d202b46d0da3 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -14,10 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use std::collections::btree_map::BTreeMap; +use std::{collections::btree_map::BTreeMap, num::NonZeroUsize}; -use memory_lru::{MemoryLruCache, ResidentSize}; -use parity_util_mem::{MallocSizeOf, MallocSizeOfExt}; +use lru::LruCache; use sp_consensus_babe::Epoch; use polkadot_primitives::v2::{ @@ -28,126 +27,67 @@ use polkadot_primitives::v2::{ ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; -const AUTHORITIES_CACHE_SIZE: usize = 128 * 1024; -const VALIDATORS_CACHE_SIZE: usize = 64 * 1024; -const VALIDATOR_GROUPS_CACHE_SIZE: usize = 64 * 1024; -const AVAILABILITY_CORES_CACHE_SIZE: usize = 64 * 1024; -const PERSISTED_VALIDATION_DATA_CACHE_SIZE: usize = 64 * 1024; -const ASSUMED_VALIDATION_DATA_CACHE_SIZE: usize = 64 * 1024; -const CHECK_VALIDATION_OUTPUTS_CACHE_SIZE: usize = 64 * 1024; -const SESSION_INDEX_FOR_CHILD_CACHE_SIZE: usize = 64 * 1024; -const VALIDATION_CODE_CACHE_SIZE: usize = 10 * 1024 * 1024; -const CANDIDATE_PENDING_AVAILABILITY_CACHE_SIZE: usize = 64 * 1024; -const CANDIDATE_EVENTS_CACHE_SIZE: usize = 64 * 1024; -const SESSION_INFO_CACHE_SIZE: usize = 64 * 1024; -const DMQ_CONTENTS_CACHE_SIZE: usize = 64 * 1024; -const INBOUND_HRMP_CHANNELS_CACHE_SIZE: usize = 64 * 1024; -const CURRENT_BABE_EPOCH_CACHE_SIZE: usize = 64 * 1024; -const ON_CHAIN_VOTES_CACHE_SIZE: usize = 3 * 1024; -const PVFS_REQUIRE_PRECHECK_SIZE: usize = 1024; -const VALIDATION_CODE_HASH_CACHE_SIZE: usize = 64 * 1024; -const VERSION_CACHE_SIZE: usize = 4 * 1024; -const DISPUTES_CACHE_SIZE: usize = 64 * 1024; - -struct ResidentSizeOf(T); - -impl ResidentSize for ResidentSizeOf { - fn resident_size(&self) -> usize { - std::mem::size_of::() + self.0.malloc_size_of() - } -} - -struct DoesNotAllocate(T); - -impl ResidentSize for DoesNotAllocate { - fn resident_size(&self) -> usize { - std::mem::size_of::() - } -} - -// this is an ugly workaround for `AuthorityDiscoveryId` -// not implementing `MallocSizeOf` -struct VecOfDoesNotAllocate(Vec); - -impl ResidentSize for VecOfDoesNotAllocate { - fn resident_size(&self) -> usize { - std::mem::size_of::() * self.0.capacity() - } -} +/// For consistency we have the same capacity for all caches. We use 128 as we'll only need that +/// much if finality stalls (we only query state for unfinalized blocks + maybe latest finalized). +/// In any case, a cache is an optimization. We should avoid a situation where having a large cache +/// leads to OOM or puts pressure on other important stuff like PVF execution/preparation. +const DEFAULT_CACHE_CAP: NonZeroUsize = match NonZeroUsize::new(128) { + Some(cap) => cap, + None => panic!("lru capacity must be non-zero"), +}; pub(crate) struct RequestResultCache { - authorities: MemoryLruCache>, - validators: MemoryLruCache>>, - validator_groups: - MemoryLruCache>, GroupRotationInfo)>>, - availability_cores: MemoryLruCache>>, - persisted_validation_data: MemoryLruCache< - (Hash, ParaId, OccupiedCoreAssumption), - ResidentSizeOf>, - >, - assumed_validation_data: MemoryLruCache< - (ParaId, Hash), - ResidentSizeOf>, - >, - check_validation_outputs: - MemoryLruCache<(Hash, ParaId, CandidateCommitments), ResidentSizeOf>, - session_index_for_child: MemoryLruCache>, - validation_code: MemoryLruCache< - (Hash, ParaId, OccupiedCoreAssumption), - ResidentSizeOf>, - >, - validation_code_by_hash: - MemoryLruCache>>, - candidate_pending_availability: - MemoryLruCache<(Hash, ParaId), ResidentSizeOf>>, - candidate_events: MemoryLruCache>>, - session_info: MemoryLruCache>, - dmq_contents: - MemoryLruCache<(Hash, ParaId), ResidentSizeOf>>>, - inbound_hrmp_channels_contents: MemoryLruCache< - (Hash, ParaId), - ResidentSizeOf>>>, - >, - current_babe_epoch: MemoryLruCache>, - on_chain_votes: MemoryLruCache>>, - pvfs_require_precheck: MemoryLruCache>>, - validation_code_hash: MemoryLruCache< - (Hash, ParaId, OccupiedCoreAssumption), - ResidentSizeOf>, - >, - version: MemoryLruCache>, - disputes: MemoryLruCache< - Hash, - ResidentSizeOf)>>, - >, + authorities: LruCache>, + validators: LruCache>, + validator_groups: LruCache>, GroupRotationInfo)>, + availability_cores: LruCache>, + persisted_validation_data: + LruCache<(Hash, ParaId, OccupiedCoreAssumption), Option>, + assumed_validation_data: + LruCache<(ParaId, Hash), Option<(PersistedValidationData, ValidationCodeHash)>>, + check_validation_outputs: LruCache<(Hash, ParaId, CandidateCommitments), bool>, + session_index_for_child: LruCache, + validation_code: LruCache<(Hash, ParaId, OccupiedCoreAssumption), Option>, + validation_code_by_hash: LruCache>, + candidate_pending_availability: LruCache<(Hash, ParaId), Option>, + candidate_events: LruCache>, + session_info: LruCache, + dmq_contents: LruCache<(Hash, ParaId), Vec>>, + inbound_hrmp_channels_contents: + LruCache<(Hash, ParaId), BTreeMap>>>, + current_babe_epoch: LruCache, + on_chain_votes: LruCache>, + pvfs_require_precheck: LruCache>, + validation_code_hash: + LruCache<(Hash, ParaId, OccupiedCoreAssumption), Option>, + version: LruCache, + disputes: LruCache)>>, } impl Default for RequestResultCache { fn default() -> Self { Self { - authorities: MemoryLruCache::new(AUTHORITIES_CACHE_SIZE), - validators: MemoryLruCache::new(VALIDATORS_CACHE_SIZE), - validator_groups: MemoryLruCache::new(VALIDATOR_GROUPS_CACHE_SIZE), - availability_cores: MemoryLruCache::new(AVAILABILITY_CORES_CACHE_SIZE), - persisted_validation_data: MemoryLruCache::new(PERSISTED_VALIDATION_DATA_CACHE_SIZE), - assumed_validation_data: MemoryLruCache::new(ASSUMED_VALIDATION_DATA_CACHE_SIZE), - check_validation_outputs: MemoryLruCache::new(CHECK_VALIDATION_OUTPUTS_CACHE_SIZE), - session_index_for_child: MemoryLruCache::new(SESSION_INDEX_FOR_CHILD_CACHE_SIZE), - validation_code: MemoryLruCache::new(VALIDATION_CODE_CACHE_SIZE), - validation_code_by_hash: MemoryLruCache::new(VALIDATION_CODE_CACHE_SIZE), - candidate_pending_availability: MemoryLruCache::new( - CANDIDATE_PENDING_AVAILABILITY_CACHE_SIZE, - ), - candidate_events: MemoryLruCache::new(CANDIDATE_EVENTS_CACHE_SIZE), - session_info: MemoryLruCache::new(SESSION_INFO_CACHE_SIZE), - dmq_contents: MemoryLruCache::new(DMQ_CONTENTS_CACHE_SIZE), - inbound_hrmp_channels_contents: MemoryLruCache::new(INBOUND_HRMP_CHANNELS_CACHE_SIZE), - current_babe_epoch: MemoryLruCache::new(CURRENT_BABE_EPOCH_CACHE_SIZE), - on_chain_votes: MemoryLruCache::new(ON_CHAIN_VOTES_CACHE_SIZE), - pvfs_require_precheck: MemoryLruCache::new(PVFS_REQUIRE_PRECHECK_SIZE), - validation_code_hash: MemoryLruCache::new(VALIDATION_CODE_HASH_CACHE_SIZE), - version: MemoryLruCache::new(VERSION_CACHE_SIZE), - disputes: MemoryLruCache::new(DISPUTES_CACHE_SIZE), + authorities: LruCache::new(DEFAULT_CACHE_CAP), + validators: LruCache::new(DEFAULT_CACHE_CAP), + validator_groups: LruCache::new(DEFAULT_CACHE_CAP), + availability_cores: LruCache::new(DEFAULT_CACHE_CAP), + persisted_validation_data: LruCache::new(DEFAULT_CACHE_CAP), + assumed_validation_data: LruCache::new(DEFAULT_CACHE_CAP), + check_validation_outputs: LruCache::new(DEFAULT_CACHE_CAP), + session_index_for_child: LruCache::new(DEFAULT_CACHE_CAP), + validation_code: LruCache::new(DEFAULT_CACHE_CAP), + validation_code_by_hash: LruCache::new(DEFAULT_CACHE_CAP), + candidate_pending_availability: LruCache::new(DEFAULT_CACHE_CAP), + candidate_events: LruCache::new(DEFAULT_CACHE_CAP), + session_info: LruCache::new(DEFAULT_CACHE_CAP), + dmq_contents: LruCache::new(DEFAULT_CACHE_CAP), + inbound_hrmp_channels_contents: LruCache::new(DEFAULT_CACHE_CAP), + current_babe_epoch: LruCache::new(DEFAULT_CACHE_CAP), + on_chain_votes: LruCache::new(DEFAULT_CACHE_CAP), + pvfs_require_precheck: LruCache::new(DEFAULT_CACHE_CAP), + validation_code_hash: LruCache::new(DEFAULT_CACHE_CAP), + version: LruCache::new(DEFAULT_CACHE_CAP), + disputes: LruCache::new(DEFAULT_CACHE_CAP), } } } @@ -157,7 +97,7 @@ impl RequestResultCache { &mut self, relay_parent: &Hash, ) -> Option<&Vec> { - self.authorities.get(relay_parent).map(|v| &v.0) + self.authorities.get(relay_parent) } pub(crate) fn cache_authorities( @@ -165,22 +105,22 @@ impl RequestResultCache { relay_parent: Hash, authorities: Vec, ) { - self.authorities.insert(relay_parent, VecOfDoesNotAllocate(authorities)); + self.authorities.put(relay_parent, authorities); } pub(crate) fn validators(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.validators.get(relay_parent).map(|v| &v.0) + self.validators.get(relay_parent) } pub(crate) fn cache_validators(&mut self, relay_parent: Hash, validators: Vec) { - self.validators.insert(relay_parent, ResidentSizeOf(validators)); + self.validators.put(relay_parent, validators); } pub(crate) fn validator_groups( &mut self, relay_parent: &Hash, ) -> Option<&(Vec>, GroupRotationInfo)> { - self.validator_groups.get(relay_parent).map(|v| &v.0) + self.validator_groups.get(relay_parent) } pub(crate) fn cache_validator_groups( @@ -188,22 +128,22 @@ impl RequestResultCache { relay_parent: Hash, groups: (Vec>, GroupRotationInfo), ) { - self.validator_groups.insert(relay_parent, ResidentSizeOf(groups)); + self.validator_groups.put(relay_parent, groups); } pub(crate) fn availability_cores(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.availability_cores.get(relay_parent).map(|v| &v.0) + self.availability_cores.get(relay_parent) } pub(crate) fn cache_availability_cores(&mut self, relay_parent: Hash, cores: Vec) { - self.availability_cores.insert(relay_parent, ResidentSizeOf(cores)); + self.availability_cores.put(relay_parent, cores); } pub(crate) fn persisted_validation_data( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.persisted_validation_data.get(&key).map(|v| &v.0) + self.persisted_validation_data.get(&key) } pub(crate) fn cache_persisted_validation_data( @@ -211,14 +151,14 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), data: Option, ) { - self.persisted_validation_data.insert(key, ResidentSizeOf(data)); + self.persisted_validation_data.put(key, data); } pub(crate) fn assumed_validation_data( &mut self, key: (Hash, ParaId, Hash), ) -> Option<&Option<(PersistedValidationData, ValidationCodeHash)>> { - self.assumed_validation_data.get(&(key.1, key.2)).map(|v| &v.0) + self.assumed_validation_data.get(&(key.1, key.2)) } pub(crate) fn cache_assumed_validation_data( @@ -226,14 +166,14 @@ impl RequestResultCache { key: (ParaId, Hash), data: Option<(PersistedValidationData, ValidationCodeHash)>, ) { - self.assumed_validation_data.insert(key, ResidentSizeOf(data)); + self.assumed_validation_data.put(key, data); } pub(crate) fn check_validation_outputs( &mut self, key: (Hash, ParaId, CandidateCommitments), ) -> Option<&bool> { - self.check_validation_outputs.get(&key).map(|v| &v.0) + self.check_validation_outputs.get(&key) } pub(crate) fn cache_check_validation_outputs( @@ -241,11 +181,11 @@ impl RequestResultCache { key: (Hash, ParaId, CandidateCommitments), value: bool, ) { - self.check_validation_outputs.insert(key, ResidentSizeOf(value)); + self.check_validation_outputs.put(key, value); } pub(crate) fn session_index_for_child(&mut self, relay_parent: &Hash) -> Option<&SessionIndex> { - self.session_index_for_child.get(relay_parent).map(|v| &v.0) + self.session_index_for_child.get(relay_parent) } pub(crate) fn cache_session_index_for_child( @@ -253,14 +193,14 @@ impl RequestResultCache { relay_parent: Hash, index: SessionIndex, ) { - self.session_index_for_child.insert(relay_parent, ResidentSizeOf(index)); + self.session_index_for_child.put(relay_parent, index); } pub(crate) fn validation_code( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.validation_code.get(&key).map(|v| &v.0) + self.validation_code.get(&key) } pub(crate) fn cache_validation_code( @@ -268,7 +208,7 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), value: Option, ) { - self.validation_code.insert(key, ResidentSizeOf(value)); + self.validation_code.put(key, value); } // the actual key is `ValidationCodeHash` (`Hash` is ignored), @@ -277,7 +217,7 @@ impl RequestResultCache { &mut self, key: (Hash, ValidationCodeHash), ) -> Option<&Option> { - self.validation_code_by_hash.get(&key.1).map(|v| &v.0) + self.validation_code_by_hash.get(&key.1) } pub(crate) fn cache_validation_code_by_hash( @@ -285,14 +225,14 @@ impl RequestResultCache { key: ValidationCodeHash, value: Option, ) { - self.validation_code_by_hash.insert(key, ResidentSizeOf(value)); + self.validation_code_by_hash.put(key, value); } pub(crate) fn candidate_pending_availability( &mut self, key: (Hash, ParaId), ) -> Option<&Option> { - self.candidate_pending_availability.get(&key).map(|v| &v.0) + self.candidate_pending_availability.get(&key) } pub(crate) fn cache_candidate_pending_availability( @@ -300,11 +240,11 @@ impl RequestResultCache { key: (Hash, ParaId), value: Option, ) { - self.candidate_pending_availability.insert(key, ResidentSizeOf(value)); + self.candidate_pending_availability.put(key, value); } pub(crate) fn candidate_events(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.candidate_events.get(relay_parent).map(|v| &v.0) + self.candidate_events.get(relay_parent) } pub(crate) fn cache_candidate_events( @@ -312,22 +252,22 @@ impl RequestResultCache { relay_parent: Hash, events: Vec, ) { - self.candidate_events.insert(relay_parent, ResidentSizeOf(events)); + self.candidate_events.put(relay_parent, events); } pub(crate) fn session_info(&mut self, key: SessionIndex) -> Option<&SessionInfo> { - self.session_info.get(&key).map(|v| &v.0) + self.session_info.get(&key) } pub(crate) fn cache_session_info(&mut self, key: SessionIndex, value: SessionInfo) { - self.session_info.insert(key, ResidentSizeOf(value)); + self.session_info.put(key, value); } pub(crate) fn dmq_contents( &mut self, key: (Hash, ParaId), ) -> Option<&Vec>> { - self.dmq_contents.get(&key).map(|v| &v.0) + self.dmq_contents.get(&key) } pub(crate) fn cache_dmq_contents( @@ -335,14 +275,14 @@ impl RequestResultCache { key: (Hash, ParaId), value: Vec>, ) { - self.dmq_contents.insert(key, ResidentSizeOf(value)); + self.dmq_contents.put(key, value); } pub(crate) fn inbound_hrmp_channels_contents( &mut self, key: (Hash, ParaId), ) -> Option<&BTreeMap>>> { - self.inbound_hrmp_channels_contents.get(&key).map(|v| &v.0) + self.inbound_hrmp_channels_contents.get(&key) } pub(crate) fn cache_inbound_hrmp_channel_contents( @@ -350,22 +290,22 @@ impl RequestResultCache { key: (Hash, ParaId), value: BTreeMap>>, ) { - self.inbound_hrmp_channels_contents.insert(key, ResidentSizeOf(value)); + self.inbound_hrmp_channels_contents.put(key, value); } pub(crate) fn current_babe_epoch(&mut self, relay_parent: &Hash) -> Option<&Epoch> { - self.current_babe_epoch.get(relay_parent).map(|v| &v.0) + self.current_babe_epoch.get(relay_parent) } pub(crate) fn cache_current_babe_epoch(&mut self, relay_parent: Hash, epoch: Epoch) { - self.current_babe_epoch.insert(relay_parent, DoesNotAllocate(epoch)); + self.current_babe_epoch.put(relay_parent, epoch); } pub(crate) fn on_chain_votes( &mut self, relay_parent: &Hash, ) -> Option<&Option> { - self.on_chain_votes.get(relay_parent).map(|v| &v.0) + self.on_chain_votes.get(relay_parent) } pub(crate) fn cache_on_chain_votes( @@ -373,14 +313,14 @@ impl RequestResultCache { relay_parent: Hash, scraped: Option, ) { - self.on_chain_votes.insert(relay_parent, ResidentSizeOf(scraped)); + self.on_chain_votes.put(relay_parent, scraped); } pub(crate) fn pvfs_require_precheck( &mut self, relay_parent: &Hash, ) -> Option<&Vec> { - self.pvfs_require_precheck.get(relay_parent).map(|v| &v.0) + self.pvfs_require_precheck.get(relay_parent) } pub(crate) fn cache_pvfs_require_precheck( @@ -388,14 +328,14 @@ impl RequestResultCache { relay_parent: Hash, pvfs: Vec, ) { - self.pvfs_require_precheck.insert(relay_parent, ResidentSizeOf(pvfs)) + self.pvfs_require_precheck.put(relay_parent, pvfs); } pub(crate) fn validation_code_hash( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.validation_code_hash.get(&key).map(|v| &v.0) + self.validation_code_hash.get(&key) } pub(crate) fn cache_validation_code_hash( @@ -403,22 +343,22 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), value: Option, ) { - self.validation_code_hash.insert(key, ResidentSizeOf(value)); + self.validation_code_hash.put(key, value); } pub(crate) fn version(&mut self, relay_parent: &Hash) -> Option<&u32> { - self.version.get(&relay_parent).map(|v| &v.0) + self.version.get(relay_parent) } pub(crate) fn cache_version(&mut self, key: Hash, value: u32) { - self.version.insert(key, ResidentSizeOf(value)); + self.version.put(key, value); } pub(crate) fn disputes( &mut self, relay_parent: &Hash, ) -> Option<&Vec<(SessionIndex, CandidateHash, DisputeState)>> { - self.disputes.get(relay_parent).map(|v| &v.0) + self.disputes.get(relay_parent) } pub(crate) fn cache_disputes( @@ -426,7 +366,7 @@ impl RequestResultCache { relay_parent: Hash, value: Vec<(SessionIndex, CandidateHash, DisputeState)>, ) { - self.disputes.insert(relay_parent, ResidentSizeOf(value)); + self.disputes.put(relay_parent, value); } } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 36355b5759e6..de42ace3af0c 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -268,7 +268,7 @@ where let (sender, receiver) = oneshot::channel(); // TODO: make the cache great again https://github.com/paritytech/polkadot/issues/5546 - let request = match self.query_cache(relay_parent.clone(), request) { + let request = match self.query_cache(relay_parent, request) { Some(request) => request, None => return, }; diff --git a/node/gum/Cargo.toml b/node/gum/Cargo.toml index c9338cd71a81..13cb9954df43 100644 --- a/node/gum/Cargo.toml +++ b/node/gum/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "tracing-gum" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true description = "Stick logs together with the TraceID as provided by tempo" [dependencies] diff --git a/node/gum/proc-macro/Cargo.toml b/node/gum/proc-macro/Cargo.toml index 7fa597f759fe..fccd4d218121 100644 --- a/node/gum/proc-macro/Cargo.toml +++ b/node/gum/proc-macro/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "tracing-gum-proc-macro" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true description = "Generate an overseer including builder pattern and message wrapper from a single annotated struct definition." [package.metadata.docs.rs] diff --git a/node/jaeger/Cargo.toml b/node/jaeger/Cargo.toml index 2042d6cb60d7..b940307a4920 100644 --- a/node/jaeger/Cargo.toml +++ b/node/jaeger/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "polkadot-node-jaeger" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true description = "Polkadot Jaeger primitives, but equally useful for Grafana/Tempo" [dependencies] -async-std = "1.11.0" mick-jaeger = "0.1.8" lazy_static = "1.4" parking_lot = "0.12.0" @@ -15,5 +14,6 @@ polkadot-node-primitives = { path = "../primitives" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" +tokio = "1.22.0" log = "0.4.17" parity-scale-codec = { version = "3.1.5", default-features = false } diff --git a/node/jaeger/src/lib.rs b/node/jaeger/src/lib.rs index 5af77764d9c8..f33563a3d752 100644 --- a/node/jaeger/src/lib.rs +++ b/node/jaeger/src/lib.rs @@ -129,7 +129,7 @@ impl Jaeger { "jaeger-collector", Some("jaeger"), Box::pin(async move { - match async_std::net::UdpSocket::bind("0.0.0.0:0").await { + match tokio::net::UdpSocket::bind("0.0.0.0:0").await { Ok(udp_socket) => loop { let buf = traces_out.next().await; // UDP sending errors happen only either if the API is misused or in case of missing privilege. diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index 2f78fa43bdf2..c783693ca527 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -2,9 +2,9 @@ name = "polkadot-test-malus" description = "Misbehaving nodes for local testnets, system and Simnet tests." license = "GPL-3.0-only" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true readme = "README.md" publish = false @@ -23,7 +23,6 @@ polkadot-node-core-backing = { path = "../core/backing" } polkadot-node-primitives = { path = "../primitives" } polkadot-primitives = { path = "../../primitives" } polkadot-node-core-pvf = { path = "../core/pvf" } -parity-util-mem = { version = "0.12.0", default-features = false, features = ["jemalloc-global"] } color-eyre = { version = "0.6.1", default-features = false } assert_matches = "1.5" async-trait = "0.1.57" diff --git a/node/metrics/Cargo.toml b/node/metrics/Cargo.toml index 26ea24766e53..b49928dc8462 100644 --- a/node/metrics/Cargo.toml +++ b/node/metrics/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-metrics" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Subsystem metric helpers" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" @@ -28,7 +28,7 @@ assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" hyper = { version = "0.14.20", default-features = false, features = ["http1", "tcp"] } -tokio = "1.19.2" +tokio = "1.22.0" polkadot-test-service = { path = "../test/service", features=["runtime-metrics"]} substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/metrics/src/metronome.rs b/node/metrics/src/metronome.rs index 9184f7ac20ad..ac47e20319d8 100644 --- a/node/metrics/src/metronome.rs +++ b/node/metrics/src/metronome.rs @@ -49,7 +49,7 @@ impl futures::Stream for Metronome { loop { match self.state { MetronomeState::SetAlarm => { - let val = self.period.clone(); + let val = self.period; self.delay.reset(val); self.state = MetronomeState::Snooze; }, diff --git a/node/network/approval-distribution/Cargo.toml b/node/network/approval-distribution/Cargo.toml index b6efa097ac28..4138446b1851 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-approval-distribution" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] polkadot-node-primitives = { path = "../../primitives" } diff --git a/node/network/approval-distribution/src/lib.rs b/node/network/approval-distribution/src/lib.rs index 5afae66ae818..bf8a60fcefba 100644 --- a/node/network/approval-distribution/src/lib.rs +++ b/node/network/approval-distribution/src/lib.rs @@ -24,6 +24,7 @@ use futures::{channel::oneshot, FutureExt as _}; use polkadot_node_network_protocol::{ self as net_protocol, grid_topology::{RandomRouting, RequiredRouting, SessionGridTopologies, SessionGridTopology}, + peer_set::MAX_NOTIFICATION_SIZE, v1 as protocol_v1, PeerId, UnifiedReputationChange as Rep, Versioned, View, }; use polkadot_node_primitives::approval::{ @@ -309,7 +310,7 @@ enum MessageSource { impl MessageSource { fn peer_id(&self) -> Option { match self { - Self::Peer(id) => Some(id.clone()), + Self::Peer(id) => Some(*id), Self::Local => None, } } @@ -389,7 +390,7 @@ impl State { ) { let mut new_hashes = HashSet::new(); for meta in &metas { - match self.blocks.entry(meta.hash.clone()) { + match self.blocks.entry(meta.hash) { hash_map::Entry::Vacant(entry) => { let candidates_count = meta.candidates.len(); let mut candidates = Vec::with_capacity(candidates_count); @@ -398,7 +399,7 @@ impl State { entry.insert(BlockEntry { known_by: HashMap::new(), number: meta.number, - parent_hash: meta.parent_hash.clone(), + parent_hash: meta.parent_hash, knowledge: Knowledge::default(), candidates, session: meta.session, @@ -406,7 +407,7 @@ impl State { self.topologies.inc_session_refs(meta.session); - new_hashes.insert(meta.hash.clone()); + new_hashes.insert(meta.hash); // In case there are duplicates, we should only set this if the entry // was vacant. @@ -433,7 +434,7 @@ impl State { &mut self.blocks, &self.topologies, self.peer_views.len(), - peer_id.clone(), + *peer_id, view_intersection, rng, ) @@ -563,10 +564,8 @@ impl State { "Pending assignment", ); - pending.push(( - peer_id.clone(), - PendingMessage::Assignment(assignment, claimed_index), - )); + pending + .push((peer_id, PendingMessage::Assignment(assignment, claimed_index))); continue } @@ -574,7 +573,7 @@ impl State { self.import_and_circulate_assignment( ctx, metrics, - MessageSource::Peer(peer_id.clone()), + MessageSource::Peer(peer_id), assignment, claimed_index, rng, @@ -604,7 +603,7 @@ impl State { "Pending approval", ); - pending.push((peer_id.clone(), PendingMessage::Approval(approval_vote))); + pending.push((peer_id, PendingMessage::Approval(approval_vote))); continue } @@ -612,7 +611,7 @@ impl State { self.import_and_circulate_approval( ctx, metrics, - MessageSource::Peer(peer_id.clone()), + MessageSource::Peer(peer_id), approval_vote, ) .await; @@ -663,7 +662,7 @@ impl State { &mut self.blocks, &self.topologies, self.peer_views.len(), - peer_id.clone(), + peer_id, view, rng, ) @@ -709,7 +708,7 @@ impl State { ) where R: CryptoRng + Rng, { - let block_hash = assignment.block_hash.clone(); + let block_hash = assignment.block_hash; let validator_index = assignment.validator; let entry = match self.blocks.get_mut(&block_hash) { @@ -737,7 +736,7 @@ impl State { if let Some(peer_id) = source.peer_id() { // check if our knowledge of the peer already contains this assignment - match entry.known_by.entry(peer_id.clone()) { + match entry.known_by.entry(peer_id) { hash_map::Entry::Occupied(mut peer_knowledge) => { let peer_knowledge = peer_knowledge.get_mut(); if peer_knowledge.contains(&message_subject, message_kind) { @@ -761,13 +760,13 @@ impl State { ?message_subject, "Assignment from a peer is out of view", ); - modify_reputation(ctx.sender(), peer_id.clone(), COST_UNEXPECTED_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id, COST_UNEXPECTED_MESSAGE).await; }, } // if the assignment is known to be valid, reward the peer if entry.knowledge.contains(&message_subject, message_kind) { - modify_reputation(ctx.sender(), peer_id.clone(), BENEFIT_VALID_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE).await; if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) { gum::trace!(target: LOG_TARGET, ?peer_id, ?message_subject, "Known assignment"); peer_knowledge.received.insert(message_subject, message_kind); @@ -803,8 +802,7 @@ impl State { ); match result { AssignmentCheckResult::Accepted => { - modify_reputation(ctx.sender(), peer_id.clone(), BENEFIT_VALID_MESSAGE_FIRST) - .await; + modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE_FIRST).await; entry.knowledge.known_messages.insert(message_subject.clone(), message_kind); if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) { peer_knowledge.received.insert(message_subject.clone(), message_kind); @@ -970,7 +968,7 @@ impl State { source: MessageSource, vote: IndirectSignedApprovalVote, ) { - let block_hash = vote.block_hash.clone(); + let block_hash = vote.block_hash; let validator_index = vote.validator; let candidate_index = vote.candidate_index; @@ -1003,7 +1001,7 @@ impl State { } // check if our knowledge of the peer already contains this approval - match entry.known_by.entry(peer_id.clone()) { + match entry.known_by.entry(peer_id) { hash_map::Entry::Occupied(mut knowledge) => { let peer_knowledge = knowledge.get_mut(); if peer_knowledge.contains(&message_subject, message_kind) { @@ -1027,14 +1025,14 @@ impl State { ?message_subject, "Approval from a peer is out of view", ); - modify_reputation(ctx.sender(), peer_id.clone(), COST_UNEXPECTED_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id, COST_UNEXPECTED_MESSAGE).await; }, } // if the approval is known to be valid, reward the peer if entry.knowledge.contains(&message_subject, message_kind) { gum::trace!(target: LOG_TARGET, ?peer_id, ?message_subject, "Known approval"); - modify_reputation(ctx.sender(), peer_id.clone(), BENEFIT_VALID_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE).await; if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) { peer_knowledge.received.insert(message_subject.clone(), message_kind); } @@ -1065,8 +1063,7 @@ impl State { ); match result { ApprovalCheckResult::Accepted => { - modify_reputation(ctx.sender(), peer_id.clone(), BENEFIT_VALID_MESSAGE_FIRST) - .await; + modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE_FIRST).await; entry.knowledge.insert(message_subject.clone(), message_kind); if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) { @@ -1301,7 +1298,7 @@ impl State { break } - let peer_knowledge = entry.known_by.entry(peer_id.clone()).or_default(); + let peer_knowledge = entry.known_by.entry(peer_id).or_default(); let topology = topologies.get_topology(entry.session); @@ -1335,13 +1332,12 @@ impl State { } } - let message_subject = - MessageSubject(block.clone(), candidate_index, validator.clone()); + let message_subject = MessageSubject(block, candidate_index, *validator); let assignment_message = ( IndirectAssignmentCert { - block_hash: block.clone(), - validator: validator.clone(), + block_hash: block, + validator: *validator, cert: message_state.approval_state.assignment_cert().clone(), }, candidate_index, @@ -1350,8 +1346,8 @@ impl State { let approval_message = message_state.approval_state.approval_signature().map(|signature| { IndirectSignedApprovalVote { - block_hash: block.clone(), - validator: validator.clone(), + block_hash: block, + validator: *validator, candidate_index, signature, } @@ -1374,7 +1370,7 @@ impl State { } } - block = entry.parent_hash.clone(); + block = entry.parent_hash; } } @@ -1386,14 +1382,7 @@ impl State { "Sending assignments to unified peer", ); - sender - .send_message(NetworkBridgeTxMessage::SendValidationMessage( - vec![peer_id.clone()], - Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( - protocol_v1::ApprovalDistributionMessage::Assignments(assignments_to_send), - )), - )) - .await; + send_assignments_batched(sender, assignments_to_send, peer_id).await; } if !approvals_to_send.is_empty() { @@ -1404,14 +1393,7 @@ impl State { "Sending approvals to unified peer", ); - sender - .send_message(NetworkBridgeTxMessage::SendValidationMessage( - vec![peer_id], - Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( - protocol_v1::ApprovalDistributionMessage::Approvals(approvals_to_send), - )), - )) - .await; + send_approvals_batched(sender, approvals_to_send, peer_id).await; } } @@ -1558,13 +1540,12 @@ async fn adjust_required_routing_and_propagate ApprovalDistribution { SpawnedSubsystem { name: "approval-distribution-subsystem", future } } } + +/// Ensures the batch size is always at least 1 element. +const fn ensure_size_not_zero(size: usize) -> usize { + if 0 == size { + panic!("Batch size must be at least 1 (MAX_NOTIFICATION_SIZE constant is too low)",); + } + + size +} + +/// The maximum amount of assignments per batch is 33% of maximum allowed by protocol. +/// This is an arbitrary value. Bumping this up increases the maximum amount of approvals or assignments +/// we send in a single message to peers. Exceeding `MAX_NOTIFICATION_SIZE` will violate the protocol +/// configuration. +pub const MAX_ASSIGNMENT_BATCH_SIZE: usize = ensure_size_not_zero( + MAX_NOTIFICATION_SIZE as usize / + std::mem::size_of::<(IndirectAssignmentCert, CandidateIndex)>() / + 3, +); + +/// The maximum amount of approvals per batch is 33% of maximum allowed by protocol. +pub const MAX_APPROVAL_BATCH_SIZE: usize = ensure_size_not_zero( + MAX_NOTIFICATION_SIZE as usize / std::mem::size_of::() / 3, +); + +/// Send assignments while honoring the `max_notification_size` of the protocol. +/// +/// Splitting the messages into multiple notifications allows more granular processing at the +/// destination, such that the subsystem doesn't get stuck for long processing a batch +/// of assignments and can `select!` other tasks. +pub(crate) async fn send_assignments_batched( + sender: &mut impl overseer::ApprovalDistributionSenderTrait, + assignments: Vec<(IndirectAssignmentCert, CandidateIndex)>, + peer: PeerId, +) { + let mut batches = assignments.into_iter().peekable(); + + while batches.peek().is_some() { + let batch: Vec<_> = batches.by_ref().take(MAX_ASSIGNMENT_BATCH_SIZE).collect(); + + sender + .send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer], + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Assignments(batch), + )), + )) + .await; + } +} + +/// Send approvals while honoring the `max_notification_size` of the protocol. +pub(crate) async fn send_approvals_batched( + sender: &mut impl overseer::ApprovalDistributionSenderTrait, + approvals: Vec, + peer: PeerId, +) { + let mut batches = approvals.into_iter().peekable(); + + while batches.peek().is_some() { + let batch: Vec<_> = batches.by_ref().take(MAX_APPROVAL_BATCH_SIZE).collect(); + + sender + .send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer], + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Approvals(batch), + )), + )) + .await; + } +} diff --git a/node/network/approval-distribution/src/metrics.rs b/node/network/approval-distribution/src/metrics.rs index c0887b25f7f4..b14e54c57403 100644 --- a/node/network/approval-distribution/src/metrics.rs +++ b/node/network/approval-distribution/src/metrics.rs @@ -127,7 +127,7 @@ impl MetricsTrait for Metrics { prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( "polkadot_parachain_time_unify_with_peer", "Time spent within fn `unify_with_peer`.", - ))?, + ).buckets(vec![0.000625, 0.00125,0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,]))?, registry, )?, time_import_pending_now_known: prometheus::register( diff --git a/node/network/approval-distribution/src/tests.rs b/node/network/approval-distribution/src/tests.rs index 73aa461752ba..567cf22f23f1 100644 --- a/node/network/approval-distribution/src/tests.rs +++ b/node/network/approval-distribution/src/tests.rs @@ -2276,3 +2276,147 @@ fn resends_messages_periodically() { virtual_overseer }); } + +fn batch_test_round(message_count: usize) { + use polkadot_node_subsystem::SubsystemContext; + let pool = sp_core::testing::TaskExecutor::new(); + let mut state = State::default(); + + let (mut context, mut virtual_overseer) = test_helpers::make_subsystem_context(pool.clone()); + let subsystem = ApprovalDistribution::new(Default::default()); + let mut rng = rand_chacha::ChaCha12Rng::seed_from_u64(12345); + let mut sender = context.sender().clone(); + let subsystem = subsystem.run_inner(context, &mut state, &mut rng); + + let test_fut = async move { + let overseer = &mut virtual_overseer; + let validators = 0..message_count; + let assignments: Vec<_> = validators + .clone() + .map(|index| (fake_assignment_cert(Hash::zero(), ValidatorIndex(index as u32)), 0)) + .collect(); + + let approvals: Vec<_> = validators + .map(|index| IndirectSignedApprovalVote { + block_hash: Hash::zero(), + candidate_index: 0, + validator: ValidatorIndex(index as u32), + signature: dummy_signature(), + }) + .collect(); + + let peer = PeerId::random(); + send_assignments_batched(&mut sender, assignments.clone(), peer).await; + send_approvals_batched(&mut sender, approvals.clone(), peer).await; + + // Check expected assignments batches. + for assignment_index in (0..assignments.len()).step_by(super::MAX_ASSIGNMENT_BATCH_SIZE) { + assert_matches!( + overseer_recv(overseer).await, + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendValidationMessage( + peers, + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Assignments(sent_assignments) + )) + )) => { + // Last batch should cover all remaining messages. + if sent_assignments.len() < super::MAX_ASSIGNMENT_BATCH_SIZE { + assert_eq!(sent_assignments.len() + assignment_index, assignments.len()); + } else { + assert_eq!(sent_assignments.len(), super::MAX_ASSIGNMENT_BATCH_SIZE); + } + + assert_eq!(peers.len(), 1); + + for (message_index, assignment) in sent_assignments.iter().enumerate() { + assert_eq!(assignment.0, assignments[assignment_index + message_index].0); + assert_eq!(assignment.1, 0); + } + } + ); + } + + // Check approval vote batching. + for approval_index in (0..approvals.len()).step_by(super::MAX_APPROVAL_BATCH_SIZE) { + assert_matches!( + overseer_recv(overseer).await, + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendValidationMessage( + peers, + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Approvals(sent_approvals) + )) + )) => { + // Last batch should cover all remaining messages. + if sent_approvals.len() < super::MAX_APPROVAL_BATCH_SIZE { + assert_eq!(sent_approvals.len() + approval_index, approvals.len()); + } else { + assert_eq!(sent_approvals.len(), super::MAX_APPROVAL_BATCH_SIZE); + } + + assert_eq!(peers.len(), 1); + + for (message_index, approval) in sent_approvals.iter().enumerate() { + assert_eq!(approval, &approvals[approval_index + message_index]); + } + } + ); + } + virtual_overseer + }; + + futures::pin_mut!(test_fut); + futures::pin_mut!(subsystem); + + executor::block_on(future::join( + async move { + let mut overseer = test_fut.await; + overseer + .send(FromOrchestra::Signal(OverseerSignal::Conclude)) + .timeout(TIMEOUT) + .await + .expect("Conclude send timeout"); + }, + subsystem, + )); +} + +#[test] +fn batch_sending_1_msg() { + batch_test_round(1); +} + +#[test] +fn batch_sending_exactly_one_batch() { + batch_test_round(super::MAX_APPROVAL_BATCH_SIZE); + batch_test_round(super::MAX_ASSIGNMENT_BATCH_SIZE); +} + +#[test] +fn batch_sending_partial_batch() { + batch_test_round(super::MAX_APPROVAL_BATCH_SIZE * 2 + 4); + batch_test_round(super::MAX_ASSIGNMENT_BATCH_SIZE * 2 + 4); +} + +#[test] +fn batch_sending_multiple_same_len() { + batch_test_round(super::MAX_APPROVAL_BATCH_SIZE * 10); + batch_test_round(super::MAX_ASSIGNMENT_BATCH_SIZE * 10); +} + +#[test] +fn batch_sending_half_batch() { + batch_test_round(super::MAX_APPROVAL_BATCH_SIZE / 2); + batch_test_round(super::MAX_ASSIGNMENT_BATCH_SIZE / 2); +} + +#[test] +#[should_panic] +fn const_batch_size_panics_if_zero() { + crate::ensure_size_not_zero(0); +} + +#[test] +fn const_ensure_size_not_zero() { + crate::ensure_size_not_zero(super::MAX_ASSIGNMENT_BATCH_SIZE); + crate::ensure_size_not_zero(super::MAX_APPROVAL_BATCH_SIZE); +} diff --git a/node/network/availability-distribution/Cargo.toml b/node/network/availability-distribution/Cargo.toml index 3e0924a4a86b..5653e07a8bac 100644 --- a/node/network/availability-distribution/Cargo.toml +++ b/node/network/availability-distribution/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-availability-distribution" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/network/availability-distribution/src/requester/fetch_task/mod.rs b/node/network/availability-distribution/src/requester/fetch_task/mod.rs index 89b634a5ce7e..c6356c9ccd5f 100644 --- a/node/network/availability-distribution/src/requester/fetch_task/mod.rs +++ b/node/network/availability-distribution/src/requester/fetch_task/mod.rs @@ -326,6 +326,17 @@ impl RunningTask { &mut self, validator: &AuthorityDiscoveryId, ) -> std::result::Result { + gum::trace!( + target: LOG_TARGET, + origin = ?validator, + relay_parent = ?self.relay_parent, + group_index = ?self.group_index, + session_index = ?self.session_index, + chunk_index = ?self.request.index, + candidate_hash = ?self.request.candidate_hash, + "Starting chunk request", + ); + let (full_request, response_recv) = OutgoingRequest::new(Recipient::Authority(validator.clone()), self.request); let requests = Requests::ChunkFetchingV1(full_request); @@ -346,13 +357,13 @@ impl RunningTask { Err(RequestError::InvalidResponse(err)) => { gum::warn!( target: LOG_TARGET, - origin= ?validator, + origin = ?validator, relay_parent = ?self.relay_parent, group_index = ?self.group_index, session_index = ?self.session_index, chunk_index = ?self.request.index, candidate_hash = ?self.request.candidate_hash, - err= ?err, + err = ?err, "Peer sent us invalid erasure chunk data" ); Err(TaskError::PeerError) @@ -360,13 +371,13 @@ impl RunningTask { Err(RequestError::NetworkError(err)) => { gum::debug!( target: LOG_TARGET, - origin= ?validator, + origin = ?validator, relay_parent = ?self.relay_parent, group_index = ?self.group_index, session_index = ?self.session_index, chunk_index = ?self.request.index, candidate_hash = ?self.request.candidate_hash, - err= ?err, + err = ?err, "Some network error occurred when fetching erasure chunk" ); Err(TaskError::PeerError) @@ -374,7 +385,7 @@ impl RunningTask { Err(RequestError::Canceled(oneshot::Canceled)) => { gum::debug!( target: LOG_TARGET, - origin= ?validator, + origin = ?validator, relay_parent = ?self.relay_parent, group_index = ?self.group_index, session_index = ?self.session_index, diff --git a/node/network/availability-distribution/src/tests/state.rs b/node/network/availability-distribution/src/tests/state.rs index c021f1bfb81b..be77aa2d023c 100644 --- a/node/network/availability-distribution/src/tests/state.rs +++ b/node/network/availability-distribution/src/tests/state.rs @@ -51,7 +51,7 @@ use polkadot_primitives::v2::{ CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo, ValidatorIndex, }; -use test_helpers::{mock::make_ferdie_keystore, SingleItemSink}; +use test_helpers::mock::make_ferdie_keystore; use super::mock::{make_session_info, OccupiedCoreBuilder}; use crate::LOG_TARGET; @@ -295,7 +295,7 @@ impl TestState { } async fn overseer_signal( - mut tx: SingleItemSink>, + mut tx: mpsc::Sender>, msg: impl Into, ) { let msg = msg.into(); diff --git a/node/network/availability-recovery/Cargo.toml b/node/network/availability-recovery/Cargo.toml index a82f2360a0fc..c731808b1b86 100644 --- a/node/network/availability-recovery/Cargo.toml +++ b/node/network/availability-recovery/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-availability-recovery" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/network/availability-recovery/src/lib.rs b/node/network/availability-recovery/src/lib.rs index 5a2905082379..38acfbe88ff9 100644 --- a/node/network/availability-recovery/src/lib.rs +++ b/node/network/availability-recovery/src/lib.rs @@ -338,8 +338,7 @@ impl RequestChunksFromValidators { index: validator_index, }; - let (req, res) = - OutgoingRequest::new(Recipient::Authority(validator), raw_request.clone()); + let (req, res) = OutgoingRequest::new(Recipient::Authority(validator), raw_request); requests.push(Requests::ChunkFetchingV1(req)); params.metrics.on_chunk_request_issued(); @@ -973,7 +972,7 @@ async fn query_full_data( ctx.send_message(AvailabilityStoreMessage::QueryAvailableData(candidate_hash, tx)) .await; - Ok(rx.await.map_err(error::Error::CanceledQueryFullData)?) + rx.await.map_err(error::Error::CanceledQueryFullData) } #[overseer::contextbounds(AvailabilityRecovery, prefix = self::overseer)] diff --git a/node/network/bitfield-distribution/Cargo.toml b/node/network/bitfield-distribution/Cargo.toml index 6e819fbe7cf4..8ac7c2ac6bfb 100644 --- a/node/network/bitfield-distribution/Cargo.toml +++ b/node/network/bitfield-distribution/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-availability-bitfield-distribution" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/network/bitfield-distribution/src/lib.rs b/node/network/bitfield-distribution/src/lib.rs index 2a1e3b8d9ef3..1bd9230a3787 100644 --- a/node/network/bitfield-distribution/src/lib.rs +++ b/node/network/bitfield-distribution/src/lib.rs @@ -319,7 +319,7 @@ async fn handle_bitfield_distribution( } let validator_index = signed_availability.validator_index(); - let validator = if let Some(validator) = validator_set.get(*&validator_index.0 as usize) { + let validator = if let Some(validator) = validator_set.get(validator_index.0 as usize) { validator.clone() } else { gum::debug!(target: LOG_TARGET, validator_index = ?validator_index.0, "Could not find a validator for index"); @@ -395,7 +395,7 @@ async fn relay_message( }; if need_routing { - Some(peer.clone()) + Some(*peer) } else { None } @@ -412,7 +412,7 @@ async fn relay_message( // track the message as sent for this peer job_data .message_sent_to_peer - .entry(peer.clone()) + .entry(*peer) .or_default() .insert(validator.clone()); }); @@ -497,7 +497,7 @@ async fn process_incoming_peer_message( // Check if the peer already sent us a message for the validator denoted in the message earlier. // Must be done after validator index verification, in order to avoid storing an unbounded // number of set entries. - let received_set = job_data.message_received_from_peer.entry(origin.clone()).or_default(); + let received_set = job_data.message_received_from_peer.entry(origin).or_default(); if !received_set.contains(&validator) { received_set.insert(validator.clone()); @@ -656,7 +656,7 @@ async fn handle_peer_view_change( ) { let added = state .peer_views - .entry(origin.clone()) + .entry(origin) .or_default() .replace_difference(view) .cloned() @@ -681,11 +681,10 @@ async fn handle_peer_view_change( let delta_set: Vec<(ValidatorId, BitfieldGossipMessage)> = added .into_iter() .filter_map(|new_relay_parent_interest| { - if let Some(job_data) = (&*state).per_relay_parent.get(&new_relay_parent_interest) { + if let Some(job_data) = state.per_relay_parent.get(&new_relay_parent_interest) { // Send all jointly known messages for a validator (given the current relay parent) // to the peer `origin`... let one_per_validator = job_data.one_per_validator.clone(); - let origin = origin.clone(); Some(one_per_validator.into_iter().filter(move |(validator, _message)| { // ..except for the ones the peer already has. job_data.message_from_validator_needed_by_peer(&origin, validator) @@ -699,7 +698,7 @@ async fn handle_peer_view_change( .collect(); for (validator, message) in delta_set.into_iter() { - send_tracked_gossip_message(ctx, state, origin.clone(), validator, message).await; + send_tracked_gossip_message(ctx, state, origin, validator, message).await; } } @@ -727,11 +726,7 @@ async fn send_tracked_gossip_message( "Sending gossip message" ); - job_data - .message_sent_to_peer - .entry(dest.clone()) - .or_default() - .insert(validator.clone()); + job_data.message_sent_to_peer.entry(dest).or_default().insert(validator.clone()); ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( vec![dest], @@ -760,14 +755,14 @@ async fn query_basics( // query validators ctx.send_message(RuntimeApiMessage::Request( - relay_parent.clone(), + relay_parent, RuntimeApiRequest::Validators(validators_tx), )) .await; // query signing context ctx.send_message(RuntimeApiMessage::Request( - relay_parent.clone(), + relay_parent, RuntimeApiRequest::SessionIndexForChild(session_tx), )) .await; diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index 4ca402536000..56208ba6a3a3 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-network-bridge" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] always-assert = "0.1" diff --git a/node/network/bridge/src/network.rs b/node/network/bridge/src/network.rs index 9b326cbbfb38..ec7623bb2e1d 100644 --- a/node/network/bridge/src/network.rs +++ b/node/network/bridge/src/network.rs @@ -161,6 +161,12 @@ impl Network for Arc> { let peer_id = match peer { Recipient::Peer(peer_id) => Some(peer_id), Recipient::Authority(authority) => { + gum::trace!( + target: LOG_TARGET, + ?authority, + "Searching for peer id to connect to authority", + ); + let mut found_peer_id = None; // Note: `get_addresses_by_authority_id` searched in a cache, and it thus expected // to be very quick. @@ -174,7 +180,7 @@ impl Network for Arc> { Ok(v) => v, Err(_) => continue, }; - NetworkService::add_known_address(&*self, peer_id.clone(), addr); + NetworkService::add_known_address(self, peer_id, addr); found_peer_id = Some(peer_id); } found_peer_id @@ -196,8 +202,16 @@ impl Network for Arc> { Some(peer_id) => peer_id, }; + gum::trace!( + target: LOG_TARGET, + %peer_id, + protocol = %req_protocol_names.get_name(protocol), + ?if_disconnected, + "Starting request", + ); + NetworkService::start_request( - &*self, + self, peer_id, req_protocol_names.get_name(protocol), payload, diff --git a/node/network/bridge/src/rx/mod.rs b/node/network/bridge/src/rx/mod.rs index 8adbcf857811..1d3052d3a218 100644 --- a/node/network/bridge/src/rx/mod.rs +++ b/node/network/bridge/src/rx/mod.rs @@ -213,7 +213,7 @@ where PeerSet::Collation => &mut shared.collation_peers, }; - match peer_map.entry(peer.clone()) { + match peer_map.entry(peer) { hash_map::Entry::Occupied(_) => continue, hash_map::Entry::Vacant(vacant) => { vacant.insert(PeerData { view: View::default(), version }); @@ -234,12 +234,12 @@ where dispatch_validation_events_to_all( vec![ NetworkBridgeEvent::PeerConnected( - peer.clone(), + peer, role, version, maybe_authority, ), - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), + NetworkBridgeEvent::PeerViewChange(peer, View::default()), ], &mut sender, ) @@ -259,12 +259,12 @@ where dispatch_collation_events_to_all( vec![ NetworkBridgeEvent::PeerConnected( - peer.clone(), + peer, role, version, maybe_authority, ), - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), + NetworkBridgeEvent::PeerViewChange(peer, View::default()), ], &mut sender, ) @@ -421,7 +421,7 @@ where Some(ValidationVersion::V1.into()) { handle_v1_peer_messages::( - remote.clone(), + remote, PeerSet::Validation, &mut shared.0.lock().validation_peers, v_messages, @@ -442,7 +442,7 @@ where }; for report in reports { - network_service.report_peer(remote.clone(), report); + network_service.report_peer(remote, report); } dispatch_validation_events_to_all(events, &mut sender).await; @@ -454,7 +454,7 @@ where Some(CollationVersion::V1.into()) { handle_v1_peer_messages::( - remote.clone(), + remote, PeerSet::Collation, &mut shared.0.lock().collation_peers, c_messages, @@ -475,7 +475,7 @@ where }; for report in reports { - network_service.report_peer(remote.clone(), report); + network_service.report_peer(remote, report); } dispatch_collation_events_to_all(events, &mut sender).await; @@ -795,11 +795,11 @@ fn handle_v1_peer_messages>( } else { peer_data.view = new_view; - NetworkBridgeEvent::PeerViewChange(peer.clone(), peer_data.view.clone()) + NetworkBridgeEvent::PeerViewChange(peer, peer_data.view.clone()) } }, WireMessage::ProtocolMessage(message) => - NetworkBridgeEvent::PeerMessage(peer.clone(), message.into()), + NetworkBridgeEvent::PeerMessage(peer, message.into()), }) } diff --git a/node/network/collator-protocol/Cargo.toml b/node/network/collator-protocol/Cargo.toml index cae4ec2b1730..c7618baa3cd7 100644 --- a/node/network/collator-protocol/Cargo.toml +++ b/node/network/collator-protocol/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-collator-protocol" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] always-assert = "0.1.2" diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index 7a603a8a404a..f7b27583a6dd 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -561,7 +561,7 @@ async fn advertise_collation( let wire_message = protocol_v1::CollatorProtocolMessage::AdvertiseCollation(relay_parent); ctx.send_message(NetworkBridgeTxMessage::SendCollationMessage( - vec![peer.clone()], + vec![peer], Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), )) .await; @@ -707,11 +707,8 @@ async fn handle_incoming_peer_message( "AdvertiseCollation message is not expected on the collator side of the protocol", ); - ctx.send_message(NetworkBridgeTxMessage::ReportPeer( - origin.clone(), - COST_UNEXPECTED_MESSAGE, - )) - .await; + ctx.send_message(NetworkBridgeTxMessage::ReportPeer(origin, COST_UNEXPECTED_MESSAGE)) + .await; // If we are advertised to, this is another collator, and we should disconnect. ctx.send_message(NetworkBridgeTxMessage::DisconnectPeer(origin, PeerSet::Collation)) @@ -838,14 +835,14 @@ async fn handle_peer_view_change( peer_id: PeerId, view: View, ) { - let current = state.peer_views.entry(peer_id.clone()).or_default(); + let current = state.peer_views.entry(peer_id).or_default(); let added: Vec = view.difference(&*current).cloned().collect(); *current = view; for added in added.into_iter() { - advertise_collation(ctx, state, added, peer_id.clone()).await; + advertise_collation(ctx, state, added, peer_id).await; } } diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index b2b3dc4824b5..1442fbcc2bcb 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -287,7 +287,7 @@ impl PeerData { PeerState::Collating(ref mut state) => if state.advertisements.insert(on_relay_parent) { state.last_active = Instant::now(); - Ok((state.collator_id.clone(), state.para_id.clone())) + Ok((state.collator_id.clone(), state.para_id)) } else { Err(AdvertisementError::Duplicate) }, @@ -375,22 +375,19 @@ impl ActiveParas { .await .await .ok() - .map(|x| x.ok()) - .flatten(); + .and_then(|x| x.ok()); let mg = polkadot_node_subsystem_util::request_validator_groups(relay_parent, sender) .await .await .ok() - .map(|x| x.ok()) - .flatten(); + .and_then(|x| x.ok()); let mc = polkadot_node_subsystem_util::request_availability_cores(relay_parent, sender) .await .await .ok() - .map(|x| x.ok()) - .flatten(); + .and_then(|x| x.ok()); let (validators, groups, rotation_info, cores) = match (mv, mg, mc) { (Some(v), Some((g, r)), Some(c)) => (v, g, r, c), @@ -486,12 +483,7 @@ struct PendingCollation { impl PendingCollation { fn new(relay_parent: Hash, para_id: &ParaId, peer_id: &PeerId) -> Self { - Self { - relay_parent, - para_id: para_id.clone(), - peer_id: peer_id.clone(), - commitments_hash: None, - } + Self { relay_parent, para_id: *para_id, peer_id: *peer_id, commitments_hash: None } } } @@ -629,9 +621,9 @@ fn collator_peer_id( peer_data: &HashMap, collator_id: &CollatorId, ) -> Option { - peer_data.iter().find_map(|(peer, data)| { - data.collator_id().filter(|c| c == &collator_id).map(|_| peer.clone()) - }) + peer_data + .iter() + .find_map(|(peer, data)| data.collator_id().filter(|c| c == &collator_id).map(|_| *peer)) } async fn disconnect_peer(sender: &mut impl overseer::CollatorProtocolSenderTrait, peer_id: PeerId) { @@ -655,9 +647,7 @@ async fn fetch_collation( Delay::new(MAX_UNSHARED_DOWNLOAD_TIME).await; (collator_id, relay_parent) }; - state - .collation_fetch_timeouts - .push(timeout(id.clone(), relay_parent.clone()).boxed()); + state.collation_fetch_timeouts.push(timeout(id.clone(), relay_parent).boxed()); if let Some(peer_data) = state.peer_data.get(&peer_id) { if peer_data.has_advertised(&relay_parent) { @@ -729,7 +719,7 @@ async fn notify_collation_seconded( /// - Ongoing collation requests have to be canceled. /// - Advertisements by this peer that are no longer relevant have to be removed. async fn handle_peer_view_change(state: &mut State, peer_id: PeerId, view: View) -> Result<()> { - let peer_data = state.peer_data.entry(peer_id.clone()).or_default(); + let peer_data = state.peer_data.entry(peer_id).or_default(); peer_data.update_view(view); state @@ -883,7 +873,7 @@ async fn process_incoming_peer_message( "Declared as collator for unneeded para", ); - modify_reputation(ctx.sender(), origin.clone(), COST_UNNEEDED_COLLATOR).await; + modify_reputation(ctx.sender(), origin, COST_UNNEEDED_COLLATOR).await; gum::trace!(target: LOG_TARGET, "Disconnecting unneeded collator"); disconnect_peer(ctx.sender(), origin).await; } @@ -1013,7 +1003,7 @@ async fn handle_our_view_change( .span_per_head() .iter() .filter(|v| !old_view.contains(&v.0)) - .map(|v| (v.0.clone(), v.1.clone())) + .map(|v| (*v.0, v.1.clone())) .collect(); added.into_iter().for_each(|(h, s)| { @@ -1046,7 +1036,7 @@ async fn handle_our_view_change( ?para_id, "Disconnecting peer on view change (not current parachain id)" ); - disconnect_peer(ctx.sender(), peer_id.clone()).await; + disconnect_peer(ctx.sender(), *peer_id).await; } } } @@ -1254,7 +1244,7 @@ async fn poll_requests( retained_requested.insert(pending_collation.clone()); } if let CollationFetchResult::Error(Some(rep)) = result { - reputation_changes.push((pending_collation.peer_id.clone(), rep)); + reputation_changes.push((pending_collation.peer_id, rep)); } } requested_collations.retain(|k, _| retained_requested.contains(k)); @@ -1337,11 +1327,7 @@ async fn handle_collation_fetched_result( if let Entry::Vacant(entry) = state.pending_candidates.entry(relay_parent) { collation_event.1.commitments_hash = Some(candidate_receipt.commitments_hash); ctx.sender() - .send_message(CandidateBackingMessage::Second( - relay_parent.clone(), - candidate_receipt, - pov, - )) + .send_message(CandidateBackingMessage::Second(relay_parent, candidate_receipt, pov)) .await; entry.insert(collation_event); @@ -1366,7 +1352,7 @@ async fn disconnect_inactive_peers( for (peer, peer_data) in peers { if peer_data.is_inactive(&eviction_policy) { gum::trace!(target: LOG_TARGET, "Disconnecting inactive peer"); - disconnect_peer(sender, peer.clone()).await; + disconnect_peer(sender, *peer).await; } } } diff --git a/node/network/dispute-distribution/Cargo.toml b/node/network/dispute-distribution/Cargo.toml index d70d41f6916f..4db7b854a74d 100644 --- a/node/network/dispute-distribution/Cargo.toml +++ b/node/network/dispute-distribution/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-dispute-distribution" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/network/dispute-distribution/src/receiver/mod.rs b/node/network/dispute-distribution/src/receiver/mod.rs index 158c66e20655..b84be7b2dfde 100644 --- a/node/network/dispute-distribution/src/receiver/mod.rs +++ b/node/network/dispute-distribution/src/receiver/mod.rs @@ -302,6 +302,12 @@ where // Queue request: if let Err((authority_id, req)) = self.peer_queues.push_req(authority_id, req) { + gum::debug!( + target: LOG_TARGET, + ?authority_id, + ?peer, + "Peer hit the rate limit - dropping message." + ); req.send_outgoing_response(OutgoingResponse { result: Err(()), reputation_changes: vec![COST_APPARENT_FLOOD], @@ -424,7 +430,7 @@ where ); return }, - Some(vote) => (vote.0.session_index(), vote.0.candidate_hash().clone()), + Some(vote) => (vote.0.session_index(), *vote.0.candidate_hash()), }; let (pending_confirmation, confirmation_rx) = oneshot::channel(); diff --git a/node/network/dispute-distribution/src/sender/mod.rs b/node/network/dispute-distribution/src/sender/mod.rs index 64299e52bf23..a54033945d6f 100644 --- a/node/network/dispute-distribution/src/sender/mod.rs +++ b/node/network/dispute-distribution/src/sender/mod.rs @@ -108,8 +108,6 @@ impl DisputeSender { runtime: &mut RuntimeInfo, msg: DisputeMessage, ) -> Result<()> { - self.rate_limit.limit().await; - let req: DisputeRequest = msg.into(); let candidate_hash = req.0.candidate_receipt.hash(); match self.disputes.entry(candidate_hash) { @@ -118,6 +116,8 @@ impl DisputeSender { return Ok(()) }, Entry::Vacant(vacant) => { + self.rate_limit.limit("in start_sender", candidate_hash).await; + let send_task = SendTask::new( ctx, runtime, @@ -169,10 +169,12 @@ impl DisputeSender { // Iterates in order of insertion: let mut should_rate_limit = true; - for dispute in self.disputes.values_mut() { + for (candidate_hash, dispute) in self.disputes.iter_mut() { if have_new_sessions || dispute.has_failed_sends() { if should_rate_limit { - self.rate_limit.limit().await; + self.rate_limit + .limit("while going through new sessions/failed sends", *candidate_hash) + .await; } let sends_happened = dispute .refresh_sends(ctx, runtime, &self.active_sessions, &self.metrics) @@ -193,7 +195,7 @@ impl DisputeSender { // recovered at startup will be relatively "old" anyway and we assume that no more than a // third of the validators will go offline at any point in time anyway. for dispute in unknown_disputes { - self.rate_limit.limit().await; + // Rate limiting handled inside `start_send_for_dispute` (calls `start_sender`). self.start_send_for_dispute(ctx, runtime, dispute).await?; } Ok(()) @@ -277,7 +279,7 @@ impl DisputeSender { Some(votes) => votes, }; - let our_valid_vote = votes.valid.get(&our_index); + let our_valid_vote = votes.valid.raw().get(&our_index); let our_invalid_vote = votes.invalid.get(&our_index); @@ -289,7 +291,7 @@ impl DisputeSender { } else if let Some(our_invalid_vote) = our_invalid_vote { // Get some valid vote as well: let valid_vote = - votes.valid.iter().next().ok_or(JfyiError::MissingVotesFromCoordinator)?; + votes.valid.raw().iter().next().ok_or(JfyiError::MissingVotesFromCoordinator)?; (valid_vote, (&our_index, our_invalid_vote)) } else { // There is no vote from us yet - nothing to do. @@ -302,7 +304,7 @@ impl DisputeSender { .get(*valid_index) .ok_or(JfyiError::InvalidStatementFromCoordinator)?; let valid_signed = SignedDisputeStatement::new_checked( - DisputeStatement::Valid(kind.clone()), + DisputeStatement::Valid(*kind), candidate_hash, session_index, valid_public.clone(), @@ -317,7 +319,7 @@ impl DisputeSender { .get(*invalid_index) .ok_or(JfyiError::InvalidValidatorIndexFromCoordinator)?; let invalid_signed = SignedDisputeStatement::new_checked( - DisputeStatement::Invalid(kind.clone()), + DisputeStatement::Invalid(*kind), candidate_hash, session_index, invalid_public.clone(), @@ -383,16 +385,23 @@ impl RateLimit { } /// Wait until ready and prepare for next call. - async fn limit(&mut self) { + /// + /// String given as occasion and candidate hash are logged in case the rate limit hit. + async fn limit(&mut self, occasion: &'static str, candidate_hash: CandidateHash) { // Wait for rate limit and add some logging: + let mut num_wakes: u32 = 0; poll_fn(|cx| { let old_limit = Pin::new(&mut self.limit); match old_limit.poll(cx) { Poll::Pending => { gum::debug!( target: LOG_TARGET, + ?occasion, + ?candidate_hash, + ?num_wakes, "Sending rate limit hit, slowing down requests" ); + num_wakes += 1; Poll::Pending }, Poll::Ready(()) => Poll::Ready(()), diff --git a/node/network/dispute-distribution/src/sender/send_task.rs b/node/network/dispute-distribution/src/sender/send_task.rs index 89b5c099bde9..3852adbc141b 100644 --- a/node/network/dispute-distribution/src/sender/send_task.rs +++ b/node/network/dispute-distribution/src/sender/send_task.rs @@ -140,21 +140,38 @@ impl SendTask { let new_authorities = self.get_relevant_validators(ctx, runtime, active_sessions).await?; // Note this will also contain all authorities for which sending failed previously: - let add_authorities = new_authorities + let add_authorities: Vec<_> = new_authorities .iter() .filter(|a| !self.deliveries.contains_key(a)) .map(Clone::clone) .collect(); // Get rid of dead/irrelevant tasks/statuses: + gum::trace!( + target: LOG_TARGET, + already_running_deliveries = ?self.deliveries.len(), + "Cleaning up deliveries" + ); self.deliveries.retain(|k, _| new_authorities.contains(k)); // Start any new tasks that are needed: + gum::trace!( + target: LOG_TARGET, + new_and_failed_authorities = ?add_authorities.len(), + overall_authority_set_size = ?new_authorities.len(), + already_running_deliveries = ?self.deliveries.len(), + "Starting new send requests for authorities." + ); let new_statuses = send_requests(ctx, self.tx.clone(), add_authorities, self.request.clone(), metrics) .await?; let was_empty = new_statuses.is_empty(); + gum::trace!( + target: LOG_TARGET, + sent_requests = ?new_statuses.len(), + "Requests dispatched." + ); self.has_failed_sends = false; self.deliveries.extend(new_statuses.into_iter()); diff --git a/node/network/gossip-support/Cargo.toml b/node/network/gossip-support/Cargo.toml index fa99366c098d..2236b72d3c77 100644 --- a/node/network/gossip-support/Cargo.toml +++ b/node/network/gossip-support/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-gossip-support" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/network/protocol/Cargo.toml b/node/network/protocol/Cargo.toml index c3fa1faedb67..2cfe1ce58e61 100644 --- a/node/network/protocol/Cargo.toml +++ b/node/network/protocol/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-network-protocol" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true description = "Primitives types for the Node-side" [dependencies] diff --git a/node/network/protocol/src/grid_topology.rs b/node/network/protocol/src/grid_topology.rs index 100ef66957bd..2ae43c07c355 100644 --- a/node/network/protocol/src/grid_topology.rs +++ b/node/network/protocol/src/grid_topology.rs @@ -94,7 +94,7 @@ impl SessionGridTopology { let n = &self.canonical_shuffling[r_n]; grid_subset.validator_indices_x.insert(n.validator_index); for p in &n.peer_ids { - grid_subset.peers_x.insert(p.clone()); + grid_subset.peers_x.insert(*p); } } @@ -102,7 +102,7 @@ impl SessionGridTopology { let n = &self.canonical_shuffling[c_n]; grid_subset.validator_indices_y.insert(n.validator_index); for p in &n.peer_ids { - grid_subset.peers_y.insert(p.clone()); + grid_subset.peers_y.insert(*p); } } diff --git a/node/network/protocol/src/lib.rs b/node/network/protocol/src/lib.rs index 169d916ce6f9..744217133eed 100644 --- a/node/network/protocol/src/lib.rs +++ b/node/network/protocol/src/lib.rs @@ -207,7 +207,7 @@ impl View { } /// Obtain an iterator over all heads. - pub fn iter<'a>(&'a self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator { self.heads.iter() } diff --git a/node/network/protocol/src/peer_set.rs b/node/network/protocol/src/peer_set.rs index d9d2925e594d..22eddc44c42f 100644 --- a/node/network/protocol/src/peer_set.rs +++ b/node/network/protocol/src/peer_set.rs @@ -36,7 +36,7 @@ const LEGACY_COLLATION_PROTOCOL_V1: &str = "/polkadot/collation/1"; const LEGACY_PROTOCOL_VERSION_V1: u32 = 1; /// Max notification size is currently constant. -const MAX_NOTIFICATION_SIZE: u64 = 100 * 1024; +pub const MAX_NOTIFICATION_SIZE: u64 = 100 * 1024; /// The peer-sets and thus the protocols which are used for the network. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, EnumIter)] diff --git a/node/network/protocol/src/request_response/mod.rs b/node/network/protocol/src/request_response/mod.rs index d24537e219c7..6ce0c883cc6c 100644 --- a/node/network/protocol/src/request_response/mod.rs +++ b/node/network/protocol/src/request_response/mod.rs @@ -126,6 +126,17 @@ const STATEMENT_RESPONSE_SIZE: u64 = MAX_CODE_SIZE as u64 + 10_000; pub const DISPUTE_REQUEST_TIMEOUT: Duration = Duration::from_secs(12); impl Protocol { + /// Get a configuration for a given Request response protocol. + /// + /// Returns a `ProtocolConfig` for this protocol. + /// Use this if you plan only to send requests for this protocol. + pub fn get_outbound_only_config( + self, + req_protocol_names: &ReqProtocolNames, + ) -> RequestResponseConfig { + self.create_config(req_protocol_names, None) + } + /// Get a configuration for a given Request response protocol. /// /// Returns a receiver for messages received on this protocol and the requested @@ -134,10 +145,19 @@ impl Protocol { self, req_protocol_names: &ReqProtocolNames, ) -> (mpsc::Receiver, RequestResponseConfig) { + let (tx, rx) = mpsc::channel(self.get_channel_size()); + let cfg = self.create_config(req_protocol_names, Some(tx)); + (rx, cfg) + } + + fn create_config( + self, + req_protocol_names: &ReqProtocolNames, + tx: Option>, + ) -> RequestResponseConfig { let name = req_protocol_names.get_name(self); let fallback_names = self.get_fallback_names(); - let (tx, rx) = mpsc::channel(self.get_channel_size()); - let cfg = match self { + match self { Protocol::ChunkFetchingV1 => RequestResponseConfig { name, fallback_names, @@ -145,7 +165,7 @@ impl Protocol { max_response_size: POV_RESPONSE_SIZE as u64 * 3, // We are connected to all validators: request_timeout: CHUNK_REQUEST_TIMEOUT, - inbound_queue: Some(tx), + inbound_queue: tx, }, Protocol::CollationFetchingV1 => RequestResponseConfig { name, @@ -154,7 +174,7 @@ impl Protocol { max_response_size: POV_RESPONSE_SIZE, // Taken from initial implementation in collator protocol: request_timeout: POV_REQUEST_TIMEOUT_CONNECTED, - inbound_queue: Some(tx), + inbound_queue: tx, }, Protocol::PoVFetchingV1 => RequestResponseConfig { name, @@ -162,7 +182,7 @@ impl Protocol { max_request_size: 1_000, max_response_size: POV_RESPONSE_SIZE, request_timeout: POV_REQUEST_TIMEOUT_CONNECTED, - inbound_queue: Some(tx), + inbound_queue: tx, }, Protocol::AvailableDataFetchingV1 => RequestResponseConfig { name, @@ -171,7 +191,7 @@ impl Protocol { // Available data size is dominated by the PoV size. max_response_size: POV_RESPONSE_SIZE, request_timeout: POV_REQUEST_TIMEOUT_CONNECTED, - inbound_queue: Some(tx), + inbound_queue: tx, }, Protocol::StatementFetchingV1 => RequestResponseConfig { name, @@ -189,7 +209,7 @@ impl Protocol { // fail, but this is desired, so we can quickly move on to a faster one - we should // also decrease its reputation. request_timeout: Duration::from_secs(1), - inbound_queue: Some(tx), + inbound_queue: tx, }, Protocol::DisputeSendingV1 => RequestResponseConfig { name, @@ -199,10 +219,9 @@ impl Protocol { /// plenty. max_response_size: 100, request_timeout: DISPUTE_REQUEST_TIMEOUT, - inbound_queue: Some(tx), + inbound_queue: tx, }, - }; - (rx, cfg) + } } // Channel sizes for the supported protocols. diff --git a/node/network/statement-distribution/Cargo.toml b/node/network/statement-distribution/Cargo.toml index 1490ed01142a..5ebdcd01b7ab 100644 --- a/node/network/statement-distribution/Cargo.toml +++ b/node/network/statement-distribution/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-statement-distribution" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Statement Distribution Subsystem" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" diff --git a/node/network/statement-distribution/src/lib.rs b/node/network/statement-distribution/src/lib.rs index 055fd4123f9a..271072ab1031 100644 --- a/node/network/statement-distribution/src/lib.rs +++ b/node/network/statement-distribution/src/lib.rs @@ -278,10 +278,10 @@ impl PeerRelayParentKnowledge { let new_known = match fingerprint.0 { CompactStatement::Seconded(ref h) => { - self.seconded_counts.entry(fingerprint.1).or_default().note_local(h.clone()); + self.seconded_counts.entry(fingerprint.1).or_default().note_local(*h); let was_known = self.is_known_candidate(h); - self.sent_candidates.insert(h.clone()); + self.sent_candidates.insert(*h); !was_known }, CompactStatement::Valid(_) => false, @@ -345,7 +345,7 @@ impl PeerRelayParentKnowledge { .seconded_counts .entry(fingerprint.1) .or_insert_with(Default::default) - .note_remote(h.clone()); + .note_remote(*h); if !allowed_remote { return Err(COST_UNEXPECTED_STATEMENT_REMOTE) @@ -374,7 +374,7 @@ impl PeerRelayParentKnowledge { } self.received_statements.insert(fingerprint.clone()); - self.received_candidates.insert(candidate_hash.clone()); + self.received_candidates.insert(*candidate_hash); Ok(fresh) } @@ -1025,13 +1025,15 @@ async fn circulate_statement<'a, Context>( let mut peers_to_send: Vec = peers .iter() - .filter_map(|(peer, data)| { - if data.can_send(&relay_parent, &fingerprint) { - Some(peer.clone()) - } else { - None - } - }) + .filter_map( + |(peer, data)| { + if data.can_send(&relay_parent, &fingerprint) { + Some(*peer) + } else { + None + } + }, + ) .collect(); let good_peers: HashSet<&PeerId> = peers_to_send.iter().collect(); @@ -1087,7 +1089,7 @@ async fn circulate_statement<'a, Context>( "Sending statement", ); ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( - peers_to_send.iter().map(|(p, _)| p.clone()).collect(), + peers_to_send.iter().map(|(p, _)| *p).collect(), payload, )) .await; @@ -1126,11 +1128,8 @@ async fn send_statements_about( statement = ?statement.statement, "Sending statement", ); - ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( - vec![peer.clone()], - payload, - )) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage(vec![peer], payload)) + .await; metrics.on_statement_distributed(); } @@ -1161,11 +1160,8 @@ async fn send_statements( statement = ?statement.statement, "Sending statement" ); - ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( - vec![peer.clone()], - payload, - )) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage(vec![peer], payload)) + .await; metrics.on_statement_distributed(); } @@ -1431,7 +1427,7 @@ async fn handle_incoming_message<'a, Context>( } let fingerprint = message.get_fingerprint(); - let candidate_hash = fingerprint.0.candidate_hash().clone(); + let candidate_hash = *fingerprint.0.candidate_hash(); let handle_incoming_span = active_head .span .child("handle-incoming") @@ -1551,7 +1547,7 @@ async fn handle_incoming_message<'a, Context>( // Send the peer all statements concerning the candidate that we have, // since it appears to have just learned about the candidate. send_statements_about( - peer.clone(), + peer, peer_data, ctx, relay_parent, @@ -1627,7 +1623,7 @@ async fn update_peer_view_and_maybe_send_unlocked( continue } if let Some(active_head) = active_heads.get(&new) { - send_statements(peer.clone(), peer_data, ctx, new, active_head, metrics).await; + send_statements(peer, peer_data, ctx, new, active_head, metrics).await; } } } @@ -1710,7 +1706,7 @@ async fn handle_network_update( topology_storage, peers, active_heads, - &*recent_outdated_heads, + recent_outdated_heads, ctx, message, req_sender, diff --git a/node/network/statement-distribution/src/metrics.rs b/node/network/statement-distribution/src/metrics.rs index 6bc6f724ae09..6acbf63eadc0 100644 --- a/node/network/statement-distribution/src/metrics.rs +++ b/node/network/statement-distribution/src/metrics.rs @@ -17,8 +17,10 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus}; /// Buckets more suitable for checking the typical latency values -const HISTOGRAM_LATENCY_BUCKETS: &[f64] = - &[0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.75, 0.9, 1.0, 1.2, 1.5, 1.75]; +const HISTOGRAM_LATENCY_BUCKETS: &[f64] = &[ + 0.000025, 0.00005, 0.000075, 0.0001, 0.0003125, 0.000625, 0.00125, 0.0025, 0.005, 0.01, 0.025, + 0.05, 0.1, +]; #[derive(Clone)] struct MetricsInner { diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 3aaa74e22da1..52310422eb4d 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-overseer" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } @@ -15,12 +15,12 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem-types = { path = "../subsystem-types" } polkadot-node-metrics = { path = "../metrics" } polkadot-primitives = { path = "../../primitives" } -orchestra = "0.0.2" +orchestra = "0.0.4" gum = { package = "tracing-gum", path = "../gum" } lru = "0.8" -parity-util-mem = { version = "0.12.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } async-trait = "0.1.57" +tikv-jemalloc-ctl = "0.5.0" [dev-dependencies] metered = { package = "prioritized-metered-channel", version = "0.2.0" } @@ -34,3 +34,4 @@ test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../pri [features] default = [] expand = ["orchestra/expand"] +dotgraph = ["orchestra/dotgraph"] diff --git a/node/overseer/src/dummy.rs b/node/overseer/src/dummy.rs index 84ecdd1e8a89..cf72774826ea 100644 --- a/node/overseer/src/dummy.rs +++ b/node/overseer/src/dummy.rs @@ -22,6 +22,9 @@ use crate::{ use lru::LruCache; use orchestra::{FromOrchestra, SpawnedSubsystem, Subsystem, SubsystemContext}; use polkadot_node_subsystem_types::{errors::SubsystemError, messages::*}; +// Generated dummy messages +use crate::messages::*; + /// A dummy subsystem that implements [`Subsystem`] for all /// types of messages. Used for tests or as a placeholder. #[derive(Clone, Copy, Debug)] @@ -56,10 +59,10 @@ where /// Create an overseer with all subsystem being `Sub`. /// /// Preferred way of initializing a dummy overseer for subsystem tests. -pub fn dummy_overseer_builder<'a, Spawner, SupportsParachains>( +pub fn dummy_overseer_builder( spawner: Spawner, supports_parachains: SupportsParachains, - registry: Option<&'a Registry>, + registry: Option<&Registry>, ) -> Result< InitializedOverseerBuilder< SpawnGlue, @@ -97,11 +100,11 @@ where } /// Create an overseer with all subsystem being `Sub`. -pub fn one_for_all_overseer_builder<'a, Spawner, SupportsParachains, Sub>( +pub fn one_for_all_overseer_builder( spawner: Spawner, supports_parachains: SupportsParachains, subsystem: Sub, - registry: Option<&'a Registry>, + registry: Option<&Registry>, ) -> Result< InitializedOverseerBuilder< SpawnGlue, diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 70dbe92b2432..6253f8b3e264 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -74,15 +74,16 @@ use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; use polkadot_primitives::v2::{Block, BlockNumber, Hash}; +use self::messages::{BitfieldSigningMessage, PvfCheckerMessage}; use polkadot_node_subsystem_types::messages::{ ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage, AvailabilityRecoveryMessage, AvailabilityStoreMessage, BitfieldDistributionMessage, - BitfieldSigningMessage, CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, - ChainSelectionMessage, CollationGenerationMessage, CollatorProtocolMessage, - DisputeCoordinatorMessage, DisputeDistributionMessage, GossipSupportMessage, - NetworkBridgeRxMessage, NetworkBridgeTxMessage, ProvisionerMessage, PvfCheckerMessage, - RuntimeApiMessage, StatementDistributionMessage, + CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, ChainSelectionMessage, + CollationGenerationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage, + DisputeDistributionMessage, GossipSupportMessage, NetworkBridgeRxMessage, + NetworkBridgeTxMessage, ProvisionerMessage, RuntimeApiMessage, StatementDistributionMessage, }; + pub use polkadot_node_subsystem_types::{ errors::{SubsystemError, SubsystemResult}, jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, @@ -101,8 +102,6 @@ pub use polkadot_node_metrics::{ Metronome, }; -use parity_util_mem::MemoryAllocationTracker; - pub use orchestra as gen; pub use orchestra::{ contextbounds, orchestra, subsystem, FromOrchestra, MapSubsystem, MessagePacket, @@ -118,11 +117,14 @@ pub const KNOWN_LEAVES_CACHE_SIZE: NonZeroUsize = match NonZeroUsize::new(2 * 24 None => panic!("Known leaves cache size must be non-zero"), }; +mod memory_stats; #[cfg(test)] mod tests; use sp_core::traits::SpawnNamed; +use memory_stats::MemoryAllocationTracker; + /// Glue to connect `trait orchestra::Spawner` and `SpawnNamed` from `substrate`. pub struct SpawnGlue(pub S); @@ -457,7 +459,7 @@ pub struct Overseer { ])] candidate_validation: CandidateValidation, - #[subsystem(PvfCheckerMessage, sends: [ + #[subsystem(sends: [ CandidateValidationMessage, RuntimeApiMessage, ])] @@ -497,7 +499,7 @@ pub struct Overseer { ])] availability_recovery: AvailabilityRecovery, - #[subsystem(blocking, BitfieldSigningMessage, sends: [ + #[subsystem(blocking, sends: [ AvailabilityStoreMessage, RuntimeApiMessage, BitfieldDistributionMessage, @@ -686,7 +688,7 @@ where subsystem_meters .iter() .cloned() - .filter_map(|x| x) + .flatten() .map(|(name, ref meters)| (name, meters.read())), ); @@ -710,7 +712,15 @@ where } /// Run the `Overseer`. - pub async fn run(mut self) -> SubsystemResult<()> { + /// + /// Logging any errors. + pub async fn run(self) { + if let Err(err) = self.run_inner().await { + gum::error!(target: LOG_TARGET, ?err, "Overseer exited with error"); + } + } + + async fn run_inner(mut self) -> SubsystemResult<()> { let metrics = self.metrics.clone(); spawn_metronome_metrics(&mut self, metrics)?; @@ -861,7 +871,7 @@ where let mut span = jaeger::Span::new(*hash, "leaf-activated"); if let Some(parent_span) = parent_hash.and_then(|h| self.span_per_active_leaf.get(&h)) { - span.add_follows_from(&*parent_span); + span.add_follows_from(parent_span); } let span = Arc::new(span); diff --git a/node/overseer/src/memory_stats.rs b/node/overseer/src/memory_stats.rs new file mode 100644 index 000000000000..670762a4935c --- /dev/null +++ b/node/overseer/src/memory_stats.rs @@ -0,0 +1,53 @@ +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +use tikv_jemalloc_ctl::{epoch, stats, Error}; + +#[derive(Clone)] +pub struct MemoryAllocationTracker { + epoch: tikv_jemalloc_ctl::epoch_mib, + allocated: stats::allocated_mib, + resident: stats::resident_mib, +} + +impl MemoryAllocationTracker { + pub fn new() -> Result { + Ok(Self { + epoch: epoch::mib()?, + allocated: stats::allocated::mib()?, + resident: stats::resident::mib()?, + }) + } + + pub fn snapshot(&self) -> Result { + // update stats by advancing the allocation epoch + self.epoch.advance()?; + + let allocated: u64 = self.allocated.read()? as _; + let resident: u64 = self.resident.read()? as _; + Ok(MemoryAllocationSnapshot { allocated, resident }) + } +} + +/// Snapshot of collected memory metrics. +#[non_exhaustive] +#[derive(Debug, Clone)] +pub struct MemoryAllocationSnapshot { + /// Total resident memory, in bytes. + pub resident: u64, + /// Total allocated memory, in bytes. + pub allocated: u64, +} diff --git a/node/overseer/src/metrics.rs b/node/overseer/src/metrics.rs index 71295dd2238c..bb7d98a68f2e 100644 --- a/node/overseer/src/metrics.rs +++ b/node/overseer/src/metrics.rs @@ -19,7 +19,7 @@ use super::*; pub use polkadot_node_metrics::metrics::{self, prometheus, Metrics as MetricsTrait}; -use parity_util_mem::MemoryAllocationSnapshot; +use memory_stats::MemoryAllocationSnapshot; /// Overseer Prometheus metrics. #[derive(Clone)] diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index dee4c7cbbba9..ca84f033b599 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -241,7 +241,7 @@ fn overseer_metrics_work() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); @@ -302,7 +302,7 @@ fn overseer_ends_on_subsystem_exit() { .build() .unwrap(); - overseer.run().await.unwrap(); + overseer.run_inner().await.unwrap(); }) } @@ -400,7 +400,7 @@ fn overseer_start_stop_works() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); let mut ss5_results = Vec::new(); @@ -499,7 +499,7 @@ fn overseer_finalize_works() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); let mut ss5_results = Vec::new(); @@ -595,7 +595,7 @@ fn overseer_finalize_leaf_preserves_it() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); let mut ss5_results = Vec::new(); @@ -684,7 +684,7 @@ fn do_not_send_empty_leaves_update_on_block_finalization() { let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); let mut ss5_results = Vec::new(); @@ -947,7 +947,7 @@ fn overseer_all_subsystems_receive_signals_and_messages() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run().fuse(); + let overseer_fut = overseer.run_inner().fuse(); pin_mut!(overseer_fut); diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index 3f0865b1e033..b865298f8467 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-primitives" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Primitives types for the Node-side" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bounded-vec = "0.6" diff --git a/node/primitives/src/disputes/message.rs b/node/primitives/src/disputes/message.rs index 1a943f8dcee6..c31ff1ecb283 100644 --- a/node/primitives/src/disputes/message.rs +++ b/node/primitives/src/disputes/message.rs @@ -170,13 +170,13 @@ impl DisputeMessage { let valid_vote = ValidDisputeVote { validator_index: valid_index, signature: valid_statement.validator_signature().clone(), - kind: valid_kind.clone(), + kind: *valid_kind, }; let invalid_vote = InvalidDisputeVote { validator_index: invalid_index, signature: invalid_statement.validator_signature().clone(), - kind: invalid_kind.clone(), + kind: *invalid_kind, }; Ok(DisputeMessage(UncheckedDisputeMessage { diff --git a/node/primitives/src/disputes/mod.rs b/node/primitives/src/disputes/mod.rs index ee047c7bcc22..bad2ddbffc46 100644 --- a/node/primitives/src/disputes/mod.rs +++ b/node/primitives/src/disputes/mod.rs @@ -14,7 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use std::collections::{BTreeMap, BTreeSet}; +use std::collections::{ + btree_map::{Entry as Bentry, Keys as Bkeys}, + BTreeMap, BTreeSet, +}; use parity_scale_codec::{Decode, Encode}; @@ -49,7 +52,7 @@ pub struct CandidateVotes { /// The receipt of the candidate itself. pub candidate_receipt: CandidateReceipt, /// Votes of validity, sorted by validator index. - pub valid: BTreeMap, + pub valid: ValidCandidateVotes, /// Votes of invalidity, sorted by validator index. pub invalid: BTreeMap, } @@ -69,6 +72,99 @@ impl CandidateVotes { } } +#[derive(Debug, Clone)] +/// Valid candidate votes. +/// +/// Prefere backing votes over other votes. +pub struct ValidCandidateVotes { + votes: BTreeMap, +} + +impl ValidCandidateVotes { + /// Create new empty `ValidCandidateVotes` + pub fn new() -> Self { + Self { votes: BTreeMap::new() } + } + /// Insert a vote, replacing any already existing vote. + /// + /// Except, for backing votes: Backing votes are always kept, and will never get overridden. + /// Import of other king of `valid` votes, will be ignored if a backing vote is already + /// present. Any already existing `valid` vote, will be overridden by any given backing vote. + /// + /// Returns: true, if the insert had any effect. + pub fn insert_vote( + &mut self, + validator_index: ValidatorIndex, + kind: ValidDisputeStatementKind, + sig: ValidatorSignature, + ) -> bool { + match self.votes.entry(validator_index) { + Bentry::Vacant(vacant) => { + vacant.insert((kind, sig)); + true + }, + Bentry::Occupied(mut occupied) => match occupied.get().0 { + ValidDisputeStatementKind::BackingValid(_) | + ValidDisputeStatementKind::BackingSeconded(_) => false, + ValidDisputeStatementKind::Explicit | + ValidDisputeStatementKind::ApprovalChecking => { + occupied.insert((kind, sig)); + kind != occupied.get().0 + }, + }, + } + } + + /// Retain any votes that match the given criteria. + pub fn retain(&mut self, f: F) + where + F: FnMut(&ValidatorIndex, &mut (ValidDisputeStatementKind, ValidatorSignature)) -> bool, + { + self.votes.retain(f) + } + + /// Get all the validator indeces we have votes for. + pub fn keys( + &self, + ) -> Bkeys<'_, ValidatorIndex, (ValidDisputeStatementKind, ValidatorSignature)> { + self.votes.keys() + } + + /// Get read only direct access to underlying map. + pub fn raw( + &self, + ) -> &BTreeMap { + &self.votes + } +} + +impl FromIterator<(ValidatorIndex, (ValidDisputeStatementKind, ValidatorSignature))> + for ValidCandidateVotes +{ + fn from_iter(iter: T) -> Self + where + T: IntoIterator, + { + Self { votes: BTreeMap::from_iter(iter) } + } +} + +impl From + for BTreeMap +{ + fn from(wrapped: ValidCandidateVotes) -> Self { + wrapped.votes + } +} +impl IntoIterator for ValidCandidateVotes { + type Item = (ValidatorIndex, (ValidDisputeStatementKind, ValidatorSignature)); + type IntoIter = as IntoIterator>::IntoIter; + + fn into_iter(self) -> Self::IntoIter { + self.votes.into_iter() + } +} + impl SignedDisputeStatement { /// Create a new `SignedDisputeStatement` from information /// that is available on-chain, and hence already can be trusted. diff --git a/node/primitives/src/lib.rs b/node/primitives/src/lib.rs index e75181b900e9..da0a0eca80be 100644 --- a/node/primitives/src/lib.rs +++ b/node/primitives/src/lib.rs @@ -30,10 +30,10 @@ use parity_scale_codec::{Decode, Encode, Error as CodecError, Input}; use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use polkadot_primitives::v2::{ - BlakeTwo256, CandidateCommitments, CandidateHash, CollatorPair, CommittedCandidateReceipt, - CompactStatement, EncodeAs, Hash, HashT, HeadData, Id as ParaId, OutboundHrmpMessage, - PersistedValidationData, SessionIndex, Signed, UncheckedSigned, UpwardMessage, ValidationCode, - ValidatorIndex, MAX_CODE_SIZE, MAX_POV_SIZE, + BlakeTwo256, BlockNumber, CandidateCommitments, CandidateHash, CollatorPair, + CommittedCandidateReceipt, CompactStatement, EncodeAs, Hash, HashT, HeadData, Id as ParaId, + OutboundHrmpMessage, PersistedValidationData, SessionIndex, Signed, UncheckedSigned, + UpwardMessage, ValidationCode, ValidatorIndex, MAX_CODE_SIZE, MAX_POV_SIZE, }; pub use sp_consensus_babe::{ AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, @@ -73,8 +73,28 @@ pub const BACKING_EXECUTION_TIMEOUT: Duration = Duration::from_secs(2); /// ensure that in the absence of extremely large disparities between hardware, /// blocks that pass backing are considered executable by approval checkers or /// dispute participants. +/// +/// NOTE: If this value is increased significantly, also check the dispute coordinator to consider +/// candidates longer into finalization: `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION`. pub const APPROVAL_EXECUTION_TIMEOUT: Duration = Duration::from_secs(12); +/// How many blocks after finalization an information about backed/included candidate should be +/// kept. +/// +/// We don't want to remove scraped candidates on finalization because we want to +/// be sure that disputes will conclude on abandoned forks. +/// Removing the candidate on finalization creates a possibility for an attacker to +/// avoid slashing. If a bad fork is abandoned too quickly because another +/// better one gets finalized the entries for the bad fork will be pruned and we +/// might never participate in a dispute for it. +/// +/// This value should consider the timeout we allow for participation in approval-voting. In +/// particular, the following condition should hold: +/// +/// slot time * `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` > `APPROVAL_EXECUTION_TIMEOUT` +/// + slot time +pub const DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION: BlockNumber = 10; + /// Linked to `MAX_FINALITY_LAG` in relay chain selection, /// `MAX_HEADS_LOOK_BACK` in `approval-voting` and /// `MAX_BATCH_SCRAPE_ANCESTORS` in `dispute-coordinator` @@ -383,7 +403,7 @@ impl std::fmt::Debug for CollationGenerationConfig { pub struct AvailableData { /// The Proof-of-Validation of the candidate. pub pov: std::sync::Arc, - /// The persisted validation data needed for secondary checks. + /// The persisted validation data needed for approval checks. pub validation_data: PersistedValidationData, } diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index e6e073546a13..8b2771b7e18d 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,18 +1,20 @@ [package] name = "polkadot-service" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" rust-version = "1.60" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] # Substrate Client sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" } beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } +mmr-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master"} sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -69,8 +71,8 @@ gum = { package = "tracing-gum", path = "../gum/" } serde = { version = "1.0.137", features = ["derive"] } serde_json = "1.0.81" thiserror = "1.0.31" -kvdb = "0.12.0" -kvdb-rocksdb = { version = "0.16.0", optional = true } +kvdb = "0.13.0" +kvdb-rocksdb = { version = "0.17.0", optional = true } parity-db = { version = "0.4.2", optional = true } async-trait = "0.1.57" diff --git a/node/service/chain-specs/kusama.json b/node/service/chain-specs/kusama.json index 3cc515f50be1..581f40aff4d6 100644 --- a/node/service/chain-specs/kusama.json +++ b/node/service/chain-specs/kusama.json @@ -23,7 +23,9 @@ "/dns/boot.stake.plus/tcp/31333/p2p/12D3KooWLa1UyG5xLPds2GbiRBCTJjpsVwRWHWN7Dff14yiNJRpR", "/dns/boot.stake.plus/tcp/31334/wss/p2p/12D3KooWLa1UyG5xLPds2GbiRBCTJjpsVwRWHWN7Dff14yiNJRpR", "/dns/boot-node.helikon.io/tcp/7060/p2p/12D3KooWL4KPqfAsPE2aY1g5Zo1CxsDwcdJ7mmAghK7cg6M2fdbD", - "/dns/boot-node.helikon.io/tcp/7062/wss/p2p/12D3KooWL4KPqfAsPE2aY1g5Zo1CxsDwcdJ7mmAghK7cg6M2fdbD" + "/dns/boot-node.helikon.io/tcp/7062/wss/p2p/12D3KooWL4KPqfAsPE2aY1g5Zo1CxsDwcdJ7mmAghK7cg6M2fdbD", + "/dns/kusama.bootnode.amforc.com/tcp/30333/p2p/12D3KooWLx6nsj6Fpd8biP1VDyuCUjazvRiGWyBam8PsqRJkbUb9", + "/dns/kusama.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWLx6nsj6Fpd8biP1VDyuCUjazvRiGWyBam8PsqRJkbUb9" ], "telemetryEndpoints": [ [ diff --git a/node/service/chain-specs/polkadot.json b/node/service/chain-specs/polkadot.json index 0871b24ff2fc..8fc8ac63ba32 100644 --- a/node/service/chain-specs/polkadot.json +++ b/node/service/chain-specs/polkadot.json @@ -23,7 +23,9 @@ "/dns/boot.stake.plus/tcp/30333/p2p/12D3KooWKT4ZHNxXH4icMjdrv7EwWBkfbz5duxE5sdJKKeWFYi5n", "/dns/boot.stake.plus/tcp/30334/wss/p2p/12D3KooWKT4ZHNxXH4icMjdrv7EwWBkfbz5duxE5sdJKKeWFYi5n", "/dns/boot-node.helikon.io/tcp/7070/p2p/12D3KooWS9ZcvRxyzrSf6p63QfTCWs12nLoNKhGux865crgxVA4H", - "/dns/boot-node.helikon.io/tcp/7072/wss/p2p/12D3KooWS9ZcvRxyzrSf6p63QfTCWs12nLoNKhGux865crgxVA4H" + "/dns/boot-node.helikon.io/tcp/7072/wss/p2p/12D3KooWS9ZcvRxyzrSf6p63QfTCWs12nLoNKhGux865crgxVA4H", + "/dns/polkadot.bootnode.amforc.com/tcp/30333/p2p/12D3KooWAsuCEVCzUVUrtib8W82Yne3jgVGhQZN3hizko5FTnDg3", + "/dns/polkadot.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWAsuCEVCzUVUrtib8W82Yne3jgVGhQZN3hizko5FTnDg3" ], "telemetryEndpoints": [ [ diff --git a/node/service/chain-specs/westend.json b/node/service/chain-specs/westend.json index 059f5c39b6e2..6527d81001df 100644 --- a/node/service/chain-specs/westend.json +++ b/node/service/chain-specs/westend.json @@ -15,7 +15,9 @@ "/dns/boot.stake.plus/tcp/32333/p2p/12D3KooWK8fjVoSvMq5copQYMsdYreSGPGgcMbGMgbMDPfpf3sm7", "/dns/boot.stake.plus/tcp/32334/wss/p2p/12D3KooWK8fjVoSvMq5copQYMsdYreSGPGgcMbGMgbMDPfpf3sm7", "/dns/boot-node.helikon.io/tcp/7080/p2p/12D3KooWRFDPyT8vA8mLzh6dJoyujn4QNjeqi6Ch79eSMz9beKXC", - "/dns/boot-node.helikon.io/tcp/7082/wss/p2p/12D3KooWRFDPyT8vA8mLzh6dJoyujn4QNjeqi6Ch79eSMz9beKXC" + "/dns/boot-node.helikon.io/tcp/7082/wss/p2p/12D3KooWRFDPyT8vA8mLzh6dJoyujn4QNjeqi6Ch79eSMz9beKXC", + "/dns/westend.bootnode.amforc.com/tcp/30333/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8", + "/dns/westend.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8" ], "telemetryEndpoints": [ [ @@ -135,4 +137,4 @@ "childrenDefault": {} } } -} +} \ No newline at end of file diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index e2c0a7bfdf94..8650499d064c 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -767,10 +767,10 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC configuration: kusama::ConfigurationConfig { config: default_parachains_host_configuration(), }, - gilt: Default::default(), paras: Default::default(), xcm_pallet: Default::default(), nomination_pools: Default::default(), + nis_counterpart_balances: Default::default(), } } @@ -1073,11 +1073,11 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: configuration: rococo_runtime::ConfigurationConfig { config: default_parachains_host_configuration(), }, - gilt: Default::default(), registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID, }, xcm_pallet: Default::default(), + nis_counterpart_balances: Default::default(), } } @@ -1466,10 +1466,10 @@ pub fn kusama_testnet_genesis( configuration: kusama::ConfigurationConfig { config: default_parachains_host_configuration(), }, - gilt: Default::default(), paras: Default::default(), xcm_pallet: Default::default(), nomination_pools: Default::default(), + nis_counterpart_balances: Default::default(), } } @@ -1629,12 +1629,12 @@ pub fn rococo_testnet_genesis( ..default_parachains_host_configuration() }, }, - gilt: Default::default(), paras: rococo_runtime::ParasConfig { paras: vec![] }, registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID, }, xcm_pallet: Default::default(), + nis_counterpart_balances: Default::default(), } } diff --git a/node/service/src/grandpa_support.rs b/node/service/src/grandpa_support.rs index f85249579ecf..2e31737d97c3 100644 --- a/node/service/src/grandpa_support.rs +++ b/node/service/src/grandpa_support.rs @@ -224,7 +224,7 @@ mod tests { TestClientBuilder, TestClientBuilderExt, }; use sp_blockchain::HeaderBackend; - use sp_runtime::{generic::BlockId, traits::Header}; + use sp_runtime::traits::Header; use std::sync::Arc; #[test] @@ -232,13 +232,16 @@ mod tests { let _ = env_logger::try_init(); let client = Arc::new(TestClientBuilder::new().build()); + let mut hashes = vec![]; + hashes.push(client.info().genesis_hash); let mut push_blocks = { let mut client = client.clone(); - move |n| { + move |hashes: &mut Vec<_>, n| { for _ in 0..n { let block = client.init_polkadot_block_builder().build().unwrap().block; + hashes.push(block.header.hash()); futures::executor::block_on(client.import(BlockOrigin::Own, block)).unwrap(); } } @@ -246,7 +249,7 @@ mod tests { let get_header = { let client = client.clone(); - move |n| client.header(&BlockId::Number(n)).unwrap().unwrap() + move |n| client.expect_header(n).unwrap() }; // the rule should filter all votes after block #20 @@ -254,7 +257,7 @@ mod tests { let voting_rule = super::PauseAfterBlockFor(20, 30); // add 10 blocks - push_blocks(10); + push_blocks(&mut hashes, 10); assert_eq!(client.info().best_number, 10); // we have not reached the pause block @@ -262,38 +265,38 @@ mod tests { assert_eq!( futures::executor::block_on(voting_rule.restrict_vote( client.clone(), - &get_header(0), - &get_header(10), - &get_header(10) + &get_header(hashes[0]), + &get_header(hashes[10]), + &get_header(hashes[10]) )), None, ); // add 15 more blocks // best block: #25 - push_blocks(15); + push_blocks(&mut hashes, 15); // we are targeting the pause block, // the vote should not be restricted assert_eq!( futures::executor::block_on(voting_rule.restrict_vote( client.clone(), - &get_header(10), - &get_header(20), - &get_header(20) + &get_header(hashes[10]), + &get_header(hashes[20]), + &get_header(hashes[20]) )), None, ); // we are past the pause block, votes should // be limited to the pause block. - let pause_block = get_header(20); + let pause_block = get_header(hashes[20]); assert_eq!( futures::executor::block_on(voting_rule.restrict_vote( client.clone(), - &get_header(10), - &get_header(21), - &get_header(21) + &get_header(hashes[10]), + &get_header(hashes[21]), + &get_header(hashes[21]) )), Some((pause_block.hash(), *pause_block.number())), ); @@ -304,15 +307,15 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(21), - &get_header(21), + &get_header(hashes[21]), + &get_header(hashes[21]), )), Some((pause_block.hash(), *pause_block.number())), ); // add 30 more blocks // best block: #55 - push_blocks(30); + push_blocks(&mut hashes, 30); // we're at the last block of the pause, this block // should still be considered in the pause period @@ -320,8 +323,8 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(50), - &get_header(50), + &get_header(hashes[50]), + &get_header(hashes[50]), )), Some((pause_block.hash(), *pause_block.number())), ); @@ -331,8 +334,8 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(51), - &get_header(51), + &get_header(hashes[51]), + &get_header(hashes[51]), )), None, ); diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 3e535f3bd1f5..4cd937b1d7de 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -95,6 +95,7 @@ pub use polkadot_client::PolkadotExecutorDispatch; pub use chain_spec::{KusamaChainSpec, PolkadotChainSpec, RococoChainSpec, WestendChainSpec}; pub use consensus_common::{block_validation::Chain, Proposal, SelectChain}; +use mmr_gadget::MmrGadget; #[cfg(feature = "full-node")] pub use polkadot_client::{ AbstractClient, Client, ClientHandle, ExecuteWithClient, FullBackend, FullClient, @@ -160,10 +161,7 @@ where &self, hash: Block::Hash, ) -> sp_blockchain::Result::Header>> { - >::header( - self, - generic::BlockId::::Hash(hash), - ) + >::header(self, hash) } fn number( &self, @@ -700,7 +698,7 @@ where return None }; - let parent_hash = client.header(&BlockId::Hash(hash)).ok()??.parent_hash; + let parent_hash = client.header(hash).ok()??.parent_hash; Some(BlockInfo { hash, parent_hash, number }) }) @@ -758,6 +756,7 @@ where { use polkadot_node_network_protocol::request_response::IncomingRequest; + let is_offchain_indexing_enabled = config.offchain_worker.indexing_enabled; let role = config.role.clone(); let force_authoring = config.force_authoring; let backoff_authoring_blocks = { @@ -1110,8 +1109,8 @@ where pin_mut!(forward); select! { - _ = forward => (), - _ = overseer_fut => (), + () = forward => (), + () = overseer_fut => (), complete => (), } }), @@ -1152,11 +1151,12 @@ where let overseer_handle = overseer_handle.clone(); async move { - let parachain = polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::create( - &*client_clone, - overseer_handle, - parent, - ).await.map_err(|e| Box::new(e))?; + let parachain = + polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::new( + client_clone, + overseer_handle, + parent, + ); let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); @@ -1219,6 +1219,18 @@ where } else { task_manager.spawn_handle().spawn_blocking("beefy-gadget", None, gadget); } + + if is_offchain_indexing_enabled { + task_manager.spawn_handle().spawn_blocking( + "mmr-gadget", + None, + MmrGadget::start( + client.clone(), + backend.clone(), + sp_mmr_primitives::INDEXING_PREFIX.to_vec(), + ), + ); + } } let config = grandpa::Config { diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index a8ce3e5eaaf0..7dff86693827 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -129,7 +129,7 @@ where /// Obtain a prepared `OverseerBuilder`, that is initialized /// with all default values. -pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( +pub fn prepared_overseer_builder( OverseerGenArgs { leaves, keystore, @@ -155,7 +155,7 @@ pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( overseer_message_channel_capacity_override, req_protocol_names, peerset_protocol_names, - }: OverseerGenArgs<'a, Spawner, RuntimeClient>, + }: OverseerGenArgs, ) -> Result< InitializedOverseerBuilder< SpawnGlue, @@ -257,7 +257,7 @@ where .collator_protocol({ let side = match is_collator { IsCollator::Yes(collator_pair) => ProtocolSide::Collator( - network_service.local_peer_id().clone(), + network_service.local_peer_id(), collator_pair, collation_req_receiver, Metrics::register(registry)?, @@ -334,10 +334,10 @@ where /// would do. pub trait OverseerGen { /// Overwrite the full generation of the overseer, including the subsystems. - fn generate<'a, Spawner, RuntimeClient>( + fn generate( &self, connector: OverseerConnector, - args: OverseerGenArgs<'a, Spawner, RuntimeClient>, + args: OverseerGenArgs, ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, @@ -358,10 +358,10 @@ use polkadot_overseer::KNOWN_LEAVES_CACHE_SIZE; pub struct RealOverseerGen; impl OverseerGen for RealOverseerGen { - fn generate<'a, Spawner, RuntimeClient>( + fn generate( &self, connector: OverseerConnector, - args: OverseerGenArgs<'a, Spawner, RuntimeClient>, + args: OverseerGenArgs, ) -> Result<(Overseer, Arc>, OverseerHandle), Error> where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, diff --git a/node/service/src/relay_chain_selection.rs b/node/service/src/relay_chain_selection.rs index df3e68cc7b1a..890e4c16ec8f 100644 --- a/node/service/src/relay_chain_selection.rs +++ b/node/service/src/relay_chain_selection.rs @@ -343,12 +343,11 @@ where // The Chain Selection subsystem is supposed to treat the finalized // block as the best leaf in the case that there are no viable // leaves, so this should not happen in practice. - let best_leaf = self + let best_leaf = *self .leaves() .await? .first() - .ok_or_else(|| ConsensusError::Other(Box::new(Error::EmptyLeaves)))? - .clone(); + .ok_or_else(|| ConsensusError::Other(Box::new(Error::EmptyLeaves)))?; gum::trace!(target: LOG_TARGET, ?best_leaf, "Best chain"); diff --git a/node/subsystem-test-helpers/Cargo.toml b/node/subsystem-test-helpers/Cargo.toml index de4b0ae0a388..41c48d7f31e1 100644 --- a/node/subsystem-test-helpers/Cargo.toml +++ b/node/subsystem-test-helpers/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Subsystem traits and message definitions" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] async-trait = "0.1.57" diff --git a/node/subsystem-test-helpers/src/lib.rs b/node/subsystem-test-helpers/src/lib.rs index 79f833b7558c..dd207039091a 100644 --- a/node/subsystem-test-helpers/src/lib.rs +++ b/node/subsystem-test-helpers/src/lib.rs @@ -177,7 +177,7 @@ where /// A test subsystem context. pub struct TestSubsystemContext { tx: TestSubsystemSender, - rx: SingleItemStream>, + rx: mpsc::Receiver>, spawn: S, } @@ -239,7 +239,7 @@ pub struct TestSubsystemContextHandle { /// /// Useful for shared ownership situations (one can have multiple senders, but only one /// receiver. - pub tx: SingleItemSink>, + pub tx: mpsc::Sender>, /// Direct access to the receiver. pub rx: mpsc::UnboundedReceiver, @@ -280,11 +280,22 @@ impl TestSubsystemContextHandle { } } -/// Make a test subsystem context. +/// Make a test subsystem context with `buffer_size == 0`. This is used by most +/// of the tests. pub fn make_subsystem_context( spawner: S, ) -> (TestSubsystemContext>, TestSubsystemContextHandle) { - let (overseer_tx, overseer_rx) = single_item_sink(); + make_buffered_subsystem_context(spawner, 0) +} + +/// Make a test subsystem context with buffered overseer channel. Some tests (e.g. +/// `dispute-coordinator`) create too many parallel operations and deadlock unless +/// the channel is buffered. Usually `buffer_size=1` is enough. +pub fn make_buffered_subsystem_context( + spawner: S, + buffer_size: usize, +) -> (TestSubsystemContext>, TestSubsystemContextHandle) { + let (overseer_tx, overseer_rx) = mpsc::channel(buffer_size); let (all_messages_tx, all_messages_rx) = mpsc::unbounded(); ( diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index acd66a067241..22528503ccc4 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-subsystem-types" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Subsystem traits and message definitions" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] derive_more = "0.99.17" @@ -13,7 +13,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } -orchestra = "0.0.2" +orchestra = "0.0.4" sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/subsystem-types/src/errors.rs b/node/subsystem-types/src/errors.rs index 27c4fcdf8d37..48829e7fc779 100644 --- a/node/subsystem-types/src/errors.rs +++ b/node/subsystem-types/src/errors.rs @@ -79,7 +79,12 @@ pub enum RecoveryError { impl std::fmt::Display for RecoveryError { fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { - write!(f, "{}", self) + let msg = match self { + RecoveryError::Invalid => "Invalid", + RecoveryError::Unavailable => "Unavailable", + }; + + write!(f, "{}", msg) } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index cb7caebcaa23..cb0834c5ba34 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -473,18 +473,6 @@ impl BitfieldDistributionMessage { } } -/// Bitfield signing message. -/// -/// Currently non-instantiable. -#[derive(Debug)] -pub enum BitfieldSigningMessage {} - -impl BoundToRelayParent for BitfieldSigningMessage { - fn relay_parent(&self) -> Hash { - match *self {} - } -} - /// Availability store subsystem message. #[derive(Debug)] pub enum AvailabilityStoreMessage { @@ -541,9 +529,7 @@ pub enum AvailabilityStoreMessage { impl AvailabilityStoreMessage { /// In fact, none of the `AvailabilityStore` messages assume a particular relay parent. pub fn relay_parent(&self) -> Option { - match self { - _ => None, - } + None } } @@ -952,9 +938,3 @@ pub enum GossipSupportMessage { #[from] NetworkBridgeUpdate(NetworkBridgeEvent), } - -/// PVF checker message. -/// -/// Currently non-instantiable. -#[derive(Debug)] -pub enum PvfCheckerMessage {} diff --git a/node/subsystem-types/src/messages/network_bridge_event.rs b/node/subsystem-types/src/messages/network_bridge_event.rs index 5abad8a3c22c..06654153357a 100644 --- a/node/subsystem-types/src/messages/network_bridge_event.rs +++ b/node/subsystem-types/src/messages/network_bridge_event.rs @@ -86,24 +86,19 @@ impl NetworkBridgeEvent { { Ok(match *self { NetworkBridgeEvent::PeerMessage(ref peer, ref msg) => - NetworkBridgeEvent::PeerMessage(peer.clone(), T::try_from(msg)?), + NetworkBridgeEvent::PeerMessage(*peer, T::try_from(msg)?), NetworkBridgeEvent::PeerConnected( ref peer, ref role, ref version, ref authority_id, - ) => NetworkBridgeEvent::PeerConnected( - peer.clone(), - role.clone(), - *version, - authority_id.clone(), - ), + ) => NetworkBridgeEvent::PeerConnected(*peer, *role, *version, authority_id.clone()), NetworkBridgeEvent::PeerDisconnected(ref peer) => - NetworkBridgeEvent::PeerDisconnected(peer.clone()), + NetworkBridgeEvent::PeerDisconnected(*peer), NetworkBridgeEvent::NewGossipTopology(ref topology) => NetworkBridgeEvent::NewGossipTopology(topology.clone()), NetworkBridgeEvent::PeerViewChange(ref peer, ref view) => - NetworkBridgeEvent::PeerViewChange(peer.clone(), view.clone()), + NetworkBridgeEvent::PeerViewChange(*peer, view.clone()), NetworkBridgeEvent::OurViewChange(ref view) => NetworkBridgeEvent::OurViewChange(view.clone()), }) diff --git a/node/subsystem-util/Cargo.toml b/node/subsystem-util/Cargo.toml index d390fd2b42cc..90abc62f97af 100644 --- a/node/subsystem-util/Cargo.toml +++ b/node/subsystem-util/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-subsystem-util" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Subsystem traits and message definitions" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] async-trait = "0.1.57" @@ -32,8 +32,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -kvdb = "0.12.0" -parity-util-mem = { version = "0.12.0", default-features = false } +kvdb = "0.13.0" parity-db = { version = "0.4.2"} [dev-dependencies] @@ -44,6 +43,6 @@ log = "0.4.17" polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" } lazy_static = "1.4.0" polkadot-primitives-test-helpers = { path = "../../primitives/test-helpers" } -kvdb-shared-tests = "0.10.0" +kvdb-shared-tests = "0.11.0" tempfile = "3.1.0" -kvdb-memorydb = "0.12.0" +kvdb-memorydb = "0.13.0" diff --git a/node/subsystem-util/src/database.rs b/node/subsystem-util/src/database.rs index 6f338b5d6440..d29a4460ea7e 100644 --- a/node/subsystem-util/src/database.rs +++ b/node/subsystem-util/src/database.rs @@ -29,7 +29,6 @@ pub trait Database: KeyValueDB { pub mod kvdb_impl { use super::{DBKeyValue, DBTransaction, DBValue, Database, KeyValueDB}; use kvdb::{DBOp, IoStats, IoStatsKind}; - use parity_util_mem::{MallocSizeOf, MallocSizeOfOps}; use std::{collections::BTreeSet, io::Result}; /// Adapter implementing subsystem database @@ -123,13 +122,6 @@ pub mod kvdb_impl { self.db.has_prefix(col, prefix) } } - - impl MallocSizeOf for DbAdapter { - fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize { - // ignore filter set - self.db.size_of(ops) - } - } } /// Utilities for using parity-db database. @@ -160,12 +152,6 @@ pub mod paritydb_impl { write_lock: Arc>, } - impl parity_util_mem::MallocSizeOf for DbAdapter { - fn size_of(&self, _ops: &mut parity_util_mem::MallocSizeOfOps) -> usize { - unimplemented!("size_of is not supported for parity_db") - } - } - impl KeyValueDB for DbAdapter { fn transaction(&self) -> DBTransaction { DBTransaction::new() diff --git a/node/subsystem-util/src/rolling_session_window.rs b/node/subsystem-util/src/rolling_session_window.rs index beac31292b7d..4ebfad405b5b 100644 --- a/node/subsystem-util/src/rolling_session_window.rs +++ b/node/subsystem-util/src/rolling_session_window.rs @@ -294,6 +294,11 @@ impl RollingSessionWindow { self.earliest_session + (self.session_info.len() as SessionIndex).saturating_sub(1) } + /// Returns `true` if `session_index` is contained in the window. + pub fn contains(&self, session_index: SessionIndex) -> bool { + session_index >= self.earliest_session() && session_index <= self.latest_session() + } + async fn earliest_non_finalized_block_session( sender: &mut Sender, ) -> Result @@ -783,6 +788,21 @@ mod tests { cache_session_info_test(1, 2, Some(window), 2, None); } + #[test] + fn cache_session_window_contains() { + let window = RollingSessionWindow { + earliest_session: 10, + session_info: vec![dummy_session_info(1)], + window_size: SESSION_WINDOW_SIZE, + db_params: Some(dummy_db_params()), + }; + + assert!(!window.contains(0)); + assert!(!window.contains(10 + SESSION_WINDOW_SIZE.get())); + assert!(!window.contains(11)); + assert!(!window.contains(10 + SESSION_WINDOW_SIZE.get() - 1)); + } + #[test] fn cache_session_info_first_late() { cache_session_info_test( diff --git a/node/subsystem/Cargo.toml b/node/subsystem/Cargo.toml index 1d783f748b45..2d788c10b4c1 100644 --- a/node/subsystem/Cargo.toml +++ b/node/subsystem/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-node-subsystem" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" description = "Subsystem traits and message definitions and the generated overseer" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] polkadot-overseer = { path = "../overseer" } diff --git a/node/subsystem/src/lib.rs b/node/subsystem/src/lib.rs index ce5fef2c8b51..6d534f5fd5bd 100644 --- a/node/subsystem/src/lib.rs +++ b/node/subsystem/src/lib.rs @@ -34,6 +34,9 @@ pub use polkadot_node_subsystem_types::{ /// Re-export of all messages type, including the wrapper type. pub mod messages { pub use super::overseer::AllMessages; + // generated, empty message types + pub use super::overseer::messages::*; + // deliberately defined messages pub use polkadot_node_subsystem_types::messages::*; } diff --git a/node/test/client/Cargo.toml b/node/test/client/Cargo.toml index 712f2a902c2d..8287d167644e 100644 --- a/node/test/client/Cargo.toml +++ b/node/test/client/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-test-client" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } diff --git a/node/test/client/src/block_builder.rs b/node/test/client/src/block_builder.rs index 1ee6d1e87dc5..058d469a26a1 100644 --- a/node/test/client/src/block_builder.rs +++ b/node/test/client/src/block_builder.rs @@ -24,7 +24,7 @@ use sp_consensus_babe::{ digests::{PreDigest, SecondaryPlainPreDigest}, BABE_ENGINE_ID, }; -use sp_runtime::{generic::BlockId, Digest, DigestItem}; +use sp_runtime::{generic::BlockId, traits::Block as BlockT, Digest, DigestItem}; use sp_state_machine::BasicExternalities; /// An extension for the test client to initialize a Polkadot specific block builder. @@ -42,20 +42,21 @@ pub trait InitPolkadotBlockBuilder { /// which should be the parent block of the block that is being build. fn init_polkadot_block_builder_at( &self, - at: &BlockId, + hash: ::Hash, ) -> sc_block_builder::BlockBuilder; } impl InitPolkadotBlockBuilder for Client { fn init_polkadot_block_builder(&self) -> BlockBuilder { let chain_info = self.chain_info(); - self.init_polkadot_block_builder_at(&BlockId::Hash(chain_info.best_hash)) + self.init_polkadot_block_builder_at(chain_info.best_hash) } fn init_polkadot_block_builder_at( &self, - at: &BlockId, + hash: ::Hash, ) -> BlockBuilder { + let at = BlockId::Hash(hash); let last_timestamp = self.runtime_api().get_last_timestamp(&at).expect("Get last timestamp"); @@ -87,7 +88,7 @@ impl InitPolkadotBlockBuilder for Client { }; let mut block_builder = self - .new_block_at(at, digest, false) + .new_block_at(&at, digest, false) .expect("Creates new block builder for test runtime"); let mut inherent_data = sp_inherents::InherentData::new(); @@ -97,7 +98,7 @@ impl InitPolkadotBlockBuilder for Client { .expect("Put timestamp inherent data"); let parent_header = self - .header(at) + .header(hash) .expect("Get the parent block header") .expect("The target block header must exist"); diff --git a/node/test/performance-test/Cargo.toml b/node/test/performance-test/Cargo.toml index 55d74ad62f1d..95da89662579 100644 --- a/node/test/performance-test/Cargo.toml +++ b/node/test/performance-test/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-performance-test" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] thiserror = "1.0.31" diff --git a/node/test/service/Cargo.toml b/node/test/service/Cargo.toml index 87111241b25a..6fab3150a623 100644 --- a/node/test/service/Cargo.toml +++ b/node/test/service/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-test-service" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] futures = "0.3.21" @@ -10,7 +10,7 @@ hex = "0.4.3" gum = { package = "tracing-gum", path = "../../gum" } rand = "0.8.5" tempfile = "3.2.0" -tokio = "1.19.2" +tokio = "1.22.0" # Polkadot dependencies polkadot-overseer = { path = "../../overseer" } @@ -48,7 +48,7 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master sc-network-common = { 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" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "wasmtime" ] } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -61,7 +61,7 @@ substrate-test-client = { git = "https://github.com/paritytech/substrate", branc pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } serde_json = "1.0.81" substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19.2", features = ["macros"] } +tokio = { version = "1.22.0", features = ["macros"] } [features] runtime-metrics=["polkadot-test-runtime/runtime-metrics"] diff --git a/node/zombienet-backchannel/Cargo.toml b/node/zombienet-backchannel/Cargo.toml index 74cd56ec521a..74e6751eb7de 100644 --- a/node/zombienet-backchannel/Cargo.toml +++ b/node/zombienet-backchannel/Cargo.toml @@ -2,14 +2,14 @@ name = "zombienet-backchannel" description = "Zombienet backchannel to notify test runner and coordinate with malus actors." license = "GPL-3.0-only" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" readme = "README.md" publish = false +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] -tokio = { version = "1.19.2", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] } +tokio = { version = "1.22.0", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] } url = "2.0.0" tokio-tungstenite = "0.17" futures-util = "0.3.23" diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index 665a7b0986cc..d203bd3ed9f6 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -1,16 +1,15 @@ [package] name = "polkadot-parachain" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Types and utilities for creating and working with parachains" -edition = "2021" +authors.workspace = true +edition.workspace = true +version.workspace = true [dependencies] # note: special care is taken to avoid inclusion of `sp-io` externals when compiling # this crate for WASM. This is critical to avoid forcing all parachain WASM into implementing # various unnecessary Substrate-specific endpoints. parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } -parity-util-mem = { version = "0.12.0", default-features = false, optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -32,7 +31,6 @@ std = [ "sp-std/std", "sp-runtime/std", "sp-core/std", - "parity-util-mem", "polkadot-core-primitives/std", "frame-support/std", ] diff --git a/parachain/src/primitives.rs b/parachain/src/primitives.rs index 2c18b178271f..e638b83c2d7c 100644 --- a/parachain/src/primitives.rs +++ b/parachain/src/primitives.rs @@ -31,9 +31,6 @@ use serde::{Deserialize, Serialize}; #[cfg(feature = "std")] use sp_core::bytes; -#[cfg(feature = "std")] -use parity_util_mem::MallocSizeOf; - use polkadot_core_primitives::{Hash, OutboundHrmpMessage}; /// Block number type used by the relay chain. @@ -43,7 +40,7 @@ pub use polkadot_core_primitives::BlockNumber as RelayChainBlockNumber; #[derive( PartialEq, Eq, Clone, PartialOrd, Ord, Encode, Decode, RuntimeDebug, derive_more::From, TypeInfo, )] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf, Default))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, Default))] pub struct HeadData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); impl HeadData { @@ -55,7 +52,7 @@ impl HeadData { /// Parachain validation code. #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, derive_more::From, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash))] pub struct ValidationCode(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); impl ValidationCode { @@ -71,7 +68,6 @@ impl ValidationCode { /// /// This type makes it easy to enforce that a hash is a validation code hash on the type level. #[derive(Clone, Copy, Encode, Decode, Hash, Eq, PartialEq, PartialOrd, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct ValidationCodeHash(Hash); impl sp_std::fmt::Display for ValidationCodeHash { @@ -114,7 +110,7 @@ impl sp_std::fmt::LowerHex for ValidationCodeHash { /// /// Contains everything required to validate para-block, may contain block and witness data. #[derive(PartialEq, Eq, Clone, Encode, Decode, derive_more::From, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); /// Unique identifier of a parachain. @@ -134,10 +130,7 @@ pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec RuntimeDebug, TypeInfo, )] -#[cfg_attr( - feature = "std", - derive(serde::Serialize, serde::Deserialize, derive_more::Display, MallocSizeOf) -)] +#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize, derive_more::Display))] pub struct Id(u32); impl TypeId for Id { diff --git a/parachain/test-parachains/Cargo.toml b/parachain/test-parachains/Cargo.toml index 8ed8ae6211c4..d023fb6be6ea 100644 --- a/parachain/test-parachains/Cargo.toml +++ b/parachain/test-parachains/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "test-parachains" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Integration tests using the test-parachains" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } diff --git a/parachain/test-parachains/adder/Cargo.toml b/parachain/test-parachains/adder/Cargo.toml index 42ffaf728ac5..4b29da55c1cf 100644 --- a/parachain/test-parachains/adder/Cargo.toml +++ b/parachain/test-parachains/adder/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "test-parachain-adder" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Test parachain which adds to a number as its state transition" -edition = "2021" build = "build.rs" +edition.workspace = true +version.workspace = true +authors.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } diff --git a/parachain/test-parachains/adder/collator/Cargo.toml b/parachain/test-parachains/adder/collator/Cargo.toml index 132fe2c0a527..3f13eecb96e3 100644 --- a/parachain/test-parachains/adder/collator/Cargo.toml +++ b/parachain/test-parachains/adder/collator/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "test-parachain-adder-collator" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Collator for the adder test parachain" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [[bin]] name = "adder-collator" @@ -44,4 +44,4 @@ substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19.2", features = ["macros"] } +tokio = { version = "1.22.0", features = ["macros"] } diff --git a/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index 3a9096c4d56b..05df7e7d592f 100644 --- a/parachain/test-parachains/halt/Cargo.toml +++ b/parachain/test-parachains/halt/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "test-parachain-halt" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Test parachain which executes forever" -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] diff --git a/parachain/test-parachains/undying/Cargo.toml b/parachain/test-parachains/undying/Cargo.toml index ab27c07781c5..1cc5595ec7a5 100644 --- a/parachain/test-parachains/undying/Cargo.toml +++ b/parachain/test-parachains/undying/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "test-parachain-undying" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Test parachain for zombienet integration tests" -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } diff --git a/parachain/test-parachains/undying/collator/Cargo.toml b/parachain/test-parachains/undying/collator/Cargo.toml index f8198f8e4006..2543b6f91930 100644 --- a/parachain/test-parachains/undying/collator/Cargo.toml +++ b/parachain/test-parachains/undying/collator/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "test-parachain-undying-collator" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Collator for the undying test parachain" -edition = "2021" +edition.workspace = true +version.workspace = true +authors.workspace = true [[bin]] name = "undying-collator" @@ -44,4 +44,4 @@ substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19", features = ["macros"] } +tokio = { version = "1.22.0", features = ["macros"] } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index b99ac7bc19e6..43df39e26bde 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,14 +1,13 @@ [package] name = "polkadot-primitives" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } hex-literal = "0.3.4" parity-scale-codec = { version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } -parity-util-mem = { version = "0.12.0", default-features = false, optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["bit-vec", "derive"] } serde = { version = "1.0.137", optional = true, features = ["derive"] } @@ -46,7 +45,6 @@ std = [ "sp-arithmetic/std", "runtime_primitives/std", "serde", - "parity-util-mem", "polkadot-parachain/std", "polkadot-core-primitives/std", "bitvec/std", diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index ea1f4fcca0b9..606ffd59920c 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -47,8 +47,6 @@ pub use polkadot_parachain::primitives::{ LOWEST_PUBLIC_ID, LOWEST_USER_ID, }; -#[cfg(feature = "std")] -use parity_util_mem::{MallocSizeOf, MallocSizeOfOps}; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; @@ -77,16 +75,6 @@ mod collator_app { /// Identity that collators use. pub type CollatorId = collator_app::Public; -#[cfg(feature = "std")] -impl MallocSizeOf for CollatorId { - fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { - 0 - } - fn constant_size() -> Option { - Some(0) - } -} - /// A Parachain collator keypair. #[cfg(feature = "std")] pub type CollatorPair = collator_app::Pair; @@ -94,16 +82,6 @@ pub type CollatorPair = collator_app::Pair; /// Signature on candidate's block data by a collator. pub type CollatorSignature = collator_app::Signature; -#[cfg(feature = "std")] -impl MallocSizeOf for CollatorSignature { - fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { - 0 - } - fn constant_size() -> Option { - Some(0) - } -} - /// The key type ID for a parachain validator key. pub const PARACHAIN_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"para"); @@ -118,16 +96,6 @@ mod validator_app { /// so we define it to be the same type as `SessionKey`. In the future it may have different crypto. pub type ValidatorId = validator_app::Public; -#[cfg(feature = "std")] -impl MallocSizeOf for ValidatorId { - fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { - 0 - } - fn constant_size() -> Option { - Some(0) - } -} - /// Trait required for type specific indices e.g. `ValidatorIndex` and `GroupIndex` pub trait TypeIndex { /// Returns the index associated to this value. @@ -136,7 +104,7 @@ pub trait TypeIndex { /// Index of the validator is used as a lightweight replacement of the `ValidatorId` when appropriate. #[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash))] pub struct ValidatorIndex(pub u32); // We should really get https://github.com/paritytech/polkadot/issues/2403 going .. @@ -163,16 +131,6 @@ application_crypto::with_pair! { /// so we define it to be the same type as `SessionKey`. In the future it may have different crypto. pub type ValidatorSignature = validator_app::Signature; -#[cfg(feature = "std")] -impl MallocSizeOf for ValidatorSignature { - fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { - 0 - } - fn constant_size() -> Option { - Some(0) - } -} - /// A declarations of storage keys where an external observer can find some interesting data. pub mod well_known_keys { use super::{HrmpChannelId, Id}; @@ -406,16 +364,6 @@ application_crypto::with_pair! { pub type AssignmentPair = assignment_app::Pair; } -#[cfg(feature = "std")] -impl MallocSizeOf for AssignmentId { - fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { - 0 - } - fn constant_size() -> Option { - Some(0) - } -} - /// The index of the candidate in the list of candidates fully included as-of the block. pub type CandidateIndex = u32; @@ -465,7 +413,7 @@ fn check_collator_signature>( /// A unique descriptor of the candidate receipt. #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Hash))] pub struct CandidateDescriptor { /// The ID of the para this is a candidate for. pub para_id: Id, @@ -507,7 +455,6 @@ impl> CandidateDescriptor { /// A candidate-receipt. #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct CandidateReceipt { /// The descriptor of the candidate. pub descriptor: CandidateDescriptor, @@ -544,7 +491,7 @@ pub struct FullCandidateReceipt { /// A candidate-receipt with commitments directly included. #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Hash))] pub struct CommittedCandidateReceipt { /// The descriptor of the candidate. pub descriptor: CandidateDescriptor, @@ -625,7 +572,7 @@ impl Ord for CommittedCandidateReceipt { /// The `PersistedValidationData` should be relatively lightweight primarily because it is constructed /// during inclusion for each candidate and therefore lies on the critical path of inclusion. #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Default, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Default))] pub struct PersistedValidationData { /// The parent head-data. pub parent_head: HeadData, @@ -646,7 +593,7 @@ impl PersistedValidationData { /// Commitments made in a `CandidateReceipt`. Many of these are outputs of validation. #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf, Default))] +#[cfg_attr(feature = "std", derive(Hash, Default))] pub struct CandidateCommitments { /// Messages destined to be interpreted by the Relay chain itself. pub upward_messages: Vec, @@ -766,7 +713,7 @@ pub fn check_candidate_backing + Clone + Encode>( .zip(backed.validity_votes.iter()) { let validator_id = validator_lookup(val_in_group_idx).ok_or(())?; - let payload = attestation.signed_payload(hash.clone(), signing_context); + let payload = attestation.signed_payload(hash, signing_context); let sig = attestation.signature(); if sig.verify(&payload[..], &validator_id) { @@ -787,7 +734,7 @@ pub fn check_candidate_backing + Clone + Encode>( #[derive( Encode, Decode, Default, PartialOrd, Ord, Eq, PartialEq, Clone, Copy, TypeInfo, RuntimeDebug, )] -#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Hash))] pub struct CoreIndex(pub u32); impl From for CoreIndex { @@ -804,7 +751,7 @@ impl TypeIndex for CoreIndex { /// The unique (during session) index of a validator group. #[derive(Encode, Decode, Default, Clone, Copy, Debug, PartialEq, Eq, TypeInfo)] -#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(Hash))] pub struct GroupIndex(pub u32); impl From for GroupIndex { @@ -846,7 +793,7 @@ pub enum CoreOccupied { /// A helper data-type for tracking validator-group rotations. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct GroupRotationInfo { /// The block number where the session started. pub session_start_block: N, @@ -934,7 +881,7 @@ impl GroupRotationInfo { /// Information about a core which is currently occupied. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct OccupiedCore { // NOTE: this has no ParaId as it can be deduced from the candidate descriptor. /// If this core is freed by availability, this is the assignment that is next up on this @@ -951,7 +898,6 @@ pub struct OccupiedCore { /// A bitfield with 1 bit for each validator in the set. `1` bits mean that the corresponding /// validators has attested to availability on-chain. A 2/3+ majority of `1` bits means that /// this will be available. - #[cfg_attr(feature = "std", ignore_malloc_size_of = "outside type")] pub availability: BitVec, /// The group assigned to distribute availability pieces of this candidate. pub group_responsible: GroupIndex, @@ -970,7 +916,7 @@ impl OccupiedCore { /// Information about a core which is currently occupied. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct ScheduledCore { /// The ID of a para scheduled. pub para_id: Id, @@ -980,7 +926,7 @@ pub struct ScheduledCore { /// The state of a particular availability core. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub enum CoreState { /// The core is currently occupied. #[codec(index = 0)] @@ -1031,7 +977,7 @@ pub enum OccupiedCoreAssumption { /// An even concerning a candidate. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub enum CandidateEvent { /// This candidate receipt was backed in the most recent block. /// This includes the core index the candidate is now occupying. @@ -1050,7 +996,7 @@ pub enum CandidateEvent { /// Scraped runtime backing votes and resolved disputes. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct ScrapedOnChainVotes { /// The session in which the block was included. pub session: SessionIndex, @@ -1239,7 +1185,6 @@ impl From for runtime_primitives::DigestItem { /// /// Statements are either in favor of the candidate's validity or against it. #[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum DisputeStatement { /// A valid statement, of the given kind. #[codec(index = 0)] @@ -1320,7 +1265,6 @@ impl DisputeStatement { /// Different kinds of statements of validity on a candidate. #[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum ValidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1338,7 +1282,6 @@ pub enum ValidDisputeStatementKind { /// Different kinds of statements of invalidity on a candidate. #[derive(Encode, Decode, Copy, Clone, PartialEq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum InvalidDisputeStatementKind { /// An explicit statement issued as part of a dispute. #[codec(index = 0)] @@ -1367,7 +1310,6 @@ impl ExplicitDisputeStatement { /// A set of statements about a specific candidate. #[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub struct DisputeStatementSet { /// The candidate referenced by this set. pub candidate_hash: CandidateHash, @@ -1432,22 +1374,6 @@ pub struct DisputeState { pub concluded_at: Option, } -#[cfg(feature = "std")] -impl MallocSizeOf for DisputeState { - fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize { - // destructuring to make sure no new fields are added to the struct without modifying this function - let Self { validators_for, validators_against, start, concluded_at } = self; - - // According to the documentation `.capacity()` might not return a byte aligned value, so just in case: - let align_eight = |d: usize| (d + 7) / 8; - - align_eight(validators_for.capacity()) + - align_eight(validators_against.capacity()) + - start.size_of(ops) + - concluded_at.size_of(ops) - } -} - /// Parachains inherent-data passed into the runtime by a block author #[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] pub struct InherentData { @@ -1464,7 +1390,6 @@ pub struct InherentData { /// An either implicit or explicit attestation to the validity of a parachain /// candidate. #[derive(Clone, Eq, PartialEq, Decode, Encode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(MallocSizeOf))] pub enum ValidityAttestation { /// Implicit validity attestation by issuing. /// This corresponds to issuance of a `Candidate` statement. @@ -1600,7 +1525,7 @@ impl CompactStatement { /// `IndexedVec` struct indexed by type specific indices. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct IndexedVec(Vec, PhantomData K>); impl Default for IndexedVec { @@ -1679,7 +1604,7 @@ pub fn supermajority_threshold(n: usize) -> usize { /// Information about validator sets of a session. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct SessionInfo { /****** New in v2 *******/ /// All the validators actively participating in parachain consensus. @@ -1705,7 +1630,6 @@ pub struct SessionInfo { /// `validators`, afterwards any remaining authorities can be found. This is any authorities not /// participating in parachain consensus - see /// [`max_validators`](https://github.com/paritytech/polkadot/blob/a52dca2be7840b23c19c153cf7e110b1e3e475f8/runtime/parachains/src/configuration.rs#L148) - #[cfg_attr(feature = "std", ignore_malloc_size_of = "outside type")] pub discovery_keys: Vec, /// The assignment keys for validators. /// @@ -1765,7 +1689,7 @@ impl PvfCheckStatement { /// Old, v1-style info about session info. Only needed for limited /// backwards-compatibility. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] +#[cfg_attr(feature = "std", derive(PartialEq))] pub struct OldV1SessionInfo { /// Validators in canonical ordering. /// @@ -1781,7 +1705,6 @@ pub struct OldV1SessionInfo { /// `validators`, afterwards any remaining authorities can be found. This is any authorities not /// participating in parachain consensus - see /// [`max_validators`](https://github.com/paritytech/polkadot/blob/a52dca2be7840b23c19c153cf7e110b1e3e475f8/runtime/parachains/src/configuration.rs#L148) - #[cfg_attr(feature = "std", ignore_malloc_size_of = "outside type")] pub discovery_keys: Vec, /// The assignment keys for validators. /// diff --git a/primitives/test-helpers/Cargo.toml b/primitives/test-helpers/Cargo.toml index 3ea45e12df7f..917e5f3babdb 100644 --- a/primitives/test-helpers/Cargo.toml +++ b/primitives/test-helpers/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-primitives-test-helpers" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/roadmap/implementers-guide/README.md b/roadmap/implementers-guide/README.md index 7f3f8cef7e63..996041f176bb 100644 --- a/roadmap/implementers-guide/README.md +++ b/roadmap/implementers-guide/README.md @@ -22,6 +22,11 @@ Then install and build the book: ```sh cargo install mdbook mdbook-linkcheck mdbook-graphviz mdbook-mermaid mdbook-last-changed mdbook serve roadmap/implementers-guide +``` + +and in a second terminal window run: + +```sh open http://localhost:3000 ``` diff --git a/roadmap/implementers-guide/src/SUMMARY.md b/roadmap/implementers-guide/src/SUMMARY.md index bcf87aad8a49..c504b9ac1923 100644 --- a/roadmap/implementers-guide/src/SUMMARY.md +++ b/roadmap/implementers-guide/src/SUMMARY.md @@ -75,7 +75,6 @@ - [Availability](types/availability.md) - [Overseer and Subsystem Protocol](types/overseer-protocol.md) - [Runtime](types/runtime.md) - - [Chain](types/chain.md) - [Messages](types/messages.md) - [Network](types/network.md) - [Approvals](types/approval.md) diff --git a/roadmap/implementers-guide/src/glossary.md b/roadmap/implementers-guide/src/glossary.md index 8612d8834cb8..d379c2813b59 100644 --- a/roadmap/implementers-guide/src/glossary.md +++ b/roadmap/implementers-guide/src/glossary.md @@ -2,6 +2,7 @@ Here you can find definitions of a bunch of jargon, usually specific to the Polkadot project. +- **Approval Checker:** A validator who randomly self-selects so to perform validity checks on a parablock which is pending approval. - **BABE:** (Blind Assignment for Blockchain Extension). The algorithm validators use to safely extend the Relay Chain. See [the Polkadot wiki][0] for more information. - **Backable Candidate:** A Parachain Candidate which is backed by a majority of validators assigned to a given parachain. - **Backed Candidate:** A Backable Candidate noted in a relay-chain block @@ -31,11 +32,9 @@ exactly one downward message queue. - **PVF Prechecking:** This is the process of initially checking the PVF when it is first added. We attempt preparation of the PVF and make sure it succeeds within a given timeout. - **PVF Preparation:** This is the process of preparing the WASM blob and includes both prevalidation and compilation. As prevalidation is pretty minimal right now, preparation mostly consists of compilation. - **Relay Parent:** A block in the relay chain, referred to in a context where work is being done in the context of the state at this block. -- **Router:** The router module is a meta module that consists of three runtime modules responsible for routing messages between paras and the relay chain. The three separate runtime modules are: Dmp, Ump, Hrmp, each responsible for the respective part of message routing. - **Runtime:** The relay-chain state machine. - **Runtime Module:** See Module. - **Runtime API:** A means for the node-side behavior to access structured information based on the state of a fork of the blockchain. -- **Secondary Checker:** A validator who has been randomly selected to perform secondary approval checks on a parablock which is pending approval. - **Subsystem:** A long-running task which is responsible for carrying out a particular category of work. - **UMP:** (Upward Message Passing) A vertical message passing mechanism from a parachain to the relay chain. - **Validator:** Specially-selected node in the network who is responsible for validating parachain blocks and issuing attestations about their validity. @@ -48,4 +47,3 @@ exactly one downward message queue. Also of use is the [Substrate Glossary](https://substrate.dev/docs/en/knowledgebase/getting-started/glossary). [0]: https://wiki.polkadot.network/docs/learn-consensus -[1]: #pvf diff --git a/roadmap/implementers-guide/src/node/availability/README.md b/roadmap/implementers-guide/src/node/availability/README.md index 46ee4b204982..76bd6467e178 100644 --- a/roadmap/implementers-guide/src/node/availability/README.md +++ b/roadmap/implementers-guide/src/node/availability/README.md @@ -1,3 +1,3 @@ # Availability Subsystems -The availability subsystems are responsible for ensuring that Proofs of Validity of backed candidates are widely available within the validator set, without requiring every node to retain a full copy. They accomplish this by broadly distributing erasure-coded chunks of the PoV, keeping track of which validator has which chunk by means of signed bitfields. They are also responsible for reassembling a complete PoV when required, e.g. when a fisherman reports a potentially invalid block. +The availability subsystems are responsible for ensuring that Proofs of Validity of backed candidates are widely available within the validator set, without requiring every node to retain a full copy. They accomplish this by broadly distributing erasure-coded chunks of the PoV, keeping track of which validator has which chunk by means of signed bitfields. They are also responsible for reassembling a complete PoV when required, e.g. when an approval checker needs to validate a parachain block. diff --git a/roadmap/implementers-guide/src/node/disputes/README.md b/roadmap/implementers-guide/src/node/disputes/README.md index 2db891aa216f..a6e126b1534b 100644 --- a/roadmap/implementers-guide/src/node/disputes/README.md +++ b/roadmap/implementers-guide/src/node/disputes/README.md @@ -1,40 +1,18 @@ # Disputes Subsystems -This section is for the node-side subsystems that lead to participation in disputes. There are five major roles that validator nodes must participate in when it comes to disputes - * Detection. Detect bad parablocks, either during candidate backing or approval checking, and initiate a dispute. - * Participation. Participate in active disputes. When a node becomes aware of a dispute, it should recover the data for the disputed block, check the validity of the parablock, and issue a statement regarding the validity of the parablock. - * Distribution. Validators should notify each other of active disputes and relevant statements over the network. - * Submission. When authoring a block, a validator should inspect the state of the parent block and provide any information about disputes that the chain needs as part of the `ParaInherent`. This should initialize new disputes on-chain as necessary. - * Fork-choice and Finality. When observing a block issuing a `DisputeRollback` digest in the header, that branch of the relay chain should be abandoned all the way back to the indicated block. When voting on chains in GRANDPA, no chains that contain blocks with active disputes or disputes that concluded invalid should be voted on. - -## Components - -### Dispute Coordinator - -This component is responsible for coordinating other subsystems around disputes. - -This component should track all statements received from all validators over some window of sessions. This includes backing statements, approval votes, and statements made specifically for disputes. This will be used to identify disagreements or instances where validators conflict with themselves. - -This is responsible for tracking and initiating disputes. Disputes will be initiated either externally by another subsystem which has identified an issue with a parablock or internally upon observing two statements which conflict with each other on the validity of a parablock. - -No more than one statement by each validator on each side of the dispute needs to be stored. That is, validators are allowed to participate on both sides of the dispute, although we won't write code to do so. Such behavior has negative extractable value in the runtime. - -This will notify the dispute participation subsystem of a new dispute if the local validator has not issued any statements on the disputed candidate already. - -Locally authored statements related to disputes will be forwarded to the dispute distribution subsystem. - -This subsystem also provides two further behaviors for the interactions between disputes and fork-choice - - Enhancing the finality voting rule. Given description of a chain and candidates included at different heights in that chain, it returns the `BlockHash` corresponding to the highest `BlockNumber` that there are no disputes before. I expect that we will slightly change `ApprovalVoting::ApprovedAncestor` to return this set and then the target block to vote on will be further constrained by this function. - - Chain roll-backs. Whenever importing new blocks, the header should be scanned for a roll-back digest. If there is one, the chain should be rolled back according to the digest. I expect this would be implemented with a `ChainApi` function and possibly an `ApprovalVoting` function to clean up the approval voting DB. - -### Dispute Participation - -This subsystem ties together the dispute tracker, availability recovery, candidate validation, and dispute distribution subsystems. When notified of a new dispute by the Dispute Tracker, the data should be recovered, the validation code loaded from the relay chain, and the candidate is executed. - -A statement depending on the outcome of the execution is produced, signed, and imported to the dispute tracker. - -### Dispute Distribution - -This is a networking component by which validators notify each other of live disputes and statements on those disputes. - -Validators will in the future distribute votes to each other via the network, but at the moment learn of disputes just from watching the chain. +If approval voting finds an invalid candidate, a dispute is raised. The disputes +subsystems are concerned with the following: + +1. Disputes can be raised +2. Disputes (votes) get propagated to all other validators +3. Votes get recorded as necessary +3. Nodes will participate in disputes in a sensible fashion +4. Finality is stopped while a candidate is being disputed on chain +5. Chains can be reverted in case a dispute concludes invalid +6. Votes are provided to the provisioner for importing on chain, in order for + slashing to work. + +The dispute-coordinator subsystem interfaces with the provisioner and chain +selection to make the bulk of this possible. `dispute-distribution` is concerned +with getting votes out to other validators and receiving them in a spam +resilient way. diff --git a/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md b/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md index 3d44e210db0e..dc01664c295a 100644 --- a/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md +++ b/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md @@ -9,12 +9,14 @@ In particular the dispute-coordinator is responsible for: - Ensuring that the node is able to raise a dispute in case an invalid candidate is found during approval checking. -- Ensuring lazy approval votes (votes given without running the parachain - validation function) will be recorded, so lazy nodes can get slashed properly. +- Ensuring approval votes will be recorded. - Coordinating actual participation in a dispute, ensuring that the node participates in any justified dispute in a way that ensures resolution of disputes on the network even in the case of many disputes raised (flood/DoS scenario). +- Ensuring disputes resolve, even for candidates on abandoned forks as much as + reasonably possible, to rule out "free tries" and thus guarantee our gambler's + ruin property. - Provide an API for chain selection, so we can prevent finalization of any chain which has included candidates for which a dispute is either ongoing or concluded invalid and avoid building on chains with an included invalid @@ -22,6 +24,8 @@ In particular the dispute-coordinator is responsible for: - Provide an API for retrieving (resolved) disputes, including all votes, both implicit (approval, backing) and explicit dispute votes. So validators can get rewarded/slashed accordingly. +- Ensure backing votes are recorded and will never get overridden by explicit + votes. ## Ensuring That Disputes Can Be Raised @@ -76,32 +80,38 @@ inefficient process. (Quadratic complexity adds up, with 35 votes in total per c Approval votes are very relevant nonetheless as we are going to see in the next section. -## Ensuring Lazy Approval Votes Will Be Recorded +## Ensuring approval votes will be recorded ### Ensuring Recording +Only votes recorded by the dispute coordinator will be considered for slashing. + While there is no need to record approval votes in the dispute coordinator -preemptively, we do need to make sure they are recorded when a dispute -actually happens. This is because only votes recorded by the dispute -coordinator will be considered for slashing. It is sufficient for our -threat model that malicious backers are slashed as opposed to both backers and -approval checkers. However, we still must import approval votes from the approvals -process into the disputes process to ensure that lazy approval checkers -actually run the parachain validation function. Slashing lazy approval checkers is necessary, else we risk a useless approvals process where every approval -checker blindly votes valid for every candidate. If we did not import approval -votes, lazy nodes would likely cast a properly checked explicit vote as part -of the dispute in addition to their blind approval vote and thus avoid a slash. -With the 2/3rd honest assumption it seems unrealistic that lazy approval voters -will keep sending unchecked approval votes once they became aware of a raised -dispute. Hence the most crucial approval votes to import are the early ones -(tranche 0), to take into account network latencies and such we still want to -import approval votes at a later point in time as well (in particular we need -to make sure the dispute can conclude, but more on that later). - -As mentioned already previously, importing votes is most efficient when batched. -At the same time approval voting and disputes are running concurrently so -approval votes are expected to trickle in still, when a dispute is already -ongoing. +preemptively, we make some effort to have any in approval-voting received +approval votes recorded when a dispute actually happens: + +This is not required for concluding the dispute, as nodes send their own vote +anyway (either explicit valid or their existing approval-vote). What nodes can +do though, is participating in approval-voting, casting a vote, but later when a +dispute is raised reconsider their vote and send an explicit invalid vote. If +they managed to only have that one recorded, then they could avoid a slash. + +This is not a problem for our basic security assumptions: The backers are the +ones to be supposed to have skin in the game, so we are not too woried about +colluding approval voters getting away slash free as the gambler's ruin property +is maintained anyway. There is however a separate problem, from colluding +approval-voters, that is "lazy" approval voters. If it were easy and reliable +for approval-voters to reconsider their vote, in case of an actual dispute, then +they don't have a direct incentive (apart from playing a part in securing the +network) to properly run the validation function at all - they could just always +vote "valid" totally risk free. (While they would alwasy risk a slash by voting +invalid.) + + +So we do want to fetch approval votes from approval-voting. Importing votes is +most efficient when batched. At the same time approval voting and disputes are +running concurrently so approval votes are expected to trickle in still, when a +dispute is already ongoing. Hence, we have the following requirements for importing approval votes: @@ -112,12 +122,12 @@ Hence, we have the following requirements for importing approval votes: already running. With a design where approval voting sends votes to the dispute-coordinator by -itself, we would need to make approval voting aware of ongoing disputes and -once it is aware it could start sending all already existing votes batched and +itself, we would need to make approval voting aware of ongoing disputes and once +it is aware it could start sending all already existing votes batched and trickling in votes as they come. The problem with this is, that it adds some unnecessary complexity to approval-voting and also we might still import most of -the votes unbatched, but one-by-one, depending on what point in time the dispute -was raised. +the votes unbatched one-by-one, depending on what point in time the dispute was +raised. Instead of the dispute coordinator informing approval-voting of an ongoing dispute for it to begin forwarding votes to the dispute coordinator, it makes @@ -126,14 +136,11 @@ candidates in dispute. This way, the dispute coordinator can also pick the best time for maximizing the number of votes in the batch. Now the question remains, when should the dispute coordinator ask -approval-voting for votes? As argued above already, querying approval votes at -the beginning of the dispute, will likely already take care of most malicious -votes. Still we would like to have a record of all, if possible. So what are -other points in time we might query approval votes? +approval-voting for votes? In fact for slashing it is only relevant to have them once the dispute concluded, so we can query approval voting the moment the dispute concludes! -There are two potential caveats with this though: +Two concerns that come to mind, are easily addressed: 1. Timing: We would like to rely as little as possible on implementation details of approval voting. In particular, if the dispute is ongoing for a long time, @@ -153,31 +160,12 @@ There are two potential caveats with this though: chain can no longer be finalized (some other/better fork already has been). This second problem can somehow be mitigated by also importing votes as soon as a dispute is detected, but not fully resolved. It is still inherently - racy. The problem can be solved in at least two ways: Either go back to full - eager import of approval votes into the dispute-coordinator in some more - efficient manner or by changing requirements on approval-voting, making it - hold on votes longer than necessary for approval-voting itself. Conceptually - both solutions are equivalent, as we make sure votes are available even - without an ongoing dispute. For now, in the interest of time we punt on this - issue: If nodes import votes as soon as a dispute is raised in addition to - when it concludes, we have a good chance of getting relevant votes and even - if not, the fundamental security properties will still hold: Backers are - getting slashed, therefore gambler's ruin is maintained. We would still like - to fix this at [some - point](https://github.com/paritytech/polkadot/issues/5864). -2. There could be a chicken and egg problem: If we wait for approval vote import - for the dispute to conclude, we would run into a problem if we needed those - approval votes to get enough votes to conclude the dispute. Luckily it turns - out that this is not quite true or at least can be made not true easily: As - already mentioned, approval voting and disputes are running concurrently, but - not only that, they race with each other! A node might simultaneously start - participating in a dispute via the dispute coordinator, due to learning about - a dispute via dispute-distribution, while also participating in approval - voting. By distributing our own approval vote we make sure the dispute can - conclude regardless how the race ended (we either participate explicitly - anyway or we sent our already present approval vote). By importing all - approval votes we make it possible to slash lazy approval voters, even - if they also cast an invalid explicit vote. + racy. The good thing is, this should be good enough: We are worried about + lazy approval checkers, the system does not need to be perfect. It should be + enough if there is some risk of getting caught. +2. We are not worried about the dispute not concluding, as nodes will always + send their own vote, regardless of it being an explict or an already existing + approval-vote. Conclusion: As long as we make sure, if our own approval vote gets imported (which would prevent dispute participation) to also distribute it via @@ -186,28 +174,27 @@ approval-voting deleting votes we will import approval votes twice during a dispute: Once when it is raised, to make as sure as possible to see approval votes also for abandoned forks and second when the dispute concludes, to maximize the amount of potentially malicious approval votes to be recorded. The -raciness obviously is not fully resolved by this, [a -ticket](https://github.com/paritytech/polkadot/issues/5864) exists. +raciness obviously is not fully resolved by this, but this is fine as argued +above. Ensuring vote import on chain is covered in the next section. -As already touched: Honest nodes -will likely validate twice, once in approval voting and once via -dispute-participation. Avoiding that does not really seem worthwhile though, as -disputes are for one exceptional, so a little wasted effort won't affect -everyday performance - second, even with eager importing of approval votes, -those doubled work is still present as disputes and approvals are racing. Every -time participation is faster than approval, a node would do double work. +What we don't care about is that honest approval-voters will likely validate +twice, once in approval voting and once via dispute-participation. Avoiding that +does not really seem worthwhile though, as disputes are for one exceptional, so +a little wasted effort won't affect everyday performance - second, even with +eager importing of approval votes, those doubled work is still present as +disputes and approvals are racing. Every time participation is faster than +approval, a node would do double work. ### Ensuring Chain Import While in the previous section we discussed means for nodes to ensure relevant -votes are recorded so lazy approval checkers get slashed properly, it is crucial -to also discuss the actual chain import. Only if we guarantee that recorded votes -will also get imported on chain (on all potential chains really) we will succeed -in executing slashes. Particularly we need to make sure backing votes end up on -chain consistantly. In contrast recording and slashing lazy approval voters only -needs to be likely, not certain. +votes are recorded so lazy approval checkers get slashed properly, it is crucial +to also discuss the actual chain import. Only if we guarantee that recorded votes +will get imported on chain (on all potential chains really) we will succeed +in executing slashes. Particularly we need to make sure backing votes end up on +chain consistently. Dispute distribution will make sure all explicit dispute votes get distributed among nodes which includes current block producers (current authority set) which @@ -227,14 +214,14 @@ production in the current set - they might only exist on an already abandoned fork. This means a block producer that just joined the set, might not have seen any of them. -For approvals it is even more tricky and less necessary: Approval voting together -with finalization is a completely off-chain process therefore those protocols -don't care about block production at all. Approval votes only have a guarantee of -being propagated between the nodes that are responsible for finalizing the -concerned blocks. This implies that on an era change the current authority set, -will not necessarily get informed about any approval votes for the previous era. -Hence even if all validators of the previous era successfully recorded all approval -votes in the dispute coordinator, they won't get a chance to put them on chain, +For approvals it is even more tricky and less necessary: Approval voting together +with finalization is a completely off-chain process therefore those protocols +don't care about block production at all. Approval votes only have a guarantee of +being propagated between the nodes that are responsible for finalizing the +concerned blocks. This implies that on an era change the current authority set, +will not necessarily get informed about any approval votes for the previous era. +Hence even if all validators of the previous era successfully recorded all approval +votes in the dispute coordinator, they won't get a chance to put them on chain, hence they won't be considered for slashing. It is important to note, that the essential properties of the system still hold: @@ -309,7 +296,7 @@ to send out a thousand tiny network messages by just sending out a single garbage message, is still a significant amplification and is nothing to ignore - this could absolutely be used to cause harm! -#### Participation +### Participation As explained, just blindly participating in any "dispute" that comes along is not a good idea. First we would like to make sure the dispute is actually @@ -336,7 +323,7 @@ participation at all on any _vote import_ if any of the following holds true: honest node that already voted, so the dispute must be genuine. Note: A node might be out of sync with the chain and we might only learn about a -block including a candidate, after we learned about the dispute. This means, we +block, including a candidate, after we learned about the dispute. This means, we have to re-evaluate participation decisions on block import! With this, nodes won't waste significant resources on completely made up @@ -348,7 +335,7 @@ obviously only need to worry about order if participations start queuing up. We treat participation for candidates that we have seen included with priority and put them on a priority queue which sorts participation based on the block -number of the relay parent of that candidate and for candidates with the same +number of the relay parent of the candidate and for candidates with the same relay parent height further by the `CandidateHash`. This ordering is globally unique and also prioritizes older candidates. @@ -359,37 +346,89 @@ times instead of just once to the oldest offender. This is obviously a good idea, in particular it makes it impossible for an attacker to prevent rolling back a very old candidate, by keeping raising disputes for newer candidates. -For candidates we have not seen included, but we have our availability piece -available we put participation on a best-effort queue, which at the moment is -processed on the basis how often we requested participation locally, which -equals the number of times we imported votes for that dispute. The idea is, if -we have not seen the candidate included, but the dispute is valid, other nodes -will have seen it included - so the more votes there are, the more likely it is -a valid dispute and we should implicitly arrive at a similar ordering as the -nodes that are able to sort based on the relay parent block height. +For candidates we have not seen included, but we know are backed (thanks to +chain scraping) or we have seen a dispute with 1/3+1 participation (confirmed +dispute) on them - we put participation on a best-effort queue. It has got the +same ordering as the priority one - by block heights of the relay parent, older +blocks are with priority. There is a possibility not to be able to obtain the +block number of the parent when we are inserting the dispute in the queue. To +account for races, we will promote any existing participation request to the +priority queue once we learn about an including block. NOTE: this is still work +in progress and is tracked by [this +issue](https://github.com/paritytech/polkadot/issues/5875). + +### Abandoned Forks + +Finalization: As mentioned we care about included and backed candidates on any +non-finalized chain, given that any disputed chain will not get finalized, we +don't need to care about finalized blocks, but what about forks that fall behind +the finalized chain in terms of block number? For those we would still like to +be able to participate in any raised disputes, otherwise attackers might be able +to avoid a slash if they manage to create a better fork after they learned about +the approval checkers. Therefore we do care about those forks even after they +have fallen behind the finalized chain. + +For simplicity we also care about the actual finalized chain (not just forks) up +to a certain depth. We do have to limit the depth, because otherwise we open a +DoS vector again. The depth (into the finalized chain) should be oriented on the +approval-voting execution timeout, in particular it should be significantly +larger. Otherwise by the time the execution is allowed to finish, we already +dropped information about those candidates and the dispute could not conclude. + +## Import -#### Import +### Spam Considerations -In the last section we looked at how to treat queuing participations to handle -heavy dispute load well. This already ensures, that honest nodes won't amplify -cheap DoS attacks. There is one minor issue remaining: Even if we delay +In the last section we looked at how to treat queuing participations to +handle heavy dispute load well. This already ensures, that honest nodes won't +amplify cheap DoS attacks. There is one minor issue remaining: Even if we delay participation until we have some confirmation of the authenticity of the -dispute, we should also not blindly import all votes arriving into the -database as this might be used to just slowly fill up disk space, until the node -is no longer functional. This leads to our last protection mechanism at the -dispute coordinator level (dispute-distribution also has its own), which is spam -slots. For each import, where we don't know whether it might be spam or not we -increment a counter for each signing participant of explicit `invalid` votes. +dispute, we should also not blindly import all votes arriving into the database +as this might be used to just slowly fill up disk space, until the node is no +longer functional. This leads to our last protection mechanism at the dispute +coordinator level (dispute-distribution also has its own), which is spam slots. +For each import containing an invalid vote, where we don't know whether it might +be spam or not we increment a counter for each signing participant of explicit +`invalid` votes. + +What votes do we treat as a potential spam? A vote will increase a spam slot if +and only if all of the following conditions are satisfied: + +* the candidate under dispute was not seen included nor backed on any chain +* the dispute is not confirmed +* we haven't cast a vote for the dispute + +Whenever any vote on a dispute is imported these conditions are checked. If the +dispute is found not to be potential spam, then spam slots for the disputed candidate hash are cleared. This decrements the spam count for every validator +which had voted invalid. + +To keep spam slots from filling up unnecessarily we want to clear spam slots +whenever a candidate is seen to be backed or included. Fortunately this behavior +is acheived by clearing slots on vote import as described above. Because on chain +backing votes are processed when a block backing the disputed candidate is discovered, spam slots are cleared for every backed candidate. Included +candidates have also been seen as backed on the same fork, so decrementing spam +slots is handled in that case as well. The reason this works is because we only need to worry about actual dispute votes. Import of backing votes are already rate limited and concern only real -candidates for approval votes a similar argument holds (if they come from +candidates. For approval votes a similar argument holds (if they come from approval-voting), but we also don't import them until a dispute already -concluded. For actual dispute votes, we need two opposing votes, so there must be +concluded. For actual dispute votes we need two opposing votes, so there must be an explicit `invalid` vote in the import. Only a third of the validators can be malicious, so spam disk usage is limited to `2*vote_size*n/3*NUM_SPAM_SLOTS`, with `n` being the number of validators. +### Backing Votes + +Backing votes are in some way special. For starters they are the only valid +votes that are guaranteed to exist for any valid dispute to be raised. Second +they are the only votes that commit to a shorter execution timeout +`BACKING_EXECUTION_TIMEOUT`, compared to a more lenient timeout used in approval +voting. To account properly for execution time variance across machines, +slashing might treat backing votes differently (more aggressively) than other +voting `valid` votes. Hence in import we shall never override a backing vote +with another valid vote. They can not be assumed to be interchangeable. + ## Attacks & Considerations The following attacks on the priority queue and best-effort queues are @@ -488,16 +527,14 @@ We only ever care about disputes for candidates that have been included on at least some chain (became available). This is because the availability system was designed for precisely that: Only with inclusion (availability) we have guarantees about the candidate to actually be available. Because only then we -have guarantees that malicious backers can be reliably checked and slashed. The -system was also designed for non included candidates to not pose any threat to -the system. +have guarantees that malicious backers can be reliably checked and slashed. Also, by design non included candidates do not pose any threat to the system. One could think of an (additional) dispute system to make it possible to dispute any candidate that has been proposed by a validator, no matter whether it got successfully included or even backed. Unfortunately, it would be very brittle (no availability) and also spam protection would be way harder than for the -disputes handled by the dispute-coordinator. In fact all described spam handling -strategies above would simply be not available. +disputes handled by the dispute-coordinator. In fact, all the spam handling +strategies described above would simply be unavailable. It is worth thinking about who could actually raise such disputes anyway: Approval checkers certainly not, as they will only ever check once availability diff --git a/roadmap/implementers-guide/src/node/utility/candidate-validation.md b/roadmap/implementers-guide/src/node/utility/candidate-validation.md index 5393368c5c6b..6e7a5f3d0c8f 100644 --- a/roadmap/implementers-guide/src/node/utility/candidate-validation.md +++ b/roadmap/implementers-guide/src/node/utility/candidate-validation.md @@ -48,4 +48,47 @@ Once we have all parameters, we can spin up a background task to perform the val If we can assume the presence of the relay-chain state (that is, during processing [`CandidateValidationMessage`][CVM]`::ValidateFromChainState`) we can run all the checks that the relay-chain would run at the inclusion time thus confirming that the candidate will be accepted. +### PVF Host + +The PVF host is responsible for handling requests to prepare and execute PVF +code blobs. + +One high-level goal is to make PVF operations as deterministic as possible, to +reduce the rate of disputes. Disputes can happen due to e.g. a job timing out on +one machine, but not another. While we do not yet have full determinism, there +are some dispute reduction mechanisms in place right now. + +#### Retrying execution requests + +If the execution request fails during **preparation**, we will retry if it is +possible that the preparation error was transient (e.g. if the error was a panic +or time out). We will only retry preparation if another request comes in after +15 minutes, to ensure any potential transient conditions had time to be +resolved. We will retry up to 5 times. + +If the actual **execution** of the artifact fails, we will retry once if it was +an ambiguous error after a brief delay, to allow any potential transient +conditions to clear. + +#### Preparation timeouts + +We use timeouts for both preparation and execution jobs to limit the amount of +time they can take. As the time for a job can vary depending on the machine and +load on the machine, this can potentially lead to disputes where some validators +successfuly execute a PVF and others don't. + +One dispute mitigation we have in place is a more lenient timeout for +preparation during execution than during pre-checking. The rationale is that the +PVF has already passed pre-checking, so we know it should be valid, and we allow +it to take longer than expected, as this is likely due to an issue with the +machine and not the PVF. + +#### CPU clock timeouts + +Another timeout-related mitigation we employ is to measure the time taken by +jobs using CPU time, rather than wall clock time. This is because the CPU time +of a process is less variable under different system conditions. When the +overall system is under heavy load, the wall clock time of a job is affected +more than the CPU time. + [CVM]: ../../types/overseer-protocol.md#validationrequesttype diff --git a/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md b/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md index b0f58346da99..fd75ce9e3804 100644 --- a/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md +++ b/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md @@ -12,11 +12,11 @@ This subsytem does not produce any output messages either. The subsystem will, h If the node is running in a collator mode, this subsystem will be disabled. The PVF pre-checker subsystem keeps track of the PVFs that are relevant for the subsystem. -To be relevant for the subsystem, a PVF must be returned by `pvfs_require_precheck` [`pvfs_require_precheck` runtime API][PVF pre-checking runtime API] in any of the active leaves. If the PVF is not present in any of the active leaves, it ceases to be relevant. +To be relevant for the subsystem, a PVF must be returned by the [`pvfs_require_precheck` runtime API][PVF pre-checking runtime API] in any of the active leaves. If the PVF is not present in any of the active leaves, it ceases to be relevant. When a PVF just becomes relevant, the subsystem will send a message to the [Candidate Validation] subsystem asking for the pre-check. -Upon receving a message from the candidate-validation subsystem, the pre-checker will note down that the PVF has its judgement and will also sign and submit a [`PvfCheckStatement`] via the [`submit_pvf_check_statement` runtime API][PVF pre-checking runtime API]. In case, a judgement was received for a PVF that is no longer in view it is ignored. It is possible that the candidate validation was not able to check the PVF. In that case, the PVF pre-checker will abstain and won't submit any check statements. +Upon receving a message from the candidate-validation subsystem, the pre-checker will note down that the PVF has its judgement and will also sign and submit a [`PvfCheckStatement`][PvfCheckStatement] via the [`submit_pvf_check_statement` runtime API][PVF pre-checking runtime API]. In case, a judgement was received for a PVF that is no longer in view it is ignored. It is possible that the candidate validation was not able to check the PVF. In that case, the PVF pre-checker will abstain and won't submit any check statements. Since a vote only is valid during [one session][overview], the subsystem will have to resign and submit the statements for for the new session. The new session is assumed to be started if at least one of the leaves has a greater session index that was previously observed in any of the leaves. @@ -28,4 +28,4 @@ If the node is not in the active validator set, it will still perform all the ch [Runtime API]: runtime-api.md [PVF pre-checking runtime API]: ../../runtime-api/pvf-prechecking.md [Candidate Validation]: candidate-validation.md -[`PvfCheckStatement`]: ../../types/pvf-prechecking.md +[PvfCheckStatement]: ../../types/pvf-prechecking.md#pvfcheckstatement diff --git a/roadmap/implementers-guide/src/protocol-overview.md b/roadmap/implementers-guide/src/protocol-overview.md index 77b3a7448c44..fa5a866e6121 100644 --- a/roadmap/implementers-guide/src/protocol-overview.md +++ b/roadmap/implementers-guide/src/protocol-overview.md @@ -8,7 +8,6 @@ First, it's important to go over the main actors we have involved in this protoc 1. Validators. These nodes are responsible for validating proposed parachain blocks. They do so by checking a Proof-of-Validity (PoV) of the block and ensuring that the PoV remains available. They put financial capital down as "skin in the game" which can be slashed (destroyed) if they are proven to have misvalidated. 1. Collators. These nodes are responsible for creating the Proofs-of-Validity that validators know how to check. Creating a PoV typically requires familiarity with the transaction format and block authoring rules of the parachain, as well as having access to the full state of the parachain. -1. Fishermen. These are user-operated, permissionless nodes whose goal is to catch misbehaving validators in exchange for a bounty. Collators and validators can behave as Fishermen too. Fishermen aren't necessary for security, and aren't covered in-depth by this document. This implies a simple pipeline where collators send validators parachain blocks and their requisite PoV to check. Then, validators validate the block using the PoV, signing statements which describe either the positive or negative outcome, and with enough positive statements, the block can be noted on the relay-chain. Negative statements are not a veto but will lead to a dispute, with those on the wrong side being slashed. If another validator later detects that a validator or group of validators incorrectly signed a statement claiming a block was valid, then those validators will be _slashed_, with the checker receiving a bounty. diff --git a/roadmap/implementers-guide/src/runtime/README.md b/roadmap/implementers-guide/src/runtime/README.md index 178346e184f5..f1f9d6c950e2 100644 --- a/roadmap/implementers-guide/src/runtime/README.md +++ b/roadmap/implementers-guide/src/runtime/README.md @@ -14,16 +14,18 @@ There is some functionality of the relay chain relating to parachains that we al We will split the logic of the runtime up into these modules: -* Initializer: manage initialization order of the other modules. +* Initializer: manages initialization order of the other modules. * Shared: manages shared storage and configurations for other modules. -* Configuration: manage configuration and configuration updates in a non-racy manner. -* Paras: manage chain-head and validation code for parachains and parathreads. +* Configuration: manages configuration and configuration updates in a non-racy manner. +* Paras: manages chain-head and validation code for parachains and parathreads. * Scheduler: manages parachain and parathread scheduling as well as validator assignments. * Inclusion: handles the inclusion and availability of scheduled parachains and parathreads. -* Validity: handles secondary checks and dispute resolution for included, available parablocks. +* SessionInfo: manages various session keys of validators and other params stored per session. +* Disputes: handles dispute resolution for included, available parablocks. +* Slashing: handles slashing logic for concluded disputes. * HRMP: handles horizontal messages between paras. -* UMP: Handles upward messages from a para to the relay chain. -* DMP: Handles downward messages from the relay chain to the para. +* UMP: handles upward messages from a para to the relay chain. +* DMP: handles downward messages from the relay chain to the para. The [Initializer module](initializer.md) is special - it's responsible for handling the initialization logic of the other modules to ensure that the correct initialization order and related invariants are maintained. The other modules won't specify a on-initialize logic, but will instead expose a special semi-private routine that the initialization module will call. The other modules are relatively straightforward and perform the roles described above. diff --git a/roadmap/implementers-guide/src/types/approval.md b/roadmap/implementers-guide/src/types/approval.md index e85a625b0710..b58e0a8187e1 100644 --- a/roadmap/implementers-guide/src/types/approval.md +++ b/roadmap/implementers-guide/src/types/approval.md @@ -6,7 +6,7 @@ The public key of a keypair used by a validator for determining assignments to a ## `AssignmentCert` -An `AssignmentCert`, short for Assignment Certificate, is a piece of data provided by a validator to prove that they have been selected to perform secondary approval checks on an included candidate. +An `AssignmentCert`, short for Assignment Certificate, is a piece of data provided by a validator to prove that they have been selected to perform approval checks on an included candidate. These certificates can be checked in the context of a specific block, candidate, and validator assignment VRF key. The block state will also provide further context about the availability core states at that block. diff --git a/roadmap/implementers-guide/src/types/candidate.md b/roadmap/implementers-guide/src/types/candidate.md index b9d5900b7f17..729c72180ee5 100644 --- a/roadmap/implementers-guide/src/types/candidate.md +++ b/roadmap/implementers-guide/src/types/candidate.md @@ -76,7 +76,7 @@ struct CandidateDescriptor { collator: CollatorId, /// The blake2-256 hash of the persisted validation data. These are extra parameters /// derived from relay-chain state that influence the validity of the block which - /// must also be kept available for secondary checkers. + /// must also be kept available for approval checkers. persisted_validation_data_hash: Hash, /// The blake2-256 hash of the `pov-block`. pov_hash: Hash, @@ -92,6 +92,22 @@ struct CandidateDescriptor { } ``` +## `ValidationParams` + +```rust +/// Validation parameters for evaluating the parachain validity function. +pub struct ValidationParams { + /// Previous head-data. + pub parent_head: HeadData, + /// The collation body. + pub block_data: BlockData, + /// The current relay-chain block number. + pub relay_parent_number: RelayChainBlockNumber, + /// The relay-chain block's storage root. + pub relay_parent_storage_root: Hash, +} +``` + ## `PersistedValidationData` The validation data provides information about how to create the inputs for validation of a candidate. This information is derived from the chain state and will vary from para to para, although some of the fields may be the same for every para. @@ -100,7 +116,7 @@ Since this data is used to form inputs to the validation function, it needs to b Furthermore, the validation data acts as a way to authorize the additional data the collator needs to pass to the validation function. For example, the validation function can check whether the incoming messages (e.g. downward messages) were actually sent by using the data provided in the validation data using so called MQC heads. -Since the commitments of the validation function are checked by the relay-chain, secondary checkers can rely on the invariant that the relay-chain only includes para-blocks for which these checks have already been done. As such, there is no need for the validation data used to inform validators and collators about the checks the relay-chain will perform to be persisted by the availability system. +Since the commitments of the validation function are checked by the relay-chain, approval checkers can rely on the invariant that the relay-chain only includes para-blocks for which these checks have already been done. As such, there is no need for the validation data used to inform validators and collators about the checks the relay-chain will perform to be persisted by the availability system. The `PersistedValidationData` should be relatively lightweight primarily because it is constructed during inclusion for each candidate and therefore lies on the critical path of inclusion. diff --git a/roadmap/implementers-guide/src/types/chain.md b/roadmap/implementers-guide/src/types/chain.md deleted file mode 100644 index e8ec6cea8f4a..000000000000 --- a/roadmap/implementers-guide/src/types/chain.md +++ /dev/null @@ -1,30 +0,0 @@ -# Chain - -Types pertaining to the relay-chain - events, structures, etc. - -## Block Import Event - -```rust -/// Indicates that a new block has been added to the blockchain. -struct BlockImportEvent { - /// The block header-hash. - hash: Hash, - /// The header itself. - header: Header, - /// Whether this block is considered the head of the best chain according to the - /// event emitter's fork-choice rule. - new_best: bool, -} -``` - -## Block Finalization Event - -```rust -/// Indicates that a new block has been finalized. -struct BlockFinalizationEvent { - /// The block header-hash. - hash: Hash, - /// The header of the finalized block. - header: Header, -} -``` diff --git a/roadmap/implementers-guide/src/types/overseer-protocol.md b/roadmap/implementers-guide/src/types/overseer-protocol.md index 4b9dc97c27e2..41d624670363 100644 --- a/roadmap/implementers-guide/src/types/overseer-protocol.md +++ b/roadmap/implementers-guide/src/types/overseer-protocol.md @@ -681,9 +681,7 @@ enum ProvisionerMessage { The Runtime API subsystem is responsible for providing an interface to the state of the chain's runtime. -This is fueled by an auxiliary type encapsulating all request types defined in the Runtime API section of the guide. - -> To do: link to the Runtime API section. Not possible currently because of https://github.com/Michael-F-Bryan/mdbook-linkcheck/issues/25. Once v0.7.1 is released it will work. +This is fueled by an auxiliary type encapsulating all request types defined in the [Runtime API section](../runtime-api) of the guide. ```rust enum RuntimeApiRequest { @@ -827,7 +825,7 @@ pub enum CandidateValidationMessage { /// /// This request doesn't involve acceptance criteria checking, therefore only useful for the /// cases where the validity of the candidate is established. This is the case for the typical - /// use-case: secondary checkers would use this request relying on the full prior checks + /// use-case: approval checkers would use this request relying on the full prior checks /// performed by the relay-chain. ValidateFromExhaustive( PersistedValidationData, diff --git a/roadmap/implementers-guide/src/types/pvf-prechecking.md b/roadmap/implementers-guide/src/types/pvf-prechecking.md index 331429bd1fc5..f68f1e60feee 100644 --- a/roadmap/implementers-guide/src/types/pvf-prechecking.md +++ b/roadmap/implementers-guide/src/types/pvf-prechecking.md @@ -1,5 +1,7 @@ # PVF Pre-checking types +## `PvfCheckStatement` + > ⚠️ This type was added in v2. One of the main units of information on which PVF pre-checking voting is build is the `PvfCheckStatement`. diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 401eec5a30d9..a641afd12496 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "polkadot-rpc" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] -jsonrpsee = { version = "0.15.1", features = ["server"] } +jsonrpsee = { version = "0.16.2", features = ["server"] } polkadot-primitives = { path = "../primitives" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -24,7 +24,7 @@ sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", bra sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } txpool-api = { package = "sc-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "master" } frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 2b3497832caa..43efefcae15b 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -108,11 +108,7 @@ where + Sync + 'static, C::Api: frame_rpc_system::AccountNonceApi, - C::Api: pallet_mmr_rpc::MmrRuntimeApi< - Block, - ::Hash, - BlockNumber, - >, + C::Api: mmr_rpc::MmrRuntimeApi::Hash, BlockNumber>, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: BabeApi, C::Api: BlockBuilder, @@ -123,7 +119,7 @@ where { use beefy_gadget_rpc::{Beefy, BeefyApiServer}; use frame_rpc_system::{System, SystemApiServer}; - use pallet_mmr_rpc::{Mmr, MmrApiServer}; + use mmr_rpc::{Mmr, MmrApiServer}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 96f29eae9257..8348a0011837 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-common" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] impl-trait-for-tuples = "0.2.2" @@ -15,7 +15,7 @@ serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/common/slot_range_helper/Cargo.toml b/runtime/common/slot_range_helper/Cargo.toml index 0cd436955827..c6d8452be79d 100644 --- a/runtime/common/slot_range_helper/Cargo.toml +++ b/runtime/common/slot_range_helper/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "slot-range-helper" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] paste = "1.0" diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index 9be227a37352..e7da8c7407cf 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -200,6 +200,7 @@ pub mod pallet { impl Pallet { // TODO: Benchmark this /// Assign a permanent parachain slot and immediately create a lease for it. + #[pallet::call_index(0)] #[pallet::weight(((MAXIMUM_BLOCK_WEIGHT / 10) as Weight, DispatchClass::Operational))] pub fn assign_perm_parachain_slot(origin: OriginFor, id: ParaId) -> DispatchResult { T::AssignSlotOrigin::ensure_origin(origin)?; @@ -258,6 +259,7 @@ pub mod pallet { /// Assign a temporary parachain slot. The function tries to create a lease for it /// immediately if `SlotLeasePeriodStart::Current` is specified, and if the number /// of currently active temporary slots is below `MaxTemporarySlotPerLeasePeriod`. + #[pallet::call_index(1)] #[pallet::weight(((MAXIMUM_BLOCK_WEIGHT / 10) as Weight, DispatchClass::Operational))] pub fn assign_temp_parachain_slot( origin: OriginFor, @@ -341,6 +343,7 @@ pub mod pallet { // TODO: Benchmark this /// Unassign a permanent or temporary parachain slot + #[pallet::call_index(2)] #[pallet::weight(((MAXIMUM_BLOCK_WEIGHT / 10) as Weight, DispatchClass::Operational))] pub fn unassign_parachain_slot(origin: OriginFor, id: ParaId) -> DispatchResult { T::AssignSlotOrigin::ensure_origin(origin.clone())?; diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index f9181a7eac7b..bdbd9d4cae97 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -253,6 +253,7 @@ pub mod pallet { /// This can only happen when there isn't already an auction in progress and may only be /// called by the root origin. Accepts the `duration` of this auction and the /// `lease_period_index` of the initial lease period of the four that are to be auctioned. + #[pallet::call_index(0)] #[pallet::weight((T::WeightInfo::new_auction(), DispatchClass::Operational))] pub fn new_auction( origin: OriginFor, @@ -279,6 +280,7 @@ pub mod pallet { /// absolute lease period index value, not an auction-specific offset. /// - `amount` is the amount to bid to be held as deposit for the parachain should the /// bid win. This amount is held throughout the range. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::bid())] pub fn bid( origin: OriginFor, @@ -296,6 +298,7 @@ pub mod pallet { /// Cancel an in-progress auction. /// /// Can only be called by Root origin. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::cancel_auction())] pub fn cancel_auction(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index bb0663ec34f7..a07bf37079d3 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -247,12 +247,9 @@ pub mod pallet { impl GenesisBuild for GenesisConfig { fn build(&self) { // build `Claims` - self.claims - .iter() - .map(|(a, b, _, _)| (a.clone(), b.clone())) - .for_each(|(a, b)| { - Claims::::insert(a, b); - }); + self.claims.iter().map(|(a, b, _, _)| (*a, *b)).for_each(|(a, b)| { + Claims::::insert(a, b); + }); // build `Total` Total::::put( self.claims @@ -266,17 +263,16 @@ pub mod pallet { // build `Signing` self.claims .iter() - .filter_map(|(a, _, _, s)| Some((a.clone(), s.clone()?))) + .filter_map(|(a, _, _, s)| Some((*a, (*s)?))) .for_each(|(a, s)| { Signing::::insert(a, s); }); // build `Preclaims` - self.claims - .iter() - .filter_map(|(a, _, i, _)| Some((i.clone()?, a.clone()))) - .for_each(|(i, a)| { + self.claims.iter().filter_map(|(a, _, i, _)| Some((i.clone()?, *a))).for_each( + |(i, a)| { Preclaims::::insert(i, a); - }); + }, + ); } } @@ -309,6 +305,7 @@ pub mod pallet { /// /// Total Complexity: O(1) /// + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::claim())] pub fn claim( origin: OriginFor, @@ -341,6 +338,7 @@ pub mod pallet { /// /// Total Complexity: O(1) /// + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::mint_claim())] pub fn mint_claim( origin: OriginFor, @@ -388,6 +386,7 @@ pub mod pallet { /// /// Total Complexity: O(1) /// + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::claim_attest())] pub fn claim_attest( origin: OriginFor, @@ -424,6 +423,7 @@ pub mod pallet { /// /// Total Complexity: O(1) /// + #[pallet::call_index(3)] #[pallet::weight(( T::WeightInfo::attest(), DispatchClass::Normal, @@ -440,6 +440,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::move_claim())] pub fn move_claim( origin: OriginFor, @@ -538,7 +539,7 @@ impl Pallet { } let mut v = b"\x19Ethereum Signed Message:\n".to_vec(); v.extend(rev.into_iter().rev()); - v.extend_from_slice(&prefix[..]); + v.extend_from_slice(prefix); v.extend_from_slice(what); v.extend_from_slice(extra); v @@ -645,7 +646,7 @@ where info: &DispatchInfoOf, len: usize, ) -> Result { - Ok(self.validate(who, call, info, len).map(|_| ())?) + self.validate(who, call, info, len).map(|_| ()) } // diff --git a/runtime/common/src/crowdloan/migration.rs b/runtime/common/src/crowdloan/migration.rs index 775d70f92458..468c2a572b51 100644 --- a/runtime/common/src/crowdloan/migration.rs +++ b/runtime/common/src/crowdloan/migration.rs @@ -15,7 +15,53 @@ // along with Polkadot. If not, see . use super::*; -use frame_support::{storage_alias, Twox64Concat}; +use frame_support::{ + dispatch::GetStorageVersion, + storage_alias, + traits::{OnRuntimeUpgrade, StorageVersion}, + Twox64Concat, +}; + +pub struct MigrateToTrackInactive(sp_std::marker::PhantomData); +impl OnRuntimeUpgrade for MigrateToTrackInactive { + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + + if onchain_version == 0 { + let mut translated = 0u64; + for index in Funds::::iter_keys() { + let b = CurrencyOf::::total_balance(&Pallet::::fund_account_id(index.into())); + CurrencyOf::::deactivate(b); + translated.saturating_inc(); + } + + StorageVersion::new(1).put::>(); + log::info!(target: "runtime::crowdloan", "Summed {} funds, storage to version 1", translated); + T::DbWeight::get().reads_writes(translated * 2 + 1, translated * 2 + 1) + } else { + log::info!(target: "runtime::crowdloan", "Migration did not execute. This probably should be removed"); + T::DbWeight::get().reads(1) + } + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + let total = Funds::::iter_keys() + .map(|index| { + CurrencyOf::::total_balance(&Pallet::::fund_account_id(index.into())) + }) + .fold(BalanceOf::::zero(), |a, i| a.saturating_add(i)); + Ok((total, CurrencyOf::::active_issuance()).encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(total: Vec) -> Result<(), &'static str> { + let (total, active) = <(BalanceOf, BalanceOf)>::decode(&mut total.as_slice()) + .expect("the state parameter should be something that was generated by pre_upgrade"); + assert_eq!(active - total, CurrencyOf::::active_issuance(), "the total be correct"); + Ok(()) + } +} /// Migrations for using fund index to create fund accounts instead of para ID. pub mod crowdloan_index_migration { @@ -67,12 +113,10 @@ pub mod crowdloan_index_migration { let leases = Leases::::get(para_id).unwrap_or_default(); let mut found_lease_deposit = false; - for maybe_deposit in leases.iter() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - found_lease_deposit = true; - break - } + for (who, _amount) in leases.iter().flatten() { + if *who == old_fund_account { + found_lease_deposit = true; + break } } if found_lease_deposit { @@ -112,11 +156,9 @@ pub mod crowdloan_index_migration { weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 2)); let mut leases = Leases::::get(para_id).unwrap_or_default(); - for maybe_deposit in leases.iter_mut() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - *who = new_fund_account.clone(); - } + for (who, _amount) in leases.iter_mut().flatten() { + if *who == old_fund_account { + *who = new_fund_account.clone(); } } @@ -162,13 +204,11 @@ pub mod crowdloan_index_migration { let leases = Leases::::get(para_id).unwrap_or_default(); let mut new_account_found = false; - for maybe_deposit in leases.iter() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - panic!("Old fund account found after migration!"); - } else if *who == new_fund_account { - new_account_found = true; - } + for (who, _amount) in leases.iter().flatten() { + if *who == old_fund_account { + panic!("Old fund account found after migration!"); + } else if *who == new_fund_account { + new_account_found = true; } } if new_account_found { diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index 1f84af3f2ee9..711bf0b7b33b 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -51,6 +51,8 @@ pub mod migration; +// TODO: Expose the total amount held. + use crate::{ slot_range::SlotRange, traits::{Auctioneer, Registrar}, @@ -182,9 +184,13 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; + /// The current storage version. + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] + #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); #[pallet::config] @@ -366,6 +372,7 @@ pub mod pallet { /// /// This applies a lock to your parachain configuration, ensuring that it cannot be changed /// by the parachain manager. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::create())] pub fn create( origin: OriginFor, @@ -443,6 +450,7 @@ pub mod pallet { /// Contribute to a crowd sale. This will transfer some balance over to fund a parachain /// slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::contribute())] pub fn contribute( origin: OriginFor, @@ -471,6 +479,7 @@ pub mod pallet { /// /// - `who`: The account whose contribution should be withdrawn. /// - `index`: The parachain to whose crowdloan the contribution was made. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::withdraw())] pub fn withdraw( origin: OriginFor, @@ -488,6 +497,7 @@ pub mod pallet { ensure!(balance > Zero::zero(), Error::::NoContributions); CurrencyOf::::transfer(&fund_account, &who, balance, AllowDeath)?; + CurrencyOf::::reactivate(balance); Self::contribution_kill(fund.fund_index, &who); fund.raised = fund.raised.saturating_sub(balance); @@ -503,6 +513,7 @@ pub mod pallet { /// times to fully refund all users. We will refund `RemoveKeysLimit` users at a time. /// /// Origin must be signed, but can come from anyone. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::refund(T::RemoveKeysLimit::get()))] pub fn refund( origin: OriginFor, @@ -527,6 +538,7 @@ pub mod pallet { break } CurrencyOf::::transfer(&fund_account, &who, balance, AllowDeath)?; + CurrencyOf::::reactivate(balance); Self::contribution_kill(fund.fund_index, &who); fund.raised = fund.raised.saturating_sub(balance); refund_count += 1; @@ -547,6 +559,7 @@ pub mod pallet { } /// Remove a fund after the retirement period has ended and all funds have been returned. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::dissolve())] pub fn dissolve(origin: OriginFor, #[pallet::compact] index: ParaId) -> DispatchResult { let who = ensure_signed(origin)?; @@ -574,6 +587,7 @@ pub mod pallet { /// Edit the configuration for an in-progress crowdloan. /// /// Can only be called by Root origin. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::edit())] pub fn edit( origin: OriginFor, @@ -611,6 +625,7 @@ pub mod pallet { /// Add an optional memo to an existing crowdloan contribution. /// /// Origin must be Signed, and the user must have contributed to the crowdloan. + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::add_memo())] pub fn add_memo(origin: OriginFor, index: ParaId, memo: Vec) -> DispatchResult { let who = ensure_signed(origin)?; @@ -629,6 +644,7 @@ pub mod pallet { /// Poke the fund into `NewRaise` /// /// Origin must be Signed, and the fund has non-zero raise. + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::poke())] pub fn poke(origin: OriginFor, index: ParaId) -> DispatchResult { ensure_signed(origin)?; @@ -642,6 +658,7 @@ pub mod pallet { /// Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain /// slot. It will be withdrawable when the crowdloan has ended and the funds are unused. + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::contribute())] pub fn contribute_all( origin: OriginFor, @@ -777,6 +794,7 @@ impl Pallet { } CurrencyOf::::transfer(&who, &fund_account, value, existence)?; + CurrencyOf::::deactivate(value); let balance = old_balance.saturating_add(value); Self::contribution_put(fund.fund_index, &who, &balance, &memo); diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index 2b10c79cfdff..51dbdd80c781 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -61,7 +61,7 @@ where pub fn era_payout( total_staked: Balance, - non_gilt_issuance: Balance, + total_stakable: Balance, max_annual_inflation: Perquintill, period_fraction: Perquintill, auctioned_slots: u64, @@ -79,17 +79,17 @@ pub fn era_payout( // amount that we expect to be taken up with auctions. let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); - let stake = Perquintill::from_rational(total_staked, non_gilt_issuance); + let stake = Perquintill::from_rational(total_staked, total_stakable); let falloff = Perquintill::from_percent(5); let adjustment = compute_inflation(stake, ideal_stake, falloff); let staking_inflation = min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); - let max_payout = period_fraction * max_annual_inflation * non_gilt_issuance; - let staking_payout = (period_fraction * staking_inflation) * non_gilt_issuance; + let max_payout = period_fraction * max_annual_inflation * total_stakable; + let staking_payout = (period_fraction * staking_inflation) * total_stakable; let rest = max_payout.saturating_sub(staking_payout); - let other_issuance = non_gilt_issuance.saturating_sub(total_staked); + let other_issuance = total_stakable.saturating_sub(total_staked); if total_staked > other_issuance { let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; // We don't do anything with this, but if we wanted to, we could introduce a cap on the diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index ac5fc69a28e4..3fb1d9021307 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -40,7 +40,7 @@ mod mock; use frame_support::{ parameter_types, traits::{ConstU32, Currency, OneSessionHandler}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use frame_system::limits; use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId, MAX_POV_SIZE}; @@ -71,7 +71,7 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// The storage proof size is not limited so far. pub const MAXIMUM_BLOCK_WEIGHT: Weight = - WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(MAX_POV_SIZE as u64); + Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), MAX_POV_SIZE as u64); const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct()); diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index bfcc91e3ba71..c66c33ca21bd 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -228,6 +228,7 @@ pub mod pallet { /// /// ## Events /// The `Registered` event is emitted in case of success. + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::register())] pub fn register( origin: OriginFor, @@ -246,6 +247,7 @@ pub mod pallet { /// /// The deposit taken can be specified for this registration. Any `ParaId` /// can be registered, including sub-1000 IDs which are System Parachains. + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::force_register())] pub fn force_register( origin: OriginFor, @@ -262,6 +264,7 @@ pub mod pallet { /// Deregister a Para Id, freeing all data and returning any deposit. /// /// The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread. + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::deregister())] pub fn deregister(origin: OriginFor, id: ParaId) -> DispatchResult { Self::ensure_root_para_or_owner(origin, id)?; @@ -279,6 +282,7 @@ pub mod pallet { /// `ParaId` to be a long-term identifier of a notional "parachain". However, their /// scheduling info (i.e. whether they're a parathread or parachain), auction information /// and the auction deposit are switched. + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::swap())] pub fn swap(origin: OriginFor, id: ParaId, other: ParaId) -> DispatchResult { Self::ensure_root_para_or_owner(origin, id)?; @@ -328,6 +332,7 @@ pub mod pallet { /// previously locked para to deregister or swap a para without using governance. /// /// Can only be called by the Root origin or the parachain. + #[pallet::call_index(4)] #[pallet::weight(T::DbWeight::get().reads_writes(1, 1))] pub fn remove_lock(origin: OriginFor, para: ParaId) -> DispatchResult { Self::ensure_root_or_para(origin, para)?; @@ -349,6 +354,7 @@ pub mod pallet { /// /// ## Events /// The `Reserved` event is emitted in case of success, which provides the ID reserved for use. + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::reserve())] pub fn reserve(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -362,6 +368,7 @@ pub mod pallet { /// para to deregister or swap a para. /// /// Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + #[pallet::call_index(6)] #[pallet::weight(T::DbWeight::get().reads_writes(1, 1))] pub fn add_lock(origin: OriginFor, para: ParaId) -> DispatchResult { Self::ensure_root_para_or_owner(origin, para)?; @@ -372,6 +379,7 @@ pub mod pallet { /// Schedule a parachain upgrade. /// /// Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + #[pallet::call_index(7)] #[pallet::weight(::WeightInfo::schedule_code_upgrade(new_code.0.len() as u32))] pub fn schedule_code_upgrade( origin: OriginFor, @@ -386,6 +394,7 @@ pub mod pallet { /// Set the parachain's current head. /// /// Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked. + #[pallet::call_index(8)] #[pallet::weight(::WeightInfo::set_current_head(new_head.0.len() as u32))] pub fn set_current_head( origin: OriginFor, diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index 49f27a8d44c3..8cb402c0930e 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -70,6 +70,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Schedule a para to be initialized at the start of the next session. + #[pallet::call_index(0)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_schedule_para_initialize( origin: OriginFor, @@ -83,6 +84,7 @@ pub mod pallet { } /// Schedule a para to be cleaned up at the start of the next session. + #[pallet::call_index(1)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_schedule_para_cleanup(origin: OriginFor, id: ParaId) -> DispatchResult { ensure_root(origin)?; @@ -92,6 +94,7 @@ pub mod pallet { } /// Upgrade a parathread to a parachain + #[pallet::call_index(2)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_schedule_parathread_upgrade( origin: OriginFor, @@ -109,6 +112,7 @@ pub mod pallet { } /// Downgrade a parachain to a parathread + #[pallet::call_index(3)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_schedule_parachain_downgrade( origin: OriginFor, @@ -129,6 +133,7 @@ pub mod pallet { /// /// The given parachain should exist and the payload should not exceed the preconfigured size /// `config.max_downward_message_size`. + #[pallet::call_index(4)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_queue_downward_xcm( origin: OriginFor, @@ -149,6 +154,7 @@ pub mod pallet { /// /// This is equivalent to sending an `Hrmp::hrmp_init_open_channel` extrinsic followed by /// `Hrmp::hrmp_accept_open_channel`. + #[pallet::call_index(5)] #[pallet::weight((1_000, DispatchClass::Operational))] pub fn sudo_establish_hrmp_channel( origin: OriginFor, diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index 52ad22bec2fb..dcc3f1e2b5c5 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -195,6 +195,7 @@ pub mod pallet { /// We check that the account does not exist at this stage. /// /// Origin must match the `ValidityOrigin`. + #[pallet::call_index(0)] #[pallet::weight(Weight::from_ref_time(200_000_000) + T::DbWeight::get().reads_writes(4, 1))] pub fn create_account( origin: OriginFor, @@ -232,6 +233,7 @@ pub mod pallet { /// We check that the account exists at this stage, but has not completed the process. /// /// Origin must match the `ValidityOrigin`. + #[pallet::call_index(1)] #[pallet::weight(T::DbWeight::get().reads_writes(1, 1))] pub fn update_validity_status( origin: OriginFor, @@ -260,6 +262,7 @@ pub mod pallet { /// We check that the account is valid for a balance transfer at this point. /// /// Origin must match the `ValidityOrigin`. + #[pallet::call_index(2)] #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] pub fn update_balance( origin: OriginFor, @@ -297,6 +300,7 @@ pub mod pallet { /// /// Origin must match the configured `PaymentAccount` (if it is not configured then this /// will always fail with `BadOrigin`). + #[pallet::call_index(3)] #[pallet::weight(T::DbWeight::get().reads_writes(4, 2))] pub fn payout(origin: OriginFor, who: T::AccountId) -> DispatchResult { // Payments must be made directly by the `PaymentAccount`. @@ -366,6 +370,7 @@ pub mod pallet { /// Set the account that will be used to payout users in the DOT purchase process. /// /// Origin must match the `ConfigurationOrigin` + #[pallet::call_index(4)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_payment_account(origin: OriginFor, who: T::AccountId) -> DispatchResult { T::ConfigurationOrigin::ensure_origin(origin)?; @@ -378,6 +383,7 @@ pub mod pallet { /// Set the statement that must be signed for a user to participate on the DOT sale. /// /// Origin must match the `ConfigurationOrigin` + #[pallet::call_index(5)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_statement(origin: OriginFor, statement: Vec) -> DispatchResult { T::ConfigurationOrigin::ensure_origin(origin)?; @@ -394,6 +400,7 @@ pub mod pallet { /// Set the block where locked DOTs will become unlocked. /// /// Origin must match the `ConfigurationOrigin` + #[pallet::call_index(6)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_unlock_block( origin: OriginFor, diff --git a/runtime/common/src/slots/migration.rs b/runtime/common/src/slots/migration.rs index 33d221b209d5..a87f1cd7a074 100644 --- a/runtime/common/src/slots/migration.rs +++ b/runtime/common/src/slots/migration.rs @@ -31,18 +31,16 @@ pub mod slots_crowdloan_index_migration { for (para_id, leases) in Leases::::iter() { let old_fund_account = old_fund_account_id::(para_id); - for maybe_deposit in leases.iter() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - let crowdloan = - crowdloan::Funds::::get(para_id).ok_or("no crowdloan found")?; - log::info!( - target: "runtime", - "para_id={:?}, old_fund_account={:?}, fund_id={:?}, leases={:?}", - para_id, old_fund_account, crowdloan.fund_index, leases, - ); - break - } + for (who, _amount) in leases.iter().flatten() { + if *who == old_fund_account { + let crowdloan = + crowdloan::Funds::::get(para_id).ok_or("no crowdloan found")?; + log::info!( + target: "runtime", + "para_id={:?}, old_fund_account={:?}, fund_id={:?}, leases={:?}", + para_id, old_fund_account, crowdloan.fund_index, leases, + ); + break } } } @@ -61,11 +59,9 @@ pub mod slots_crowdloan_index_migration { let new_fund_account = crowdloan::Pallet::::fund_account_id(fund.fund_index); // look for places the old account is used, and replace with the new account. - for maybe_deposit in leases.iter_mut() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - *who = new_fund_account.clone(); - } + for (who, _amount) in leases.iter_mut().flatten() { + if *who == old_fund_account { + *who = new_fund_account.clone(); } } @@ -83,11 +79,9 @@ pub mod slots_crowdloan_index_migration { let old_fund_account = old_fund_account_id::(para_id); log::info!(target: "runtime", "checking para_id: {:?}", para_id); // check the old fund account doesn't exist anywhere. - for maybe_deposit in leases.iter() { - if let Some((who, _amount)) = maybe_deposit { - if *who == old_fund_account { - panic!("old fund account found after migration!"); - } + for (who, _amount) in leases.iter().flatten() { + if *who == old_fund_account { + panic!("old fund account found after migration!"); } } } diff --git a/runtime/common/src/slots/mod.rs b/runtime/common/src/slots/mod.rs index 673d9f86e1bd..62637d582b55 100644 --- a/runtime/common/src/slots/mod.rs +++ b/runtime/common/src/slots/mod.rs @@ -165,6 +165,7 @@ pub mod pallet { /// independently of any other on-chain mechanism to use it. /// /// The dispatch origin for this call must match `T::ForceOrigin`. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::force_lease())] pub fn force_lease( origin: OriginFor, @@ -183,6 +184,7 @@ pub mod pallet { /// Clear all leases for a Para Id, refunding any deposits back to the original owners. /// /// The dispatch origin for this call must match `T::ForceOrigin`. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::clear_all_leases())] pub fn clear_all_leases(origin: OriginFor, para: ParaId) -> DispatchResult { T::ForceOrigin::ensure_origin(origin)?; @@ -205,6 +207,7 @@ pub mod pallet { /// let them onboard from here. /// /// Origin must be signed, but can be called by anyone. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::trigger_onboard())] pub fn trigger_onboard(origin: OriginFor, para: ParaId) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -1039,8 +1042,8 @@ mod benchmarking { // Worst case scenario, T parathreads onboard, and C parachains offboard. manage_lease_period_start { // Assume reasonable maximum of 100 paras at any time - let c in 1 .. 100; - let t in 1 .. 100; + let c in 0 .. 100; + let t in 0 .. 100; let period_begin = 1u32.into(); let period_count = 4u32.into(); diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index ec3de40ec5e6..6f4a7be8f1f4 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "kusama-runtime" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } @@ -18,7 +18,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "./constants", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -54,7 +54,7 @@ pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/su pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nis = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -108,8 +108,8 @@ keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substra sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } separator = "0.4.1" serde_json = "1.0.81" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19.2", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +tokio = { version = "1.22.0", features = ["macros"] } sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] @@ -150,7 +150,7 @@ std = [ "pallet-election-provider-multi-phase/std", "pallet-fast-unstake/std", "pallet-democracy/std", - "pallet-gilt/std", + "pallet-nis/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", @@ -216,7 +216,7 @@ runtime-benchmarks = [ "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", - "pallet-gilt/runtime-benchmarks", + "pallet-nis/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", @@ -267,7 +267,7 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-democracy/try-runtime", - "pallet-gilt/try-runtime", + "pallet-nis/try-runtime", "pallet-grandpa/try-runtime", "pallet-identity/try-runtime", "pallet-im-online/try-runtime", diff --git a/runtime/kusama/constants/Cargo.toml b/runtime/kusama/constants/Cargo.toml index 6f85387f743d..d24fc3b4be12 100644 --- a/runtime/kusama/constants/Cargo.toml +++ b/runtime/kusama/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "kusama-runtime-constants" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] smallvec = "1.8.0" @@ -10,10 +10,14 @@ smallvec = "1.8.0" frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } [features] default = ["std"] std = [ - "sp-runtime/std" + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] diff --git a/runtime/kusama/constants/src/lib.rs b/runtime/kusama/constants/src/lib.rs index a8d047241b24..923f71b94dd8 100644 --- a/runtime/kusama/constants/src/lib.rs +++ b/runtime/kusama/constants/src/lib.rs @@ -26,8 +26,8 @@ pub mod currency { pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS; pub const UNITS: Balance = 1_000_000_000_000; - pub const CENTS: Balance = UNITS / 30_000; - pub const QUID: Balance = CENTS * 100; + pub const QUID: Balance = UNITS / 30; + pub const CENTS: Balance = QUID / 100; pub const GRAND: Balance = QUID * 1_000; pub const MILLICENTS: Balance = CENTS / 1_000; diff --git a/runtime/kusama/constants/src/weights/block_weights.rs b/runtime/kusama/constants/src/weights/block_weights.rs index a96b7bfc11de..7931478ee7b0 100644 --- a/runtime/kusama/constants/src/weights/block_weights.rs +++ b/runtime/kusama/constants/src/weights/block_weights.rs @@ -1,28 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19 (Y/M/D) -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/kusama/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -34,32 +32,32 @@ // --weight-path=runtime/kusama/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 6_094_385, 6_351_993 - /// Average: 6_192_341 - /// Median: 6_193_838 - /// Std-Dev: 63893.84 + /// Min, Max: 6_665_440, 6_986_371 + /// Average: 6_731_894 + /// Median: 6_723_700 + /// Std-Dev: 49280.83 /// /// Percentiles nanoseconds: - /// 99th: 6_332_047 - /// 95th: 6_308_225 - /// 75th: 6_236_204 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(6_192_341); + /// 99th: 6_876_251 + /// 95th: 6_811_463 + /// 75th: 6_751_221 + pub const BlockExecutionWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(6_731_894)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -70,12 +68,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/kusama/constants/src/weights/extrinsic_weights.rs b/runtime/kusama/constants/src/weights/extrinsic_weights.rs index dfa623b6c72a..f0fc7739ee27 100644 --- a/runtime/kusama/constants/src/weights/extrinsic_weights.rs +++ b/runtime/kusama/constants/src/weights/extrinsic_weights.rs @@ -1,27 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-20 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/kusama/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -33,32 +32,32 @@ // --weight-path=runtime/kusama/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 85_946, 88_408 - /// Average: 86_309 - /// Median: 86_213 - /// Std-Dev: 345.03 + /// Stats nanoseconds: + /// Min, Max: 94_359, 96_436 + /// Average: 94_889 + /// Median: 94_839 + /// Std-Dev: 369.49 /// - /// Percentiles [NS]: - /// 99th: 87_527 - /// 95th: 86_901 - /// 75th: 86_308 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(86_309); + /// Percentiles nanoseconds: + /// 99th: 96_279 + /// 95th: 95_584 + /// 75th: 95_005 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(94_889)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -69,12 +68,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/kusama/constants/src/weights/paritydb_weights.rs b/runtime/kusama/constants/src/weights/paritydb_weights.rs index dca7d348310c..4338d928d807 100644 --- a/runtime/kusama/constants/src/weights/paritydb_weights.rs +++ b/runtime/kusama/constants/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/kusama/constants/src/weights/rocksdb_weights.rs b/runtime/kusama/constants/src/weights/rocksdb_weights.rs index 87867ebfe177..1d115d963fac 100644 --- a/runtime/kusama/constants/src/weights/rocksdb_weights.rs +++ b/runtime/kusama/constants/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/kusama/src/governance/fellowship.rs b/runtime/kusama/src/governance/fellowship.rs index 52ab8d0bebc8..6d01780ebc0c 100644 --- a/runtime/kusama/src/governance/fellowship.rs +++ b/runtime/kusama/src/governance/fellowship.rs @@ -50,7 +50,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -72,7 +72,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -94,7 +94,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -138,7 +138,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -160,7 +160,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -182,7 +182,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -204,7 +204,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -226,7 +226,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), @@ -248,7 +248,7 @@ impl pallet_referenda::TracksInfo for TracksInfo { prepare_period: 30 * MINUTES, decision_period: 7 * DAYS, confirm_period: 30 * MINUTES, - min_enactment_period: 4, + min_enactment_period: 1 * MINUTES, min_approval: pallet_referenda::Curve::LinearDecreasing { length: Perbill::from_percent(100), floor: Perbill::from_percent(50), diff --git a/runtime/kusama/src/governance/mod.rs b/runtime/kusama/src/governance/mod.rs index 87cbfd7eea2f..3dd4eba2b57e 100644 --- a/runtime/kusama/src/governance/mod.rs +++ b/runtime/kusama/src/governance/mod.rs @@ -30,7 +30,7 @@ mod origins; pub use origins::{ pallet_custom_origins, AuctionAdmin, Fellows, FellowshipAdmin, FellowshipExperts, FellowshipInitiates, FellowshipMasters, GeneralAdmin, LeaseAdmin, ReferendumCanceller, - ReferendumKiller, Spender, StakingAdmin, WhitelistedCaller, + ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller, }; mod tracks; pub use tracks::TracksInfo; @@ -47,14 +47,15 @@ impl pallet_conviction_voting::Config for Runtime { type Currency = Balances; type VoteLockingPeriod = VoteLockingPeriod; type MaxVotes = ConstU32<512>; - type MaxTurnout = frame_support::traits::TotalIssuanceOf; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; type Polls = Referenda; } parameter_types! { pub const AlarmInterval: BlockNumber = 1; - pub const SubmissionDeposit: Balance = 100 * UNITS; - pub const UndecidingTimeout: BlockNumber = 28 * DAYS; + pub const SubmissionDeposit: Balance = 1 * QUID; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; } parameter_types! { @@ -71,7 +72,7 @@ impl pallet_whitelist::Config for Runtime { type WhitelistOrigin = EitherOf>, Fellows>; type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; - type PreimageProvider = Preimage; + type Preimages = Preimage; } impl pallet_referenda::Config for Runtime { diff --git a/runtime/kusama/src/governance/origins.rs b/runtime/kusama/src/governance/origins.rs index be8c44430f46..b02ff53f3bab 100644 --- a/runtime/kusama/src/governance/origins.rs +++ b/runtime/kusama/src/governance/origins.rs @@ -120,6 +120,7 @@ pub mod pallet_custom_origins { } decl_unit_ensures!( StakingAdmin, + Treasurer, FellowshipAdmin, GeneralAdmin, AuctionAdmin, @@ -173,6 +174,7 @@ pub mod pallet_custom_origins { SmallSpender = 10 * GRAND, MediumSpender = 100 * GRAND, BigSpender = 1_000 * GRAND, + Treasurer = 10_000 * GRAND, } } diff --git a/runtime/kusama/src/governance/tracks.rs b/runtime/kusama/src/governance/tracks.rs index fd1c94118507..93b2312a76f8 100644 --- a/runtime/kusama/src/governance/tracks.rs +++ b/runtime/kusama/src/governance/tracks.rs @@ -63,7 +63,7 @@ const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percen const APP_WHITELISTED_CALLER: Curve = Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); const SUP_WHITELISTED_CALLER: Curve = - Curve::make_reciprocal(1, 28, percent(20), percent(10), percent(50)); + Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15] = [ ( @@ -71,11 +71,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "root", max_deciding: 1, - decision_deposit: 1_000 * GRAND, - prepare_period: 3 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 3 * HOURS, + decision_deposit: 100 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, min_approval: APP_ROOT, min_support: SUP_ROOT, }, @@ -84,12 +84,12 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 1, pallet_referenda::TrackInfo { name: "whitelisted_caller", - max_deciding: 10, - decision_deposit: 10_000 * GRAND, - prepare_period: 3 * HOURS, - decision_period: 28 * DAYS, + max_deciding: 100, + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, + decision_period: 14 * DAYS, confirm_period: 10 * MINUTES, - min_enactment_period: 30 * MINUTES, + min_enactment_period: 10 * MINUTES, min_approval: APP_WHITELISTED_CALLER, min_support: SUP_WHITELISTED_CALLER, }, @@ -100,10 +100,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "staking_admin", max_deciding: 10, decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 10 * MINUTES, min_approval: APP_STAKING_ADMIN, min_support: SUP_STAKING_ADMIN, }, @@ -113,11 +113,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "treasurer", max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + decision_deposit: 1 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 24 * HOURS, min_approval: APP_TREASURER, min_support: SUP_TREASURER, }, @@ -128,10 +128,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "lease_admin", max_deciding: 10, decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 10 * MINUTES, min_approval: APP_LEASE_ADMIN, min_support: SUP_LEASE_ADMIN, }, @@ -142,10 +142,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "fellowship_admin", max_deciding: 10, decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 10 * MINUTES, min_approval: APP_FELLOWSHIP_ADMIN, min_support: SUP_FELLOWSHIP_ADMIN, }, @@ -156,10 +156,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "general_admin", max_deciding: 10, decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 10 * MINUTES, min_approval: APP_GENERAL_ADMIN, min_support: SUP_GENERAL_ADMIN, }, @@ -170,10 +170,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "auction_admin", max_deciding: 10, decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 2 * DAYS, + min_enactment_period: 10 * MINUTES, min_approval: APP_AUCTION_ADMIN, min_support: SUP_AUCTION_ADMIN, }, @@ -183,9 +183,9 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "referendum_canceller", max_deciding: 1_000, - decision_deposit: 50 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + decision_deposit: 10 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 7 * DAYS, confirm_period: 3 * HOURS, min_enactment_period: 10 * MINUTES, min_approval: APP_REFERENDUM_CANCELLER, @@ -198,8 +198,8 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 name: "referendum_killer", max_deciding: 1_000, decision_deposit: 50 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + prepare_period: 2 * HOURS, + decision_period: 14 * DAYS, confirm_period: 3 * HOURS, min_enactment_period: 10 * MINUTES, min_approval: APP_REFERENDUM_KILLER, @@ -211,11 +211,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "small_tipper", max_deciding: 200, - decision_deposit: 5 * QUID, - prepare_period: 4, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 28 * DAYS, + decision_deposit: 1 * QUID, + prepare_period: 1 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 1 * MINUTES, min_approval: APP_SMALL_TIPPER, min_support: SUP_SMALL_TIPPER, }, @@ -225,11 +225,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "big_tipper", max_deciding: 100, - decision_deposit: 50 * QUID, - prepare_period: 4, - decision_period: 28 * DAYS, - confirm_period: 6 * HOURS, - min_enactment_period: 28 * DAYS, + decision_deposit: 10 * QUID, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 10 * MINUTES, min_approval: APP_BIG_TIPPER, min_support: SUP_BIG_TIPPER, }, @@ -239,11 +239,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 pallet_referenda::TrackInfo { name: "small_spender", max_deciding: 50, - decision_deposit: 500 * QUID, - prepare_period: 4, - decision_period: 28 * DAYS, + decision_deposit: 100 * QUID, + prepare_period: 4 * HOURS, + decision_period: 14 * DAYS, confirm_period: 12 * HOURS, - min_enactment_period: 28 * DAYS, + min_enactment_period: 24 * HOURS, min_approval: APP_SMALL_SPENDER, min_support: SUP_SMALL_SPENDER, }, @@ -252,12 +252,12 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 33, pallet_referenda::TrackInfo { name: "medium_spender", - max_deciding: 20, - decision_deposit: 1_500 * QUID, - prepare_period: 4, - decision_period: 28 * DAYS, + max_deciding: 50, + decision_deposit: 200 * QUID, + prepare_period: 4 * HOURS, + decision_period: 14 * DAYS, confirm_period: 24 * HOURS, - min_enactment_period: 28 * DAYS, + min_enactment_period: 24 * HOURS, min_approval: APP_MEDIUM_SPENDER, min_support: SUP_MEDIUM_SPENDER, }, @@ -266,12 +266,12 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15 34, pallet_referenda::TrackInfo { name: "big_spender", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 4, - decision_period: 28 * DAYS, + max_deciding: 50, + decision_deposit: 400 * QUID, + prepare_period: 4 * HOURS, + decision_period: 14 * DAYS, confirm_period: 48 * HOURS, - min_enactment_period: 28 * DAYS, + min_enactment_period: 24 * HOURS, min_approval: APP_BIG_SPENDER, min_support: SUP_BIG_SPENDER, }, diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 7ef451e52ea9..d0e92134fb61 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -20,6 +20,7 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] +use pallet_nis::WithMaximumOf; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::v2::{ AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt, @@ -53,7 +54,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, PrivilegeCmp, WithdrawReasons, + LockIdentifier, PrivilegeCmp, StorageMapShim, WithdrawReasons, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -63,7 +64,7 @@ use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; -use sp_core::OpaqueMetadata; +use sp_core::{ConstU128, OpaqueMetadata}; use sp_mmr_primitives as mmr; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -105,9 +106,10 @@ pub mod xcm_config; // Governance configurations. pub mod governance; use governance::{ - old::CouncilCollective, pallet_custom_origins, AuctionAdmin, GeneralAdmin, LeaseAdmin, - StakingAdmin, TreasurySpender, + old::CouncilCollective, pallet_custom_origins, AuctionAdmin, Fellows, GeneralAdmin, LeaseAdmin, + StakingAdmin, Treasurer, TreasurySpender, }; +use xcm_config::CheckAccount; #[cfg(test)] mod tests; @@ -124,13 +126,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 9310, + spec_version: 9330, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] apis: sp_version::create_apis_vec![[]], - transaction_version: 15, + transaction_version: 16, state_version: 0, }; @@ -497,7 +499,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { (), >; type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = StakingAdmin; + type ForceOrigin = EitherOf, StakingAdmin>; type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; type MaxElectingVoters = MaxElectingVoters; type MaxElectableTargets = MaxElectableTargets; @@ -537,7 +539,7 @@ impl pallet_staking::EraPayout for EraPayout { runtime_common::impls::era_payout( total_staked, - Gilt::issuance().non_gilt, + Nis::issuance().other, MAX_ANNUAL_INFLATION, Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), auctioned_slots, @@ -582,8 +584,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - // The staking admin or root can cancel the slash. - type SlashCancelOrigin = EitherOf, StakingAdmin>; + type AdminOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = EraPayout; type NextNewSession = Session; @@ -633,8 +634,8 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EnsureRoot; - type RejectOrigin = EnsureRoot; + type ApproveOrigin = EitherOfDiverse, Treasurer>; + type RejectOrigin = EitherOfDiverse, Treasurer>; type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; @@ -841,8 +842,8 @@ impl pallet_identity::Config for Runtime { type MaxAdditionalFields = MaxAdditionalFields; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; - type ForceOrigin = GeneralAdmin; - type RegistrarOrigin = GeneralAdmin; + type ForceOrigin = EitherOf, GeneralAdmin>; + type RegistrarOrigin = EitherOf, GeneralAdmin>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -1005,6 +1006,11 @@ impl InstanceFilter for ProxyType { RuntimeCall::Bounties(..) | RuntimeCall::ChildBounties(..) | RuntimeCall::Tips(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::FellowshipCollective(..) | + RuntimeCall::FellowshipReferenda(..) | + RuntimeCall::Whitelist(..) | RuntimeCall::Claims(..) | RuntimeCall::Utility(..) | RuntimeCall::Identity(..) | @@ -1022,7 +1028,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Scheduler(..) | RuntimeCall::Proxy(..) | RuntimeCall::Multisig(..) | - RuntimeCall::Gilt(..) | + RuntimeCall::Nis(..) | RuntimeCall::Registrar(paras_registrar::Call::register {..}) | RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` @@ -1034,17 +1040,22 @@ impl InstanceFilter for ProxyType { RuntimeCall::NominationPools(..) | RuntimeCall::FastUnstake(..) ), - ProxyType::Governance => - matches!( - c, - RuntimeCall::Democracy(..) | - RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | - RuntimeCall::PhragmenElection(..) | - RuntimeCall::Treasury(..) | - RuntimeCall::Bounties(..) | - RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | - RuntimeCall::ChildBounties(..) - ), + ProxyType::Governance => matches!( + c, + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) | + // OpenGov calls + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::FellowshipCollective(..) | + RuntimeCall::FellowshipReferenda(..) | + RuntimeCall::Whitelist(..) + ), ProxyType::Staking => { matches!( c, @@ -1192,7 +1203,7 @@ impl slots::Config for Runtime { type Registrar = Registrar; type LeasePeriod = LeasePeriod; type LeaseOffset = (); - type ForceOrigin = LeaseAdmin; + type ForceOrigin = EitherOf, LeaseAdmin>; type WeightInfo = weights::runtime_common_slots::WeightInfo; } @@ -1232,37 +1243,61 @@ impl auctions::Config for Runtime { type EndingPeriod = EndingPeriod; type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type InitiateOrigin = AuctionAdmin; + type InitiateOrigin = EitherOf, AuctionAdmin>; type WeightInfo = weights::runtime_common_auctions::WeightInfo; } +type NisCounterpartInstance = pallet_balances::Instance2; +impl pallet_balances::Config for Runtime { + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ConstU128<10_000_000_000>; // One KTC cent + type AccountStore = StorageMapShim< + pallet_balances::Account, + frame_system::Provider, + AccountId, + pallet_balances::AccountData, + >; + type MaxLocks = ConstU32<4>; + type MaxReserves = ConstU32<4>; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; +} + parameter_types! { pub IgnoredIssuance: Balance = Treasury::pot(); - pub const QueueCount: u32 = 300; - pub const MaxQueueLen: u32 = 1000; - pub const FifoQueueLen: u32 = 250; - pub const GiltPeriod: BlockNumber = 30 * DAYS; - pub const MinFreeze: Balance = 10_000 * CENTS; + pub const NisBasePeriod: BlockNumber = 7 * DAYS; + pub const MinBid: Balance = 100 * QUID; + pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64); pub const IntakePeriod: BlockNumber = 5 * MINUTES; - pub const MaxIntakeBids: u32 = 100; + pub MaxIntakeWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10; + pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5); + pub storage NisTarget: Perquintill = Perquintill::zero(); + pub const NisPalletId: PalletId = PalletId(*b"py/nis "); } -impl pallet_gilt::Config for Runtime { +impl pallet_nis::Config for Runtime { + type WeightInfo = weights::pallet_nis::WeightInfo; type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; - type AdminOrigin = EnsureRoot; + type FundOrigin = frame_system::EnsureSigned; + type Counterpart = NisCounterpartBalances; + type CounterpartAmount = WithMaximumOf>; type Deficit = (); // Mint - type Surplus = (); // Burn type IgnoredIssuance = IgnoredIssuance; - type QueueCount = QueueCount; - type MaxQueueLen = MaxQueueLen; - type FifoQueueLen = FifoQueueLen; - type Period = GiltPeriod; - type MinFreeze = MinFreeze; + type Target = NisTarget; + type PalletId = NisPalletId; + type QueueCount = ConstU32<500>; + type MaxQueueLen = ConstU32<1000>; + type FifoQueueLen = ConstU32<250>; + type BasePeriod = NisBasePeriod; + type MinBid = MinBid; + type MinReceipt = MinReceipt; type IntakePeriod = IntakePeriod; - type MaxIntakeBids = MaxIntakeBids; - type WeightInfo = weights::pallet_gilt::WeightInfo; + type MaxIntakeWeight = MaxIntakeWeight; + type ThawThrottle = ThawThrottle; } parameter_types! { @@ -1376,8 +1411,10 @@ construct_runtime! { // Election pallet. Only works with staking, but placed here to maintain indices. ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 37, - // Gilts pallet. - Gilt: pallet_gilt::{Pallet, Call, Storage, Event, Config} = 38, + // NIS pallet. + Nis: pallet_nis::{Pallet, Call, Storage, Event} = 38, +// pub type NisCounterpartInstance = pallet_balances::Instance2; + NisCounterpartBalances: pallet_balances:: = 45, // Provides a semi-sorted list of nominators for staking. VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 39, @@ -1443,6 +1480,16 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, + pallet_referenda::migration::v1::MigrateV0ToV1, + pallet_referenda::migration::v1::MigrateV0ToV1< + Runtime, + governance::FellowshipReferendaInstance, + >, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1453,17 +1500,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - // "Bound uses of call" - pallet_preimage::migration::v1::Migration, - pallet_scheduler::migration::v3::MigrateToV4, - pallet_democracy::migrations::v1::Migration, - pallet_multisig::migrations::v1::MigrateToV1, - // "Properly migrate weights to v2" - parachains_configuration::migration::v3::MigrateToV3, - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - pallet_fast_unstake::migrations::v1::MigrateToV1, - ), + Migrations, >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; @@ -1477,7 +1514,7 @@ mod benches { define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so - // the that path resolves correctly in the generated file. + // that the path resolves correctly in the generated file. [runtime_common::auctions, Auctions] [runtime_common::crowdloan, Crowdloan] [runtime_common::claims, Claims] @@ -1492,6 +1529,7 @@ mod benches { [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] + [pallet_balances, NisCounterpartBalances] [pallet_bags_list, VoterList] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] @@ -1504,7 +1542,7 @@ mod benches { [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [frame_election_provider_support, ElectionProviderBench::] [pallet_fast_unstake, FastUnstake] - [pallet_gilt, Gilt] + [pallet_nis, Nis] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] @@ -1704,6 +1742,10 @@ sp_api::impl_runtime_apis! { Err(mmr::Error::PalletNotIncluded) } + fn mmr_leaf_count() -> Result { + Err(mmr::Error::PalletNotIncluded) + } + fn generate_proof( _block_numbers: Vec, _best_known_block_number: Option, @@ -1870,21 +1912,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { + fn on_runtime_upgrade(checks: bool) -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade kusama."); - let weight = Executive::try_runtime_upgrade().unwrap(); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { - log::info!( - target: "runtime::kusama", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", - block.header.number, - block.header.hash(), - state_root_check, - select, - ); - Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() } } @@ -2039,7 +2081,7 @@ mod tests_fess { // ensure this number does not change, or that it is checked after each change. // a 1 MB solution should need around 0.16 KSM deposit let deposit = SignedDepositBase::get() + (SignedDepositByte::get() * 1024 * 1024); - assert_eq_error_rate!(deposit, UNITS * 16 / 100, UNITS / 100); + assert_eq_error_rate!(deposit, UNITS * 167 / 100, UNITS / 100); } } @@ -2190,6 +2232,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade()); + ext.execute_with(|| Runtime::on_runtime_upgrade(true)); } } diff --git a/runtime/kusama/src/weights/frame_benchmarking_baseline.rs b/runtime/kusama/src/weights/frame_benchmarking_baseline.rs index 174c8859a41e..adf6d21c8ad5 100644 --- a/runtime/kusama/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/kusama/src/weights/frame_benchmarking_baseline.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_benchmarking::baseline`. @@ -46,46 +46,54 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_ref_time(114_000 as u64) + // Minimum execution time: 102 nanoseconds. + Weight::from_ref_time(153_256 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_ref_time(125_000 as u64) + // Minimum execution time: 104 nanoseconds. + Weight::from_ref_time(159_150 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_ref_time(116_000 as u64) + // Minimum execution time: 106 nanoseconds. + Weight::from_ref_time(155_325 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_ref_time(115_000 as u64) + // Minimum execution time: 102 nanoseconds. + Weight::from_ref_time(148_483 as u64) } /// The range of component `i` is `[0, 100]`. fn hashing(i: u32, ) -> Weight { - Weight::from_ref_time(19_441_790_000 as u64) - // Standard Error: 126_000 - .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 19_966_061 nanoseconds. + Weight::from_ref_time(20_167_025_347 as u64) + // Standard Error: 298_405 + .saturating_add(Weight::from_ref_time(1_324_681 as u64).saturating_mul(i as u64)) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 35_000 - .saturating_add(Weight::from_ref_time(47_909_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 136 nanoseconds. + Weight::from_ref_time(174_000 as u64) + // Standard Error: 17_607 + .saturating_add(Weight::from_ref_time(47_209_113 as u64).saturating_mul(i as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(1_998_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 145 nanoseconds. + Weight::from_ref_time(154_000 as u64) + // Standard Error: 4_008 + .saturating_add(Weight::from_ref_time(1_977_799 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(338_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 109 nanoseconds. + Weight::from_ref_time(128_000 as u64) + // Standard Error: 804 + .saturating_add(Weight::from_ref_time(325_284 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } } diff --git a/runtime/kusama/src/weights/frame_election_provider_support.rs b/runtime/kusama/src/weights/frame_election_provider_support.rs index 3b1691b5b770..255bda05e015 100644 --- a/runtime/kusama/src/weights/frame_election_provider_support.rs +++ b/runtime/kusama/src/weights/frame_election_provider_support.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. @@ -48,20 +48,22 @@ impl frame_election_provider_support::WeightInfo for We /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(13_944_000 as u64).saturating_mul(v as u64)) - // Standard Error: 4_876_000 - .saturating_add(Weight::from_ref_time(2_223_649_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 5_474_633 nanoseconds. + Weight::from_ref_time(5_525_752_000 as u64) + // Standard Error: 135_558 + .saturating_add(Weight::from_ref_time(5_545_241 as u64).saturating_mul(v as u64)) + // Standard Error: 13_859_031 + .saturating_add(Weight::from_ref_time(1_538_596_617 as u64).saturating_mul(d as u64)) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 79_000 - .saturating_add(Weight::from_ref_time(14_480_000 as u64).saturating_mul(v as u64)) - // Standard Error: 6_844_000 - .saturating_add(Weight::from_ref_time(2_525_332_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 4_309_239 nanoseconds. + Weight::from_ref_time(4_353_424_000 as u64) + // Standard Error: 145_409 + .saturating_add(Weight::from_ref_time(5_482_164 as u64).saturating_mul(v as u64)) + // Standard Error: 14_866_111 + .saturating_add(Weight::from_ref_time(1_765_233_611 as u64).saturating_mul(d as u64)) } } diff --git a/runtime/kusama/src/weights/frame_system.rs b/runtime/kusama/src/weights/frame_system.rs index 022c09e7752b..dd8aeed0d219 100644 --- a/runtime/kusama/src/weights/frame_system.rs +++ b/runtime/kusama/src/weights/frame_system.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. @@ -46,45 +46,51 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - Weight::from_ref_time(882_000 as u64) + // Minimum execution time: 3_661 nanoseconds. + Weight::from_ref_time(3_719_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(411 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + // Minimum execution time: 12_500 nanoseconds. + Weight::from_ref_time(12_792_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(1_770 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(7_344_000 as u64) + // Minimum execution time: 8_514 nanoseconds. + Weight::from_ref_time(8_736_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(610_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_377 nanoseconds. + Weight::from_ref_time(3_436_000 as u64) + // Standard Error: 1_938 + .saturating_add(Weight::from_ref_time(603_404 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(454_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_660 nanoseconds. + Weight::from_ref_time(3_741_000 as u64) + // Standard Error: 927 + .saturating_add(Weight::from_ref_time(434_412 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(978_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 4_929 nanoseconds. + Weight::from_ref_time(5_084_000 as u64) + // Standard Error: 1_255 + .saturating_add(Weight::from_ref_time(978_082 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/kusama/src/weights/mod.rs b/runtime/kusama/src/weights/mod.rs index 2f9e2d35c211..c277b2beb819 100644 --- a/runtime/kusama/src/weights/mod.rs +++ b/runtime/kusama/src/weights/mod.rs @@ -19,6 +19,7 @@ pub mod frame_election_provider_support; pub mod frame_system; pub mod pallet_bags_list; pub mod pallet_balances; +pub mod pallet_balances_nis_counterpart_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; pub mod pallet_collective_council; @@ -28,12 +29,12 @@ pub mod pallet_democracy; pub mod pallet_election_provider_multi_phase; pub mod pallet_elections_phragmen; pub mod pallet_fast_unstake; -pub mod pallet_gilt; pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; pub mod pallet_multisig; +pub mod pallet_nis; pub mod pallet_nomination_pools; pub mod pallet_preimage; pub mod pallet_proxy; diff --git a/runtime/kusama/src/weights/pallet_bags_list.rs b/runtime/kusama/src/weights/pallet_bags_list.rs index e753f72a62ea..de0700d07983 100644 --- a/runtime/kusama/src/weights/pallet_bags_list.rs +++ b/runtime/kusama/src/weights/pallet_bags_list.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_bags_list`. @@ -49,7 +49,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:4 w:4) // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(61_057_000 as u64) + // Minimum execution time: 62_727 nanoseconds. + Weight::from_ref_time(64_215_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -58,7 +59,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - Weight::from_ref_time(59_674_000 as u64) + // Minimum execution time: 61_907 nanoseconds. + Weight::from_ref_time(64_148_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -68,7 +70,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - Weight::from_ref_time(60_844_000 as u64) + // Minimum execution time: 61_775 nanoseconds. + Weight::from_ref_time(62_422_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_balances.rs b/runtime/kusama/src/weights/pallet_balances.rs index adfee6ac8b23..1787c8d3822d 100644 --- a/runtime/kusama/src/weights/pallet_balances.rs +++ b/runtime/kusama/src/weights/pallet_balances.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -46,43 +46,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(39_458_000 as u64) + // Minimum execution time: 40_902 nanoseconds. + Weight::from_ref_time(41_638_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(28_773_000 as u64) + // Minimum execution time: 30_093 nanoseconds. + Weight::from_ref_time(30_732_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(22_414_000 as u64) + // Minimum execution time: 23_901 nanoseconds. + Weight::from_ref_time(24_238_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(25_136_000 as u64) + // Minimum execution time: 26_402 nanoseconds. + Weight::from_ref_time(27_026_000 as u64) .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) fn force_transfer() -> Weight { - Weight::from_ref_time(39_681_000 as u64) + // Minimum execution time: 40_328 nanoseconds. + Weight::from_ref_time(41_242_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(33_651_000 as u64) + // Minimum execution time: 35_401 nanoseconds. + Weight::from_ref_time(36_122_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(19_448_000 as u64) + // Minimum execution time: 20_178 nanoseconds. + Weight::from_ref_time(20_435_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs b/runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs new file mode 100644 index 000000000000..fcaa58c5fbda --- /dev/null +++ b/runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs @@ -0,0 +1,105 @@ +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-11-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=kusama-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --header=./file_header.txt +// --output=./runtime/kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 41_890 nanoseconds. + Weight::from_ref_time(42_832_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 30_130 nanoseconds. + Weight::from_ref_time(31_076_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 20_254 nanoseconds. + Weight::from_ref_time(20_956_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 27_767 nanoseconds. + Weight::from_ref_time(28_472_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 41_369 nanoseconds. + Weight::from_ref_time(41_831_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 37_413 nanoseconds. + Weight::from_ref_time(38_587_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 19_049 nanoseconds. + Weight::from_ref_time(19_464_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/kusama/src/weights/pallet_bounties.rs b/runtime/kusama/src/weights/pallet_bounties.rs index e4c633dc6114..cf34a99e51a3 100644 --- a/runtime/kusama/src/weights/pallet_bounties.rs +++ b/runtime/kusama/src/weights/pallet_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_bounties`. @@ -50,43 +50,49 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: Bounties Bounties (r:0 w:1) /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { - Weight::from_ref_time(28_877_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 29_047 nanoseconds. + Weight::from_ref_time(30_003_353 as u64) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(809 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: Bounties BountyApprovals (r:1 w:1) fn approve_bounty() -> Weight { - Weight::from_ref_time(11_971_000 as u64) + // Minimum execution time: 11_505 nanoseconds. + Weight::from_ref_time(11_831_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn propose_curator() -> Weight { - Weight::from_ref_time(11_213_000 as u64) + // Minimum execution time: 11_422 nanoseconds. + Weight::from_ref_time(11_716_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn unassign_curator() -> Weight { - Weight::from_ref_time(39_351_000 as u64) + // Minimum execution time: 40_028 nanoseconds. + Weight::from_ref_time(40_648_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn accept_curator() -> Weight { - Weight::from_ref_time(27_149_000 as u64) + // Minimum execution time: 27_639 nanoseconds. + Weight::from_ref_time(28_480_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: ChildBounties ParentChildBounties (r:1 w:0) fn award_bounty() -> Weight { - Weight::from_ref_time(23_870_000 as u64) + // Minimum execution time: 24_826 nanoseconds. + Weight::from_ref_time(25_281_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,7 +101,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - Weight::from_ref_time(67_658_000 as u64) + // Minimum execution time: 67_233 nanoseconds. + Weight::from_ref_time(68_242_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -104,7 +111,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - Weight::from_ref_time(41_915_000 as u64) + // Minimum execution time: 43_779 nanoseconds. + Weight::from_ref_time(44_285_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -113,24 +121,27 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - Weight::from_ref_time(51_843_000 as u64) + // Minimum execution time: 52_893 nanoseconds. + Weight::from_ref_time(53_583_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn extend_bounty_expiry() -> Weight { - Weight::from_ref_time(19_980_000 as u64) + // Minimum execution time: 21_030 nanoseconds. + Weight::from_ref_time(21_691_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties BountyApprovals (r:1 w:1) - // Storage: Bounties Bounties (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `b` is `[1, 100]`. + // Storage: Bounties Bounties (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `b` is `[0, 100]`. fn spend_funds(b: u32, ) -> Weight { - Weight::from_ref_time(9_229_000 as u64) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(25_764_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 7_438 nanoseconds. + Weight::from_ref_time(18_396_001 as u64) + // Standard Error: 26_725 + .saturating_add(Weight::from_ref_time(24_975_270 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) diff --git a/runtime/kusama/src/weights/pallet_child_bounties.rs b/runtime/kusama/src/weights/pallet_child_bounties.rs index 861d7bf92ebf..ae6ecf0808b4 100644 --- a/runtime/kusama/src/weights/pallet_child_bounties.rs +++ b/runtime/kusama/src/weights/pallet_child_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_child_bounties`. @@ -52,9 +52,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(51_114_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 51_699 nanoseconds. + Weight::from_ref_time(53_278_250 as u64) + // Standard Error: 11 + .saturating_add(Weight::from_ref_time(814 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,7 +63,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(18_300_000 as u64) + // Minimum execution time: 19_296 nanoseconds. + Weight::from_ref_time(19_776_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,7 +72,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(32_067_000 as u64) + // Minimum execution time: 34_816 nanoseconds. + Weight::from_ref_time(35_312_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,14 +81,16 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(43_720_000 as u64) + // Minimum execution time: 46_811 nanoseconds. + Weight::from_ref_time(47_562_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:0) // Storage: ChildBounties ChildBounties (r:1 w:1) fn award_child_bounty() -> Weight { - Weight::from_ref_time(27_081_000 as u64) + // Minimum execution time: 29_189 nanoseconds. + Weight::from_ref_time(29_476_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -94,7 +99,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(65_901_000 as u64) + // Minimum execution time: 69_129 nanoseconds. + Weight::from_ref_time(70_082_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -105,7 +111,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(50_101_000 as u64) + // Minimum execution time: 52_958 nanoseconds. + Weight::from_ref_time(54_430_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -116,7 +123,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(61_510_000 as u64) + // Minimum execution time: 62_510 nanoseconds. + Weight::from_ref_time(64_138_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_collective_council.rs b/runtime/kusama/src/weights/pallet_collective_council.rs index 8fe7d12e04b5..5fb745f5397c 100644 --- a/runtime/kusama/src/weights/pallet_collective_council.rs +++ b/runtime/kusama/src/weights/pallet_collective_council.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -27,6 +27,7 @@ // --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_collective // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -37,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. @@ -45,20 +46,21 @@ pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { // Storage: Council Members (r:1 w:1) // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) // Storage: Council Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(9_709_000 as u64).saturating_mul(m as u64)) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(11_829_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 16_447 nanoseconds. + Weight::from_ref_time(16_856_000 as u64) + // Standard Error: 46_757 + .saturating_add(Weight::from_ref_time(5_281_186 as u64).saturating_mul(m as u64)) + // Standard Error: 46_757 + .saturating_add(Weight::from_ref_time(7_500_991 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -70,11 +72,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(18_472_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(13_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 19_949 nanoseconds. + Weight::from_ref_time(19_368_834 as u64) + // Standard Error: 22 + .saturating_add(Weight::from_ref_time(1_917 as u64).saturating_mul(b as u64)) + // Standard Error: 229 + .saturating_add(Weight::from_ref_time(13_967 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -84,11 +87,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(20_282_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_295 nanoseconds. + Weight::from_ref_time(21_517_404 as u64) + // Standard Error: 26 + .saturating_add(Weight::from_ref_time(1_856 as u64).saturating_mul(b as u64)) + // Standard Error: 271 + .saturating_add(Weight::from_ref_time(22_820 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -103,13 +107,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(27_141_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(22_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(102_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_745 nanoseconds. + Weight::from_ref_time(28_146_412 as u64) + // Standard Error: 71 + .saturating_add(Weight::from_ref_time(3_378 as u64).saturating_mul(b as u64)) + // Standard Error: 749 + .saturating_add(Weight::from_ref_time(22_179 as u64).saturating_mul(m as u64)) + // Standard Error: 739 + .saturating_add(Weight::from_ref_time(108_349 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -118,9 +123,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(26_680_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(37_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 27_772 nanoseconds. + Weight::from_ref_time(28_486_180 as u64) + // Standard Error: 376 + .saturating_add(Weight::from_ref_time(38_162 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +139,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(30_379_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 30_430 nanoseconds. + Weight::from_ref_time(32_906_376 as u64) + // Standard Error: 538 + .saturating_add(Weight::from_ref_time(20_866 as u64).saturating_mul(m as u64)) + // Standard Error: 525 + .saturating_add(Weight::from_ref_time(84_112 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -152,13 +159,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(40_122_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(89_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 41_328 nanoseconds. + Weight::from_ref_time(41_331_557 as u64) + // Standard Error: 60 + .saturating_add(Weight::from_ref_time(1_828 as u64).saturating_mul(b as u64)) + // Standard Error: 645 + .saturating_add(Weight::from_ref_time(26_460 as u64).saturating_mul(m as u64)) + // Standard Error: 628 + .saturating_add(Weight::from_ref_time(96_432 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -172,11 +180,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(32_590_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 33_541 nanoseconds. + Weight::from_ref_time(34_963_525 as u64) + // Standard Error: 517 + .saturating_add(Weight::from_ref_time(26_814 as u64).saturating_mul(m as u64)) + // Standard Error: 505 + .saturating_add(Weight::from_ref_time(84_716 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -192,13 +201,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(42_120_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 42_833 nanoseconds. + Weight::from_ref_time(44_229_039 as u64) + // Standard Error: 67 + .saturating_add(Weight::from_ref_time(1_742 as u64).saturating_mul(b as u64)) + // Standard Error: 713 + .saturating_add(Weight::from_ref_time(22_234 as u64).saturating_mul(m as u64)) + // Standard Error: 695 + .saturating_add(Weight::from_ref_time(96_563 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -208,9 +218,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(21_325_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 19_172 nanoseconds. + Weight::from_ref_time(22_273_247 as u64) + // Standard Error: 664 + .saturating_add(Weight::from_ref_time(95_163 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_collective_technical_committee.rs b/runtime/kusama/src/weights/pallet_collective_technical_committee.rs index 149a26d54b0e..4d0711063214 100644 --- a/runtime/kusama/src/weights/pallet_collective_technical_committee.rs +++ b/runtime/kusama/src/weights/pallet_collective_technical_committee.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -27,6 +27,7 @@ // --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_collective // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -37,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. @@ -45,20 +46,21 @@ pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:100 w:100) // Storage: TechnicalCommittee Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. + // Storage: TechnicalCommittee Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(9_293_000 as u64).saturating_mul(m as u64)) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(11_556_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 16_808 nanoseconds. + Weight::from_ref_time(17_190_000 as u64) + // Standard Error: 46_506 + .saturating_add(Weight::from_ref_time(5_338_165 as u64).saturating_mul(m as u64)) + // Standard Error: 46_506 + .saturating_add(Weight::from_ref_time(7_515_702 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -70,11 +72,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(18_967_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(13_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_545 nanoseconds. + Weight::from_ref_time(19_860_961 as u64) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(1_865 as u64).saturating_mul(b as u64)) + // Standard Error: 190 + .saturating_add(Weight::from_ref_time(13_602 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -84,11 +87,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(20_872_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_052 nanoseconds. + Weight::from_ref_time(22_008_528 as u64) + // Standard Error: 21 + .saturating_add(Weight::from_ref_time(1_839 as u64).saturating_mul(b as u64)) + // Standard Error: 225 + .saturating_add(Weight::from_ref_time(21_080 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -103,13 +107,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(28_426_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(104_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_562 nanoseconds. + Weight::from_ref_time(29_261_959 as u64) + // Standard Error: 70 + .saturating_add(Weight::from_ref_time(3_503 as u64).saturating_mul(b as u64)) + // Standard Error: 733 + .saturating_add(Weight::from_ref_time(21_047 as u64).saturating_mul(m as u64)) + // Standard Error: 724 + .saturating_add(Weight::from_ref_time(113_937 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -118,9 +123,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(28_138_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(38_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 29_024 nanoseconds. + Weight::from_ref_time(30_114_505 as u64) + // Standard Error: 450 + .saturating_add(Weight::from_ref_time(39_180 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +139,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(31_287_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(84_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 32_178 nanoseconds. + Weight::from_ref_time(33_614_789 as u64) + // Standard Error: 472 + .saturating_add(Weight::from_ref_time(22_479 as u64).saturating_mul(m as u64)) + // Standard Error: 461 + .saturating_add(Weight::from_ref_time(83_882 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -152,13 +159,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(40_722_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(90_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 41_635 nanoseconds. + Weight::from_ref_time(42_323_834 as u64) + // Standard Error: 55 + .saturating_add(Weight::from_ref_time(1_697 as u64).saturating_mul(b as u64)) + // Standard Error: 591 + .saturating_add(Weight::from_ref_time(24_790 as u64).saturating_mul(m as u64)) + // Standard Error: 576 + .saturating_add(Weight::from_ref_time(96_009 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -172,11 +180,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(33_303_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(30_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 34_682 nanoseconds. + Weight::from_ref_time(35_559_148 as u64) + // Standard Error: 495 + .saturating_add(Weight::from_ref_time(27_860 as u64).saturating_mul(m as u64)) + // Standard Error: 483 + .saturating_add(Weight::from_ref_time(83_712 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -192,13 +201,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(42_826_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(93_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 43_702 nanoseconds. + Weight::from_ref_time(44_643_929 as u64) + // Standard Error: 62 + .saturating_add(Weight::from_ref_time(1_639 as u64).saturating_mul(b as u64)) + // Standard Error: 660 + .saturating_add(Weight::from_ref_time(23_244 as u64).saturating_mul(m as u64)) + // Standard Error: 643 + .saturating_add(Weight::from_ref_time(98_321 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -208,9 +218,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(21_772_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(90_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 20_059 nanoseconds. + Weight::from_ref_time(22_842_572 as u64) + // Standard Error: 625 + .saturating_add(Weight::from_ref_time(97_244 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_conviction_voting.rs b/runtime/kusama/src/weights/pallet_conviction_voting.rs index fbbb0d6529b5..b8050dcf2c3e 100644 --- a/runtime/kusama/src/weights/pallet_conviction_voting.rs +++ b/runtime/kusama/src/weights/pallet_conviction_voting.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_conviction_voting // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_conviction_voting -// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -39,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_conviction_voting`. @@ -49,11 +48,12 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Storage: ConvictionVoting VotingFor (r:1 w:1) // Storage: ConvictionVoting ClassLocksFor (r:1 w:1) // Storage: Balances Locks (r:1 w:1) - // Storage: Scheduler Agenda (r:2 w:2) + // Storage: Scheduler Agenda (r:1 w:1) fn vote_new() -> Weight { - Weight::from_ref_time(5_652_326_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 129_807 nanoseconds. + Weight::from_ref_time(133_007_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: ConvictionVoting VotingFor (r:1 w:1) @@ -61,7 +61,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Storage: Balances Locks (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn vote_existing() -> Weight { - Weight::from_ref_time(509_859_000 as u64) + // Minimum execution time: 154_191 nanoseconds. + Weight::from_ref_time(156_774_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -69,14 +70,16 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn remove_vote() -> Weight { - Weight::from_ref_time(486_638_000 as u64) + // Minimum execution time: 128_599 nanoseconds. + Weight::from_ref_time(131_816_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ConvictionVoting VotingFor (r:1 w:1) // Storage: Referenda ReferendumInfoFor (r:1 w:0) fn remove_other_vote() -> Weight { - Weight::from_ref_time(74_517_000 as u64) + // Minimum execution time: 71_872 nanoseconds. + Weight::from_ref_time(73_800_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -87,12 +90,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Storage: Scheduler Agenda (r:2 w:2) /// The range of component `r` is `[0, 512]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(78_376_000 as u64) - // Standard Error: 2_253_708 - .saturating_add(Weight::from_ref_time(221_428_037 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 77_152 nanoseconds. + Weight::from_ref_time(706_169_111 as u64) + // Standard Error: 59_459 + .saturating_add(Weight::from_ref_time(26_675_761 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) } // Storage: ConvictionVoting VotingFor (r:2 w:2) @@ -100,19 +104,21 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Storage: Scheduler Agenda (r:2 w:2) /// The range of component `r` is `[0, 512]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(55_946_000 as u64) - // Standard Error: 2_268_396 - .saturating_add(Weight::from_ref_time(221_648_859 as u64).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Minimum execution time: 57_429 nanoseconds. + Weight::from_ref_time(678_011_885 as u64) + // Standard Error: 59_201 + .saturating_add(Weight::from_ref_time(26_729_943 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64))) } // Storage: ConvictionVoting VotingFor (r:1 w:1) // Storage: ConvictionVoting ClassLocksFor (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn unlock() -> Weight { - Weight::from_ref_time(93_068_000 as u64) + // Minimum execution time: 91_278 nanoseconds. + Weight::from_ref_time(93_505_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_democracy.rs b/runtime/kusama/src/weights/pallet_democracy.rs index b9b4127c597e..87865759d494 100644 --- a/runtime/kusama/src/weights/pallet_democracy.rs +++ b/runtime/kusama/src/weights/pallet_democracy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/kusama/src/weights +// --output=./runtime/kusama/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,13 +49,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - Weight::from_ref_time(42_340_000 as u64) + // Minimum execution time: 43_480 nanoseconds. + Weight::from_ref_time(44_439_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy DepositOf (r:1 w:1) fn second() -> Weight { - Weight::from_ref_time(38_557_000 as u64) + // Minimum execution time: 40_276 nanoseconds. + Weight::from_ref_time(41_788_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -63,7 +65,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - Weight::from_ref_time(48_480_000 as u64) + // Minimum execution time: 50_609 nanoseconds. + Weight::from_ref_time(51_581_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -71,14 +74,16 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - Weight::from_ref_time(48_553_000 as u64) + // Minimum execution time: 50_941 nanoseconds. + Weight::from_ref_time(51_356_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - Weight::from_ref_time(20_602_000 as u64) + // Minimum execution time: 21_573 nanoseconds. + Weight::from_ref_time(22_094_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,39 +94,45 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - Weight::from_ref_time(75_265_000 as u64) + // Minimum execution time: 78_016 nanoseconds. + Weight::from_ref_time(79_651_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose() -> Weight { - Weight::from_ref_time(15_498_000 as u64) + // Minimum execution time: 17_106 nanoseconds. + Weight::from_ref_time(17_287_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - Weight::from_ref_time(4_503_000 as u64) + // Minimum execution time: 4_801 nanoseconds. + Weight::from_ref_time(4_954_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - Weight::from_ref_time(4_486_000 as u64) + // Minimum execution time: 4_671 nanoseconds. + Weight::from_ref_time(4_906_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - Weight::from_ref_time(19_676_000 as u64) + // Minimum execution time: 20_734 nanoseconds. + Weight::from_ref_time(21_068_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external() -> Weight { - Weight::from_ref_time(25_443_000 as u64) + // Minimum execution time: 26_640 nanoseconds. + Weight::from_ref_time(27_058_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -129,13 +140,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - Weight::from_ref_time(63_468_000 as u64) + // Minimum execution time: 66_091 nanoseconds. + Weight::from_ref_time(67_119_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - Weight::from_ref_time(13_030_000 as u64) + // Minimum execution time: 13_879 nanoseconds. + Weight::from_ref_time(14_107_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -143,9 +156,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - Weight::from_ref_time(5_941_000 as u64) - // Standard Error: 2_263 - .saturating_add(Weight::from_ref_time(2_136_731 as u64).saturating_mul(r as u64)) + // Minimum execution time: 6_375 nanoseconds. + Weight::from_ref_time(9_732_668 as u64) + // Standard Error: 4_002 + .saturating_add(Weight::from_ref_time(2_103_987 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -158,9 +172,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - Weight::from_ref_time(8_085_000 as u64) - // Standard Error: 2_202 - .saturating_add(Weight::from_ref_time(2_143_624 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_604 nanoseconds. + Weight::from_ref_time(12_108_221 as u64) + // Standard Error: 3_740 + .saturating_add(Weight::from_ref_time(2_106_843 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -170,9 +185,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(40_416_000 as u64) - // Standard Error: 4_125 - .saturating_add(Weight::from_ref_time(3_038_258 as u64).saturating_mul(r as u64)) + // Minimum execution time: 43_169 nanoseconds. + Weight::from_ref_time(49_050_100 as u64) + // Standard Error: 6_519 + .saturating_add(Weight::from_ref_time(3_017_381 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -182,9 +198,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(24_459_000 as u64) - // Standard Error: 2_860 - .saturating_add(Weight::from_ref_time(2_984_453 as u64).saturating_mul(r as u64)) + // Minimum execution time: 26_214 nanoseconds. + Weight::from_ref_time(31_373_892 as u64) + // Standard Error: 13_107 + .saturating_add(Weight::from_ref_time(2_995_678 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -192,7 +209,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - Weight::from_ref_time(5_200_000 as u64) + // Minimum execution time: 5_062 nanoseconds. + Weight::from_ref_time(5_265_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -200,9 +218,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { - Weight::from_ref_time(24_289_000 as u64) - // Standard Error: 2_579 - .saturating_add(Weight::from_ref_time(125_300 as u64).saturating_mul(r as u64)) + // Minimum execution time: 25_583 nanoseconds. + Weight::from_ref_time(32_527_820 as u64) + // Standard Error: 1_608 + .saturating_add(Weight::from_ref_time(32_882 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -211,9 +230,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { - Weight::from_ref_time(28_331_000 as u64) - // Standard Error: 755 - .saturating_add(Weight::from_ref_time(90_997 as u64).saturating_mul(r as u64)) + // Minimum execution time: 30_561 nanoseconds. + Weight::from_ref_time(32_558_405 as u64) + // Standard Error: 635 + .saturating_add(Weight::from_ref_time(63_267 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -221,9 +241,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_350_000 as u64) - // Standard Error: 1_015 - .saturating_add(Weight::from_ref_time(104_402 as u64).saturating_mul(r as u64)) + // Minimum execution time: 16_041 nanoseconds. + Weight::from_ref_time(18_765_906 as u64) + // Standard Error: 833 + .saturating_add(Weight::from_ref_time(66_549 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -231,9 +252,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_433_000 as u64) - // Standard Error: 980 - .saturating_add(Weight::from_ref_time(104_660 as u64).saturating_mul(r as u64)) + // Minimum execution time: 15_811 nanoseconds. + Weight::from_ref_time(18_594_645 as u64) + // Standard Error: 940 + .saturating_add(Weight::from_ref_time(72_328 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs index e388d4bce642..2705a9d2d49f 100644 --- a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. @@ -53,33 +53,38 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(15_619_000 as u64) + // Minimum execution time: 15_765 nanoseconds. + Weight::from_ref_time(16_178_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(14_464_000 as u64) + // Minimum execution time: 15_294 nanoseconds. + Weight::from_ref_time(15_649_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(14_167_000 as u64) + // Minimum execution time: 14_776 nanoseconds. + Weight::from_ref_time(15_204_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(28_601_000 as u64) + // Minimum execution time: 29_172 nanoseconds. + Weight::from_ref_time(29_735_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(22_410_000 as u64) + // Minimum execution time: 23_324 nanoseconds. + Weight::from_ref_time(23_675_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -89,11 +94,12 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - Weight::from_ref_time(14_136_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(554_000 as u64).saturating_mul(v as u64)) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 615_137 nanoseconds. + Weight::from_ref_time(17_886_193 as u64) + // Standard Error: 2_263 + .saturating_add(Weight::from_ref_time(558_009 as u64).saturating_mul(v as u64)) + // Standard Error: 4_524 + .saturating_add(Weight::from_ref_time(75_903 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -108,12 +114,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn elect_queued(a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(1_167_000 as u64).saturating_mul(a as u64)) - // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(180_000 as u64).saturating_mul(d as u64)) + fn elect_queued(a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 376_033 nanoseconds. + Weight::from_ref_time(379_882_000 as u64) + // Standard Error: 8_877 + .saturating_add(Weight::from_ref_time(562_200 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -124,7 +129,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(49_945_000 as u64) + // Minimum execution time: 50_778 nanoseconds. + Weight::from_ref_time(51_219_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -139,16 +145,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(874_000 as u64).saturating_mul(v as u64)) - // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(39_000 as u64).saturating_mul(t as u64)) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(10_873_000 as u64).saturating_mul(a as u64)) - // Standard Error: 35_000 - .saturating_add(Weight::from_ref_time(2_257_000 as u64).saturating_mul(d as u64)) + fn submit_unsigned(_v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 6_866_951 nanoseconds. + Weight::from_ref_time(6_994_679_000 as u64) + // Standard Error: 59_999 + .saturating_add(Weight::from_ref_time(7_093_483 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -160,16 +161,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(895_000 as u64).saturating_mul(v as u64)) - // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(t as u64)) - // Standard Error: 42_000 - .saturating_add(Weight::from_ref_time(8_673_000 as u64).saturating_mul(a as u64)) - // Standard Error: 63_000 - .saturating_add(Weight::from_ref_time(1_598_000 as u64).saturating_mul(d as u64)) + fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 5_710_244 nanoseconds. + Weight::from_ref_time(5_739_503_000 as u64) + // Standard Error: 16_787 + .saturating_add(Weight::from_ref_time(131_224 as u64).saturating_mul(v as u64)) + // Standard Error: 49_748 + .saturating_add(Weight::from_ref_time(5_312_456 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) } } diff --git a/runtime/kusama/src/weights/pallet_elections_phragmen.rs b/runtime/kusama/src/weights/pallet_elections_phragmen.rs index 8d5db5a31006..9a333bb4a60b 100644 --- a/runtime/kusama/src/weights/pallet_elections_phragmen.rs +++ b/runtime/kusama/src/weights/pallet_elections_phragmen.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. @@ -51,9 +51,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - Weight::from_ref_time(30_711_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(201_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 31_673 nanoseconds. + Weight::from_ref_time(34_361_005 as u64) + // Standard Error: 9_644 + .saturating_add(Weight::from_ref_time(93_408 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -64,9 +65,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - Weight::from_ref_time(40_536_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(173_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 41_200 nanoseconds. + Weight::from_ref_time(42_889_832 as u64) + // Standard Error: 4_165 + .saturating_add(Weight::from_ref_time(223_881 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,16 +79,18 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - Weight::from_ref_time(40_543_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(199_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 42_012 nanoseconds. + Weight::from_ref_time(43_635_852 as u64) + // Standard Error: 4_519 + .saturating_add(Weight::from_ref_time(119_706 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn remove_voter() -> Weight { - Weight::from_ref_time(39_001_000 as u64) + // Minimum execution time: 40_370 nanoseconds. + Weight::from_ref_time(41_142_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -95,18 +99,20 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { - Weight::from_ref_time(26_806_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 37_086 nanoseconds. + Weight::from_ref_time(28_441_305 as u64) + // Standard Error: 1_050 + .saturating_add(Weight::from_ref_time(91_457 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: PhragmenElection Candidates (r:1 w:1) /// The range of component `c` is `[1, 1000]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - Weight::from_ref_time(23_558_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(67_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 32_127 nanoseconds. + Weight::from_ref_time(23_789_781 as u64) + // Standard Error: 995 + .saturating_add(Weight::from_ref_time(71_601 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -116,18 +122,21 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn renounce_candidacy_members() -> Weight { - Weight::from_ref_time(44_960_000 as u64) + // Minimum execution time: 44_751 nanoseconds. + Weight::from_ref_time(46_264_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: PhragmenElection RunnersUp (r:1 w:1) fn renounce_candidacy_runners_up() -> Weight { - Weight::from_ref_time(34_666_000 as u64) + // Minimum execution time: 34_904 nanoseconds. + Weight::from_ref_time(36_139_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn remove_member_without_replacement() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: PhragmenElection Members (r:1 w:1) @@ -137,7 +146,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn remove_member_with_replacement() -> Weight { - Weight::from_ref_time(59_021_000 as u64) + // Minimum execution time: 59_246 nanoseconds. + Weight::from_ref_time(60_848_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,13 +158,12 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:5000 w:5000) // Storage: System Account (r:5000 w:5000) /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[1, 5000]`. - fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 88_000 - .saturating_add(Weight::from_ref_time(60_894_000 as u64).saturating_mul(v as u64)) - // Standard Error: 88_000 - .saturating_add(Weight::from_ref_time(379_000 as u64).saturating_mul(d as u64)) + /// The range of component `d` is `[0, 5000]`. + fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { + // Minimum execution time: 279_914_581 nanoseconds. + Weight::from_ref_time(280_093_180_000 as u64) + // Standard Error: 242_383 + .saturating_add(Weight::from_ref_time(34_902_791 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64))) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) @@ -172,14 +181,16 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `v` is `[1, 10000]`. /// The range of component `e` is `[10000, 160000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 691_000 - .saturating_add(Weight::from_ref_time(57_805_000 as u64).saturating_mul(v as u64)) - // Standard Error: 46_000 - .saturating_add(Weight::from_ref_time(3_139_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 29_009_063 nanoseconds. + Weight::from_ref_time(29_156_039_000 as u64) + // Standard Error: 553_255 + .saturating_add(Weight::from_ref_time(46_221_121 as u64).saturating_mul(v as u64)) + // Standard Error: 35_504 + .saturating_add(Weight::from_ref_time(2_367_682 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(265 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) + .saturating_add(T::DbWeight::get().writes(6 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } } diff --git a/runtime/kusama/src/weights/pallet_fast_unstake.rs b/runtime/kusama/src/weights/pallet_fast_unstake.rs index b7b6008fcc7e..4f1ce8aee992 100644 --- a/runtime/kusama/src/weights/pallet_fast_unstake.rs +++ b/runtime/kusama/src/weights/pallet_fast_unstake.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_fast_unstake // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_fast_unstake -// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -50,65 +49,73 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Ledger (r:0 w:1) - // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SlashingSpans (r:64 w:0) + // Storage: Staking Bonded (r:64 w:64) + // Storage: Staking Validators (r:64 w:0) + // Storage: Staking Nominators (r:64 w:0) + // Storage: System Account (r:64 w:64) + // Storage: Balances Locks (r:64 w:64) + // Storage: Staking Ledger (r:0 w:64) + // Storage: Staking Payee (r:0 w:64) fn on_idle_unstake() -> Weight { - Weight::from_ref_time(64_798_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 2_141_174 nanoseconds. + Weight::from_ref_time(2_204_649_000 as u64) + .saturating_add(T::DbWeight::get().reads(389 as u64)) + .saturating_add(T::DbWeight::get().writes(321 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking ValidatorCount (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) - // Storage: FastUnstake Queue (r:2 w:1) + // Storage: FastUnstake Queue (r:65 w:64) // Storage: FastUnstake CounterForQueue (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking ErasStakers (r:56 w:0) /// The range of component `x` is `[28, 3584]`. fn on_idle_check(x: u32, ) -> Weight { - Weight::from_ref_time(412_389_000 as u64) - // Standard Error: 10_902 - .saturating_add(Weight::from_ref_time(10_950_753 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(64 as u64)) + // Minimum execution time: 21_964_474 nanoseconds. + Weight::from_ref_time(22_227_783_000 as u64) + // Standard Error: 498_921 + .saturating_add(Weight::from_ref_time(624_289_713 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(85 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(66 as u64)) } + // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: FastUnstake Queue (r:1 w:1) // Storage: FastUnstake Head (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn register_fast_unstake() -> Weight { - Weight::from_ref_time(84_738_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + // Minimum execution time: 124_637 nanoseconds. + Weight::from_ref_time(126_193_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } + // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: FastUnstake Queue (r:1 w:1) // Storage: FastUnstake Head (r:1 w:0) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn deregister() -> Weight { - Weight::from_ref_time(23_369_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 50_711 nanoseconds. + Weight::from_ref_time(51_537_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) fn control() -> Weight { - Weight::from_ref_time(3_991_000 as u64) + // Minimum execution time: 4_008 nanoseconds. + Weight::from_ref_time(4_153_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kusama/src/weights/pallet_gilt.rs b/runtime/kusama/src/weights/pallet_gilt.rs deleted file mode 100644 index 3ab2d6d41709..000000000000 --- a/runtime/kusama/src/weights/pallet_gilt.rs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . -//! Autogenerated weights for `pallet_gilt` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=kusama-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_gilt -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight}}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_gilt`. -pub struct WeightInfo(PhantomData); -impl pallet_gilt::WeightInfo for WeightInfo { - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - /// The range of component `l` is `[0, 999]`. - fn place_bid(l: u32, ) -> Weight { - Weight::from_ref_time(33_022_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(81_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - fn place_bid_max() -> Weight { - Weight::from_ref_time(105_031_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - /// The range of component `l` is `[1, 1000]`. - fn retract_bid(l: u32, ) -> Weight { - Weight::from_ref_time(33_573_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - fn set_target() -> Weight { - Weight::from_ref_time(6_386_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Gilt Active (r:1 w:1) - // Storage: Gilt ActiveTotal (r:1 w:1) - fn thaw() -> Weight { - Weight::from_ref_time(45_459_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:0) - fn pursue_target_noop() -> Weight { - Weight::from_ref_time(2_669_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt Active (r:0 w:1) - /// The range of component `b` is `[1, 1000]`. - fn pursue_target_per_item(b: u32, ) -> Weight { - Weight::from_ref_time(33_549_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_979_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt Active (r:0 w:1) - /// The range of component `q` is `[1, 300]`. - fn pursue_target_per_queue(q: u32, ) -> Weight { - Weight::from_ref_time(28_306_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(6_651_000 as u64).saturating_mul(q as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(q as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(q as u64))) - } -} diff --git a/runtime/kusama/src/weights/pallet_identity.rs b/runtime/kusama/src/weights/pallet_identity.rs index 050a3b10db8e..46a9f0d10351 100644 --- a/runtime/kusama/src/weights/pallet_identity.rs +++ b/runtime/kusama/src/weights/pallet_identity.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_identity`. @@ -47,32 +47,35 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(16_780_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(193_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 16_710 nanoseconds. + Weight::from_ref_time(18_118_559 as u64) + // Standard Error: 3_051 + .saturating_add(Weight::from_ref_time(148_040 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(32_514_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(129_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(323_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 35_847 nanoseconds. + Weight::from_ref_time(35_393_868 as u64) + // Standard Error: 3_524 + .saturating_add(Weight::from_ref_time(75_148 as u64).saturating_mul(r as u64)) + // Standard Error: 687 + .saturating_add(Weight::from_ref_time(306_971 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Storage: Identity SuperOf (r:2 w:2) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(28_130_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_089_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_340 nanoseconds. + Weight::from_ref_time(28_847_479 as u64) + // Standard Error: 5_014 + .saturating_add(Weight::from_ref_time(2_161_226 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -80,12 +83,13 @@ impl pallet_identity::WeightInfo for WeightInfo { } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Storage: Identity SuperOf (r:0 w:2) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(28_597_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(891_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_122 nanoseconds. + Weight::from_ref_time(28_546_493 as u64) + // Standard Error: 4_337 + .saturating_add(Weight::from_ref_time(929_288 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -94,16 +98,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(35_657_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(48_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(889_000 as u64).saturating_mul(s as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(160_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 51_131 nanoseconds. + Weight::from_ref_time(36_991_277 as u64) + // Standard Error: 11_013 + .saturating_add(Weight::from_ref_time(75_731 as u64).saturating_mul(r as u64)) + // Standard Error: 2_150 + .saturating_add(Weight::from_ref_time(900_334 as u64).saturating_mul(s as u64)) + // Standard Error: 2_150 + .saturating_add(Weight::from_ref_time(161_480 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -111,65 +116,71 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(34_656_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(129_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(332_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 38_002 nanoseconds. + Weight::from_ref_time(36_848_336 as u64) + // Standard Error: 4_513 + .saturating_add(Weight::from_ref_time(100_666 as u64).saturating_mul(r as u64)) + // Standard Error: 880 + .saturating_add(Weight::from_ref_time(327_085 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(31_048_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(133_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(334_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 34_116 nanoseconds. + Weight::from_ref_time(34_235_732 as u64) + // Standard Error: 3_409 + .saturating_add(Weight::from_ref_time(49_426 as u64).saturating_mul(r as u64)) + // Standard Error: 665 + .saturating_add(Weight::from_ref_time(323_592 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(8_975_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(140_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_678 nanoseconds. + Weight::from_ref_time(9_613_287 as u64) + // Standard Error: 2_285 + .saturating_add(Weight::from_ref_time(117_905 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(9_212_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(138_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_892 nanoseconds. + Weight::from_ref_time(9_735_071 as u64) + // Standard Error: 2_239 + .saturating_add(Weight::from_ref_time(115_282 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(9_088_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(131_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_783 nanoseconds. + Weight::from_ref_time(9_686_212 as u64) + // Standard Error: 2_092 + .saturating_add(Weight::from_ref_time(107_045 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(23_324_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(133_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(334_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 28_056 nanoseconds. + Weight::from_ref_time(28_240_411 as u64) + // Standard Error: 7_231 + .saturating_add(Weight::from_ref_time(61_164 as u64).saturating_mul(r as u64)) + // Standard Error: 1_337 + .saturating_add(Weight::from_ref_time(546_999 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -178,16 +189,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(46_896_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(892_000 as u64).saturating_mul(s as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 62_459 nanoseconds. + Weight::from_ref_time(47_788_369 as u64) + // Standard Error: 5_893 + .saturating_add(Weight::from_ref_time(100_560 as u64).saturating_mul(r as u64)) + // Standard Error: 1_150 + .saturating_add(Weight::from_ref_time(907_788 as u64).saturating_mul(s as u64)) + // Standard Error: 1_150 + .saturating_add(Weight::from_ref_time(161_942 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -195,11 +207,12 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(35_814_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_735 nanoseconds. + Weight::from_ref_time(37_928_065 as u64) + // Standard Error: 1_523 + .saturating_add(Weight::from_ref_time(75_465 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -207,9 +220,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(15_348_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 14_370 nanoseconds. + Weight::from_ref_time(16_434_826 as u64) + // Standard Error: 665 + .saturating_add(Weight::from_ref_time(25_894 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -218,19 +232,21 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(37_193_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 35_617 nanoseconds. + Weight::from_ref_time(39_518_606 as u64) + // Standard Error: 1_088 + .saturating_add(Weight::from_ref_time(67_069 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(27_633_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 26_143 nanoseconds. + Weight::from_ref_time(29_067_018 as u64) + // Standard Error: 1_342 + .saturating_add(Weight::from_ref_time(68_986 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_im_online.rs b/runtime/kusama/src/weights/pallet_im_online.rs index 0c11f749e439..90c9f826561d 100644 --- a/runtime/kusama/src/weights/pallet_im_online.rs +++ b/runtime/kusama/src/weights/pallet_im_online.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. @@ -52,11 +52,12 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(76_533_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(22_000 as u64).saturating_mul(k as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(314_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 97_143 nanoseconds. + Weight::from_ref_time(78_523_977 as u64) + // Standard Error: 267 + .saturating_add(Weight::from_ref_time(21_647 as u64).saturating_mul(k as u64)) + // Standard Error: 2_698 + .saturating_add(Weight::from_ref_time(307_112 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_indices.rs b/runtime/kusama/src/weights/pallet_indices.rs index b0f0fc563044..46bec05d5241 100644 --- a/runtime/kusama/src/weights/pallet_indices.rs +++ b/runtime/kusama/src/weights/pallet_indices.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_indices`. @@ -46,33 +46,38 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(25_146_000 as u64) + // Minimum execution time: 26_443 nanoseconds. + Weight::from_ref_time(26_877_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(31_999_000 as u64) + // Minimum execution time: 33_704 nanoseconds. + Weight::from_ref_time(34_123_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - Weight::from_ref_time(26_357_000 as u64) + // Minimum execution time: 27_656 nanoseconds. + Weight::from_ref_time(28_641_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - Weight::from_ref_time(26_922_000 as u64) + // Minimum execution time: 27_860 nanoseconds. + Weight::from_ref_time(28_165_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - Weight::from_ref_time(31_859_000 as u64) + // Minimum execution time: 33_354 nanoseconds. + Weight::from_ref_time(33_982_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_membership.rs b/runtime/kusama/src/weights/pallet_membership.rs index 1994c517a4d3..cf8da764e400 100644 --- a/runtime/kusama/src/weights/pallet_membership.rs +++ b/runtime/kusama/src/weights/pallet_membership.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_membership`. @@ -50,9 +50,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_ref_time(19_903_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(39_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_534 nanoseconds. + Weight::from_ref_time(21_396_898 as u64) + // Standard Error: 468 + .saturating_add(Weight::from_ref_time(38_585 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -63,9 +64,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_ref_time(22_263_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(34_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_322 nanoseconds. + Weight::from_ref_time(24_145_795 as u64) + // Standard Error: 405 + .saturating_add(Weight::from_ref_time(34_076 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -76,9 +78,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_ref_time(22_495_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_397 nanoseconds. + Weight::from_ref_time(24_269_522 as u64) + // Standard Error: 510 + .saturating_add(Weight::from_ref_time(45_360 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -89,9 +92,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_ref_time(21_897_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(162_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_278 nanoseconds. + Weight::from_ref_time(24_319_110 as u64) + // Standard Error: 794 + .saturating_add(Weight::from_ref_time(148_683 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -102,9 +106,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_ref_time(22_747_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_217 nanoseconds. + Weight::from_ref_time(24_958_755 as u64) + // Standard Error: 614 + .saturating_add(Weight::from_ref_time(43_480 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -113,17 +118,21 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_ref_time(8_106_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(9_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 8_205 nanoseconds. + Weight::from_ref_time(8_676_301 as u64) + // Standard Error: 188 + .saturating_add(Weight::from_ref_time(9_933 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. - fn clear_prime(_m: u32, ) -> Weight { - Weight::from_ref_time(4_643_000 as u64) + fn clear_prime(m: u32, ) -> Weight { + // Minimum execution time: 4_596 nanoseconds. + Weight::from_ref_time(4_956_168 as u64) + // Standard Error: 134 + .saturating_add(Weight::from_ref_time(240 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/kusama/src/weights/pallet_multisig.rs b/runtime/kusama/src/weights/pallet_multisig.rs index b034fafcd8cc..adb5cbb2a7e4 100644 --- a/runtime/kusama/src/weights/pallet_multisig.rs +++ b/runtime/kusama/src/weights/pallet_multisig.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -28,11 +28,11 @@ // --steps=50 // --repeat=20 // --pallet=pallet_multisig -// --extrinsic= +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=runtime/kusama/src/weights/ +// --output=./runtime/kusama/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,22 +46,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 14_233 nanoseconds. - Weight::from_ref_time(14_763_390 as u64) + // Minimum execution time: 14_550 nanoseconds. + Weight::from_ref_time(14_819_772 as u64) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(479 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(530 as u64).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 42_837 nanoseconds. - Weight::from_ref_time(34_846_149 as u64) - // Standard Error: 646 - .saturating_add(Weight::from_ref_time(89_482 as u64).saturating_mul(s as u64)) - // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_465 as u64).saturating_mul(z as u64)) + // Minimum execution time: 44_383 nanoseconds. + Weight::from_ref_time(36_132_121 as u64) + // Standard Error: 1_070 + .saturating_add(Weight::from_ref_time(93_918 as u64).saturating_mul(s as u64)) + // Standard Error: 10 + .saturating_add(Weight::from_ref_time(1_528 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,12 +69,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 32_269 nanoseconds. - Weight::from_ref_time(25_447_784 as u64) - // Standard Error: 499 - .saturating_add(Weight::from_ref_time(74_525 as u64).saturating_mul(s as u64)) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_457 as u64).saturating_mul(z as u64)) + // Minimum execution time: 34_110 nanoseconds. + Weight::from_ref_time(26_664_378 as u64) + // Standard Error: 629 + .saturating_add(Weight::from_ref_time(83_644 as u64).saturating_mul(s as u64)) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(1_504 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,12 +83,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 46_096 nanoseconds. - Weight::from_ref_time(37_139_587 as u64) - // Standard Error: 602 - .saturating_add(Weight::from_ref_time(104_199 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_478 as u64).saturating_mul(z as u64)) + // Minimum execution time: 48_372 nanoseconds. + Weight::from_ref_time(38_695_552 as u64) + // Standard Error: 1_125 + .saturating_add(Weight::from_ref_time(106_455 as u64).saturating_mul(s as u64)) + // Standard Error: 11 + .saturating_add(Weight::from_ref_time(1_594 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -96,30 +96,30 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 31_572 nanoseconds. - Weight::from_ref_time(33_475_485 as u64) - // Standard Error: 972 - .saturating_add(Weight::from_ref_time(91_041 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_237 nanoseconds. + Weight::from_ref_time(34_981_368 as u64) + // Standard Error: 1_047 + .saturating_add(Weight::from_ref_time(89_105 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 21_861 nanoseconds. - Weight::from_ref_time(23_986_670 as u64) - // Standard Error: 660 - .saturating_add(Weight::from_ref_time(79_765 as u64).saturating_mul(s as u64)) + // Minimum execution time: 23_708 nanoseconds. + Weight::from_ref_time(25_069_818 as u64) + // Standard Error: 671 + .saturating_add(Weight::from_ref_time(81_787 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 31_375 nanoseconds. - Weight::from_ref_time(33_657_765 as u64) - // Standard Error: 931 - .saturating_add(Weight::from_ref_time(84_177 as u64).saturating_mul(s as u64)) + // Minimum execution time: 33_396 nanoseconds. + Weight::from_ref_time(35_234_152 as u64) + // Standard Error: 918 + .saturating_add(Weight::from_ref_time(88_496 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_nis.rs b/runtime/kusama/src/weights/pallet_nis.rs new file mode 100644 index 000000000000..857b20a14e98 --- /dev/null +++ b/runtime/kusama/src/weights/pallet_nis.rs @@ -0,0 +1,122 @@ +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . +//! Autogenerated weights for `pallet_nis` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=pallet_nis +// --chain=kusama-dev +// --header=./file_header.txt +// --output=./runtime/kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_nis`. +pub struct WeightInfo(PhantomData); +impl pallet_nis::WeightInfo for WeightInfo { + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + /// The range of component `l` is `[0, 999]`. + fn place_bid(l: u32, ) -> Weight { + // Minimum execution time: 31_836 nanoseconds. + Weight::from_ref_time(33_284_190) + // Standard Error: 663 + .saturating_add(Weight::from_ref_time(70_316).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + fn place_bid_max() -> Weight { + // Minimum execution time: 100_161 nanoseconds. + Weight::from_ref_time(102_736_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + /// The range of component `l` is `[1, 1000]`. + fn retract_bid(l: u32, ) -> Weight { + // Minimum execution time: 36_993 nanoseconds. + Weight::from_ref_time(34_181_184) + // Standard Error: 634 + .saturating_add(Weight::from_ref_time(56_251).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Summary (r:1 w:0) + // Storage: System Account (r:1 w:1) + fn fund_deficit() -> Weight { + // Minimum execution time: 40_822 nanoseconds. + Weight::from_ref_time(41_752_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Nis Receipts (r:1 w:1) + // Storage: Nis Summary (r:1 w:1) + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 61_305 nanoseconds. + Weight::from_ref_time(61_909_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: Nis Summary (r:1 w:1) + // Storage: System Account (r:1 w:0) + // Storage: Nis QueueTotals (r:1 w:1) + fn process_queues() -> Weight { + // Minimum execution time: 32_369 nanoseconds. + Weight::from_ref_time(33_715_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + fn process_queue() -> Weight { + // Minimum execution time: 4_065 nanoseconds. + Weight::from_ref_time(4_212_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:0) + // Storage: Nis Receipts (r:0 w:1) + fn process_bid() -> Weight { + // Minimum execution time: 12_606 nanoseconds. + Weight::from_ref_time(12_994_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/kusama/src/weights/pallet_nomination_pools.rs b/runtime/kusama/src/weights/pallet_nomination_pools.rs index 96ebdf4dec37..365606d19ea7 100644 --- a/runtime/kusama/src/weights/pallet_nomination_pools.rs +++ b/runtime/kusama/src/weights/pallet_nomination_pools.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_nomination_pools`. @@ -47,18 +47,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) - // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn join() -> Weight { - Weight::from_ref_time(141_186_000 as u64) + // Minimum execution time: 140_322 nanoseconds. + Weight::from_ref_time(142_148_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -66,13 +67,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_transfer() -> Weight { - Weight::from_ref_time(136_315_000 as u64) + // Minimum execution time: 137_788 nanoseconds. + Weight::from_ref_time(138_966_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -80,13 +82,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:3) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:2 w:2) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_reward() -> Weight { - Weight::from_ref_time(140_720_000 as u64) + // Minimum execution time: 141_513 nanoseconds. + Weight::from_ref_time(143_360_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -95,13 +98,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim_payout() -> Weight { - Weight::from_ref_time(54_588_000 as u64) + // Minimum execution time: 54_447 nanoseconds. + Weight::from_ref_time(54_781_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,49 +114,53 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) // Storage: NominationPools SubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) fn unbond() -> Weight { - Weight::from_ref_time(139_268_000 as u64) + // Minimum execution time: 141_940 nanoseconds. + Weight::from_ref_time(142_725_000 as u64) .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { - Weight::from_ref_time(51_661_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(17_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 57_477 nanoseconds. + Weight::from_ref_time(59_023_071 as u64) + // Standard Error: 998 + .saturating_add(Weight::from_ref_time(14_190 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(92_492_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(28_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 96_669 nanoseconds. + Weight::from_ref_time(98_786_656 as u64) + // Standard Error: 1_856 + .saturating_add(Weight::from_ref_time(19_127 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) @@ -168,25 +177,25 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking Payee (r:0 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - Weight::from_ref_time(146_714_000 as u64) + // Minimum execution time: 144_438 nanoseconds. + Weight::from_ref_time(148_030_307 as u64) .saturating_add(T::DbWeight::get().reads(20 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } + // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: NominationPools MinCreateBond (r:1 w:0) // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools MaxPools (r:1 w:0) // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: NominationPools PoolMembers (r:1 w:1) - // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) // Storage: System Account (r:2 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: NominationPools CounterForRewardPools (r:1 w:1) @@ -195,36 +204,40 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - Weight::from_ref_time(130_529_000 as u64) - .saturating_add(T::DbWeight::get().reads(22 as u64)) + // Minimum execution time: 127_047 nanoseconds. + Weight::from_ref_time(128_199_000 as u64) + .saturating_add(T::DbWeight::get().reads(21 as u64)) .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking MaxNominatorsCount (r:1 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(60_380_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(1_053_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 62_596 nanoseconds. + Weight::from_ref_time(63_891_149 as u64) + // Standard Error: 4_980 + .saturating_add(Weight::from_ref_time(930_710 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) fn set_state() -> Weight { - Weight::from_ref_time(34_144_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Minimum execution time: 38_503 nanoseconds. + Weight::from_ref_time(38_998_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -232,9 +245,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForMetadata (r:1 w:1) /// The range of component `n` is `[1, 256]`. fn set_metadata(n: u32, ) -> Weight { - Weight::from_ref_time(16_813_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 15_627 nanoseconds. + Weight::from_ref_time(16_164_158 as u64) + // Standard Error: 116 + .saturating_add(Weight::from_ref_time(660 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -244,16 +258,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinCreateBond (r:0 w:1) // Storage: NominationPools MaxPools (r:0 w:1) fn set_configs() -> Weight { - Weight::from_ref_time(7_602_000 as u64) + // Minimum execution time: 6_206 nanoseconds. + Weight::from_ref_time(6_409_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - Weight::from_ref_time(25_674_000 as u64) + // Minimum execution time: 25_897 nanoseconds. + Weight::from_ref_time(26_204_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -262,8 +279,9 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(59_990_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 65_020 nanoseconds. + Weight::from_ref_time(65_744_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } } diff --git a/runtime/kusama/src/weights/pallet_preimage.rs b/runtime/kusama/src/weights/pallet_preimage.rs index 2fc3687f4581..bdc5d2480fb5 100644 --- a/runtime/kusama/src/weights/pallet_preimage.rs +++ b/runtime/kusama/src/weights/pallet_preimage.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/kusama/src/weights +// --output=./runtime/kusama/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,9 +48,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(27_993_000 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(2_208 as u64).saturating_mul(s as u64)) + // Minimum execution time: 29_596 nanoseconds. + Weight::from_ref_time(29_955_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_332 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -58,9 +59,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(19_503_000 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(2_264 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_842 nanoseconds. + Weight::from_ref_time(21_120_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_333 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,66 +70,76 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(17_878_000 as u64) - // Standard Error: 2 - .saturating_add(Weight::from_ref_time(2_130 as u64).saturating_mul(s as u64)) + // Minimum execution time: 19_634 nanoseconds. + Weight::from_ref_time(20_007_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_334 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(40_091_000 as u64) + // Minimum execution time: 42_136 nanoseconds. + Weight::from_ref_time(43_022_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(27_459_000 as u64) + // Minimum execution time: 29_924 nanoseconds. + Weight::from_ref_time(30_867_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(27_176_000 as u64) + // Minimum execution time: 28_022 nanoseconds. + Weight::from_ref_time(29_699_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(14_096_000 as u64) + // Minimum execution time: 14_463 nanoseconds. + Weight::from_ref_time(15_790_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(17_365_000 as u64) + // Minimum execution time: 17_932 nanoseconds. + Weight::from_ref_time(18_435_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(8_013_000 as u64) + // Minimum execution time: 8_460 nanoseconds. + Weight::from_ref_time(8_648_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(27_185_000 as u64) + // Minimum execution time: 28_702 nanoseconds. + Weight::from_ref_time(29_678_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(7_955_000 as u64) + // Minimum execution time: 8_322 nanoseconds. + Weight::from_ref_time(8_687_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(7_819_000 as u64) + // Minimum execution time: 8_678 nanoseconds. + Weight::from_ref_time(8_930_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_proxy.rs b/runtime/kusama/src/weights/pallet_proxy.rs index 2ea546eed2fa..5f86d59c8903 100644 --- a/runtime/kusama/src/weights/pallet_proxy.rs +++ b/runtime/kusama/src/weights/pallet_proxy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -47,9 +47,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_ref_time(20_646_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 20_558 nanoseconds. + Weight::from_ref_time(21_610_234 as u64) + // Standard Error: 1_401 + .saturating_add(Weight::from_ref_time(54_214 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -58,11 +59,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(37_132_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(131_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 38_487 nanoseconds. + Weight::from_ref_time(39_434_103 as u64) + // Standard Error: 2_822 + .saturating_add(Weight::from_ref_time(117_580 as u64).saturating_mul(a as u64)) + // Standard Error: 2_915 + .saturating_add(Weight::from_ref_time(26_206 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -71,11 +73,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_277_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(125_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(20_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_384 nanoseconds. + Weight::from_ref_time(27_680_801 as u64) + // Standard Error: 1_625 + .saturating_add(Weight::from_ref_time(116_271 as u64).saturating_mul(a as u64)) + // Standard Error: 1_679 + .saturating_add(Weight::from_ref_time(158 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -83,12 +86,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_199_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(128_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(p as u64)) + fn reject_announcement(a: u32, _p: u32, ) -> Weight { + // Minimum execution time: 26_643 nanoseconds. + Weight::from_ref_time(28_099_236 as u64) + // Standard Error: 2_152 + .saturating_add(Weight::from_ref_time(122_534 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,38 +100,42 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(34_707_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(109_000 as u64).saturating_mul(a as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 34_367 nanoseconds. + Weight::from_ref_time(35_689_576 as u64) + // Standard Error: 1_886 + .saturating_add(Weight::from_ref_time(108_160 as u64).saturating_mul(a as u64)) + // Standard Error: 1_949 + .saturating_add(Weight::from_ref_time(30_216 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_733_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_377 nanoseconds. + Weight::from_ref_time(29_837_875 as u64) + // Standard Error: 1_632 + .saturating_add(Weight::from_ref_time(56_009 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_518_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(83_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_842 nanoseconds. + Weight::from_ref_time(29_978_693 as u64) + // Standard Error: 1_866 + .saturating_add(Weight::from_ref_time(77_845 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_ref_time(24_528_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(58_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 25_443 nanoseconds. + Weight::from_ref_time(26_221_391 as u64) + // Standard Error: 1_420 + .saturating_add(Weight::from_ref_time(41_799 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -137,18 +143,20 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { - Weight::from_ref_time(31_637_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(36_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 32_184 nanoseconds. + Weight::from_ref_time(33_287_258 as u64) + // Standard Error: 1_669 + .saturating_add(Weight::from_ref_time(16_625 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_ref_time(26_228_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_186 nanoseconds. + Weight::from_ref_time(27_561_767 as u64) + // Standard Error: 1_567 + .saturating_add(Weight::from_ref_time(35_395 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_ranked_collective.rs b/runtime/kusama/src/weights/pallet_ranked_collective.rs index 33b62a7db764..d84db79ceec1 100644 --- a/runtime/kusama/src/weights/pallet_ranked_collective.rs +++ b/runtime/kusama/src/weights/pallet_ranked_collective.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_ranked_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_ranked_collective // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_ranked_collective -// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -39,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_ranked_collective`. @@ -50,7 +49,8 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective IndexToId (r:0 w:1) // Storage: FellowshipCollective IdToIndex (r:0 w:1) fn add_member() -> Weight { - Weight::from_ref_time(20_797_000 as u64) + // Minimum execution time: 20_091 nanoseconds. + Weight::from_ref_time(20_793_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -60,9 +60,10 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective IndexToId (r:1 w:1) /// The range of component `r` is `[0, 10]`. fn remove_member(r: u32, ) -> Weight { - Weight::from_ref_time(30_196_000 as u64) - // Standard Error: 10_539 - .saturating_add(Weight::from_ref_time(9_633_382 as u64).saturating_mul(r as u64)) + // Minimum execution time: 31_411 nanoseconds. + Weight::from_ref_time(33_650_900 as u64) + // Standard Error: 20_315 + .saturating_add(Weight::from_ref_time(9_742_136 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -74,9 +75,10 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective IdToIndex (r:0 w:1) /// The range of component `r` is `[0, 10]`. fn promote_member(r: u32, ) -> Weight { - Weight::from_ref_time(21_958_000 as u64) - // Standard Error: 3_398 - .saturating_add(Weight::from_ref_time(527_087 as u64).saturating_mul(r as u64)) + // Minimum execution time: 22_519 nanoseconds. + Weight::from_ref_time(24_202_495 as u64) + // Standard Error: 9_707 + .saturating_add(Weight::from_ref_time(404_053 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -86,9 +88,10 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective IndexToId (r:1 w:1) /// The range of component `r` is `[0, 10]`. fn demote_member(r: u32, ) -> Weight { - Weight::from_ref_time(29_934_000 as u64) - // Standard Error: 11_453 - .saturating_add(Weight::from_ref_time(884_044 as u64).saturating_mul(r as u64)) + // Minimum execution time: 30_958 nanoseconds. + Weight::from_ref_time(34_019_871 as u64) + // Standard Error: 15_923 + .saturating_add(Weight::from_ref_time(594_745 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -97,20 +100,21 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective Voting (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn vote() -> Weight { - Weight::from_ref_time(45_989_000 as u64) + // Minimum execution time: 46_000 nanoseconds. + Weight::from_ref_time(46_496_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:0) // Storage: FellowshipCollective VotingCleanup (r:1 w:0) - // Storage: FellowshipCollective Voting (r:0 w:1) - /// The range of component `n` is `[1, 100]`. + // Storage: FellowshipCollective Voting (r:0 w:2) + /// The range of component `n` is `[0, 100]`. fn cleanup_poll(n: u32, ) -> Weight { - Weight::from_ref_time(17_842_000 as u64) - // Standard Error: 733 - .saturating_add(Weight::from_ref_time(892_322 as u64).saturating_mul(n as u64)) + // Minimum execution time: 14_684 nanoseconds. + Weight::from_ref_time(18_793_742 as u64) + // Standard Error: 1_475 + .saturating_add(Weight::from_ref_time(908_456 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64))) } } diff --git a/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs b/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs index ca52d8044bbf..e9e8f8797a50 100644 --- a/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs +++ b/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_referenda // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_referenda -// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -50,14 +49,16 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: FellowshipReferenda ReferendumInfoFor (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(32_438_000 as u64) + // Minimum execution time: 32_206 nanoseconds. + Weight::from_ref_time(32_784_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn place_decision_deposit_preparing() -> Weight { - Weight::from_ref_time(48_476_000 as u64) + // Minimum execution time: 48_362 nanoseconds. + Weight::from_ref_time(48_952_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -65,7 +66,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipReferenda DecidingCount (r:1 w:0) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) fn place_decision_deposit_queued() -> Weight { - Weight::from_ref_time(94_751_000 as u64) + // Minimum execution time: 85_674 nanoseconds. + Weight::from_ref_time(88_734_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,7 +75,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipReferenda DecidingCount (r:1 w:0) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) fn place_decision_deposit_not_queued() -> Weight { - Weight::from_ref_time(94_975_000 as u64) + // Minimum execution time: 85_794 nanoseconds. + Weight::from_ref_time(88_404_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -82,7 +85,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:2 w:2) fn place_decision_deposit_passing() -> Weight { - Weight::from_ref_time(194_931_000 as u64) + // Minimum execution time: 175_254 nanoseconds. + Weight::from_ref_time(198_703_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,34 +94,46 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipReferenda DecidingCount (r:1 w:1) // Storage: FellowshipCollective MemberCount (r:1 w:0) fn place_decision_deposit_failing() -> Weight { - Weight::from_ref_time(42_888_000 as u64) + // Minimum execution time: 43_797 nanoseconds. + Weight::from_ref_time(44_532_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) fn refund_decision_deposit() -> Weight { - Weight::from_ref_time(30_949_000 as u64) + // Minimum execution time: 31_289 nanoseconds. + Weight::from_ref_time(32_447_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Referenda ReferendumInfoFor (r:1 w:1) + fn refund_submission_deposit() -> Weight { + // Minimum execution time: 25_000 nanoseconds. + Weight::from_ref_time(25_000_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn cancel() -> Weight { - Weight::from_ref_time(38_960_000 as u64) + // Minimum execution time: 38_398 nanoseconds. + Weight::from_ref_time(38_965_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn kill() -> Weight { - Weight::from_ref_time(67_836_000 as u64) + // Minimum execution time: 68_236 nanoseconds. + Weight::from_ref_time(69_049_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: FellowshipReferenda TrackQueue (r:1 w:0) // Storage: FellowshipReferenda DecidingCount (r:1 w:1) fn one_fewer_deciding_queue_empty() -> Weight { - Weight::from_ref_time(11_204_000 as u64) + // Minimum execution time: 11_448 nanoseconds. + Weight::from_ref_time(11_631_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -126,7 +142,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:2 w:2) fn one_fewer_deciding_failing() -> Weight { - Weight::from_ref_time(224_465_000 as u64) + // Minimum execution time: 118_312 nanoseconds. + Weight::from_ref_time(122_145_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -135,61 +152,69 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:2 w:2) fn one_fewer_deciding_passing() -> Weight { - Weight::from_ref_time(224_764_000 as u64) + // Minimum execution time: 120_150 nanoseconds. + Weight::from_ref_time(122_398_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_requeued_insertion() -> Weight { - Weight::from_ref_time(91_727_000 as u64) + // Minimum execution time: 84_906 nanoseconds. + Weight::from_ref_time(89_371_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_requeued_slide() -> Weight { - Weight::from_ref_time(91_868_000 as u64) + // Minimum execution time: 85_598 nanoseconds. + Weight::from_ref_time(88_356_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipReferenda DecidingCount (r:1 w:0) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_queued() -> Weight { - Weight::from_ref_time(94_520_000 as u64) + // Minimum execution time: 89_197 nanoseconds. + Weight::from_ref_time(92_027_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipReferenda DecidingCount (r:1 w:0) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_not_queued() -> Weight { - Weight::from_ref_time(93_483_000 as u64) + // Minimum execution time: 87_844 nanoseconds. + Weight::from_ref_time(90_542_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_no_deposit() -> Weight { - Weight::from_ref_time(29_294_000 as u64) + // Minimum execution time: 29_265 nanoseconds. + Weight::from_ref_time(29_798_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_preparing() -> Weight { - Weight::from_ref_time(30_363_000 as u64) + // Minimum execution time: 30_675 nanoseconds. + Weight::from_ref_time(31_170_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) fn nudge_referendum_timed_out() -> Weight { - Weight::from_ref_time(22_703_000 as u64) + // Minimum execution time: 22_609 nanoseconds. + Weight::from_ref_time(23_111_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -198,7 +223,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_deciding_failing() -> Weight { - Weight::from_ref_time(40_760_000 as u64) + // Minimum execution time: 41_801 nanoseconds. + Weight::from_ref_time(42_472_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -207,7 +233,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_deciding_passing() -> Weight { - Weight::from_ref_time(91_300_000 as u64) + // Minimum execution time: 87_514 nanoseconds. + Weight::from_ref_time(90_499_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -215,7 +242,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_confirming() -> Weight { - Weight::from_ref_time(165_577_000 as u64) + // Minimum execution time: 162_441 nanoseconds. + Weight::from_ref_time(168_308_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -223,7 +251,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_end_confirming() -> Weight { - Weight::from_ref_time(166_188_000 as u64) + // Minimum execution time: 160_873 nanoseconds. + Weight::from_ref_time(169_712_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -231,7 +260,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_continue_not_confirming() -> Weight { - Weight::from_ref_time(159_324_000 as u64) + // Minimum execution time: 153_124 nanoseconds. + Weight::from_ref_time(165_777_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -239,7 +269,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_continue_confirming() -> Weight { - Weight::from_ref_time(82_615_000 as u64) + // Minimum execution time: 80_850 nanoseconds. + Weight::from_ref_time(84_958_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -247,17 +278,18 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) fn nudge_referendum_approved() -> Weight { - Weight::from_ref_time(185_354_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 173_234 nanoseconds. + Weight::from_ref_time(182_819_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipCollective MemberCount (r:1 w:0) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_rejected() -> Weight { - Weight::from_ref_time(165_963_000 as u64) + // Minimum execution time: 164_370 nanoseconds. + Weight::from_ref_time(169_732_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_referenda_referenda.rs b/runtime/kusama/src/weights/pallet_referenda_referenda.rs index 8d8fc6ecbd61..f389a91d98bd 100644 --- a/runtime/kusama/src/weights/pallet_referenda_referenda.rs +++ b/runtime/kusama/src/weights/pallet_referenda_referenda.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=kusama-dev // --steps=50 // --repeat=20 +// --pallet=pallet_referenda // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_referenda -// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -49,14 +48,16 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Referenda ReferendumInfoFor (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(37_366_000 as u64) + // Minimum execution time: 36_890 nanoseconds. + Weight::from_ref_time(37_840_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn place_decision_deposit_preparing() -> Weight { - Weight::from_ref_time(47_931_000 as u64) + // Minimum execution time: 47_353 nanoseconds. + Weight::from_ref_time(48_691_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -64,7 +65,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda DecidingCount (r:1 w:0) // Storage: Referenda TrackQueue (r:1 w:1) fn place_decision_deposit_queued() -> Weight { - Weight::from_ref_time(48_799_000 as u64) + // Minimum execution time: 49_607 nanoseconds. + Weight::from_ref_time(50_436_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -72,7 +74,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda DecidingCount (r:1 w:0) // Storage: Referenda TrackQueue (r:1 w:1) fn place_decision_deposit_not_queued() -> Weight { - Weight::from_ref_time(48_899_000 as u64) + // Minimum execution time: 49_359 nanoseconds. + Weight::from_ref_time(50_238_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -80,41 +83,54 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda DecidingCount (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn place_decision_deposit_passing() -> Weight { - Weight::from_ref_time(61_981_000 as u64) + // Minimum execution time: 61_393 nanoseconds. + Weight::from_ref_time(62_632_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda DecidingCount (r:1 w:1) fn place_decision_deposit_failing() -> Weight { - Weight::from_ref_time(42_318_000 as u64) + // Minimum execution time: 43_290 nanoseconds. + Weight::from_ref_time(43_959_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) fn refund_decision_deposit() -> Weight { - Weight::from_ref_time(30_391_000 as u64) + // Minimum execution time: 30_398 nanoseconds. + Weight::from_ref_time(31_447_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) + fn refund_submission_deposit() -> Weight { + // Minimum execution time: 25_000 nanoseconds. + Weight::from_ref_time(25_000_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn cancel() -> Weight { - Weight::from_ref_time(38_601_000 as u64) + // Minimum execution time: 37_690 nanoseconds. + Weight::from_ref_time(38_864_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn kill() -> Weight { - Weight::from_ref_time(78_111_000 as u64) + // Minimum execution time: 77_496 nanoseconds. + Weight::from_ref_time(79_978_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Referenda TrackQueue (r:1 w:0) // Storage: Referenda DecidingCount (r:1 w:1) fn one_fewer_deciding_queue_empty() -> Weight { - Weight::from_ref_time(11_132_000 as u64) + // Minimum execution time: 11_238 nanoseconds. + Weight::from_ref_time(11_723_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -122,7 +138,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn one_fewer_deciding_failing() -> Weight { - Weight::from_ref_time(161_624_000 as u64) + // Minimum execution time: 75_823 nanoseconds. + Weight::from_ref_time(77_497_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -130,61 +147,69 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn one_fewer_deciding_passing() -> Weight { - Weight::from_ref_time(167_193_000 as u64) + // Minimum execution time: 78_698 nanoseconds. + Weight::from_ref_time(79_660_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_requeued_insertion() -> Weight { - Weight::from_ref_time(44_257_000 as u64) + // Minimum execution time: 53_145 nanoseconds. + Weight::from_ref_time(54_297_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_requeued_slide() -> Weight { - Weight::from_ref_time(43_981_000 as u64) + // Minimum execution time: 52_893 nanoseconds. + Weight::from_ref_time(53_670_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda DecidingCount (r:1 w:0) // Storage: Referenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_queued() -> Weight { - Weight::from_ref_time(45_931_000 as u64) + // Minimum execution time: 55_017 nanoseconds. + Weight::from_ref_time(55_775_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda DecidingCount (r:1 w:0) // Storage: Referenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + // Storage: Scheduler Agenda (r:1 w:0) fn nudge_referendum_not_queued() -> Weight { - Weight::from_ref_time(45_854_000 as u64) + // Minimum execution time: 55_068 nanoseconds. + Weight::from_ref_time(55_545_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_no_deposit() -> Weight { - Weight::from_ref_time(28_641_000 as u64) + // Minimum execution time: 28_613 nanoseconds. + Weight::from_ref_time(29_017_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_preparing() -> Weight { - Weight::from_ref_time(29_629_000 as u64) + // Minimum execution time: 30_008 nanoseconds. + Weight::from_ref_time(30_928_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) fn nudge_referendum_timed_out() -> Weight { - Weight::from_ref_time(21_852_000 as u64) + // Minimum execution time: 21_985 nanoseconds. + Weight::from_ref_time(22_654_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -192,7 +217,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda DecidingCount (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_deciding_failing() -> Weight { - Weight::from_ref_time(41_478_000 as u64) + // Minimum execution time: 41_155 nanoseconds. + Weight::from_ref_time(42_540_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -200,51 +226,57 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Referenda DecidingCount (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_deciding_passing() -> Weight { - Weight::from_ref_time(44_198_000 as u64) + // Minimum execution time: 43_525 nanoseconds. + Weight::from_ref_time(44_193_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_begin_confirming() -> Weight { - Weight::from_ref_time(38_978_000 as u64) + // Minimum execution time: 39_208 nanoseconds. + Weight::from_ref_time(40_097_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_end_confirming() -> Weight { - Weight::from_ref_time(40_123_000 as u64) + // Minimum execution time: 40_627 nanoseconds. + Weight::from_ref_time(42_055_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_continue_not_confirming() -> Weight { - Weight::from_ref_time(36_868_000 as u64) + // Minimum execution time: 37_450 nanoseconds. + Weight::from_ref_time(38_157_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_continue_confirming() -> Weight { - Weight::from_ref_time(36_835_000 as u64) + // Minimum execution time: 37_800 nanoseconds. + Weight::from_ref_time(38_601_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) fn nudge_referendum_approved() -> Weight { - Weight::from_ref_time(56_130_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 49_125 nanoseconds. + Weight::from_ref_time(50_262_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_rejected() -> Weight { - Weight::from_ref_time(38_997_000 as u64) + // Minimum execution time: 39_656 nanoseconds. + Weight::from_ref_time(40_908_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_scheduler.rs b/runtime/kusama/src/weights/pallet_scheduler.rs index c6df2801dd69..dc7fe054f202 100644 --- a/runtime/kusama/src/weights/pallet_scheduler.rs +++ b/runtime/kusama/src/weights/pallet_scheduler.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/kusama/src/weights +// --output=./runtime/kusama/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,52 +46,61 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_558_000 as u64) + // Minimum execution time: 5_067 nanoseconds. + Weight::from_ref_time(5_193_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(3_715_000 as u64) - // Standard Error: 2_737 - .saturating_add(Weight::from_ref_time(624_353 as u64).saturating_mul(s as u64)) + // Minimum execution time: 4_288 nanoseconds. + Weight::from_ref_time(7_652_085 as u64) + // Standard Error: 1_878 + .saturating_add(Weight::from_ref_time(548_847 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - Weight::from_ref_time(9_345_000 as u64) + // Minimum execution time: 9_861 nanoseconds. + Weight::from_ref_time(10_063_000 as u64) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(20_078_000 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_153 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_134 nanoseconds. + Weight::from_ref_time(21_368_000 as u64) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(1_280 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Scheduler Lookup (r:0 w:1) fn service_task_named() -> Weight { - Weight::from_ref_time(10_744_000 as u64) + // Minimum execution time: 11_292 nanoseconds. + Weight::from_ref_time(11_567_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_periodic() -> Weight { - Weight::from_ref_time(9_556_000 as u64) + // Minimum execution time: 9_974 nanoseconds. + Weight::from_ref_time(10_162_000 as u64) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(4_130_000 as u64) + // Minimum execution time: 4_164 nanoseconds. + Weight::from_ref_time(4_266_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_058_000 as u64) + // Minimum execution time: 4_020 nanoseconds. + Weight::from_ref_time(4_116_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(16_721_000 as u64) - // Standard Error: 3_319 - .saturating_add(Weight::from_ref_time(657_802 as u64).saturating_mul(s as u64)) + // Minimum execution time: 18_088 nanoseconds. + Weight::from_ref_time(21_737_123 as u64) + // Standard Error: 2_364 + .saturating_add(Weight::from_ref_time(580_581 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -99,9 +108,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(19_496_000 as u64) - // Standard Error: 1_368 - .saturating_add(Weight::from_ref_time(572_226 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_197 nanoseconds. + Weight::from_ref_time(21_901_362 as u64) + // Standard Error: 1_994 + .saturating_add(Weight::from_ref_time(571_379 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -109,9 +119,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(19_831_000 as u64) - // Standard Error: 3_559 - .saturating_add(Weight::from_ref_time(689_493 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_694 nanoseconds. + Weight::from_ref_time(25_027_021 as u64) + // Standard Error: 2_967 + .saturating_add(Weight::from_ref_time(599_640 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -119,9 +130,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(20_788_000 as u64) - // Standard Error: 1_758 - .saturating_add(Weight::from_ref_time(605_808 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_231 nanoseconds. + Weight::from_ref_time(23_895_092 as u64) + // Standard Error: 2_733 + .saturating_add(Weight::from_ref_time(581_286 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_session.rs b/runtime/kusama/src/weights/pallet_session.rs index b07d6a7444e2..5e376a70cff5 100644 --- a/runtime/kusama/src/weights/pallet_session.rs +++ b/runtime/kusama/src/weights/pallet_session.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -48,7 +48,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - Weight::from_ref_time(51_955_000 as u64) + // Minimum execution time: 51_779 nanoseconds. + Weight::from_ref_time(53_571_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -56,7 +57,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - Weight::from_ref_time(38_814_000 as u64) + // Minimum execution time: 39_411 nanoseconds. + Weight::from_ref_time(40_698_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_staking.rs b/runtime/kusama/src/weights/pallet_staking.rs index 53cb5d10c4b1..cdaa6e100ffc 100644 --- a/runtime/kusama/src/weights/pallet_staking.rs +++ b/runtime/kusama/src/weights/pallet_staking.rs @@ -16,21 +16,23 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// /home/benchbot/cargo_target_dir/production/polkadot // benchmark // pallet -// --chain=kusama-dev // --steps=50 // --repeat=20 -// --pallet=pallet_staking // --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=pallet_staking +// --chain=kusama-dev // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ @@ -38,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_staking`. @@ -47,13 +49,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - Weight::from_ref_time(46_005_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Minimum execution time: 46_498 nanoseconds. + Weight::from_ref_time(47_017_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -61,9 +63,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - Weight::from_ref_time(79_816_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Minimum execution time: 83_337 nanoseconds. + Weight::from_ref_time(84_125_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -75,9 +78,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - Weight::from_ref_time(84_908_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 89_555 nanoseconds. + Weight::from_ref_time(90_189_000) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -85,11 +89,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(39_533_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 39_859 nanoseconds. + Weight::from_ref_time(41_164_480) + // Standard Error: 870 + .saturating_add(Weight::from_ref_time(22_362).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -104,11 +109,16 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - Weight::from_ref_time(74_544_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + // Minimum execution time: 78_182 nanoseconds. + Weight::from_ref_time(82_653_282) + // Standard Error: 2_211 + .saturating_add(Weight::from_ref_time(919_603).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -122,20 +132,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - Weight::from_ref_time(57_525_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 60_801 nanoseconds. + Weight::from_ref_time(61_461_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - Weight::from_ref_time(29_911_000 as u64) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(6_821_000 as u64).saturating_mul(k as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(k as u64))) + // Minimum execution time: 34_706 nanoseconds. + Weight::from_ref_time(30_155_201) + // Standard Error: 9_801 + .saturating_add(Weight::from_ref_time(6_812_249).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -150,12 +162,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 24]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(59_437_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(2_490_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 63_815 nanoseconds. + Weight::from_ref_time(62_277_624) + // Standard Error: 8_020 + .saturating_add(Weight::from_ref_time(2_558_933).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -165,51 +178,59 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(56_100_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 59_765 nanoseconds. + Weight::from_ref_time(60_359_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - Weight::from_ref_time(15_258_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 15_948 nanoseconds. + Weight::from_ref_time(16_331_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(21_938_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 22_707 nanoseconds. + Weight::from_ref_time(23_051_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - Weight::from_ref_time(4_071_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_236 nanoseconds. + Weight::from_ref_time(4_468_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - Weight::from_ref_time(4_152_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_264 nanoseconds. + Weight::from_ref_time(4_397_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - Weight::from_ref_time(4_318_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_334 nanoseconds. + Weight::from_ref_time(4_478_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - Weight::from_ref_time(4_106_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_429 nanoseconds. + Weight::from_ref_time(4_522_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - Weight::from_ref_time(4_502_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_573 nanoseconds. + Weight::from_ref_time(4_979_271) + // Standard Error: 29 + .saturating_add(Weight::from_ref_time(10_199).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -226,62 +247,64 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - Weight::from_ref_time(71_669_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(883_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 71_604 nanoseconds. + Weight::from_ref_time(76_356_335) + // Standard Error: 2_128 + .saturating_add(Weight::from_ref_time(924_544).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - Weight::from_ref_time(930_179_000 as u64) - // Standard Error: 57_000 - .saturating_add(Weight::from_ref_time(4_953_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 111_696 nanoseconds. + Weight::from_ref_time(919_128_155) + // Standard Error: 58_383 + .saturating_add(Weight::from_ref_time(4_917_235).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - /// The range of component `n` is `[1, 256]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `n` is `[0, 512]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - Weight::from_ref_time(150_647_000 as u64) - // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(20_795_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64))) + // Minimum execution time: 110_470 nanoseconds. + Weight::from_ref_time(214_513_056) + // Standard Error: 17_132 + .saturating_add(Weight::from_ref_time(21_681_392).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:2) + // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Balances Locks (r:2 w:2) - /// The range of component `n` is `[1, 256]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + /// The range of component `n` is `[0, 512]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - Weight::from_ref_time(177_911_000 as u64) - // Standard Error: 30_000 - .saturating_add(Weight::from_ref_time(28_200_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(n as u64))) + // Minimum execution time: 127_623 nanoseconds. + Weight::from_ref_time(71_193_329) + // Standard Error: 104_006 + .saturating_add(Weight::from_ref_time(31_734_017).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -291,11 +314,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - Weight::from_ref_time(80_037_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(24_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 81_989 nanoseconds. + Weight::from_ref_time(84_089_774) + // Standard Error: 3_862 + .saturating_add(Weight::from_ref_time(34_551).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -312,16 +336,16 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - Weight::from_ref_time(78_855_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(869_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 81_744 nanoseconds. + Weight::from_ref_time(83_697_917) + // Standard Error: 2_378 + .saturating_add(Weight::from_ref_time(928_791).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: VoterList ListBags (r:183 w:0) + // Storage: VoterList ListBags (r:166 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) // Storage: Staking Validators (r:2 w:0) @@ -332,62 +356,62 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ValidatorCount (r:1 w:0) // Storage: Staking MinimumValidatorCount (r:1 w:0) // Storage: Staking CurrentEra (r:1 w:1) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasStakersClipped (r:0 w:1) // Storage: Staking ErasValidatorPrefs (r:0 w:1) // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[1, 10]`. - /// The range of component `n` is `[1, 100]`. + /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 579_000 - .saturating_add(Weight::from_ref_time(161_445_000 as u64).saturating_mul(v as u64)) - // Standard Error: 55_000 - .saturating_add(Weight::from_ref_time(22_905_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(192 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Minimum execution time: 426_726 nanoseconds. + Weight::from_ref_time(427_956_000) + // Standard Error: 1_694_488 + .saturating_add(Weight::from_ref_time(55_297_221).saturating_mul(v.into())) + // Standard Error: 168_846 + .saturating_add(Weight::from_ref_time(12_858_483).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(173)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:21 w:0) - // Storage: VoterList ListBags (r:183 w:0) + // Storage: VoterList ListBags (r:166 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) // Storage: Staking Validators (r:500 w:0) // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. - /// The range of component `s` is `[1, 20]`. - fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 375_000 - .saturating_add(Weight::from_ref_time(41_603_000 as u64).saturating_mul(v as u64)) - // Standard Error: 375_000 - .saturating_add(Weight::from_ref_time(38_528_000 as u64).saturating_mul(n as u64)) - // Standard Error: 9_578_000 - .saturating_add(Weight::from_ref_time(41_537_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(186 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Minimum execution time: 25_092_560 nanoseconds. + Weight::from_ref_time(25_487_312_000) + // Standard Error: 547_909 + .saturating_add(Weight::from_ref_time(4_859_299).saturating_mul(v.into())) + // Standard Error: 547_909 + .saturating_add(Weight::from_ref_time(4_082_635).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(168)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) } + // Storage: Staking CounterForValidators (r:1 w:0) // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - Weight::from_ref_time(310_326_000 as u64) - // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(6_164_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 3_516_893 nanoseconds. + Weight::from_ref_time(139_483_001) + // Standard Error: 43_749 + .saturating_add(Weight::from_ref_time(7_181_910).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -396,8 +420,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - Weight::from_ref_time(7_502_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 7_596 nanoseconds. + Weight::from_ref_time(7_960_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -406,8 +431,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - Weight::from_ref_time(6_757_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 7_041 nanoseconds. + Weight::from_ref_time(7_258_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -420,15 +446,23 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - Weight::from_ref_time(66_406_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 69_602 nanoseconds. + Weight::from_ref_time(71_173_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - Weight::from_ref_time(14_744_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 15_488 nanoseconds. + Weight::from_ref_time(15_690_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Staking MinCommission (r:0 w:1) + fn set_min_commission() -> Weight { + // Minimum execution time: 4_360 nanoseconds. + Weight::from_ref_time(4_617_000) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/kusama/src/weights/pallet_timestamp.rs b/runtime/kusama/src/weights/pallet_timestamp.rs index 9ae6e72e02f8..57d4f7621be0 100644 --- a/runtime/kusama/src/weights/pallet_timestamp.rs +++ b/runtime/kusama/src/weights/pallet_timestamp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -47,11 +47,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - Weight::from_ref_time(9_144_000 as u64) + // Minimum execution time: 9_352 nanoseconds. + Weight::from_ref_time(9_715_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(3_852_000 as u64) + // Minimum execution time: 4_512 nanoseconds. + Weight::from_ref_time(4_623_000 as u64) } } diff --git a/runtime/kusama/src/weights/pallet_tips.rs b/runtime/kusama/src/weights/pallet_tips.rs index dc6f02b1d9b1..66ddaf41b3c0 100644 --- a/runtime/kusama/src/weights/pallet_tips.rs +++ b/runtime/kusama/src/weights/pallet_tips.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_tips`. @@ -48,16 +48,18 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `r` is `[0, 16384]`. fn report_awesome(r: u32, ) -> Weight { - Weight::from_ref_time(29_461_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 29_607 nanoseconds. + Weight::from_ref_time(31_236_013 as u64) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(1_831 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) fn retract_tip() -> Weight { - Weight::from_ref_time(28_620_000 as u64) + // Minimum execution time: 29_400 nanoseconds. + Weight::from_ref_time(29_797_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -67,11 +69,12 @@ impl pallet_tips::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 16384]`. /// The range of component `t` is `[1, 19]`. fn tip_new(r: u32, t: u32, ) -> Weight { - Weight::from_ref_time(19_451_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(189_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 23_060 nanoseconds. + Weight::from_ref_time(21_778_664 as u64) + // Standard Error: 7 + .saturating_add(Weight::from_ref_time(1_682 as u64).saturating_mul(r as u64)) + // Standard Error: 6_497 + .saturating_add(Weight::from_ref_time(164_476 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,9 +82,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `t` is `[1, 19]`. fn tip(t: u32, ) -> Weight { - Weight::from_ref_time(14_423_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(164_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 14_816 nanoseconds. + Weight::from_ref_time(15_348_469 as u64) + // Standard Error: 1_621 + .saturating_add(Weight::from_ref_time(135_014 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -91,9 +95,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 19]`. fn close_tip(t: u32, ) -> Weight { - Weight::from_ref_time(45_535_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(158_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 45_047 nanoseconds. + Weight::from_ref_time(47_082_126 as u64) + // Standard Error: 4_737 + .saturating_add(Weight::from_ref_time(100_518 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +106,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 19]`. fn slash_tip(t: u32, ) -> Weight { - Weight::from_ref_time(19_074_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(32_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 19_055 nanoseconds. + Weight::from_ref_time(19_857_862 as u64) + // Standard Error: 1_113 + .saturating_add(Weight::from_ref_time(34_263 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_treasury.rs b/runtime/kusama/src/weights/pallet_treasury.rs index ac10deacaa8b..7bdfe2064462 100644 --- a/runtime/kusama/src/weights/pallet_treasury.rs +++ b/runtime/kusama/src/weights/pallet_treasury.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,26 +38,34 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { + // Storage: Treasury ProposalCount (r:1 w:1) + // Storage: Treasury Approvals (r:1 w:1) + // Storage: Treasury Proposals (r:0 w:1) fn spend() -> Weight { - Weight::from_ref_time(131_000 as u64) + // Minimum execution time: 18_856 nanoseconds. + Weight::from_ref_time(19_144_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - Weight::from_ref_time(25_664_000 as u64) + // Minimum execution time: 27_164 nanoseconds. + Weight::from_ref_time(27_790_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - Weight::from_ref_time(36_678_000 as u64) + // Minimum execution time: 38_257 nanoseconds. + Weight::from_ref_time(38_930_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,15 +73,17 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(12_868_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(52_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 9_729 nanoseconds. + Weight::from_ref_time(13_242_610 as u64) + // Standard Error: 1_133 + .saturating_add(Weight::from_ref_time(48_014 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - Weight::from_ref_time(7_810_000 as u64) + // Minimum execution time: 8_151 nanoseconds. + Weight::from_ref_time(8_355_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,9 +93,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Proposals (r:2 w:2) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(57_241_000 as u64) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(24_874_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 50_854 nanoseconds. + Weight::from_ref_time(63_148_952 as u64) + // Standard Error: 23_228 + .saturating_add(Weight::from_ref_time(24_411_714 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/kusama/src/weights/pallet_utility.rs b/runtime/kusama/src/weights/pallet_utility.rs index 8eaa6258faa3..16d0d87b4b4e 100644 --- a/runtime/kusama/src/weights/pallet_utility.rs +++ b/runtime/kusama/src/weights/pallet_utility.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -46,26 +46,31 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(29_094_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_803_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_629 nanoseconds. + Weight::from_ref_time(15_201_709 as u64) + // Standard Error: 2_617 + .saturating_add(Weight::from_ref_time(3_430_759 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - Weight::from_ref_time(5_660_000 as u64) + // Minimum execution time: 5_876 nanoseconds. + Weight::from_ref_time(5_994_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(17_216_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(3_979_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_541 nanoseconds. + Weight::from_ref_time(18_710_023 as u64) + // Standard Error: 2_936 + .saturating_add(Weight::from_ref_time(3_591_842 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(13_181_000 as u64) + // Minimum execution time: 13_664 nanoseconds. + Weight::from_ref_time(14_022_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(19_722_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_795_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_520 nanoseconds. + Weight::from_ref_time(16_718_610 as u64) + // Standard Error: 3_003 + .saturating_add(Weight::from_ref_time(3_455_686 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index a570fa7b4b99..6288e07a5db0 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_vesting`. @@ -49,11 +49,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_421_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(103_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_642 nanoseconds. + Weight::from_ref_time(38_226_745 as u64) + // Standard Error: 1_085 + .saturating_add(Weight::from_ref_time(37_262 as u64).saturating_mul(l as u64)) + // Standard Error: 1_931 + .saturating_add(Weight::from_ref_time(61_339 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,11 +63,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_493_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(70_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_010 nanoseconds. + Weight::from_ref_time(37_870_524 as u64) + // Standard Error: 1_888 + .saturating_add(Weight::from_ref_time(47_214 as u64).saturating_mul(l as u64)) + // Standard Error: 3_359 + .saturating_add(Weight::from_ref_time(38_374 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -76,11 +78,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(37_644_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(l as u64)) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(74_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_389 nanoseconds. + Weight::from_ref_time(37_550_733 as u64) + // Standard Error: 1_060 + .saturating_add(Weight::from_ref_time(49_011 as u64).saturating_mul(l as u64)) + // Standard Error: 1_886 + .saturating_add(Weight::from_ref_time(62_179 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -90,11 +93,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(34_945_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_686 nanoseconds. + Weight::from_ref_time(37_792_534 as u64) + // Standard Error: 1_624 + .saturating_add(Weight::from_ref_time(38_716 as u64).saturating_mul(l as u64)) + // Standard Error: 2_889 + .saturating_add(Weight::from_ref_time(33_810 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -104,11 +108,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(50_024_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(50_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(63_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 52_356 nanoseconds. + Weight::from_ref_time(53_053_813 as u64) + // Standard Error: 1_679 + .saturating_add(Weight::from_ref_time(37_518 as u64).saturating_mul(l as u64)) + // Standard Error: 2_987 + .saturating_add(Weight::from_ref_time(18_617 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -118,11 +123,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(49_452_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(41_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(79_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 51_625 nanoseconds. + Weight::from_ref_time(51_648_113 as u64) + // Standard Error: 1_712 + .saturating_add(Weight::from_ref_time(43_998 as u64).saturating_mul(l as u64)) + // Standard Error: 3_047 + .saturating_add(Weight::from_ref_time(42_370 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -132,11 +138,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(36_353_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(51_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(104_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_592 nanoseconds. + Weight::from_ref_time(38_624_597 as u64) + // Standard Error: 922 + .saturating_add(Weight::from_ref_time(45_973 as u64).saturating_mul(l as u64)) + // Standard Error: 1_704 + .saturating_add(Weight::from_ref_time(69_427 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -146,11 +153,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_921_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(58_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_606 nanoseconds. + Weight::from_ref_time(38_893_122 as u64) + // Standard Error: 1_158 + .saturating_add(Weight::from_ref_time(44_023 as u64).saturating_mul(l as u64)) + // Standard Error: 2_139 + .saturating_add(Weight::from_ref_time(60_243 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/kusama/src/weights/pallet_whitelist.rs b/runtime/kusama/src/weights/pallet_whitelist.rs index 5e7dcf8f75b3..401ffb48f4d2 100644 --- a/runtime/kusama/src/weights/pallet_whitelist.rs +++ b/runtime/kusama/src/weights/pallet_whitelist.rs @@ -63,7 +63,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Storage: Whitelist WhitelistedCall (r:1 w:1) // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) - fn dispatch_whitelisted_call() -> Weight { + // TODO regenerate + fn dispatch_whitelisted_call(_n: u32) -> Weight { Weight::from_ref_time(7_327_364_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/kusama/src/weights/runtime_common_auctions.rs b/runtime/kusama/src/weights/runtime_common_auctions.rs index 368665cb91a7..bb9a9a008d01 100644 --- a/runtime/kusama/src/weights/runtime_common_auctions.rs +++ b/runtime/kusama/src/weights/runtime_common_auctions.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::auctions`. @@ -47,7 +47,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - Weight::from_ref_time(16_541_000 as u64) + // Minimum execution time: 17_589 nanoseconds. + Weight::from_ref_time(17_777_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,7 +60,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - Weight::from_ref_time(72_654_000 as u64) + // Minimum execution time: 71_154 nanoseconds. + Weight::from_ref_time(72_510_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -76,7 +78,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - Weight::from_ref_time(15_198_212_000 as u64) + // Minimum execution time: 15_548_622 nanoseconds. + Weight::from_ref_time(15_867_007_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - Weight::from_ref_time(4_630_319_000 as u64) + // Minimum execution time: 4_637_901 nanoseconds. + Weight::from_ref_time(4_730_879_000 as u64) .saturating_add(T::DbWeight::get().reads(73 as u64)) .saturating_add(T::DbWeight::get().writes(3673 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_common_claims.rs b/runtime/kusama/src/weights/runtime_common_claims.rs index cf02524e5559..b27afcd0a8df 100644 --- a/runtime/kusama/src/weights/runtime_common_claims.rs +++ b/runtime/kusama/src/weights/runtime_common_claims.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::claims`. @@ -52,7 +52,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(144_147_000 as u64) + // Minimum execution time: 144_357 nanoseconds. + Weight::from_ref_time(146_222_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - Weight::from_ref_time(11_356_000 as u64) + // Minimum execution time: 11_388 nanoseconds. + Weight::from_ref_time(11_833_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -73,7 +75,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - Weight::from_ref_time(147_747_000 as u64) + // Minimum execution time: 148_256 nanoseconds. + Weight::from_ref_time(153_700_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -86,7 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - Weight::from_ref_time(67_746_000 as u64) + // Minimum execution time: 68_246 nanoseconds. + Weight::from_ref_time(70_821_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -95,7 +99,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - Weight::from_ref_time(21_643_000 as u64) + // Minimum execution time: 21_200 nanoseconds. + Weight::from_ref_time(21_813_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_common_crowdloan.rs b/runtime/kusama/src/weights/runtime_common_crowdloan.rs index ac5438c137d1..91753886e41d 100644 --- a/runtime/kusama/src/weights/runtime_common_crowdloan.rs +++ b/runtime/kusama/src/weights/runtime_common_crowdloan.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::crowdloan`. @@ -49,7 +49,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(46_612_000 as u64) + // Minimum execution time: 47_414 nanoseconds. + Weight::from_ref_time(48_286_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - Weight::from_ref_time(116_068_000 as u64) + // Minimum execution time: 116_057 nanoseconds. + Weight::from_ref_time(117_264_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -69,16 +71,18 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(54_293_000 as u64) + // Minimum execution time: 55_684 nanoseconds. + Weight::from_ref_time(56_470_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `k` is `[0, 1000]`. fn refund(k: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(18_183_000 as u64).saturating_mul(k as u64)) + // Minimum execution time: 50_573 nanoseconds. + Weight::from_ref_time(62_908_000 as u64) + // Standard Error: 13_896 + .saturating_add(Weight::from_ref_time(17_794_898 as u64).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -87,27 +91,31 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - Weight::from_ref_time(34_634_000 as u64) + // Minimum execution time: 37_873 nanoseconds. + Weight::from_ref_time(38_408_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - Weight::from_ref_time(24_646_000 as u64) + // Minimum execution time: 26_842 nanoseconds. + Weight::from_ref_time(27_758_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - Weight::from_ref_time(32_088_000 as u64) + // Minimum execution time: 34_190 nanoseconds. + Weight::from_ref_time(35_145_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - Weight::from_ref_time(24_754_000 as u64) + // Minimum execution time: 26_873 nanoseconds. + Weight::from_ref_time(27_829_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,9 +131,10 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { - Weight::from_ref_time(15_720_000 as u64) - // Standard Error: 33_000 - .saturating_add(Weight::from_ref_time(41_322_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 103_946 nanoseconds. + Weight::from_ref_time(8_539_524 as u64) + // Standard Error: 42_832 + .saturating_add(Weight::from_ref_time(40_283_343 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs index 8b9f554fe3e6..a1b572259692 100644 --- a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::paras_registrar`. @@ -48,7 +48,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - Weight::from_ref_time(30_299_000 as u64) + // Minimum execution time: 30_852 nanoseconds. + Weight::from_ref_time(31_532_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,7 +63,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - Weight::from_ref_time(7_938_844_000 as u64) + // Minimum execution time: 7_439_882 nanoseconds. + Weight::from_ref_time(7_564_995_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -76,7 +78,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - Weight::from_ref_time(7_905_688_000 as u64) + // Minimum execution time: 7_412_236 nanoseconds. + Weight::from_ref_time(7_528_657_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -87,7 +90,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - Weight::from_ref_time(47_531_000 as u64) + // Minimum execution time: 49_031 nanoseconds. + Weight::from_ref_time(50_187_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -99,11 +103,13 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - Weight::from_ref_time(42_367_000 as u64) + // Minimum execution time: 44_366 nanoseconds. + Weight::from_ref_time(45_345_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) + // Storage: Paras UpgradeRestrictionSignal (r:1 w:1) // Storage: Paras CurrentCodeHash (r:1 w:0) // Storage: Paras UpgradeCooldowns (r:1 w:1) // Storage: Paras PvfActiveVoteMap (r:1 w:0) @@ -112,19 +118,22 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: System Digest (r:1 w:1) // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) - // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 42_230 nanoseconds. + Weight::from_ref_time(42_587_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_333 as u64).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `b` is `[1, 1048576]`. fn set_current_head(b: u32, ) -> Weight { - Weight::from_ref_time(5_494_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 13_316 nanoseconds. + Weight::from_ref_time(13_675_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(910 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kusama/src/weights/runtime_common_slots.rs b/runtime/kusama/src/weights/runtime_common_slots.rs index a897fe1205ff..cf26075d1390 100644 --- a/runtime/kusama/src/weights/runtime_common_slots.rs +++ b/runtime/kusama/src/weights/runtime_common_slots.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::slots`. @@ -47,7 +47,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(30_342_000 as u64) + // Minimum execution time: 31_674 nanoseconds. + Weight::from_ref_time(32_043_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,11 +61,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(5_979_000 as u64).saturating_mul(c as u64)) - // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(15_498_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 569_152 nanoseconds. + Weight::from_ref_time(575_433_000 as u64) + // Standard Error: 71_875 + .saturating_add(Weight::from_ref_time(2_060_648 as u64).saturating_mul(c as u64)) + // Standard Error: 71_875 + .saturating_add(Weight::from_ref_time(11_927_056 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(t as u64))) @@ -75,7 +77,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(92_539_000 as u64) + // Minimum execution time: 92_561 nanoseconds. + Weight::from_ref_time(93_794_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(28_034_000 as u64) + // Minimum execution time: 28_796 nanoseconds. + Weight::from_ref_time(29_798_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_configuration.rs b/runtime/kusama/src/weights/runtime_parachains_configuration.rs index f7308aafffe0..dac0259c9762 100644 --- a/runtime/kusama/src/weights/runtime_parachains_configuration.rs +++ b/runtime/kusama/src/weights/runtime_parachains_configuration.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::configuration`. @@ -48,7 +48,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - Weight::from_ref_time(10_810_000 as u64) + // Minimum execution time: 12_075 nanoseconds. + Weight::from_ref_time(12_339_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -56,7 +57,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(10_580_000 as u64) + // Minimum execution time: 12_457 nanoseconds. + Weight::from_ref_time(13_010_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -64,7 +66,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - Weight::from_ref_time(10_631_000 as u64) + // Minimum execution time: 12_413 nanoseconds. + Weight::from_ref_time(12_701_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -72,19 +75,22 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(10_910_000 as u64) + // Minimum execution time: 12_333 nanoseconds. + Weight::from_ref_time(12_813_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn set_hrmp_open_request_ttl() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: Configuration PendingConfigs (r:1 w:1) // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - Weight::from_ref_time(11_012_000 as u64) + // Minimum execution time: 12_040 nanoseconds. + Weight::from_ref_time(12_571_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_disputes.rs b/runtime/kusama/src/weights/runtime_parachains_disputes.rs index 248b3af844f7..a26e08073182 100644 --- a/runtime/kusama/src/weights/runtime_parachains_disputes.rs +++ b/runtime/kusama/src/weights/runtime_parachains_disputes.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::disputes`. @@ -46,7 +46,8 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - Weight::from_ref_time(3_909_000 as u64) + // Minimum execution time: 4_402 nanoseconds. + Weight::from_ref_time(4_492_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kusama/src/weights/runtime_parachains_hrmp.rs b/runtime/kusama/src/weights/runtime_parachains_hrmp.rs index ab7a5b87291e..33343a4067a7 100644 --- a/runtime/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/kusama/src/weights/runtime_parachains_hrmp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::hrmp`. @@ -53,7 +53,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - Weight::from_ref_time(38_970_000 as u64) + // Minimum execution time: 42_278 nanoseconds. + Weight::from_ref_time(42_770_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -64,7 +65,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - Weight::from_ref_time(39_314_000 as u64) + // Minimum execution time: 41_471 nanoseconds. + Weight::from_ref_time(42_331_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -74,7 +76,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - Weight::from_ref_time(35_896_000 as u64) + // Minimum execution time: 38_134 nanoseconds. + Weight::from_ref_time(38_715_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -87,11 +90,12 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `i` is `[0, 127]`. /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(7_134_000 as u64).saturating_mul(i as u64)) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(7_238_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 867_577 nanoseconds. + Weight::from_ref_time(874_935_000 as u64) + // Standard Error: 78_897 + .saturating_add(Weight::from_ref_time(2_673_773 as u64).saturating_mul(i as u64)) + // Standard Error: 78_897 + .saturating_add(Weight::from_ref_time(2_683_401 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(e as u64))) @@ -109,9 +113,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannels (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { - Weight::from_ref_time(117_000 as u64) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(15_838_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 10_142 nanoseconds. + Weight::from_ref_time(10_319_000 as u64) + // Standard Error: 11_640 + .saturating_add(Weight::from_ref_time(15_901_207 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((7 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -125,9 +130,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannelContents (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(9_709_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 6_588 nanoseconds. + Weight::from_ref_time(1_707_852 as u64) + // Standard Error: 11_751 + .saturating_add(Weight::from_ref_time(9_612_854 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -138,9 +144,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - Weight::from_ref_time(30_404_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 25_551 nanoseconds. + Weight::from_ref_time(31_335_704 as u64) + // Standard Error: 1_322 + .saturating_add(Weight::from_ref_time(98_216 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,9 +155,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { - Weight::from_ref_time(593_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(2_622_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 4_762 nanoseconds. + Weight::from_ref_time(2_997_588 as u64) + // Standard Error: 3_871 + .saturating_add(Weight::from_ref_time(2_566_697 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -167,7 +175,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1) fn force_open_hrmp_channel() -> Weight { - Weight::from_ref_time(104_771_000 as u64) + // Minimum execution time: 53_453 nanoseconds. + Weight::from_ref_time(53_861_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_initializer.rs b/runtime/kusama/src/weights/runtime_parachains_initializer.rs index ef152d190f79..380e0a99aa1b 100644 --- a/runtime/kusama/src/weights/runtime_parachains_initializer.rs +++ b/runtime/kusama/src/weights/runtime_parachains_initializer.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::initializer`. @@ -47,9 +47,10 @@ impl runtime_parachains::initializer::WeightInfo for We // Storage: System Digest (r:1 w:1) /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - Weight::from_ref_time(9_788_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 7_852 nanoseconds. + Weight::from_ref_time(10_740_573 as u64) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(1_317 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_paras.rs b/runtime/kusama/src/weights/runtime_parachains_paras.rs index 4b42562c8566..c9f7419e9452 100644 --- a/runtime/kusama/src/weights/runtime_parachains_paras.rs +++ b/runtime/kusama/src/weights/runtime_parachains_paras.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras`. @@ -52,18 +52,20 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 35_796 nanoseconds. + Weight::from_ref_time(36_105_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_317 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Paras Heads (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 13_374 nanoseconds. + Weight::from_ref_time(13_806_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(910 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) @@ -78,9 +80,10 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 60_701 nanoseconds. + Weight::from_ref_time(61_305_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_340 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -89,16 +92,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 19_070 nanoseconds. + Weight::from_ref_time(19_220_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(910 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - Weight::from_ref_time(22_217_000 as u64) + // Minimum execution time: 23_946 nanoseconds. + Weight::from_ref_time(24_805_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,16 +111,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:1 w:1) /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 9_055 nanoseconds. + Weight::from_ref_time(9_171_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_325 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - Weight::from_ref_time(6_480_000 as u64) + // Minimum execution time: 7_063 nanoseconds. + Weight::from_ref_time(7_167_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,7 +130,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - Weight::from_ref_time(93_853_000 as u64) + // Minimum execution time: 92_634 nanoseconds. + Weight::from_ref_time(94_982_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -135,7 +143,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - Weight::from_ref_time(644_115_000 as u64) + // Minimum execution time: 624_541 nanoseconds. + Weight::from_ref_time(631_251_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -148,7 +157,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - Weight::from_ref_time(609_948_000 as u64) + // Minimum execution time: 592_733 nanoseconds. + Weight::from_ref_time(600_415_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -158,7 +168,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - Weight::from_ref_time(505_647_000 as u64) + // Minimum execution time: 491_686 nanoseconds. + Weight::from_ref_time(503_208_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -172,7 +183,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - Weight::from_ref_time(692_341_000 as u64) + // Minimum execution time: 661_583 nanoseconds. + Weight::from_ref_time(670_694_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(304 as u64)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs b/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs index bb0f7815ec08..c5a68ad56e81 100644 --- a/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras_inherent`. @@ -53,14 +53,15 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParasDisputes Included (r:1 w:1) // Storage: ParasDisputes SpamSlots (r:1 w:1) // Storage: ParaScheduler AvailabilityCores (r:1 w:1) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) + // Storage: Staking ActiveEra (r:1 w:0) + // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: ParasDisputes Frozen (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParasShared ActiveValidatorKeys (r:1 w:0) // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: ParaSessionInfo AccountKeys (r:1 w:0) - // Storage: Staking ActiveEra (r:1 w:0) - // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) // Storage: Hrmp HrmpChannelDigests (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:1 w:0) @@ -76,10 +77,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - Weight::from_ref_time(341_679_000 as u64) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(48_621_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(28 as u64)) + // Minimum execution time: 810_241 nanoseconds. + Weight::from_ref_time(348_752_510 as u64) + // Standard Error: 23_627 + .saturating_add(Weight::from_ref_time(48_079_357 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -93,6 +95,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -112,8 +115,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - Weight::from_ref_time(339_684_000 as u64) - .saturating_add(T::DbWeight::get().reads(25 as u64)) + // Minimum execution time: 332_410 nanoseconds. + Weight::from_ref_time(339_799_000 as u64) + .saturating_add(T::DbWeight::get().reads(26 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -127,6 +131,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -148,10 +153,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - Weight::from_ref_time(907_441_000 as u64) - // Standard Error: 47_000 - .saturating_add(Weight::from_ref_time(48_158_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(28 as u64)) + // Minimum execution time: 5_612_242 nanoseconds. + Weight::from_ref_time(858_538_320 as u64) + // Standard Error: 48_385 + .saturating_add(Weight::from_ref_time(47_873_187 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -165,6 +171,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -187,8 +194,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - Weight::from_ref_time(40_608_399_000 as u64) - .saturating_add(T::DbWeight::get().reads(30 as u64)) + // Minimum execution time: 38_531_556 nanoseconds. + Weight::from_ref_time(38_807_324_000 as u64) + .saturating_add(T::DbWeight::get().reads(31 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } } diff --git a/runtime/kusama/src/weights/runtime_parachains_ump.rs b/runtime/kusama/src/weights/runtime_parachains_ump.rs index effa650d0258..1473eeac063b 100644 --- a/runtime/kusama/src/weights/runtime_parachains_ump.rs +++ b/runtime/kusama/src/weights/runtime_parachains_ump.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. @@ -46,22 +46,25 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - Weight::from_ref_time(4_549_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_348 nanoseconds. + Weight::from_ref_time(5_121_205 as u64) + // Standard Error: 12 + .saturating_add(Weight::from_ref_time(1_934 as u64).saturating_mul(s as u64)) } // Storage: Ump NeedsDispatch (r:1 w:1) // Storage: Ump NextDispatchRoundStartWith (r:1 w:1) // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - Weight::from_ref_time(8_784_000 as u64) + // Minimum execution time: 9_800 nanoseconds. + Weight::from_ref_time(10_025_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - Weight::from_ref_time(24_147_000 as u64) + // Minimum execution time: 26_272 nanoseconds. + Weight::from_ref_time(26_790_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 17310dd5ead1..55a474e239f6 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for the Kusama runtime. use super::{ - parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, Fellows, ParaId, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee, XcmPallet, }; use frame_support::{match_types, parameter_types, traits::Everything}; use runtime_common::{xcm_sender, ToAuthor}; @@ -28,8 +28,8 @@ use xcm_builder::{ AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, BackingToPlurality, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete, - LocationInverter, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeWeightCredit, UsingComponents, WeightInfoBounds, + LocationInverter, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; parameter_types! { @@ -154,6 +154,10 @@ impl xcm_executor::Config for XcmConfig { parameter_types! { pub const CouncilBodyId: BodyId = BodyId::Executive; + // StakingAdmin pluralistic body. + pub const StakingAdminBodyId: BodyId = BodyId::Defense; + // Fellows pluralistic body. + pub const FellowsBodyId: BodyId = BodyId::Technical; } /// Type to convert the council origin to a Plurality `MultiLocation` value. @@ -172,13 +176,33 @@ pub type LocalOriginToLocation = ( // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); + +/// Type to convert the `StakingAdmin` origin to a Plurality `MultiLocation` value. +pub type StakingAdminToPlurality = + OriginToPluralityVoice; + +/// Type to convert the Fellows origin to a Plurality `MultiLocation` value. +pub type FellowsToPlurality = OriginToPluralityVoice; + +/// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an interior location +/// of this chain for a destination chain. +pub type LocalPalletOriginToLocation = ( + // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality of the + // `Unit` body. + CouncilToPlurality, + // StakingAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + StakingAdminToPlurality, + // Fellows origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + FellowsToPlurality, +); + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // We only allow the council to send messages. This is basically safe to enable for everyone - // (safe the possibility of someone spamming the parachain if they're willing to pay the KSM to - // send from the Relay-chain), but it's useless until we bring in XCM v3 which will make - // `DescendOrigin` a bit more useful. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + // We only allow the root, the council, fellows and the staking admin to send messages. + // This is basically safe to enable for everyone (safe the possibility of someone spamming the parachain + // if they're willing to pay the KSM to send from the Relay-chain), but it's useless until we bring in XCM v3 + // which will make `DescendOrigin` a bit more useful. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; diff --git a/runtime/metrics/Cargo.toml b/runtime/metrics/Cargo.toml index efa7569d1130..99d7878d99e8 100644 --- a/runtime/metrics/Cargo.toml +++ b/runtime/metrics/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-metrics" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false} diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index cb8b989ccdda..cdcd998b7572 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-parachains" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 2ebaff1b8282..2f09deb34ded 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -19,7 +19,7 @@ //! Configuration can change only at session boundaries and is buffered until then. use crate::shared; -use frame_support::{pallet_prelude::*, weights::constants::WEIGHT_PER_MILLIS}; +use frame_support::{pallet_prelude::*, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use primitives::v2::{Balance, SessionIndex, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE}; @@ -285,8 +285,10 @@ impl> Default for HostConfiguration Pallet { /// Set the validation upgrade cooldown. + #[pallet::call_index(0)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -534,6 +537,7 @@ pub mod pallet { } /// Set the validation upgrade delay. + #[pallet::call_index(1)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -549,6 +553,7 @@ pub mod pallet { } /// Set the acceptance period for an included candidate. + #[pallet::call_index(2)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -564,6 +569,7 @@ pub mod pallet { } /// Set the max validation code size for incoming upgrades. + #[pallet::call_index(3)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -576,6 +582,7 @@ pub mod pallet { } /// Set the max POV block size for incoming upgrades. + #[pallet::call_index(4)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -588,6 +595,7 @@ pub mod pallet { } /// Set the max head data size for paras. + #[pallet::call_index(5)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -600,6 +608,7 @@ pub mod pallet { } /// Set the number of parathread execution cores. + #[pallet::call_index(6)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -612,6 +621,7 @@ pub mod pallet { } /// Set the number of retries for a particular parathread. + #[pallet::call_index(7)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -624,6 +634,7 @@ pub mod pallet { } /// Set the parachain validator-group rotation frequency + #[pallet::call_index(8)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -639,6 +650,7 @@ pub mod pallet { } /// Set the availability period for parachains. + #[pallet::call_index(9)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -654,6 +666,7 @@ pub mod pallet { } /// Set the availability period for parathreads. + #[pallet::call_index(10)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -669,6 +682,7 @@ pub mod pallet { } /// Set the scheduling lookahead, in expected number of blocks at peak throughput. + #[pallet::call_index(11)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -681,6 +695,7 @@ pub mod pallet { } /// Set the maximum number of validators to assign to any core. + #[pallet::call_index(12)] #[pallet::weight(( T::WeightInfo::set_config_with_option_u32(), DispatchClass::Operational, @@ -696,6 +711,7 @@ pub mod pallet { } /// Set the maximum number of validators to use in parachain consensus. + #[pallet::call_index(13)] #[pallet::weight(( T::WeightInfo::set_config_with_option_u32(), DispatchClass::Operational, @@ -708,6 +724,7 @@ pub mod pallet { } /// Set the dispute period, in number of sessions to keep for disputes. + #[pallet::call_index(14)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -720,6 +737,7 @@ pub mod pallet { } /// Set the dispute post conclusion acceptance period. + #[pallet::call_index(15)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -735,6 +753,7 @@ pub mod pallet { } /// Set the maximum number of dispute spam slots. + #[pallet::call_index(16)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -747,6 +766,7 @@ pub mod pallet { } /// Set the dispute conclusion by time out period. + #[pallet::call_index(17)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -763,6 +783,7 @@ pub mod pallet { /// Set the no show slots, in number of number of consensus slots. /// Must be at least 1. + #[pallet::call_index(18)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -775,6 +796,7 @@ pub mod pallet { } /// Set the total number of delay tranches. + #[pallet::call_index(19)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -787,6 +809,7 @@ pub mod pallet { } /// Set the zeroth delay tranche width. + #[pallet::call_index(20)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -799,6 +822,7 @@ pub mod pallet { } /// Set the number of validators needed to approve a block. + #[pallet::call_index(21)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -811,6 +835,7 @@ pub mod pallet { } /// Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion. + #[pallet::call_index(22)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -823,6 +848,7 @@ pub mod pallet { } /// Sets the maximum items that can present in a upward dispatch queue at once. + #[pallet::call_index(23)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -835,6 +861,7 @@ pub mod pallet { } /// Sets the maximum total size of items that can present in a upward dispatch queue at once. + #[pallet::call_index(24)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -847,6 +874,7 @@ pub mod pallet { } /// Set the critical downward message size. + #[pallet::call_index(25)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -859,6 +887,7 @@ pub mod pallet { } /// Sets the soft limit for the phase of dispatching dispatchable upward messages. + #[pallet::call_index(26)] #[pallet::weight(( T::WeightInfo::set_config_with_weight(), DispatchClass::Operational, @@ -871,6 +900,7 @@ pub mod pallet { } /// Sets the maximum size of an upward message that can be sent by a candidate. + #[pallet::call_index(27)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -883,6 +913,7 @@ pub mod pallet { } /// Sets the maximum number of messages that a candidate can contain. + #[pallet::call_index(28)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -898,6 +929,7 @@ pub mod pallet { } /// Sets the number of sessions after which an HRMP open channel request expires. + #[pallet::call_index(29)] #[pallet::weight(( T::WeightInfo::set_hrmp_open_request_ttl(), DispatchClass::Operational, @@ -909,6 +941,7 @@ pub mod pallet { } /// Sets the amount of funds that the sender should provide for opening an HRMP channel. + #[pallet::call_index(30)] #[pallet::weight(( T::WeightInfo::set_config_with_balance(), DispatchClass::Operational, @@ -922,6 +955,7 @@ pub mod pallet { /// Sets the amount of funds that the recipient should provide for accepting opening an HRMP /// channel. + #[pallet::call_index(31)] #[pallet::weight(( T::WeightInfo::set_config_with_balance(), DispatchClass::Operational, @@ -934,6 +968,7 @@ pub mod pallet { } /// Sets the maximum number of messages allowed in an HRMP channel at once. + #[pallet::call_index(32)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -946,6 +981,7 @@ pub mod pallet { } /// Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. + #[pallet::call_index(33)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -958,6 +994,7 @@ pub mod pallet { } /// Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. + #[pallet::call_index(34)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -973,6 +1010,7 @@ pub mod pallet { } /// Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. + #[pallet::call_index(35)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -988,6 +1026,7 @@ pub mod pallet { } /// Sets the maximum size of a message that could ever be put into an HRMP channel. + #[pallet::call_index(36)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -1000,6 +1039,7 @@ pub mod pallet { } /// Sets the maximum number of outbound HRMP channels a parachain is allowed to open. + #[pallet::call_index(37)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -1015,6 +1055,7 @@ pub mod pallet { } /// Sets the maximum number of outbound HRMP channels a parathread is allowed to open. + #[pallet::call_index(38)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -1030,6 +1071,7 @@ pub mod pallet { } /// Sets the maximum number of outbound HRMP messages can be sent by a candidate. + #[pallet::call_index(39)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -1045,6 +1087,7 @@ pub mod pallet { } /// Sets the maximum amount of weight any individual upward message may consume. + #[pallet::call_index(40)] #[pallet::weight(( T::WeightInfo::set_config_with_weight(), DispatchClass::Operational, @@ -1057,6 +1100,7 @@ pub mod pallet { } /// Enable or disable PVF pre-checking. Consult the field documentation prior executing. + #[pallet::call_index(41)] #[pallet::weight(( // Using u32 here is a little bit of cheating, but that should be fine. T::WeightInfo::set_config_with_u32(), @@ -1070,6 +1114,7 @@ pub mod pallet { } /// Set the number of session changes after which a PVF pre-checking voting is rejected. + #[pallet::call_index(42)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -1085,6 +1130,7 @@ pub mod pallet { /// upgrade taking place. /// /// See the field documentation for information and constraints for the new value. + #[pallet::call_index(43)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -1101,6 +1147,7 @@ pub mod pallet { /// Setting this to true will disable consistency checks for the configuration setters. /// Use with caution. + #[pallet::call_index(44)] #[pallet::weight(( T::DbWeight::get().writes(1), DispatchClass::Operational, diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index d87c98f6ae78..2b754f155966 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -128,7 +128,7 @@ pub mod v3 { hrmp_max_parathread_outbound_channels: Default::default(), hrmp_max_message_num_per_candidate: Default::default(), ump_max_individual_weight: OldWeight( - frame_support::weights::constants::WEIGHT_PER_MILLIS.ref_time() * 20, + frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS * 20, ), pvf_checking_enabled: false, pvf_voting_ttl: 2u32.into(), diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index 9f458421e2ed..a01827f33d7c 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -525,6 +525,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::force_unfreeze())] pub fn force_unfreeze(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; @@ -1112,7 +1113,7 @@ impl Pallet { // it's sufficient to count the votes in the statement set after they set.statements.iter().for_each(|(statement, v_i, _signature)| { if Some(true) == - summary.new_participants.get(v_i.0 as usize).map(|b| b.as_ref().clone()) + summary.new_participants.get(v_i.0 as usize).map(|b| *b.as_ref()) { match statement { // `summary.new_flags` contains the spam free votes. diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 2dfdc87c4b4e..419db8654d89 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -475,6 +475,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::report_dispute_lost( key_owner_proof.validator_count() ))] diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index 53ad6781048f..4476f1f4a4da 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -465,6 +465,7 @@ pub mod pallet { /// /// The channel can be opened only after the recipient confirms it and only on a session /// change. + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::hrmp_init_open_channel())] pub fn hrmp_init_open_channel( origin: OriginFor, @@ -491,6 +492,7 @@ pub mod pallet { /// Accept a pending open channel request from the given sender. /// /// The channel will be opened only on the next session boundary. + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::hrmp_accept_open_channel())] pub fn hrmp_accept_open_channel(origin: OriginFor, sender: ParaId) -> DispatchResult { let origin = ensure_parachain(::RuntimeOrigin::from(origin))?; @@ -503,6 +505,7 @@ pub mod pallet { /// recipient in the channel being closed. /// /// The closure can only happen on a session change. + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::hrmp_close_channel())] pub fn hrmp_close_channel( origin: OriginFor, @@ -521,6 +524,7 @@ pub mod pallet { /// Origin must be Root. /// /// Number of inbound and outbound channels for `para` must be provided as witness data of weighing. + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::force_clean_hrmp(*_inbound, *_outbound))] pub fn force_clean_hrmp( origin: OriginFor, @@ -539,6 +543,7 @@ pub mod pallet { /// function process all of those requests immediately. /// /// Total number of opening channels must be provided as witness data of weighing. + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::force_process_hrmp_open(*_channels))] pub fn force_process_hrmp_open(origin: OriginFor, _channels: u32) -> DispatchResult { ensure_root(origin)?; @@ -553,6 +558,7 @@ pub mod pallet { /// function process all of those requests immediately. /// /// Total number of closing channels must be provided as witness data of weighing. + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::force_process_hrmp_close(*_channels))] pub fn force_process_hrmp_close(origin: OriginFor, _channels: u32) -> DispatchResult { ensure_root(origin)?; @@ -568,6 +574,7 @@ pub mod pallet { /// /// Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as /// witness data. + #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::hrmp_cancel_open_request(*open_requests))] pub fn hrmp_cancel_open_request( origin: OriginFor, @@ -591,6 +598,7 @@ pub mod pallet { /// /// Expected use is when one of the `ParaId`s involved in the channel is governed by the /// Relay Chain, e.g. a common good parachain. + #[pallet::call_index(7)] #[pallet::weight(::WeightInfo::force_open_hrmp_channel())] pub fn force_open_hrmp_channel( origin: OriginFor, @@ -751,10 +759,10 @@ impl Pallet { let ingress = ::HrmpIngressChannelsIndex::take(outgoing_para) .into_iter() - .map(|sender| HrmpChannelId { sender, recipient: outgoing_para.clone() }); + .map(|sender| HrmpChannelId { sender, recipient: *outgoing_para }); let egress = ::HrmpEgressChannelsIndex::take(outgoing_para) .into_iter() - .map(|recipient| HrmpChannelId { sender: outgoing_para.clone(), recipient }); + .map(|recipient| HrmpChannelId { sender: *outgoing_para, recipient }); let mut to_close = ingress.chain(egress).collect::>(); to_close.sort(); to_close.dedup(); @@ -1075,7 +1083,7 @@ impl Pallet { channel.total_size += inbound.data.len() as u32; // compute the new MQC head of the channel - let prev_head = channel.mqc_head.clone().unwrap_or(Default::default()); + let prev_head = channel.mqc_head.unwrap_or(Default::default()); let new_head = BlakeTwo256::hash_of(&( prev_head, inbound.sent_at, @@ -1149,11 +1157,11 @@ impl Pallet { let channel_id = HrmpChannelId { sender: origin, recipient }; ensure!( ::HrmpOpenChannelRequests::get(&channel_id).is_none(), - Error::::OpenHrmpChannelAlreadyExists, + Error::::OpenHrmpChannelAlreadyRequested, ); ensure!( ::HrmpChannels::get(&channel_id).is_none(), - Error::::OpenHrmpChannelAlreadyRequested, + Error::::OpenHrmpChannelAlreadyExists, ); let egress_cnt = diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f74a8cfd3f8d..1df6c141e9df 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -102,7 +102,7 @@ impl CandidatePendingAvailability { /// Get the core index. pub(crate) fn core_occupied(&self) -> CoreIndex { - self.core.clone() + self.core } /// Get the candidate hash. @@ -383,7 +383,7 @@ impl Pallet { let mut freed_cores = Vec::with_capacity(expected_bits); for (para_id, pending_availability) in assigned_paras_record .into_iter() - .filter_map(|x| x) + .flatten() .filter_map(|(id, p)| p.map(|p| (id, p))) { if pending_availability.availability_votes.count_ones() >= threshold { @@ -644,8 +644,7 @@ impl Pallet { }; // one more sweep for actually writing to storage. - let core_indices = - core_indices_and_backers.iter().map(|&(ref c, _, _)| c.clone()).collect(); + let core_indices = core_indices_and_backers.iter().map(|&(ref c, _, _)| *c).collect(); for (candidate, (core, backers, group)) in candidates.into_iter().zip(core_indices_and_backers) { diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index eaa4510fafcf..85546559b7de 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -210,6 +210,7 @@ pub mod pallet { /// Issue a signal to the consensus engine to forcibly act as though all parachain /// blocks in all relay chain blocks up to and including the given number in the current /// chain are valid and should be finalized. + #[pallet::call_index(0)] #[pallet::weight(( ::WeightInfo::force_approve( frame_system::Pallet::::digest().logs.len() as u32, @@ -247,7 +248,7 @@ impl Pallet { let validators = shared::Pallet::::initializer_on_new_session( session_index, - random_seed.clone(), + random_seed, &new_config, all_validators, ); diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index 3c5744b96546..0fca9a004099 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -659,7 +659,7 @@ pub mod pallet { /// Past code of parachains. The parachains themselves may not be registered anymore, /// but we also keep their code on-chain for the same amount of time as outdated code - /// to keep it available for secondary checkers. + /// to keep it available for approval checkers. #[pallet::storage] #[pallet::getter(fn past_code_meta)] pub(super) type PastCodeMeta = @@ -788,6 +788,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Set the storage for the parachain validation code immediately. + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::force_set_current_code(new_code.0.len() as u32))] pub fn force_set_current_code( origin: OriginFor, @@ -815,6 +816,7 @@ pub mod pallet { } /// Set the storage for the current parachain head data immediately. + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::force_set_current_head(new_head.0.len() as u32))] pub fn force_set_current_head( origin: OriginFor, @@ -827,6 +829,7 @@ pub mod pallet { } /// Schedule an upgrade as if it was scheduled in the given relay parent block. + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::force_schedule_code_upgrade(new_code.0.len() as u32))] pub fn force_schedule_code_upgrade( origin: OriginFor, @@ -842,6 +845,7 @@ pub mod pallet { } /// Note a new block head for para within the context of the current block. + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::force_note_new_head(new_head.0.len() as u32))] pub fn force_note_new_head( origin: OriginFor, @@ -858,6 +862,7 @@ pub mod pallet { /// Put a parachain directly into the next session's action queue. /// We can't queue it any sooner than this without going into the /// initializer... + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::force_queue_action())] pub fn force_queue_action(origin: OriginFor, para: ParaId) -> DispatchResult { ensure_root(origin)?; @@ -884,6 +889,7 @@ pub mod pallet { /// /// This function is mainly meant to be used for upgrading parachains that do not follow /// the go-ahead signal while the PVF pre-checking feature is enabled. + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::add_trusted_validation_code(validation_code.0.len() as u32))] pub fn add_trusted_validation_code( origin: OriginFor, @@ -932,6 +938,7 @@ pub mod pallet { /// This is better than removing the storage directly, because it will not remove the code /// that was suddenly got used by some parachain while this dispatchable was pending /// dispatching. + #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::poke_unused_validation_code())] pub fn poke_unused_validation_code( origin: OriginFor, @@ -946,6 +953,7 @@ pub mod pallet { /// Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and /// enacts the results if that was the last vote before achieving the supermajority. + #[pallet::call_index(7)] #[pallet::weight( ::WeightInfo::include_pvf_check_statement_finalize_upgrade_accept() .max(::WeightInfo::include_pvf_check_statement_finalize_upgrade_reject()) diff --git a/runtime/parachains/src/paras_inherent/mod.rs b/runtime/parachains/src/paras_inherent/mod.rs index 188a8f677979..15669ec9c15d 100644 --- a/runtime/parachains/src/paras_inherent/mod.rs +++ b/runtime/parachains/src/paras_inherent/mod.rs @@ -277,6 +277,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Enter the paras inherent. This will process bitfields and backed candidates. + #[pallet::call_index(0)] #[pallet::weight(( paras_inherent_total_weight::( data.backed_candidates.as_slice(), @@ -513,7 +514,7 @@ impl Pallet { METRICS.on_candidates_sanitized(backed_candidates.len() as u64); // Process backed candidates according to scheduled cores. - let parent_storage_root = parent_header.state_root().clone(); + let parent_storage_root = *parent_header.state_root(); let inclusion::ProcessedCandidates::<::Hash> { core_indices: occupied, candidate_receipt_with_backing_validator_indices, @@ -711,7 +712,7 @@ impl Pallet { let scheduled = >::scheduled(); let relay_parent_number = now - One::one(); - let parent_storage_root = parent_header.state_root().clone(); + let parent_storage_root = *parent_header.state_root(); let check_ctx = CandidateCheckContext::::new(now, relay_parent_number); let backed_candidates = sanitize_backed_candidates::( @@ -1201,7 +1202,7 @@ fn compute_entropy(parent_hash: T::Hash) -> [u8; 32] { // known 2 epochs ago. it is marginally better than using the parent block // hash since it's harder to influence the VRF output than the block hash. let vrf_random = ParentBlockRandomness::::random(&CANDIDATE_SEED_SUBJECT[..]).0; - let mut entropy: [u8; 32] = CANDIDATE_SEED_SUBJECT.clone(); + let mut entropy: [u8; 32] = CANDIDATE_SEED_SUBJECT; if let Some(vrf_random) = vrf_random { entropy.as_mut().copy_from_slice(vrf_random.as_ref()); } else { diff --git a/runtime/parachains/src/runtime_api_impl/v2.rs b/runtime/parachains/src/runtime_api_impl/v2.rs index 77ea96742b54..57345a819de0 100644 --- a/runtime/parachains/src/runtime_api_impl/v2.rs +++ b/runtime/parachains/src/runtime_api_impl/v2.rs @@ -107,7 +107,7 @@ pub fn availability_cores() -> Vec>::pending_availability(para_id) .expect("Occupied core always has pending availability; qed"); - let backed_in_number = pending_availability.backed_in_number().clone(); + let backed_in_number = *pending_availability.backed_in_number(); OccupiedCore { next_up_on_available: >::next_up_on_available( CoreIndex(i as u32), @@ -135,7 +135,7 @@ pub fn availability_cores() -> Vec>::pending_availability(para_id) .expect("Occupied core always has pending availability; qed"); - let backed_in_number = pending_availability.backed_in_number().clone(); + let backed_in_number = *pending_availability.backed_in_number(); OccupiedCore { next_up_on_available: >::next_up_on_available( CoreIndex(i as u32), diff --git a/runtime/parachains/src/scheduler.rs b/runtime/parachains/src/scheduler.rs index 0185817b2aa1..6eb1b732705f 100644 --- a/runtime/parachains/src/scheduler.rs +++ b/runtime/parachains/src/scheduler.rs @@ -483,7 +483,7 @@ impl Pallet { Some(CoreAssignment { kind: AssignmentKind::Parachain, para_id: parachains[core_index], - core: core.clone(), + core, group_idx: Self::group_assigned_to_core(core, now).expect( "core is not out of bounds and we are guaranteed \ to be after the most recent session start; qed", @@ -496,7 +496,7 @@ impl Pallet { parathread_queue.take_next_on_core(core_offset).map(|entry| CoreAssignment { kind: AssignmentKind::Parathread(entry.claim.1, entry.retries), para_id: entry.claim.0, - core: core.clone(), + core, group_idx: Self::group_assigned_to_core(core, now).expect( "core is not out of bounds and we are guaranteed \ to be after the most recent session start; qed", @@ -610,11 +610,9 @@ impl Pallet { (at - session_start_block) / config.group_rotation_frequency.into(); let rotations_since_session_start = - match >::try_into(rotations_since_session_start) { - Ok(i) => i, - Err(_) => 0, // can only happen if rotations occur only once every u32::max(), - // so functionally no difference in behavior. - }; + >::try_into(rotations_since_session_start).unwrap_or(0); + // Error case can only happen if rotations occur only once every u32::max(), + // so functionally no difference in behavior. let group_idx = (core.0 as usize + rotations_since_session_start as usize) % validator_groups.len(); diff --git a/runtime/parachains/src/ump.rs b/runtime/parachains/src/ump.rs index 5aa7b17d923c..d7ecad3797b2 100644 --- a/runtime/parachains/src/ump.rs +++ b/runtime/parachains/src/ump.rs @@ -107,7 +107,7 @@ impl, C: Config> UmpSink VersionedXcm, }; - let id = upward_message_id(&data[..]); + let id = upward_message_id(data); let maybe_msg_and_weight = VersionedXcm::::decode_all_with_depth_limit( xcm::MAX_XCM_DECODE_DEPTH, &mut data, @@ -349,6 +349,7 @@ pub mod pallet { /// /// Events: /// - `OverweightServiced`: On success. + #[pallet::call_index(0)] #[pallet::weight(weight_limit.saturating_add(::WeightInfo::service_overweight()))] pub fn service_overweight( origin: OriginFor, diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 9809fb8ff843..99b8629a20e5 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-runtime" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } @@ -18,7 +18,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -100,8 +100,8 @@ keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substra sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } serde_json = "1.0.81" separator = "0.4.1" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19.2", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +tokio = { version = "1.22.0", features = ["macros"] } sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] diff --git a/runtime/polkadot/constants/Cargo.toml b/runtime/polkadot/constants/Cargo.toml index 953ff98c2d5b..c6b3bed8dc3f 100644 --- a/runtime/polkadot/constants/Cargo.toml +++ b/runtime/polkadot/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-constants" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] smallvec = "1.8.0" @@ -10,10 +10,14 @@ smallvec = "1.8.0" frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } [features] default = ["std"] std = [ - "sp-runtime/std" + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] diff --git a/runtime/polkadot/constants/src/weights/block_weights.rs b/runtime/polkadot/constants/src/weights/block_weights.rs index 211cd595acba..b9f99d689a65 100644 --- a/runtime/polkadot/constants/src/weights/block_weights.rs +++ b/runtime/polkadot/constants/src/weights/block_weights.rs @@ -1,28 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19 (Y/M/D) -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -34,32 +32,32 @@ // --weight-path=runtime/polkadot/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 5_736_651, 6_591_625 - /// Average: 5_849_907 - /// Median: 5_847_129 - /// Std-Dev: 109200.59 + /// Min, Max: 6_019_119, 6_263_448 + /// Average: 6_103_588 + /// Median: 6_099_366 + /// Std-Dev: 50562.05 /// /// Percentiles nanoseconds: - /// 99th: 6_131_246 - /// 95th: 5_988_921 - /// 75th: 5_885_724 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_849_907); + /// 99th: 6_239_600 + /// 95th: 6_178_734 + /// 75th: 6_145_812 + pub const BlockExecutionWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(6_103_588)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -70,12 +68,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/polkadot/constants/src/weights/extrinsic_weights.rs b/runtime/polkadot/constants/src/weights/extrinsic_weights.rs index 79f1e550d33f..e56fc9108452 100644 --- a/runtime/polkadot/constants/src/weights/extrinsic_weights.rs +++ b/runtime/polkadot/constants/src/weights/extrinsic_weights.rs @@ -1,27 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-20 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -33,32 +32,32 @@ // --weight-path=runtime/polkadot/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// - /// Stats [NS]: - /// Min, Max: 84_940, 86_590 - /// Average: 85_212 - /// Median: 85_156 - /// Std-Dev: 243.25 + /// Stats nanoseconds: + /// Min, Max: 94_862, 96_847 + /// Average: 95_479 + /// Median: 95_465 + /// Std-Dev: 347.27 /// - /// Percentiles [NS]: - /// 99th: 86_269 - /// 95th: 85_510 - /// 75th: 85_216 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(85_212); + /// Percentiles nanoseconds: + /// 99th: 96_351 + /// 95th: 96_116 + /// 75th: 95_639 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(95_479)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -69,12 +68,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/polkadot/constants/src/weights/paritydb_weights.rs b/runtime/polkadot/constants/src/weights/paritydb_weights.rs index 9695b7bc7800..95c91e5182bd 100644 --- a/runtime/polkadot/constants/src/weights/paritydb_weights.rs +++ b/runtime/polkadot/constants/src/weights/paritydb_weights.rs @@ -57,7 +57,7 @@ pub mod constants { /// 99th: 14_451 /// 95th: 12_588 /// 75th: 11_200 - read: 11_826 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, /// Time to write one storage item. /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. @@ -72,7 +72,7 @@ pub mod constants { /// 99th: 69_379 /// 95th: 47_168 /// 75th: 35_252 - write: 38_052 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -88,20 +88,20 @@ pub mod constants { fn bound() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/polkadot/constants/src/weights/rocksdb_weights.rs b/runtime/polkadot/constants/src/weights/rocksdb_weights.rs index 1ed70431b9e3..cfc480ce9461 100644 --- a/runtime/polkadot/constants/src/weights/rocksdb_weights.rs +++ b/runtime/polkadot/constants/src/weights/rocksdb_weights.rs @@ -56,7 +56,7 @@ pub mod constants { /// 99th: 32_074 /// 95th: 26_658 /// 75th: 19_363 - read: 20_499 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, /// Time to write one storage item. /// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. @@ -71,7 +71,7 @@ pub mod constants { /// 99th: 111_151 /// 95th: 92_666 /// 75th: 80_297 - write: 83_471 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -87,20 +87,20 @@ pub mod constants { fn bound() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 25b142a13be1..8c4d85afb67d 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -114,13 +114,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 9310, + spec_version: 9330, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] apis: sp_version::create_apis_vec![[]], - transaction_version: 16, + transaction_version: 17, state_version: 0, }; @@ -553,7 +553,7 @@ parameter_types! { pub const MaxNominations: u32 = ::LIMIT as u32; } -type SlashCancelOrigin = EitherOfDiverse< +type StakingAdminOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -578,7 +578,6 @@ impl pallet_staking::EraPayout for EraPayout { runtime_common::impls::era_payout( total_staked, - // Polkadot has no notion of gilts, the entire issuance is non-guilt. total_issuance, MAX_ANNUAL_INFLATION, Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), @@ -600,8 +599,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - // A super-majority of the council can cancel the slash. - type SlashCancelOrigin = SlashCancelOrigin; + type AdminOrigin = StakingAdminOrigin; type SessionInterface = Self; type EraPayout = EraPayout; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -1599,6 +1597,11 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1609,17 +1612,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - // "Bound uses of call" - pallet_preimage::migration::v1::Migration, - pallet_scheduler::migration::v3::MigrateToV4, - pallet_democracy::migrations::v1::Migration, - pallet_multisig::migrations::v1::MigrateToV1, - // "Properly migrate weights to v2" - parachains_configuration::migration::v3::MigrateToV3, - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - pallet_fast_unstake::migrations::v1::MigrateToV1, - ), + Migrations, >; /// The payload being signed in transactions. @@ -1861,6 +1854,10 @@ sp_api::impl_runtime_apis! { Err(mmr::Error::PalletNotIncluded) } + fn mmr_leaf_count() -> Result { + Err(mmr::Error::PalletNotIncluded) + } + fn generate_proof( _block_numbers: Vec, _best_known_block_number: Option, @@ -2017,21 +2014,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { + fn on_runtime_upgrade(checks: bool) -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade polkadot."); - let weight = Executive::try_runtime_upgrade().unwrap(); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { - log::info!( - target: "runtime::polkadot", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", - block.header.number, - block.header.hash(), - state_root_check, - select, - ); - Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() } } @@ -2443,6 +2440,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade()); + ext.execute_with(|| Runtime::on_runtime_upgrade(true)); } } diff --git a/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs b/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs index a7ff4faf911e..3b6794f1f5ac 100644 --- a/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_benchmarking::baseline`. @@ -46,44 +46,54 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_ref_time(120_000 as u64) + // Minimum execution time: 103 nanoseconds. + Weight::from_ref_time(141_724 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_ref_time(116_000 as u64) + // Minimum execution time: 108 nanoseconds. + Weight::from_ref_time(134_768 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_ref_time(130_000 as u64) + // Minimum execution time: 102 nanoseconds. + Weight::from_ref_time(138_207 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_ref_time(127_000 as u64) + // Minimum execution time: 104 nanoseconds. + Weight::from_ref_time(142_094 as u64) } /// The range of component `i` is `[0, 100]`. - fn hashing(_i: u32, ) -> Weight { - Weight::from_ref_time(19_460_902_000 as u64) + fn hashing(i: u32, ) -> Weight { + // Minimum execution time: 19_917_370 nanoseconds. + Weight::from_ref_time(20_109_614_680 as u64) + // Standard Error: 118_678 + .saturating_add(Weight::from_ref_time(717_597 as u64).saturating_mul(i as u64)) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_ref_time(734_000 as u64) - // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(47_456_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 132 nanoseconds. + Weight::from_ref_time(147_000 as u64) + // Standard Error: 18_267 + .saturating_add(Weight::from_ref_time(47_320_328 as u64).saturating_mul(i as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(1_945_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 106 nanoseconds. + Weight::from_ref_time(114_000 as u64) + // Standard Error: 4_368 + .saturating_add(Weight::from_ref_time(1_928_792 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(334_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 118 nanoseconds. + Weight::from_ref_time(125_000 as u64) + // Standard Error: 833 + .saturating_add(Weight::from_ref_time(323_135 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } } diff --git a/runtime/polkadot/src/weights/frame_election_provider_support.rs b/runtime/polkadot/src/weights/frame_election_provider_support.rs index 910a2884fcc5..a8c6dfdc26bc 100644 --- a/runtime/polkadot/src/weights/frame_election_provider_support.rs +++ b/runtime/polkadot/src/weights/frame_election_provider_support.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. @@ -48,20 +48,22 @@ impl frame_election_provider_support::WeightInfo for We /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(13_900_000 as u64).saturating_mul(v as u64)) - // Standard Error: 4_843_000 - .saturating_add(Weight::from_ref_time(2_216_812_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 5_475_839 nanoseconds. + Weight::from_ref_time(5_538_536_000 as u64) + // Standard Error: 135_964 + .saturating_add(Weight::from_ref_time(5_556_702 as u64).saturating_mul(v as u64)) + // Standard Error: 13_900_513 + .saturating_add(Weight::from_ref_time(1_535_237_976 as u64).saturating_mul(d as u64)) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 84_000 - .saturating_add(Weight::from_ref_time(14_955_000 as u64).saturating_mul(v as u64)) - // Standard Error: 7_259_000 - .saturating_add(Weight::from_ref_time(2_615_111_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 4_279_269 nanoseconds. + Weight::from_ref_time(4_313_963_000 as u64) + // Standard Error: 144_712 + .saturating_add(Weight::from_ref_time(5_458_633 as u64).saturating_mul(v as u64)) + // Standard Error: 14_794_881 + .saturating_add(Weight::from_ref_time(1_759_919_301 as u64).saturating_mul(d as u64)) } } diff --git a/runtime/polkadot/src/weights/frame_system.rs b/runtime/polkadot/src/weights/frame_system.rs index 9430d6d61902..4f4a48a1ac98 100644 --- a/runtime/polkadot/src/weights/frame_system.rs +++ b/runtime/polkadot/src/weights/frame_system.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,51 +38,59 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. - fn remark(_b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_533 nanoseconds. + Weight::from_ref_time(3_602_000 as u64) + // Standard Error: 0 + .saturating_add(Weight::from_ref_time(513 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + // Minimum execution time: 12_386 nanoseconds. + Weight::from_ref_time(12_695_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(1_871 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(7_394_000 as u64) + // Minimum execution time: 8_334 nanoseconds. + Weight::from_ref_time(8_584_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(603_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_663 nanoseconds. + Weight::from_ref_time(3_735_000 as u64) + // Standard Error: 2_110 + .saturating_add(Weight::from_ref_time(621_937 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(449_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_651 nanoseconds. + Weight::from_ref_time(3_780_000 as u64) + // Standard Error: 932 + .saturating_add(Weight::from_ref_time(436_723 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(966_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 5_442 nanoseconds. + Weight::from_ref_time(5_545_000 as u64) + // Standard Error: 1_291 + .saturating_add(Weight::from_ref_time(977_372 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/polkadot/src/weights/pallet_bags_list.rs b/runtime/polkadot/src/weights/pallet_bags_list.rs index b97bf973b60c..05f646ff0d31 100644 --- a/runtime/polkadot/src/weights/pallet_bags_list.rs +++ b/runtime/polkadot/src/weights/pallet_bags_list.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_bags_list`. @@ -49,7 +49,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:4 w:4) // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(61_333_000 as u64) + // Minimum execution time: 64_054 nanoseconds. + Weight::from_ref_time(64_863_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -58,7 +59,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - Weight::from_ref_time(59_741_000 as u64) + // Minimum execution time: 68_386 nanoseconds. + Weight::from_ref_time(74_597_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -68,7 +70,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - Weight::from_ref_time(59_689_000 as u64) + // Minimum execution time: 71_132 nanoseconds. + Weight::from_ref_time(79_636_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_balances.rs b/runtime/polkadot/src/weights/pallet_balances.rs index 45878e2701e5..4c6a894714f6 100644 --- a/runtime/polkadot/src/weights/pallet_balances.rs +++ b/runtime/polkadot/src/weights/pallet_balances.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -46,43 +46,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(39_352_000 as u64) + // Minimum execution time: 41_279 nanoseconds. + Weight::from_ref_time(41_738_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(29_209_000 as u64) + // Minimum execution time: 30_237 nanoseconds. + Weight::from_ref_time(30_631_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(21_928_000 as u64) + // Minimum execution time: 22_939 nanoseconds. + Weight::from_ref_time(23_320_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(24_992_000 as u64) + // Minimum execution time: 25_940 nanoseconds. + Weight::from_ref_time(26_584_000 as u64) .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) fn force_transfer() -> Weight { - Weight::from_ref_time(39_081_000 as u64) + // Minimum execution time: 40_393 nanoseconds. + Weight::from_ref_time(40_921_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(33_031_000 as u64) + // Minimum execution time: 35_485 nanoseconds. + Weight::from_ref_time(36_121_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(18_389_000 as u64) + // Minimum execution time: 19_966 nanoseconds. + Weight::from_ref_time(20_434_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_bounties.rs b/runtime/polkadot/src/weights/pallet_bounties.rs index a36e24bde2c6..8f6404894cee 100644 --- a/runtime/polkadot/src/weights/pallet_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_bounties`. @@ -50,43 +50,49 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: Bounties Bounties (r:0 w:1) /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { - Weight::from_ref_time(28_317_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 29_378 nanoseconds. + Weight::from_ref_time(32_175_061 as u64) + // Standard Error: 18 + .saturating_add(Weight::from_ref_time(829 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: Bounties BountyApprovals (r:1 w:1) fn approve_bounty() -> Weight { - Weight::from_ref_time(11_513_000 as u64) + // Minimum execution time: 12_073 nanoseconds. + Weight::from_ref_time(12_863_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn propose_curator() -> Weight { - Weight::from_ref_time(10_931_000 as u64) + // Minimum execution time: 11_317 nanoseconds. + Weight::from_ref_time(11_559_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn unassign_curator() -> Weight { - Weight::from_ref_time(39_279_000 as u64) + // Minimum execution time: 40_364 nanoseconds. + Weight::from_ref_time(40_970_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn accept_curator() -> Weight { - Weight::from_ref_time(27_265_000 as u64) + // Minimum execution time: 28_522 nanoseconds. + Weight::from_ref_time(29_027_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: ChildBounties ParentChildBounties (r:1 w:0) fn award_bounty() -> Weight { - Weight::from_ref_time(23_378_000 as u64) + // Minimum execution time: 24_756 nanoseconds. + Weight::from_ref_time(25_056_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,7 +101,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - Weight::from_ref_time(67_940_000 as u64) + // Minimum execution time: 69_714 nanoseconds. + Weight::from_ref_time(70_332_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -104,7 +111,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - Weight::from_ref_time(42_622_000 as u64) + // Minimum execution time: 44_853 nanoseconds. + Weight::from_ref_time(45_328_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -113,24 +121,27 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - Weight::from_ref_time(51_906_000 as u64) + // Minimum execution time: 53_131 nanoseconds. + Weight::from_ref_time(53_605_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn extend_bounty_expiry() -> Weight { - Weight::from_ref_time(19_709_000 as u64) + // Minimum execution time: 21_458 nanoseconds. + Weight::from_ref_time(21_732_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties BountyApprovals (r:1 w:1) - // Storage: Bounties Bounties (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `b` is `[1, 100]`. + // Storage: Bounties Bounties (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `b` is `[0, 100]`. fn spend_funds(b: u32, ) -> Weight { - Weight::from_ref_time(13_392_000 as u64) - // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(25_680_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 7_421 nanoseconds. + Weight::from_ref_time(12_894_197 as u64) + // Standard Error: 22_528 + .saturating_add(Weight::from_ref_time(25_161_376 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) diff --git a/runtime/polkadot/src/weights/pallet_child_bounties.rs b/runtime/polkadot/src/weights/pallet_child_bounties.rs index 9032a46cf999..fdb9632d05b2 100644 --- a/runtime/polkadot/src/weights/pallet_child_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_child_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_child_bounties`. @@ -52,9 +52,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(50_251_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 51_343 nanoseconds. + Weight::from_ref_time(53_139_500 as u64) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(950 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,7 +63,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(18_172_000 as u64) + // Minimum execution time: 18_618 nanoseconds. + Weight::from_ref_time(19_241_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,7 +72,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(32_032_000 as u64) + // Minimum execution time: 34_559 nanoseconds. + Weight::from_ref_time(34_899_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,14 +81,16 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(43_630_000 as u64) + // Minimum execution time: 45_199 nanoseconds. + Weight::from_ref_time(45_846_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:0) // Storage: ChildBounties ChildBounties (r:1 w:1) fn award_child_bounty() -> Weight { - Weight::from_ref_time(26_677_000 as u64) + // Minimum execution time: 28_459 nanoseconds. + Weight::from_ref_time(28_782_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -94,7 +99,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(65_968_000 as u64) + // Minimum execution time: 68_148 nanoseconds. + Weight::from_ref_time(69_069_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -105,7 +111,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(49_350_000 as u64) + // Minimum execution time: 51_256 nanoseconds. + Weight::from_ref_time(51_850_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -116,7 +123,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(58_604_000 as u64) + // Minimum execution time: 62_367 nanoseconds. + Weight::from_ref_time(63_053_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_collective_council.rs b/runtime/polkadot/src/weights/pallet_collective_council.rs index 8ec2346b4c18..e44da780e45f 100644 --- a/runtime/polkadot/src/weights/pallet_collective_council.rs +++ b/runtime/polkadot/src/weights/pallet_collective_council.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. @@ -46,20 +46,21 @@ pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { // Storage: Council Members (r:1 w:1) // Storage: Council Proposals (r:1 w:0) - // Storage: Council Voting (r:100 w:100) // Storage: Council Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(9_455_000 as u64).saturating_mul(m as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(11_655_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 17_210 nanoseconds. + Weight::from_ref_time(17_530_000 as u64) + // Standard Error: 45_117 + .saturating_add(Weight::from_ref_time(5_249_798 as u64).saturating_mul(m as u64)) + // Standard Error: 45_117 + .saturating_add(Weight::from_ref_time(7_324_560 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -71,11 +72,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(17_969_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(16_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 19_994 nanoseconds. + Weight::from_ref_time(19_549_331 as u64) + // Standard Error: 26 + .saturating_add(Weight::from_ref_time(1_853 as u64).saturating_mul(b as u64)) + // Standard Error: 269 + .saturating_add(Weight::from_ref_time(13_555 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -85,11 +87,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(20_152_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_337 nanoseconds. + Weight::from_ref_time(21_334_737 as u64) + // Standard Error: 89 + .saturating_add(Weight::from_ref_time(2_105 as u64).saturating_mul(b as u64)) + // Standard Error: 925 + .saturating_add(Weight::from_ref_time(26_733 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -104,13 +107,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(27_034_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(19_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(98_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_783 nanoseconds. + Weight::from_ref_time(27_684_184 as u64) + // Standard Error: 72 + .saturating_add(Weight::from_ref_time(3_800 as u64).saturating_mul(b as u64)) + // Standard Error: 761 + .saturating_add(Weight::from_ref_time(24_502 as u64).saturating_mul(m as u64)) + // Standard Error: 751 + .saturating_add(Weight::from_ref_time(115_019 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -119,9 +123,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(26_472_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(36_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 27_444 nanoseconds. + Weight::from_ref_time(28_598_559 as u64) + // Standard Error: 401 + .saturating_add(Weight::from_ref_time(39_653 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -134,11 +139,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(30_247_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(25_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(81_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 30_342 nanoseconds. + Weight::from_ref_time(32_791_699 as u64) + // Standard Error: 528 + .saturating_add(Weight::from_ref_time(23_619 as u64).saturating_mul(m as u64)) + // Standard Error: 515 + .saturating_add(Weight::from_ref_time(84_196 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -153,13 +159,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(39_632_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 41_134 nanoseconds. + Weight::from_ref_time(41_249_837 as u64) + // Standard Error: 60 + .saturating_add(Weight::from_ref_time(2_093 as u64).saturating_mul(b as u64)) + // Standard Error: 636 + .saturating_add(Weight::from_ref_time(28_014 as u64).saturating_mul(m as u64)) + // Standard Error: 620 + .saturating_add(Weight::from_ref_time(101_117 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -173,11 +180,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(32_323_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(83_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 33_724 nanoseconds. + Weight::from_ref_time(35_254_396 as u64) + // Standard Error: 517 + .saturating_add(Weight::from_ref_time(25_053 as u64).saturating_mul(m as u64)) + // Standard Error: 504 + .saturating_add(Weight::from_ref_time(83_886 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -193,13 +201,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(41_345_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 43_271 nanoseconds. + Weight::from_ref_time(43_900_162 as u64) + // Standard Error: 61 + .saturating_add(Weight::from_ref_time(1_982 as u64).saturating_mul(b as u64)) + // Standard Error: 649 + .saturating_add(Weight::from_ref_time(25_510 as u64).saturating_mul(m as u64)) + // Standard Error: 633 + .saturating_add(Weight::from_ref_time(101_004 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -209,9 +218,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(21_279_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 19_186 nanoseconds. + Weight::from_ref_time(22_558_610 as u64) + // Standard Error: 701 + .saturating_add(Weight::from_ref_time(96_319 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_collective_technical_committee.rs b/runtime/polkadot/src/weights/pallet_collective_technical_committee.rs index 3ff7d72e0e57..024a7635897e 100644 --- a/runtime/polkadot/src/weights/pallet_collective_technical_committee.rs +++ b/runtime/polkadot/src/weights/pallet_collective_technical_committee.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. @@ -46,22 +46,21 @@ pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) - // Storage: TechnicalCommittee Voting (r:100 w:100) // Storage: TechnicalCommittee Prime (r:0 w:1) - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - /// The range of component `m` is `[1, 100]`. - /// The range of component `n` is `[1, 100]`. - /// The range of component `p` is `[1, 100]`. - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(9_684_000 as u64).saturating_mul(m as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(n as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(11_913_000 as u64).saturating_mul(p as u64)) + // Storage: TechnicalCommittee Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 17_751 nanoseconds. + Weight::from_ref_time(18_047_000 as u64) + // Standard Error: 46_093 + .saturating_add(Weight::from_ref_time(5_321_338 as u64).saturating_mul(m as u64)) + // Standard Error: 46_093 + .saturating_add(Weight::from_ref_time(7_365_838 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -73,11 +72,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(18_444_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(14_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_410 nanoseconds. + Weight::from_ref_time(19_931_408 as u64) + // Standard Error: 21 + .saturating_add(Weight::from_ref_time(1_918 as u64).saturating_mul(b as u64)) + // Standard Error: 218 + .saturating_add(Weight::from_ref_time(13_235 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -87,11 +87,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[1, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(20_360_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(20_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_194 nanoseconds. + Weight::from_ref_time(21_888_541 as u64) + // Standard Error: 25 + .saturating_add(Weight::from_ref_time(2_039 as u64).saturating_mul(b as u64)) + // Standard Error: 259 + .saturating_add(Weight::from_ref_time(21_726 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -106,13 +107,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(28_324_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(19_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(101_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_672 nanoseconds. + Weight::from_ref_time(29_100_596 as u64) + // Standard Error: 69 + .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(b as u64)) + // Standard Error: 724 + .saturating_add(Weight::from_ref_time(19_233 as u64).saturating_mul(m as u64)) + // Standard Error: 715 + .saturating_add(Weight::from_ref_time(119_783 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -121,9 +123,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[5, 100]`. /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(27_893_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(35_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 29_125 nanoseconds. + Weight::from_ref_time(30_445_599 as u64) + // Standard Error: 508 + .saturating_add(Weight::from_ref_time(39_802 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -136,11 +139,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(31_064_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(25_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(81_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 32_071 nanoseconds. + Weight::from_ref_time(33_525_762 as u64) + // Standard Error: 478 + .saturating_add(Weight::from_ref_time(24_412 as u64).saturating_mul(m as u64)) + // Standard Error: 466 + .saturating_add(Weight::from_ref_time(84_991 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -155,13 +159,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(40_289_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 41_643 nanoseconds. + Weight::from_ref_time(41_807_491 as u64) + // Standard Error: 60 + .saturating_add(Weight::from_ref_time(1_950 as u64).saturating_mul(b as u64)) + // Standard Error: 641 + .saturating_add(Weight::from_ref_time(26_528 as u64).saturating_mul(m as u64)) + // Standard Error: 625 + .saturating_add(Weight::from_ref_time(101_337 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -175,11 +180,12 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(33_218_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(28_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(82_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 34_324 nanoseconds. + Weight::from_ref_time(35_486_550 as u64) + // Standard Error: 575 + .saturating_add(Weight::from_ref_time(29_066 as u64).saturating_mul(m as u64)) + // Standard Error: 561 + .saturating_add(Weight::from_ref_time(86_407 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -195,13 +201,14 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(41_967_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(90_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 43_484 nanoseconds. + Weight::from_ref_time(43_730_713 as u64) + // Standard Error: 61 + .saturating_add(Weight::from_ref_time(2_043 as u64).saturating_mul(b as u64)) + // Standard Error: 648 + .saturating_add(Weight::from_ref_time(28_523 as u64).saturating_mul(m as u64)) + // Standard Error: 632 + .saturating_add(Weight::from_ref_time(103_704 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -211,9 +218,10 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(21_586_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 19_657 nanoseconds. + Weight::from_ref_time(22_843_773 as u64) + // Standard Error: 713 + .saturating_add(Weight::from_ref_time(100_683 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_democracy.rs b/runtime/polkadot/src/weights/pallet_democracy.rs index 136797abcf03..4c7de43d9512 100644 --- a/runtime/polkadot/src/weights/pallet_democracy.rs +++ b/runtime/polkadot/src/weights/pallet_democracy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/polkadot/src/weights +// --output=./runtime/polkadot/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,13 +49,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - Weight::from_ref_time(42_048_000 as u64) + // Minimum execution time: 42_967 nanoseconds. + Weight::from_ref_time(43_770_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy DepositOf (r:1 w:1) fn second() -> Weight { - Weight::from_ref_time(38_631_000 as u64) + // Minimum execution time: 39_741 nanoseconds. + Weight::from_ref_time(41_106_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -63,7 +65,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - Weight::from_ref_time(48_571_000 as u64) + // Minimum execution time: 50_419 nanoseconds. + Weight::from_ref_time(51_479_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -71,14 +74,16 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - Weight::from_ref_time(48_556_000 as u64) + // Minimum execution time: 51_170 nanoseconds. + Weight::from_ref_time(51_755_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - Weight::from_ref_time(20_104_000 as u64) + // Minimum execution time: 21_378 nanoseconds. + Weight::from_ref_time(21_957_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,39 +94,45 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - Weight::from_ref_time(75_289_000 as u64) + // Minimum execution time: 77_526 nanoseconds. + Weight::from_ref_time(79_470_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose() -> Weight { - Weight::from_ref_time(15_734_000 as u64) + // Minimum execution time: 16_498 nanoseconds. + Weight::from_ref_time(17_076_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - Weight::from_ref_time(4_507_000 as u64) + // Minimum execution time: 4_502 nanoseconds. + Weight::from_ref_time(4_690_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - Weight::from_ref_time(4_603_000 as u64) + // Minimum execution time: 4_599 nanoseconds. + Weight::from_ref_time(4_750_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - Weight::from_ref_time(19_816_000 as u64) + // Minimum execution time: 20_905 nanoseconds. + Weight::from_ref_time(21_387_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external() -> Weight { - Weight::from_ref_time(25_722_000 as u64) + // Minimum execution time: 26_946 nanoseconds. + Weight::from_ref_time(27_534_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -129,13 +140,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - Weight::from_ref_time(63_768_000 as u64) + // Minimum execution time: 65_837 nanoseconds. + Weight::from_ref_time(66_889_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - Weight::from_ref_time(13_183_000 as u64) + // Minimum execution time: 13_714 nanoseconds. + Weight::from_ref_time(14_237_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -143,9 +156,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - Weight::from_ref_time(5_999_000 as u64) - // Standard Error: 2_072 - .saturating_add(Weight::from_ref_time(2_080_681 as u64).saturating_mul(r as u64)) + // Minimum execution time: 6_405 nanoseconds. + Weight::from_ref_time(9_620_132 as u64) + // Standard Error: 3_895 + .saturating_add(Weight::from_ref_time(2_076_637 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -158,9 +172,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - Weight::from_ref_time(8_114_000 as u64) - // Standard Error: 2_286 - .saturating_add(Weight::from_ref_time(2_087_574 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_766 nanoseconds. + Weight::from_ref_time(12_133_052 as u64) + // Standard Error: 4_049 + .saturating_add(Weight::from_ref_time(2_074_530 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -170,9 +185,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(40_509_000 as u64) - // Standard Error: 3_676 - .saturating_add(Weight::from_ref_time(2_999_395 as u64).saturating_mul(r as u64)) + // Minimum execution time: 42_683 nanoseconds. + Weight::from_ref_time(48_330_501 as u64) + // Standard Error: 7_233 + .saturating_add(Weight::from_ref_time(2_994_008 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -182,9 +198,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(24_592_000 as u64) - // Standard Error: 2_506 - .saturating_add(Weight::from_ref_time(2_932_469 as u64).saturating_mul(r as u64)) + // Minimum execution time: 25_626 nanoseconds. + Weight::from_ref_time(29_036_412 as u64) + // Standard Error: 4_605 + .saturating_add(Weight::from_ref_time(2_952_295 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -192,7 +209,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - Weight::from_ref_time(5_070_000 as u64) + // Minimum execution time: 4_943 nanoseconds. + Weight::from_ref_time(5_130_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -200,9 +218,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { - Weight::from_ref_time(23_860_000 as u64) - // Standard Error: 2_624 - .saturating_add(Weight::from_ref_time(129_209 as u64).saturating_mul(r as u64)) + // Minimum execution time: 25_894 nanoseconds. + Weight::from_ref_time(32_320_132 as u64) + // Standard Error: 1_445 + .saturating_add(Weight::from_ref_time(30_390 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -211,9 +230,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { - Weight::from_ref_time(28_512_000 as u64) - // Standard Error: 619 - .saturating_add(Weight::from_ref_time(84_477 as u64).saturating_mul(r as u64)) + // Minimum execution time: 30_098 nanoseconds. + Weight::from_ref_time(31_959_025 as u64) + // Standard Error: 673 + .saturating_add(Weight::from_ref_time(70_608 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -221,9 +241,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_612_000 as u64) - // Standard Error: 841 - .saturating_add(Weight::from_ref_time(98_567 as u64).saturating_mul(r as u64)) + // Minimum execution time: 15_813 nanoseconds. + Weight::from_ref_time(18_185_628 as u64) + // Standard Error: 850 + .saturating_add(Weight::from_ref_time(78_098 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -231,9 +252,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_282_000 as u64) - // Standard Error: 1_040 - .saturating_add(Weight::from_ref_time(104_928 as u64).saturating_mul(r as u64)) + // Minimum execution time: 15_738 nanoseconds. + Weight::from_ref_time(18_380_060 as u64) + // Standard Error: 970 + .saturating_add(Weight::from_ref_time(77_708 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs index 4a7f68237716..797b0037b070 100644 --- a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. @@ -53,33 +53,38 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(15_195_000 as u64) + // Minimum execution time: 16_179 nanoseconds. + Weight::from_ref_time(16_599_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(14_471_000 as u64) + // Minimum execution time: 15_355 nanoseconds. + Weight::from_ref_time(15_840_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(13_680_000 as u64) + // Minimum execution time: 14_708 nanoseconds. + Weight::from_ref_time(15_094_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(28_132_000 as u64) + // Minimum execution time: 29_850 nanoseconds. + Weight::from_ref_time(30_766_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(21_833_000 as u64) + // Minimum execution time: 25_348 nanoseconds. + Weight::from_ref_time(26_069_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,12 +93,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. - fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(448_000 as u64).saturating_mul(v as u64)) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(223_000 as u64).saturating_mul(t as u64)) + fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { + // Minimum execution time: 431_296 nanoseconds. + Weight::from_ref_time(441_927_000 as u64) + // Standard Error: 2_405 + .saturating_add(Weight::from_ref_time(259_124 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -108,10 +112,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn elect_queued(a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(176_492_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(305_000 as u64).saturating_mul(a as u64)) + fn elect_queued(a: u32, d: u32, ) -> Weight { + // Minimum execution time: 281_284 nanoseconds. + Weight::from_ref_time(93_886_656 as u64) + // Standard Error: 5_123 + .saturating_add(Weight::from_ref_time(305_112 as u64).saturating_mul(a as u64)) + // Standard Error: 7_679 + .saturating_add(Weight::from_ref_time(150_164 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -122,7 +129,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(47_621_000 as u64) + // Minimum execution time: 49_731 nanoseconds. + Weight::from_ref_time(50_382_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -137,16 +145,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(765_000 as u64).saturating_mul(v as u64)) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(34_000 as u64).saturating_mul(t as u64)) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(7_231_000 as u64).saturating_mul(a as u64)) - // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(1_703_000 as u64).saturating_mul(d as u64)) + fn submit_unsigned(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 4_693_663 nanoseconds. + Weight::from_ref_time(4_728_052_000 as u64) + // Standard Error: 14_708 + .saturating_add(Weight::from_ref_time(99_516 as u64).saturating_mul(v as u64)) + // Standard Error: 43_588 + .saturating_add(Weight::from_ref_time(4_479_682 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -158,16 +163,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(789_000 as u64).saturating_mul(v as u64)) - // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(41_000 as u64).saturating_mul(t as u64)) - // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(5_713_000 as u64).saturating_mul(a as u64)) - // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(1_311_000 as u64).saturating_mul(d as u64)) + fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 3_895_772 nanoseconds. + Weight::from_ref_time(3_953_808_000 as u64) + // Standard Error: 12_413 + .saturating_add(Weight::from_ref_time(233_081 as u64).saturating_mul(v as u64)) + // Standard Error: 36_787 + .saturating_add(Weight::from_ref_time(3_177_044 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs index 508af82266fe..be3de6f45c91 100644 --- a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs +++ b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. @@ -51,9 +51,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - Weight::from_ref_time(30_686_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(200_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 32_564 nanoseconds. + Weight::from_ref_time(33_571_516 as u64) + // Standard Error: 3_881 + .saturating_add(Weight::from_ref_time(223_347 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -64,9 +65,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - Weight::from_ref_time(40_127_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(213_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 42_211 nanoseconds. + Weight::from_ref_time(43_972_399 as u64) + // Standard Error: 5_870 + .saturating_add(Weight::from_ref_time(192_313 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,16 +79,18 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - Weight::from_ref_time(39_986_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(226_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 42_918 nanoseconds. + Weight::from_ref_time(43_559_758 as u64) + // Standard Error: 30_177 + .saturating_add(Weight::from_ref_time(264_050 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn remove_voter() -> Weight { - Weight::from_ref_time(39_114_000 as u64) + // Minimum execution time: 42_081 nanoseconds. + Weight::from_ref_time(42_705_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -95,18 +99,20 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { - Weight::from_ref_time(27_187_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 38_084 nanoseconds. + Weight::from_ref_time(30_323_420 as u64) + // Standard Error: 1_137 + .saturating_add(Weight::from_ref_time(92_216 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: PhragmenElection Candidates (r:1 w:1) /// The range of component `c` is `[1, 1000]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - Weight::from_ref_time(23_114_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(67_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 32_052 nanoseconds. + Weight::from_ref_time(23_967_172 as u64) + // Standard Error: 1_006 + .saturating_add(Weight::from_ref_time(69_919 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -116,18 +122,21 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn renounce_candidacy_members() -> Weight { - Weight::from_ref_time(44_892_000 as u64) + // Minimum execution time: 44_658 nanoseconds. + Weight::from_ref_time(46_150_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: PhragmenElection RunnersUp (r:1 w:1) fn renounce_candidacy_runners_up() -> Weight { - Weight::from_ref_time(34_318_000 as u64) + // Minimum execution time: 34_466 nanoseconds. + Weight::from_ref_time(36_065_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn remove_member_without_replacement() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: PhragmenElection Members (r:1 w:1) @@ -137,7 +146,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn remove_member_with_replacement() -> Weight { - Weight::from_ref_time(59_226_000 as u64) + // Minimum execution time: 59_328 nanoseconds. + Weight::from_ref_time(59_980_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,13 +158,12 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:5000 w:5000) // Storage: System Account (r:5000 w:5000) /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[1, 5000]`. - fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 86_000 - .saturating_add(Weight::from_ref_time(60_379_000 as u64).saturating_mul(v as u64)) - // Standard Error: 86_000 - .saturating_add(Weight::from_ref_time(543_000 as u64).saturating_mul(d as u64)) + /// The range of component `d` is `[0, 5000]`. + fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { + // Minimum execution time: 281_848_917 nanoseconds. + Weight::from_ref_time(282_529_259_000 as u64) + // Standard Error: 244_287 + .saturating_add(Weight::from_ref_time(34_643_190 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64))) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) @@ -172,14 +181,16 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `v` is `[1, 10000]`. /// The range of component `e` is `[10000, 160000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 674_000 - .saturating_add(Weight::from_ref_time(52_473_000 as u64).saturating_mul(v as u64)) - // Standard Error: 44_000 - .saturating_add(Weight::from_ref_time(2_826_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 28_514_414 nanoseconds. + Weight::from_ref_time(28_653_120_000 as u64) + // Standard Error: 451_970 + .saturating_add(Weight::from_ref_time(41_012_837 as u64).saturating_mul(v as u64)) + // Standard Error: 29_004 + .saturating_add(Weight::from_ref_time(2_024_452 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(269 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) + .saturating_add(T::DbWeight::get().writes(6 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } } diff --git a/runtime/polkadot/src/weights/pallet_fast_unstake.rs b/runtime/polkadot/src/weights/pallet_fast_unstake.rs index 8752534c8a30..6f1b4cb0d878 100644 --- a/runtime/polkadot/src/weights/pallet_fast_unstake.rs +++ b/runtime/polkadot/src/weights/pallet_fast_unstake.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=polkadot-dev // --steps=50 // --repeat=20 +// --pallet=pallet_fast_unstake // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_fast_unstake -// --chain=polkadot-dev // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/ @@ -50,65 +49,72 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Ledger (r:0 w:1) - // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SlashingSpans (r:64 w:0) + // Storage: Staking Bonded (r:64 w:64) + // Storage: Staking Validators (r:64 w:0) + // Storage: Staking Nominators (r:64 w:0) + // Storage: System Account (r:64 w:64) + // Storage: Balances Locks (r:64 w:64) + // Storage: Staking Ledger (r:0 w:64) + // Storage: Staking Payee (r:0 w:64) fn on_idle_unstake() -> Weight { - Weight::from_ref_time(67_082_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 2_143_088 nanoseconds. + Weight::from_ref_time(2_180_693_000 as u64) + .saturating_add(T::DbWeight::get().reads(389 as u64)) + .saturating_add(T::DbWeight::get().writes(321 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking ValidatorCount (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) - // Storage: FastUnstake Queue (r:2 w:1) + // Storage: FastUnstake Queue (r:65 w:64) // Storage: FastUnstake CounterForQueue (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking ErasStakers (r:56 w:0) /// The range of component `x` is `[28, 3584]`. fn on_idle_check(x: u32, ) -> Weight { - Weight::from_ref_time(504_317_000 as u64) - // Standard Error: 18_023 - .saturating_add(Weight::from_ref_time(14_203_535 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(64 as u64)) + // Minimum execution time: 28_585_887 nanoseconds. + Weight::from_ref_time(28_897_826_000 as u64) + // Standard Error: 697_438 + .saturating_add(Weight::from_ref_time(864_448_829 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(85 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(66 as u64)) } + // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: FastUnstake Queue (r:1 w:1) // Storage: FastUnstake Head (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) + // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn register_fast_unstake() -> Weight { - Weight::from_ref_time(90_682_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) + // Minimum execution time: 125_199 nanoseconds. + Weight::from_ref_time(127_131_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } + // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: FastUnstake Queue (r:1 w:1) // Storage: FastUnstake Head (r:1 w:0) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn deregister() -> Weight { - Weight::from_ref_time(23_926_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 50_373 nanoseconds. + Weight::from_ref_time(51_451_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) fn control() -> Weight { - Weight::from_ref_time(3_899_000 as u64) + // Minimum execution time: 4_124 nanoseconds. + Weight::from_ref_time(4_273_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_identity.rs b/runtime/polkadot/src/weights/pallet_identity.rs index f7e90a178a38..59ef2e0e29eb 100644 --- a/runtime/polkadot/src/weights/pallet_identity.rs +++ b/runtime/polkadot/src/weights/pallet_identity.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_identity`. @@ -47,32 +47,35 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(16_888_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(157_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 17_728 nanoseconds. + Weight::from_ref_time(18_802_571 as u64) + // Standard Error: 2_795 + .saturating_add(Weight::from_ref_time(141_858 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(31_138_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(188_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(306_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 36_405 nanoseconds. + Weight::from_ref_time(36_175_137 as u64) + // Standard Error: 3_748 + .saturating_add(Weight::from_ref_time(79_184 as u64).saturating_mul(r as u64)) + // Standard Error: 731 + .saturating_add(Weight::from_ref_time(336_404 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Storage: Identity SuperOf (r:2 w:2) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(28_095_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_071_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_420 nanoseconds. + Weight::from_ref_time(29_465_886 as u64) + // Standard Error: 5_250 + .saturating_add(Weight::from_ref_time(2_141_877 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -80,12 +83,13 @@ impl pallet_identity::WeightInfo for WeightInfo { } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Storage: Identity SuperOf (r:0 w:2) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(28_614_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(895_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_452 nanoseconds. + Weight::from_ref_time(29_027_753 as u64) + // Standard Error: 4_422 + .saturating_add(Weight::from_ref_time(927_954 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -94,16 +98,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(35_665_000 as u64) - // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(889_000 as u64).saturating_mul(s as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 52_757 nanoseconds. + Weight::from_ref_time(37_480_393 as u64) + // Standard Error: 5_162 + .saturating_add(Weight::from_ref_time(74_235 as u64).saturating_mul(r as u64)) + // Standard Error: 1_008 + .saturating_add(Weight::from_ref_time(889_324 as u64).saturating_mul(s as u64)) + // Standard Error: 1_008 + .saturating_add(Weight::from_ref_time(175_597 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -111,65 +116,71 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(34_417_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(129_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(313_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 38_614 nanoseconds. + Weight::from_ref_time(36_952_302 as u64) + // Standard Error: 4_162 + .saturating_add(Weight::from_ref_time(117_466 as u64).saturating_mul(r as u64)) + // Standard Error: 812 + .saturating_add(Weight::from_ref_time(360_113 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(31_051_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(131_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(312_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 34_487 nanoseconds. + Weight::from_ref_time(33_137_826 as u64) + // Standard Error: 4_408 + .saturating_add(Weight::from_ref_time(130_256 as u64).saturating_mul(r as u64)) + // Standard Error: 860 + .saturating_add(Weight::from_ref_time(358_444 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(9_068_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(129_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_981 nanoseconds. + Weight::from_ref_time(9_912_405 as u64) + // Standard Error: 2_270 + .saturating_add(Weight::from_ref_time(125_220 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(9_175_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(130_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_134 nanoseconds. + Weight::from_ref_time(10_168_184 as u64) + // Standard Error: 2_481 + .saturating_add(Weight::from_ref_time(118_366 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(9_306_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(105_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_316 nanoseconds. + Weight::from_ref_time(9_969_317 as u64) + // Standard Error: 1_769 + .saturating_add(Weight::from_ref_time(120_680 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(23_500_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(132_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(313_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 29_275 nanoseconds. + Weight::from_ref_time(27_614_499 as u64) + // Standard Error: 5_680 + .saturating_add(Weight::from_ref_time(111_852 as u64).saturating_mul(r as u64)) + // Standard Error: 1_051 + .saturating_add(Weight::from_ref_time(603_502 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -178,14 +189,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. - fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { - Weight::from_ref_time(46_776_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(890_000 as u64).saturating_mul(s as u64)) + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Minimum execution time: 64_116 nanoseconds. + Weight::from_ref_time(48_330_163 as u64) + // Standard Error: 5_125 + .saturating_add(Weight::from_ref_time(124_589 as u64).saturating_mul(r as u64)) + // Standard Error: 1_000 + .saturating_add(Weight::from_ref_time(907_109 as u64).saturating_mul(s as u64)) + // Standard Error: 1_000 + .saturating_add(Weight::from_ref_time(166_050 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -193,11 +207,12 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(35_995_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(72_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_248 nanoseconds. + Weight::from_ref_time(38_740_222 as u64) + // Standard Error: 1_876 + .saturating_add(Weight::from_ref_time(78_534 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -205,9 +220,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(15_390_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(28_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 14_319 nanoseconds. + Weight::from_ref_time(16_793_491 as u64) + // Standard Error: 706 + .saturating_add(Weight::from_ref_time(25_971 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -216,19 +232,21 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(37_190_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(67_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_248 nanoseconds. + Weight::from_ref_time(40_083_859 as u64) + // Standard Error: 1_215 + .saturating_add(Weight::from_ref_time(66_182 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(28_005_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 25_792 nanoseconds. + Weight::from_ref_time(29_482_631 as u64) + // Standard Error: 1_182 + .saturating_add(Weight::from_ref_time(71_110 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_im_online.rs b/runtime/polkadot/src/weights/pallet_im_online.rs index 67c03022b125..eb2fbb22bcc7 100644 --- a/runtime/polkadot/src/weights/pallet_im_online.rs +++ b/runtime/polkadot/src/weights/pallet_im_online.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. @@ -52,11 +52,12 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(76_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(23_000 as u64).saturating_mul(k as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(291_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 96_848 nanoseconds. + Weight::from_ref_time(76_934_215 as u64) + // Standard Error: 356 + .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(k as u64)) + // Standard Error: 3_595 + .saturating_add(Weight::from_ref_time(319_684 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_indices.rs b/runtime/polkadot/src/weights/pallet_indices.rs index 2bfb79cf8ba4..6f02c6e01041 100644 --- a/runtime/polkadot/src/weights/pallet_indices.rs +++ b/runtime/polkadot/src/weights/pallet_indices.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_indices`. @@ -46,33 +46,38 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(24_909_000 as u64) + // Minimum execution time: 27_020 nanoseconds. + Weight::from_ref_time(27_507_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(31_373_000 as u64) + // Minimum execution time: 32_499 nanoseconds. + Weight::from_ref_time(32_898_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - Weight::from_ref_time(25_840_000 as u64) + // Minimum execution time: 27_796 nanoseconds. + Weight::from_ref_time(28_283_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - Weight::from_ref_time(26_189_000 as u64) + // Minimum execution time: 28_389 nanoseconds. + Weight::from_ref_time(28_796_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - Weight::from_ref_time(31_330_000 as u64) + // Minimum execution time: 33_329 nanoseconds. + Weight::from_ref_time(34_108_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_membership.rs b/runtime/polkadot/src/weights/pallet_membership.rs index dccfed9e5f3b..86f88fa0984c 100644 --- a/runtime/polkadot/src/weights/pallet_membership.rs +++ b/runtime/polkadot/src/weights/pallet_membership.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_membership`. @@ -50,9 +50,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_ref_time(19_886_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(31_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_390 nanoseconds. + Weight::from_ref_time(22_044_878 as u64) + // Standard Error: 797 + .saturating_add(Weight::from_ref_time(33_243 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -63,9 +64,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_ref_time(22_104_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_013 nanoseconds. + Weight::from_ref_time(23_713_008 as u64) + // Standard Error: 481 + .saturating_add(Weight::from_ref_time(38_172 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -76,9 +78,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_ref_time(22_139_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_198 nanoseconds. + Weight::from_ref_time(23_817_539 as u64) + // Standard Error: 644 + .saturating_add(Weight::from_ref_time(49_693 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -89,9 +92,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_ref_time(22_002_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(147_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_542 nanoseconds. + Weight::from_ref_time(23_700_365 as u64) + // Standard Error: 776 + .saturating_add(Weight::from_ref_time(167_755 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -102,9 +106,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_ref_time(22_660_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_375 nanoseconds. + Weight::from_ref_time(24_305_512 as u64) + // Standard Error: 624 + .saturating_add(Weight::from_ref_time(49_648 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -113,17 +118,21 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_ref_time(8_013_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(9_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 8_276 nanoseconds. + Weight::from_ref_time(8_721_388 as u64) + // Standard Error: 211 + .saturating_add(Weight::from_ref_time(9_233 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. - fn clear_prime(_m: u32, ) -> Weight { - Weight::from_ref_time(4_708_000 as u64) + fn clear_prime(m: u32, ) -> Weight { + // Minimum execution time: 4_809 nanoseconds. + Weight::from_ref_time(5_110_419 as u64) + // Standard Error: 141 + .saturating_add(Weight::from_ref_time(1_010 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_multisig.rs b/runtime/polkadot/src/weights/pallet_multisig.rs index cd8a795eeaa3..60270bfec009 100644 --- a/runtime/polkadot/src/weights/pallet_multisig.rs +++ b/runtime/polkadot/src/weights/pallet_multisig.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -28,11 +28,11 @@ // --steps=50 // --repeat=20 // --pallet=pallet_multisig -// --extrinsic= +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=runtime/polkadot/src/weights/ +// --output=./runtime/polkadot/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,22 +46,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 14_333 nanoseconds. - Weight::from_ref_time(14_680_513 as u64) - // Standard Error: 3 - .saturating_add(Weight::from_ref_time(478 as u64).saturating_mul(z as u64)) + // Minimum execution time: 14_625 nanoseconds. + Weight::from_ref_time(15_168_661 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(700 as u64).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 41_940 nanoseconds. - Weight::from_ref_time(34_164_952 as u64) - // Standard Error: 758 - .saturating_add(Weight::from_ref_time(84_361 as u64).saturating_mul(s as u64)) + // Minimum execution time: 44_269 nanoseconds. + Weight::from_ref_time(36_420_603 as u64) + // Standard Error: 767 + .saturating_add(Weight::from_ref_time(84_830 as u64).saturating_mul(s as u64)) // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_515 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(1_740 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,12 +69,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 32_061 nanoseconds. - Weight::from_ref_time(25_242_175 as u64) - // Standard Error: 488 - .saturating_add(Weight::from_ref_time(74_544 as u64).saturating_mul(s as u64)) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_451 as u64).saturating_mul(z as u64)) + // Minimum execution time: 34_804 nanoseconds. + Weight::from_ref_time(27_400_589 as u64) + // Standard Error: 709 + .saturating_add(Weight::from_ref_time(80_170 as u64).saturating_mul(s as u64)) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(1_670 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,12 +83,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 45_799 nanoseconds. - Weight::from_ref_time(36_673_371 as u64) - // Standard Error: 602 - .saturating_add(Weight::from_ref_time(105_602 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_489 as u64).saturating_mul(z as u64)) + // Minimum execution time: 48_885 nanoseconds. + Weight::from_ref_time(38_719_746 as u64) + // Standard Error: 740 + .saturating_add(Weight::from_ref_time(109_443 as u64).saturating_mul(s as u64)) + // Standard Error: 7 + .saturating_add(Weight::from_ref_time(1_762 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -96,30 +96,30 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 30_746 nanoseconds. - Weight::from_ref_time(33_495_066 as u64) - // Standard Error: 1_027 - .saturating_add(Weight::from_ref_time(85_901 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_918 nanoseconds. + Weight::from_ref_time(35_114_296 as u64) + // Standard Error: 870 + .saturating_add(Weight::from_ref_time(88_713 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 21_939 nanoseconds. - Weight::from_ref_time(23_359_812 as u64) - // Standard Error: 626 - .saturating_add(Weight::from_ref_time(86_183 as u64).saturating_mul(s as u64)) + // Minimum execution time: 23_394 nanoseconds. + Weight::from_ref_time(25_193_425 as u64) + // Standard Error: 766 + .saturating_add(Weight::from_ref_time(84_508 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 32_246 nanoseconds. - Weight::from_ref_time(33_400_827 as u64) - // Standard Error: 746 - .saturating_add(Weight::from_ref_time(85_743 as u64).saturating_mul(s as u64)) + // Minimum execution time: 33_360 nanoseconds. + Weight::from_ref_time(35_598_264 as u64) + // Standard Error: 855 + .saturating_add(Weight::from_ref_time(85_941 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_nomination_pools.rs b/runtime/polkadot/src/weights/pallet_nomination_pools.rs index 90024d6ef55a..fe5b0e1ec8c3 100644 --- a/runtime/polkadot/src/weights/pallet_nomination_pools.rs +++ b/runtime/polkadot/src/weights/pallet_nomination_pools.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_nomination_pools`. @@ -47,18 +47,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) - // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn join() -> Weight { - Weight::from_ref_time(138_999_000 as u64) + // Minimum execution time: 143_368 nanoseconds. + Weight::from_ref_time(147_813_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -66,13 +67,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_transfer() -> Weight { - Weight::from_ref_time(134_798_000 as u64) + // Minimum execution time: 141_294 nanoseconds. + Weight::from_ref_time(142_580_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -80,13 +82,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:3) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:2 w:2) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_reward() -> Weight { - Weight::from_ref_time(138_061_000 as u64) + // Minimum execution time: 145_976 nanoseconds. + Weight::from_ref_time(149_745_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -95,13 +98,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim_payout() -> Weight { - Weight::from_ref_time(53_869_000 as u64) + // Minimum execution time: 54_743 nanoseconds. + Weight::from_ref_time(55_539_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,49 +114,53 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) // Storage: NominationPools SubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) fn unbond() -> Weight { - Weight::from_ref_time(138_663_000 as u64) + // Minimum execution time: 143_857 nanoseconds. + Weight::from_ref_time(145_751_000 as u64) .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { - Weight::from_ref_time(50_820_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 58_224 nanoseconds. + Weight::from_ref_time(59_802_225 as u64) + // Standard Error: 870 + .saturating_add(Weight::from_ref_time(19_208 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(91_686_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 98_968 nanoseconds. + Weight::from_ref_time(100_541_263 as u64) + // Standard Error: 1_330 + .saturating_add(Weight::from_ref_time(26_422 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) @@ -167,26 +176,28 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - Weight::from_ref_time(144_919_000 as u64) + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + // Minimum execution time: 149_053 nanoseconds. + Weight::from_ref_time(152_258_821 as u64) + // Standard Error: 2_471 + .saturating_add(Weight::from_ref_time(3_994 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(20 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } + // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: NominationPools MinCreateBond (r:1 w:0) // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools MaxPools (r:1 w:0) // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: NominationPools PoolMembers (r:1 w:1) - // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) // Storage: System Account (r:2 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: NominationPools CounterForRewardPools (r:1 w:1) @@ -195,36 +206,40 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - Weight::from_ref_time(128_829_000 as u64) - .saturating_add(T::DbWeight::get().reads(22 as u64)) + // Minimum execution time: 131_307 nanoseconds. + Weight::from_ref_time(131_903_000 as u64) + .saturating_add(T::DbWeight::get().reads(21 as u64)) .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking MaxNominatorsCount (r:1 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(60_631_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(988_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 63_797 nanoseconds. + Weight::from_ref_time(64_609_885 as u64) + // Standard Error: 7_244 + .saturating_add(Weight::from_ref_time(987_467 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) fn set_state() -> Weight { - Weight::from_ref_time(33_763_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Minimum execution time: 39_822 nanoseconds. + Weight::from_ref_time(40_523_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -232,9 +247,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForMetadata (r:1 w:1) /// The range of component `n` is `[1, 256]`. fn set_metadata(n: u32, ) -> Weight { - Weight::from_ref_time(16_470_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 15_620 nanoseconds. + Weight::from_ref_time(16_509_178 as u64) + // Standard Error: 137 + .saturating_add(Weight::from_ref_time(356 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -244,16 +260,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinCreateBond (r:0 w:1) // Storage: NominationPools MaxPools (r:0 w:1) fn set_configs() -> Weight { - Weight::from_ref_time(7_525_000 as u64) + // Minimum execution time: 6_536 nanoseconds. + Weight::from_ref_time(6_677_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - Weight::from_ref_time(25_910_000 as u64) + // Minimum execution time: 26_150 nanoseconds. + Weight::from_ref_time(26_682_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -262,8 +281,9 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(59_921_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 65_307 nanoseconds. + Weight::from_ref_time(66_030_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_preimage.rs b/runtime/polkadot/src/weights/pallet_preimage.rs index bd316e310277..b8c1eb4e40a9 100644 --- a/runtime/polkadot/src/weights/pallet_preimage.rs +++ b/runtime/polkadot/src/weights/pallet_preimage.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/polkadot/src/weights +// --output=./runtime/polkadot/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,9 +48,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(28_326_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_116 as u64).saturating_mul(s as u64)) + // Minimum execution time: 29_241 nanoseconds. + Weight::from_ref_time(29_702_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_485 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -58,9 +59,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(20_011_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_114 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_209 nanoseconds. + Weight::from_ref_time(21_369_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_482 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,66 +70,76 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(18_805_000 as u64) + // Minimum execution time: 19_543 nanoseconds. + Weight::from_ref_time(19_817_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_116 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_487 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(39_007_000 as u64) + // Minimum execution time: 41_035 nanoseconds. + Weight::from_ref_time(42_095_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(27_523_000 as u64) + // Minimum execution time: 28_472 nanoseconds. + Weight::from_ref_time(30_030_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(26_477_000 as u64) + // Minimum execution time: 28_034 nanoseconds. + Weight::from_ref_time(30_657_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(13_236_000 as u64) + // Minimum execution time: 15_756 nanoseconds. + Weight::from_ref_time(16_707_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(17_975_000 as u64) + // Minimum execution time: 17_491 nanoseconds. + Weight::from_ref_time(18_540_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(8_295_000 as u64) + // Minimum execution time: 8_636 nanoseconds. + Weight::from_ref_time(9_055_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(26_186_000 as u64) + // Minimum execution time: 28_146 nanoseconds. + Weight::from_ref_time(29_062_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(8_176_000 as u64) + // Minimum execution time: 8_541 nanoseconds. + Weight::from_ref_time(8_992_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(8_005_000 as u64) + // Minimum execution time: 8_558 nanoseconds. + Weight::from_ref_time(8_880_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_proxy.rs b/runtime/polkadot/src/weights/pallet_proxy.rs index 3897dadd865a..dd0d55a515a3 100644 --- a/runtime/polkadot/src/weights/pallet_proxy.rs +++ b/runtime/polkadot/src/weights/pallet_proxy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -47,9 +47,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_ref_time(20_123_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(66_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 20_608 nanoseconds. + Weight::from_ref_time(21_427_971 as u64) + // Standard Error: 1_454 + .saturating_add(Weight::from_ref_time(58_755 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -58,11 +59,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(37_255_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(37_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 38_933 nanoseconds. + Weight::from_ref_time(38_864_156 as u64) + // Standard Error: 2_331 + .saturating_add(Weight::from_ref_time(129_402 as u64).saturating_mul(a as u64)) + // Standard Error: 2_409 + .saturating_add(Weight::from_ref_time(37_803 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -71,11 +73,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_052_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(123_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_663 nanoseconds. + Weight::from_ref_time(28_155_321 as u64) + // Standard Error: 1_876 + .saturating_add(Weight::from_ref_time(119_017 as u64).saturating_mul(a as u64)) + // Standard Error: 1_939 + .saturating_add(Weight::from_ref_time(2_962 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -84,11 +87,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_446_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(108_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(8_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_838 nanoseconds. + Weight::from_ref_time(28_201_760 as u64) + // Standard Error: 1_761 + .saturating_add(Weight::from_ref_time(111_913 as u64).saturating_mul(a as u64)) + // Standard Error: 1_820 + .saturating_add(Weight::from_ref_time(3_823 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,38 +102,42 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(34_147_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(110_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(44_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 34_778 nanoseconds. + Weight::from_ref_time(35_773_772 as u64) + // Standard Error: 2_014 + .saturating_add(Weight::from_ref_time(117_292 as u64).saturating_mul(a as u64)) + // Standard Error: 2_081 + .saturating_add(Weight::from_ref_time(42_008 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(27_804_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_063 nanoseconds. + Weight::from_ref_time(29_792_630 as u64) + // Standard Error: 1_849 + .saturating_add(Weight::from_ref_time(68_018 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(27_960_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_939 nanoseconds. + Weight::from_ref_time(29_987_466 as u64) + // Standard Error: 2_039 + .saturating_add(Weight::from_ref_time(95_130 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_ref_time(23_964_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(53_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 24_796 nanoseconds. + Weight::from_ref_time(26_085_767 as u64) + // Standard Error: 1_389 + .saturating_add(Weight::from_ref_time(53_192 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -137,18 +145,20 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { - Weight::from_ref_time(30_935_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 31_445 nanoseconds. + Weight::from_ref_time(32_982_887 as u64) + // Standard Error: 3_109 + .saturating_add(Weight::from_ref_time(47_589 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_ref_time(25_877_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(37_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_316 nanoseconds. + Weight::from_ref_time(27_309_864 as u64) + // Standard Error: 1_763 + .saturating_add(Weight::from_ref_time(47_640 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_scheduler.rs b/runtime/polkadot/src/weights/pallet_scheduler.rs index 9446fdc5efec..81d44bfc978b 100644 --- a/runtime/polkadot/src/weights/pallet_scheduler.rs +++ b/runtime/polkadot/src/weights/pallet_scheduler.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/polkadot/src/weights +// --output=./runtime/polkadot/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,55 +46,61 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_522_000 as u64) + // Minimum execution time: 4_885 nanoseconds. + Weight::from_ref_time(4_987_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(3_859_000 as u64) - // Standard Error: 2_692 - .saturating_add(Weight::from_ref_time(618_992 as u64).saturating_mul(s as u64)) + // Minimum execution time: 4_159 nanoseconds. + Weight::from_ref_time(7_592_661 as u64) + // Standard Error: 1_966 + .saturating_add(Weight::from_ref_time(686_426 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - Weight::from_ref_time(12_288_000 as u64) + // Minimum execution time: 10_198 nanoseconds. + Weight::from_ref_time(10_441_000 as u64) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(23_105_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_126 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_321 nanoseconds. + Weight::from_ref_time(21_555_000 as u64) + // Standard Error: 9 + .saturating_add(Weight::from_ref_time(1_534 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Scheduler Lookup (r:0 w:1) fn service_task_named() -> Weight { - Weight::from_ref_time(13_382_000 as u64) + // Minimum execution time: 11_616 nanoseconds. + Weight::from_ref_time(11_798_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - Weight::from_ref_time(19_246_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 9_892 nanoseconds. + Weight::from_ref_time(10_084_000 as u64) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(3_714_000 as u64) + // Minimum execution time: 4_250 nanoseconds. + Weight::from_ref_time(4_349_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(3_667_000 as u64) + // Minimum execution time: 4_195 nanoseconds. + Weight::from_ref_time(4_294_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(16_556_000 as u64) - // Standard Error: 3_431 - .saturating_add(Weight::from_ref_time(659_506 as u64).saturating_mul(s as u64)) + // Minimum execution time: 17_845 nanoseconds. + Weight::from_ref_time(21_966_647 as u64) + // Standard Error: 2_375 + .saturating_add(Weight::from_ref_time(709_788 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -102,9 +108,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(18_922_000 as u64) - // Standard Error: 1_665 - .saturating_add(Weight::from_ref_time(586_420 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_576 nanoseconds. + Weight::from_ref_time(22_223_331 as u64) + // Standard Error: 1_893 + .saturating_add(Weight::from_ref_time(704_138 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -112,9 +119,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(19_633_000 as u64) - // Standard Error: 3_740 - .saturating_add(Weight::from_ref_time(692_772 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_629 nanoseconds. + Weight::from_ref_time(25_733_922 as u64) + // Standard Error: 3_411 + .saturating_add(Weight::from_ref_time(730_376 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,9 +130,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(20_220_000 as u64) - // Standard Error: 2_111 - .saturating_add(Weight::from_ref_time(622_452 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_737 nanoseconds. + Weight::from_ref_time(24_034_587 as u64) + // Standard Error: 2_365 + .saturating_add(Weight::from_ref_time(719_777 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_session.rs b/runtime/polkadot/src/weights/pallet_session.rs index 2b67806f65d6..7512266e8c52 100644 --- a/runtime/polkadot/src/weights/pallet_session.rs +++ b/runtime/polkadot/src/weights/pallet_session.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -48,7 +48,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - Weight::from_ref_time(50_181_000 as u64) + // Minimum execution time: 51_133 nanoseconds. + Weight::from_ref_time(52_762_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -56,7 +57,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - Weight::from_ref_time(38_209_000 as u64) + // Minimum execution time: 38_703 nanoseconds. + Weight::from_ref_time(40_249_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_staking.rs b/runtime/polkadot/src/weights/pallet_staking.rs index f162b24405a6..8cc7e5903e0f 100644 --- a/runtime/polkadot/src/weights/pallet_staking.rs +++ b/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,21 +16,23 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// /home/benchbot/cargo_target_dir/production/polkadot // benchmark // pallet -// --chain=polkadot-dev // --steps=50 // --repeat=20 -// --pallet=pallet_staking // --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=pallet_staking +// --chain=polkadot-dev // --header=./file_header.txt // --output=./runtime/polkadot/src/weights/ @@ -38,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_staking`. @@ -47,13 +49,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - Weight::from_ref_time(45_432_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Minimum execution time: 47_596 nanoseconds. + Weight::from_ref_time(48_262_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -61,9 +63,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - Weight::from_ref_time(79_495_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Minimum execution time: 85_311 nanoseconds. + Weight::from_ref_time(85_983_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -75,9 +78,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - Weight::from_ref_time(84_820_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 91_155 nanoseconds. + Weight::from_ref_time(92_284_000) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -85,11 +89,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(39_300_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 40_335 nanoseconds. + Weight::from_ref_time(41_980_327) + // Standard Error: 5_476 + .saturating_add(Weight::from_ref_time(22_616).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -104,11 +109,16 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - Weight::from_ref_time(75_001_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + // Minimum execution time: 79_780 nanoseconds. + Weight::from_ref_time(83_493_244) + // Standard Error: 2_034 + .saturating_add(Weight::from_ref_time(921_312).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -122,20 +132,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - Weight::from_ref_time(58_154_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 60_128 nanoseconds. + Weight::from_ref_time(60_981_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - Weight::from_ref_time(28_809_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(6_244_000 as u64).saturating_mul(k as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(k as u64))) + // Minimum execution time: 32_908 nanoseconds. + Weight::from_ref_time(29_665_429) + // Standard Error: 8_170 + .saturating_add(Weight::from_ref_time(6_484_323).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -150,12 +162,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(59_788_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(2_494_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 63_783 nanoseconds. + Weight::from_ref_time(63_455_416) + // Standard Error: 6_146 + .saturating_add(Weight::from_ref_time(2_387_675).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -165,51 +178,59 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(55_934_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 59_804 nanoseconds. + Weight::from_ref_time(60_578_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - Weight::from_ref_time(15_014_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 15_947 nanoseconds. + Weight::from_ref_time(16_220_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(22_074_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 22_585 nanoseconds. + Weight::from_ref_time(23_242_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - Weight::from_ref_time(3_971_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_303 nanoseconds. + Weight::from_ref_time(4_470_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - Weight::from_ref_time(3_980_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_347 nanoseconds. + Weight::from_ref_time(4_522_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - Weight::from_ref_time(3_926_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_313 nanoseconds. + Weight::from_ref_time(4_548_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - Weight::from_ref_time(4_043_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_302 nanoseconds. + Weight::from_ref_time(4_487_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - Weight::from_ref_time(4_365_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_414 nanoseconds. + Weight::from_ref_time(4_950_256) + // Standard Error: 34 + .saturating_add(Weight::from_ref_time(11_147).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -226,62 +247,64 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - Weight::from_ref_time(72_013_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(868_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 71_586 nanoseconds. + Weight::from_ref_time(76_784_220) + // Standard Error: 2_649 + .saturating_add(Weight::from_ref_time(914_345).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - Weight::from_ref_time(862_274_000 as u64) - // Standard Error: 57_000 - .saturating_add(Weight::from_ref_time(4_844_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 113_087 nanoseconds. + Weight::from_ref_time(919_333_329) + // Standard Error: 58_190 + .saturating_add(Weight::from_ref_time(4_926_882).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - /// The range of component `n` is `[1, 256]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `n` is `[0, 512]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - Weight::from_ref_time(147_723_000 as u64) - // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(20_027_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64))) + // Minimum execution time: 109_456 nanoseconds. + Weight::from_ref_time(218_455_664) + // Standard Error: 16_502 + .saturating_add(Weight::from_ref_time(21_415_223).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:2) + // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Balances Locks (r:2 w:2) - /// The range of component `n` is `[1, 256]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + /// The range of component `n` is `[0, 512]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - Weight::from_ref_time(106_610_000 as u64) - // Standard Error: 144_000 - .saturating_add(Weight::from_ref_time(28_792_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(n as u64))) + // Minimum execution time: 127_355 nanoseconds. + Weight::from_ref_time(183_799_193) + // Standard Error: 31_316 + .saturating_add(Weight::from_ref_time(31_085_934).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -291,11 +314,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - Weight::from_ref_time(79_808_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 82_240 nanoseconds. + Weight::from_ref_time(84_253_539) + // Standard Error: 4_496 + .saturating_add(Weight::from_ref_time(38_336).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -312,15 +336,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - Weight::from_ref_time(79_588_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(860_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 81_232 nanoseconds. + Weight::from_ref_time(83_432_135) + // Standard Error: 1_903 + .saturating_add(Weight::from_ref_time(920_509).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) // Storage: VoterList ListBags (r:178 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) @@ -332,28 +356,28 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ValidatorCount (r:1 w:0) // Storage: Staking MinimumValidatorCount (r:1 w:0) // Storage: Staking CurrentEra (r:1 w:1) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasStakersClipped (r:0 w:1) // Storage: Staking ErasValidatorPrefs (r:0 w:1) // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[1, 10]`. - /// The range of component `n` is `[1, 100]`. + /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 694_000 - .saturating_add(Weight::from_ref_time(176_240_000 as u64).saturating_mul(v as u64)) - // Standard Error: 66_000 - .saturating_add(Weight::from_ref_time(23_971_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(187 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Minimum execution time: 443_914 nanoseconds. + Weight::from_ref_time(445_239_000) + // Standard Error: 1_702_013 + .saturating_add(Weight::from_ref_time(55_886_094).saturating_mul(v.into())) + // Standard Error: 169_596 + .saturating_add(Weight::from_ref_time(13_054_062).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(185)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:21 w:0) // Storage: VoterList ListBags (r:178 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) @@ -361,33 +385,33 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. - /// The range of component `s` is `[1, 20]`. - fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 450_000 - .saturating_add(Weight::from_ref_time(38_224_000 as u64).saturating_mul(v as u64)) - // Standard Error: 450_000 - .saturating_add(Weight::from_ref_time(38_981_000 as u64).saturating_mul(n as u64)) - // Standard Error: 11_498_000 - .saturating_add(Weight::from_ref_time(16_085_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(181 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Minimum execution time: 25_042_404 nanoseconds. + Weight::from_ref_time(25_221_780_000) + // Standard Error: 587_812 + .saturating_add(Weight::from_ref_time(6_736_902).saturating_mul(v.into())) + // Standard Error: 587_812 + .saturating_add(Weight::from_ref_time(2_992_604).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(180)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) } + // Storage: Staking CounterForValidators (r:1 w:0) // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - Weight::from_ref_time(105_025_000 as u64) - // Standard Error: 45_000 - .saturating_add(Weight::from_ref_time(6_357_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 3_554_519 nanoseconds. + Weight::from_ref_time(111_958_458) + // Standard Error: 51_313 + .saturating_add(Weight::from_ref_time(7_328_224).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -396,8 +420,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - Weight::from_ref_time(7_146_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 7_416 nanoseconds. + Weight::from_ref_time(7_844_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -406,8 +431,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - Weight::from_ref_time(6_698_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 6_765 nanoseconds. + Weight::from_ref_time(7_042_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -420,15 +446,23 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - Weight::from_ref_time(66_060_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 69_321 nanoseconds. + Weight::from_ref_time(70_413_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - Weight::from_ref_time(14_560_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 14_915 nanoseconds. + Weight::from_ref_time(15_495_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Staking MinCommission (r:0 w:1) + fn set_min_commission() -> Weight { + // Minimum execution time: 4_184 nanoseconds. + Weight::from_ref_time(4_326_000) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/polkadot/src/weights/pallet_timestamp.rs b/runtime/polkadot/src/weights/pallet_timestamp.rs index bb9dc57e1149..a00a8500e187 100644 --- a/runtime/polkadot/src/weights/pallet_timestamp.rs +++ b/runtime/polkadot/src/weights/pallet_timestamp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -47,11 +47,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - Weight::from_ref_time(9_237_000 as u64) + // Minimum execution time: 9_473 nanoseconds. + Weight::from_ref_time(9_896_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(3_851_000 as u64) + // Minimum execution time: 4_279 nanoseconds. + Weight::from_ref_time(4_529_000 as u64) } } diff --git a/runtime/polkadot/src/weights/pallet_tips.rs b/runtime/polkadot/src/weights/pallet_tips.rs index b43a9c45b965..8d5a80899b28 100644 --- a/runtime/polkadot/src/weights/pallet_tips.rs +++ b/runtime/polkadot/src/weights/pallet_tips.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_tips`. @@ -48,16 +48,18 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `r` is `[0, 16384]`. fn report_awesome(r: u32, ) -> Weight { - Weight::from_ref_time(29_098_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 29_978 nanoseconds. + Weight::from_ref_time(31_596_470 as u64) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(2_012 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) fn retract_tip() -> Weight { - Weight::from_ref_time(27_830_000 as u64) + // Minimum execution time: 29_917 nanoseconds. + Weight::from_ref_time(30_436_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -67,11 +69,12 @@ impl pallet_tips::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 16384]`. /// The range of component `t` is `[1, 13]`. fn tip_new(r: u32, t: u32, ) -> Weight { - Weight::from_ref_time(20_185_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(204_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 22_911 nanoseconds. + Weight::from_ref_time(22_091_512 as u64) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(1_846 as u64).saturating_mul(r as u64)) + // Standard Error: 9_030 + .saturating_add(Weight::from_ref_time(210_311 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,9 +82,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `t` is `[1, 13]`. fn tip(t: u32, ) -> Weight { - Weight::from_ref_time(14_650_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(169_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 14_955 nanoseconds. + Weight::from_ref_time(15_347_933 as u64) + // Standard Error: 2_036 + .saturating_add(Weight::from_ref_time(140_987 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -91,9 +95,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 13]`. fn close_tip(t: u32, ) -> Weight { - Weight::from_ref_time(44_468_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(186_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 46_745 nanoseconds. + Weight::from_ref_time(47_775_426 as u64) + // Standard Error: 5_647 + .saturating_add(Weight::from_ref_time(149_882 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +106,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 13]`. fn slash_tip(t: u32, ) -> Weight { - Weight::from_ref_time(18_758_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(34_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 19_411 nanoseconds. + Weight::from_ref_time(20_301_396 as u64) + // Standard Error: 2_075 + .saturating_add(Weight::from_ref_time(36_174 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/polkadot/src/weights/pallet_treasury.rs b/runtime/polkadot/src/weights/pallet_treasury.rs index 9e30a9b8ed2f..9a5e760241d4 100644 --- a/runtime/polkadot/src/weights/pallet_treasury.rs +++ b/runtime/polkadot/src/weights/pallet_treasury.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,26 +38,29 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - Weight::from_ref_time(159_000 as u64) + // Minimum execution time: 140 nanoseconds. + Weight::from_ref_time(192_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - Weight::from_ref_time(25_052_000 as u64) + // Minimum execution time: 27_339 nanoseconds. + Weight::from_ref_time(27_812_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - Weight::from_ref_time(37_455_000 as u64) + // Minimum execution time: 39_765 nanoseconds. + Weight::from_ref_time(40_401_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,15 +68,17 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(12_929_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(52_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_092 nanoseconds. + Weight::from_ref_time(13_612_152 as u64) + // Standard Error: 1_134 + .saturating_add(Weight::from_ref_time(45_701 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - Weight::from_ref_time(7_745_000 as u64) + // Minimum execution time: 8_372 nanoseconds. + Weight::from_ref_time(8_582_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,9 +88,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: System Account (r:4 w:4) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(41_263_000 as u64) - // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(24_564_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 35_588 nanoseconds. + Weight::from_ref_time(45_604_897 as u64) + // Standard Error: 24_691 + .saturating_add(Weight::from_ref_time(24_665_984 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) diff --git a/runtime/polkadot/src/weights/pallet_utility.rs b/runtime/polkadot/src/weights/pallet_utility.rs index f7e6e51eff4d..648577ca1a2d 100644 --- a/runtime/polkadot/src/weights/pallet_utility.rs +++ b/runtime/polkadot/src/weights/pallet_utility.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -46,26 +46,31 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(15_356_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_407_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_964 nanoseconds. + Weight::from_ref_time(19_427_609 as u64) + // Standard Error: 3_994 + .saturating_add(Weight::from_ref_time(3_826_293 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - Weight::from_ref_time(5_533_000 as u64) + // Minimum execution time: 6_409 nanoseconds. + Weight::from_ref_time(6_892_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(26_834_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_527_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 12_148 nanoseconds. + Weight::from_ref_time(21_596_151 as u64) + // Standard Error: 2_632 + .saturating_add(Weight::from_ref_time(3_977_735 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(13_247_000 as u64) + // Minimum execution time: 14_111 nanoseconds. + Weight::from_ref_time(14_347_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(24_641_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_373_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 12_114 nanoseconds. + Weight::from_ref_time(16_797_748 as u64) + // Standard Error: 2_468 + .saturating_add(Weight::from_ref_time(3_823_041 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index e1052f38114e..4e1e4dd18d7b 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_vesting`. @@ -49,11 +49,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_041_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(48_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_531 nanoseconds. + Weight::from_ref_time(38_955_116 as u64) + // Standard Error: 1_450 + .saturating_add(Weight::from_ref_time(41_616 as u64).saturating_mul(l as u64)) + // Standard Error: 2_580 + .saturating_add(Weight::from_ref_time(69_436 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,11 +63,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(34_819_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(40_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(81_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_671 nanoseconds. + Weight::from_ref_time(38_567_314 as u64) + // Standard Error: 1_210 + .saturating_add(Weight::from_ref_time(35_143 as u64).saturating_mul(l as u64)) + // Standard Error: 2_154 + .saturating_add(Weight::from_ref_time(55_568 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -76,11 +78,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_068_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(98_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_295 nanoseconds. + Weight::from_ref_time(38_013_471 as u64) + // Standard Error: 1_321 + .saturating_add(Weight::from_ref_time(53_553 as u64).saturating_mul(l as u64)) + // Standard Error: 2_351 + .saturating_add(Weight::from_ref_time(84_076 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -90,11 +93,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_164_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(34_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(70_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_769 nanoseconds. + Weight::from_ref_time(38_918_484 as u64) + // Standard Error: 1_194 + .saturating_add(Weight::from_ref_time(28_142 as u64).saturating_mul(l as u64)) + // Standard Error: 2_126 + .saturating_add(Weight::from_ref_time(47_289 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -104,11 +108,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(49_221_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(39_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(88_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 53_331 nanoseconds. + Weight::from_ref_time(53_357_152 as u64) + // Standard Error: 2_054 + .saturating_add(Weight::from_ref_time(44_152 as u64).saturating_mul(l as u64)) + // Standard Error: 3_654 + .saturating_add(Weight::from_ref_time(52_672 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -118,11 +123,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(48_444_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 52_809 nanoseconds. + Weight::from_ref_time(53_497_880 as u64) + // Standard Error: 2_046 + .saturating_add(Weight::from_ref_time(29_895 as u64).saturating_mul(l as u64)) + // Standard Error: 3_641 + .saturating_add(Weight::from_ref_time(41_171 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -132,11 +138,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_632_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(48_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(113_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 40_643 nanoseconds. + Weight::from_ref_time(39_703_973 as u64) + // Standard Error: 1_240 + .saturating_add(Weight::from_ref_time(40_068 as u64).saturating_mul(l as u64)) + // Standard Error: 2_291 + .saturating_add(Weight::from_ref_time(79_877 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -146,11 +153,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_538_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(53_000 as u64).saturating_mul(l as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(103_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 40_470 nanoseconds. + Weight::from_ref_time(39_534_878 as u64) + // Standard Error: 1_164 + .saturating_add(Weight::from_ref_time(40_286 as u64).saturating_mul(l as u64)) + // Standard Error: 2_149 + .saturating_add(Weight::from_ref_time(77_107 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_common_auctions.rs b/runtime/polkadot/src/weights/runtime_common_auctions.rs index 2f464845ebb3..b63f0396b078 100644 --- a/runtime/polkadot/src/weights/runtime_common_auctions.rs +++ b/runtime/polkadot/src/weights/runtime_common_auctions.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::auctions`. @@ -47,7 +47,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - Weight::from_ref_time(16_359_000 as u64) + // Minimum execution time: 17_695 nanoseconds. + Weight::from_ref_time(18_051_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,7 +60,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - Weight::from_ref_time(69_607_000 as u64) + // Minimum execution time: 73_260 nanoseconds. + Weight::from_ref_time(74_711_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -76,7 +78,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - Weight::from_ref_time(15_111_005_000 as u64) + // Minimum execution time: 15_542_084 nanoseconds. + Weight::from_ref_time(15_830_065_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - Weight::from_ref_time(4_643_675_000 as u64) + // Minimum execution time: 4_685_796 nanoseconds. + Weight::from_ref_time(4_784_757_000 as u64) .saturating_add(T::DbWeight::get().reads(73 as u64)) .saturating_add(T::DbWeight::get().writes(3673 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_common_claims.rs b/runtime/polkadot/src/weights/runtime_common_claims.rs index 0c9dc4c7ad7f..e435986978b3 100644 --- a/runtime/polkadot/src/weights/runtime_common_claims.rs +++ b/runtime/polkadot/src/weights/runtime_common_claims.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::claims`. @@ -52,7 +52,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(143_005_000 as u64) + // Minimum execution time: 144_499 nanoseconds. + Weight::from_ref_time(146_851_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - Weight::from_ref_time(11_431_000 as u64) + // Minimum execution time: 11_557 nanoseconds. + Weight::from_ref_time(12_078_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -73,7 +75,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - Weight::from_ref_time(145_634_000 as u64) + // Minimum execution time: 147_154 nanoseconds. + Weight::from_ref_time(150_718_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -86,7 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - Weight::from_ref_time(66_979_000 as u64) + // Minimum execution time: 68_909 nanoseconds. + Weight::from_ref_time(71_077_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -95,7 +99,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - Weight::from_ref_time(21_303_000 as u64) + // Minimum execution time: 22_310 nanoseconds. + Weight::from_ref_time(23_037_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_common_crowdloan.rs b/runtime/polkadot/src/weights/runtime_common_crowdloan.rs index 7151a55e943a..2b375f9fcafb 100644 --- a/runtime/polkadot/src/weights/runtime_common_crowdloan.rs +++ b/runtime/polkadot/src/weights/runtime_common_crowdloan.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::crowdloan`. @@ -49,7 +49,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(46_657_000 as u64) + // Minimum execution time: 47_532 nanoseconds. + Weight::from_ref_time(49_107_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - Weight::from_ref_time(116_256_000 as u64) + // Minimum execution time: 117_161 nanoseconds. + Weight::from_ref_time(118_612_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -69,16 +71,18 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(54_668_000 as u64) + // Minimum execution time: 56_984 nanoseconds. + Weight::from_ref_time(57_919_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `k` is `[0, 1000]`. fn refund(k: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(17_769_000 as u64).saturating_mul(k as u64)) + // Minimum execution time: 53_704 nanoseconds. + Weight::from_ref_time(64_956_000 as u64) + // Standard Error: 15_082 + .saturating_add(Weight::from_ref_time(18_122_444 as u64).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -87,27 +91,31 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - Weight::from_ref_time(35_958_000 as u64) + // Minimum execution time: 37_332 nanoseconds. + Weight::from_ref_time(38_138_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - Weight::from_ref_time(23_705_000 as u64) + // Minimum execution time: 24_508 nanoseconds. + Weight::from_ref_time(24_887_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - Weight::from_ref_time(33_328_000 as u64) + // Minimum execution time: 34_804 nanoseconds. + Weight::from_ref_time(35_771_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - Weight::from_ref_time(25_527_000 as u64) + // Minimum execution time: 26_119 nanoseconds. + Weight::from_ref_time(26_830_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,9 +131,10 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { - Weight::from_ref_time(21_631_000 as u64) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(39_559_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 105_872 nanoseconds. + Weight::from_ref_time(6_994_467 as u64) + // Standard Error: 38_723 + .saturating_add(Weight::from_ref_time(41_147_156 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs b/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs index 89a1c628c503..f10c5b2bed1c 100644 --- a/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/polkadot/src/weights/runtime_common_paras_registrar.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::paras_registrar`. @@ -48,7 +48,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - Weight::from_ref_time(29_429_000 as u64) + // Minimum execution time: 31_379 nanoseconds. + Weight::from_ref_time(32_013_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,7 +64,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - Weight::from_ref_time(7_272_403_000 as u64) + // Minimum execution time: 7_838_268 nanoseconds. + Weight::from_ref_time(8_000_048_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -78,7 +80,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - Weight::from_ref_time(7_255_583_000 as u64) + // Minimum execution time: 7_818_286 nanoseconds. + Weight::from_ref_time(7_962_262_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -89,7 +92,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - Weight::from_ref_time(47_678_000 as u64) + // Minimum execution time: 49_346 nanoseconds. + Weight::from_ref_time(50_242_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -101,11 +105,14 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - Weight::from_ref_time(42_298_000 as u64) + // Minimum execution time: 44_290 nanoseconds. + Weight::from_ref_time(44_983_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) + // Storage: Paras UpgradeRestrictionSignal (r:1 w:1) + // Storage: Configuration ActiveConfig (r:1 w:0) // Storage: Paras CurrentCodeHash (r:1 w:0) // Storage: Paras UpgradeCooldowns (r:1 w:1) // Storage: Paras PvfActiveVoteMap (r:1 w:0) @@ -114,19 +121,22 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: System Digest (r:1 w:1) // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) - // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 41_975 nanoseconds. + Weight::from_ref_time(42_390_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_483 as u64).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `b` is `[1, 1048576]`. fn set_current_head(b: u32, ) -> Weight { - Weight::from_ref_time(5_494_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 14_431 nanoseconds. + Weight::from_ref_time(14_559_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(1_072 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/polkadot/src/weights/runtime_common_slots.rs b/runtime/polkadot/src/weights/runtime_common_slots.rs index fdd7f3ba693b..b077e6d1a114 100644 --- a/runtime/polkadot/src/weights/runtime_common_slots.rs +++ b/runtime/polkadot/src/weights/runtime_common_slots.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::slots`. @@ -47,7 +47,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(29_433_000 as u64) + // Minimum execution time: 32_032 nanoseconds. + Weight::from_ref_time(32_759_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,11 +61,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(5_768_000 as u64).saturating_mul(c as u64)) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(15_445_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 557_429 nanoseconds. + Weight::from_ref_time(565_348_000 as u64) + // Standard Error: 70_889 + .saturating_add(Weight::from_ref_time(2_056_680 as u64).saturating_mul(c as u64)) + // Standard Error: 70_889 + .saturating_add(Weight::from_ref_time(12_087_471 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(t as u64))) @@ -75,7 +77,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(90_622_000 as u64) + // Minimum execution time: 94_049 nanoseconds. + Weight::from_ref_time(95_684_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(28_143_000 as u64) + // Minimum execution time: 28_824 nanoseconds. + Weight::from_ref_time(29_892_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_configuration.rs b/runtime/polkadot/src/weights/runtime_parachains_configuration.rs index a0db531f8346..f4daa292146f 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_configuration.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::configuration`. @@ -49,7 +49,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - Weight::from_ref_time(10_912_000 as u64) + // Minimum execution time: 11_517 nanoseconds. + Weight::from_ref_time(12_084_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -58,7 +59,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(10_724_000 as u64) + // Minimum execution time: 11_579 nanoseconds. + Weight::from_ref_time(11_966_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -67,7 +69,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - Weight::from_ref_time(10_750_000 as u64) + // Minimum execution time: 11_441 nanoseconds. + Weight::from_ref_time(11_834_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -76,12 +79,14 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(10_812_000 as u64) + // Minimum execution time: 11_406 nanoseconds. + Weight::from_ref_time(11_717_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn set_hrmp_open_request_ttl() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: Configuration PendingConfigs (r:1 w:1) @@ -89,7 +94,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - Weight::from_ref_time(11_100_000 as u64) + // Minimum execution time: 11_631 nanoseconds. + Weight::from_ref_time(11_937_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_disputes.rs b/runtime/polkadot/src/weights/runtime_parachains_disputes.rs index e45401e40eca..01292d51a830 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_disputes.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_disputes.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::disputes`. @@ -46,7 +46,8 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - Weight::from_ref_time(3_751_000 as u64) + // Minimum execution time: 4_367 nanoseconds. + Weight::from_ref_time(4_690_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/polkadot/src/weights/runtime_parachains_hrmp.rs b/runtime/polkadot/src/weights/runtime_parachains_hrmp.rs index 576b25ddd718..d0e777bcb33b 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_hrmp.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2021 Parity Technologies (UK) Ltd. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -16,23 +16,23 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: -// target/release/polkadot +// ./target/production/polkadot // benchmark -// --chain=kusama-dev +// pallet +// --chain=polkadot-dev // --steps=50 // --repeat=20 // --pallet=runtime_parachains::hrmp // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs - +// --output=./runtime/polkadot/src/weights/runtime_parachains_hrmp.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,7 +54,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - Weight::from_ref_time(54_952_000 as u64) + // Minimum execution time: 41_505 nanoseconds. + Weight::from_ref_time(42_119_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -66,7 +67,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - Weight::from_ref_time(47_965_000 as u64) + // Minimum execution time: 41_067 nanoseconds. + Weight::from_ref_time(41_634_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -77,7 +79,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - Weight::from_ref_time(44_369_000 as u64) + // Minimum execution time: 37_960 nanoseconds. + Weight::from_ref_time(38_224_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -87,12 +90,15 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:0 w:1) // Storage: Hrmp HrmpChannelContents (r:0 w:127) // Storage: Hrmp HrmpOpenChannelRequestCount (r:0 w:1) + /// The range of component `i` is `[0, 127]`. + /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(15_959_000 as u64).saturating_mul(i as u64)) - // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(16_048_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 877_471 nanoseconds. + Weight::from_ref_time(886_196_000 as u64) + // Standard Error: 79_424 + .saturating_add(Weight::from_ref_time(2_738_544 as u64).saturating_mul(i as u64)) + // Standard Error: 79_424 + .saturating_add(Weight::from_ref_time(2_749_789 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(e as u64))) @@ -109,10 +115,12 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:2 w:2) // Storage: Hrmp HrmpChannels (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 26_000 - .saturating_add(Weight::from_ref_time(35_598_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 9_479 nanoseconds. + Weight::from_ref_time(9_641_000 as u64) + // Standard Error: 9_212 + .saturating_add(Weight::from_ref_time(15_726_613 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((7 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -124,37 +132,44 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:2 w:2) // Storage: Hrmp HrmpCloseChannelRequests (r:0 w:2) // Storage: Hrmp HrmpChannelContents (r:0 w:2) + /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(20_510_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 6_452 nanoseconds. + Weight::from_ref_time(6_591_000 as u64) + // Standard Error: 7_889 + .saturating_add(Weight::from_ref_time(9_705_589 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((5 as u64).saturating_mul(c as u64))) } - // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) + // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) + /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - Weight::from_ref_time(32_749_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(59_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 26_109 nanoseconds. + Weight::from_ref_time(31_555_015 as u64) + // Standard Error: 1_534 + .saturating_add(Weight::from_ref_time(90_940 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) + /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(5_781_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 4_551 nanoseconds. + Weight::from_ref_time(2_251_955 as u64) + // Standard Error: 3_808 + .saturating_add(Weight::from_ref_time(2_597_436 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } // Storage: Paras ParaLifecycles (r:2 w:0) + // Storage: Configuration ActiveConfig (r:1 w:0) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpChannels (r:1 w:0) // Storage: Hrmp HrmpEgressChannelsIndex (r:1 w:0) @@ -165,8 +180,9 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1) fn force_open_hrmp_channel() -> Weight { - Weight::from_ref_time(104_771_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) + // Minimum execution time: 52_512 nanoseconds. + Weight::from_ref_time(53_287_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } } diff --git a/runtime/polkadot/src/weights/runtime_parachains_initializer.rs b/runtime/polkadot/src/weights/runtime_parachains_initializer.rs index 15480b1c48a7..8e1dfd5a459b 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_initializer.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_initializer.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::initializer`. @@ -47,9 +47,10 @@ impl runtime_parachains::initializer::WeightInfo for We // Storage: System Digest (r:1 w:1) /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - Weight::from_ref_time(9_756_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 8_089 nanoseconds. + Weight::from_ref_time(10_807_136 as u64) + // Standard Error: 4 + .saturating_add(Weight::from_ref_time(1_318 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_paras.rs b/runtime/polkadot/src/weights/runtime_parachains_paras.rs index bf81061f31ef..5cf3b86dc854 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_paras.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_paras.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras`. @@ -52,18 +52,20 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 38_052 nanoseconds. + Weight::from_ref_time(38_343_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_470 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Paras Heads (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 12_951 nanoseconds. + Weight::from_ref_time(13_054_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(1_071 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Configuration ActiveConfig (r:1 w:0) @@ -79,9 +81,10 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 62_248 nanoseconds. + Weight::from_ref_time(62_476_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_494 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -90,16 +93,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 18_755 nanoseconds. + Weight::from_ref_time(19_028_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(1_069 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - Weight::from_ref_time(23_313_000 as u64) + // Minimum execution time: 24_134 nanoseconds. + Weight::from_ref_time(24_730_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -107,16 +112,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:1 w:1) /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 8_618 nanoseconds. + Weight::from_ref_time(8_808_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_473 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - Weight::from_ref_time(6_423_000 as u64) + // Minimum execution time: 6_839 nanoseconds. + Weight::from_ref_time(6_966_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -125,7 +132,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - Weight::from_ref_time(95_444_000 as u64) + // Minimum execution time: 92_622 nanoseconds. + Weight::from_ref_time(94_867_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -138,7 +146,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - Weight::from_ref_time(629_670_000 as u64) + // Minimum execution time: 637_636 nanoseconds. + Weight::from_ref_time(647_421_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -152,7 +161,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - Weight::from_ref_time(594_898_000 as u64) + // Minimum execution time: 593_660 nanoseconds. + Weight::from_ref_time(601_930_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -163,7 +173,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - Weight::from_ref_time(497_417_000 as u64) + // Minimum execution time: 498_509 nanoseconds. + Weight::from_ref_time(505_284_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -178,7 +189,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - Weight::from_ref_time(667_000_000 as u64) + // Minimum execution time: 669_947 nanoseconds. + Weight::from_ref_time(676_418_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(304 as u64)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs b/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs index 7e7b020d5dfb..dc6535472ace 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras_inherent`. @@ -60,6 +60,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -77,10 +78,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - Weight::from_ref_time(323_064_000 as u64) - // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(48_113_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(29 as u64)) + // Minimum execution time: 826_168 nanoseconds. + Weight::from_ref_time(364_874_705 as u64) + // Standard Error: 23_955 + .saturating_add(Weight::from_ref_time(47_989_024 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(30 as u64)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -95,6 +97,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -114,8 +117,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - Weight::from_ref_time(322_987_000 as u64) - .saturating_add(T::DbWeight::get().reads(26 as u64)) + // Minimum execution time: 343_456 nanoseconds. + Weight::from_ref_time(351_684_000 as u64) + .saturating_add(T::DbWeight::get().reads(27 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -130,6 +134,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -151,10 +156,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - Weight::from_ref_time(820_412_000 as u64) - // Standard Error: 38_000 - .saturating_add(Weight::from_ref_time(47_835_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(29 as u64)) + // Minimum execution time: 5_667_234 nanoseconds. + Weight::from_ref_time(962_138_267 as u64) + // Standard Error: 46_800 + .saturating_add(Weight::from_ref_time(47_508_067 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(30 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -169,6 +175,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -191,8 +198,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - Weight::from_ref_time(38_004_269_000 as u64) - .saturating_add(T::DbWeight::get().reads(31 as u64)) + // Minimum execution time: 40_991_691 nanoseconds. + Weight::from_ref_time(41_457_004_000 as u64) + .saturating_add(T::DbWeight::get().reads(32 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } } diff --git a/runtime/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index 846d98a59d99..39f7a337479a 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -107,10 +107,12 @@ pub type XcmRouter = ( parameter_types! { pub const Polkadot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) }); pub const PolkadotForStatemint: (MultiAssetFilter, MultiLocation) = (Polkadot::get(), Parachain(1000).into()); + pub const PolkadotForCollectives: (MultiAssetFilter, MultiLocation) = (Polkadot::get(), Parachain(1001).into()); } -/// Polkadot Relay recognizes/respects the Statemint chain as a teleporter. -pub type TrustedTeleporters = (xcm_builder::Case,); +/// Polkadot Relay recognizes/respects System parachains as teleporters. +pub type TrustedTeleporters = + (xcm_builder::Case, xcm_builder::Case); match_types! { pub type OnlyParachains: impl Contains = { diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index b79b2cf444be..aaf6710b7c1a 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "rococo-runtime" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } @@ -16,7 +16,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } beefy-merkle-tree = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } rococo-runtime-constants = { package = "rococo-runtime-constants", path = "./constants", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -49,13 +49,13 @@ pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = " pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nis = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -130,7 +130,7 @@ std = [ "pallet-collective/std", "pallet-elections-phragmen/std", "pallet-democracy/std", - "pallet-gilt/std", + "pallet-nis/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", @@ -188,7 +188,7 @@ runtime-benchmarks = [ "pallet-collective/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", - "pallet-gilt/runtime-benchmarks", + "pallet-nis/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index ec520965684b..6d7563e36d10 100644 --- a/runtime/rococo/constants/Cargo.toml +++ b/runtime/rococo/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "rococo-runtime-constants" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] smallvec = "1.8.0" @@ -10,10 +10,14 @@ smallvec = "1.8.0" frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } [features] default = ["std"] std = [ - "sp-runtime/std" + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] diff --git a/runtime/rococo/constants/src/weights/block_weights.rs b/runtime/rococo/constants/src/weights/block_weights.rs index c33546f80a94..8d0f096561c4 100644 --- a/runtime/rococo/constants/src/weights/block_weights.rs +++ b/runtime/rococo/constants/src/weights/block_weights.rs @@ -1,28 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) //! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/rococo/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -34,32 +32,32 @@ // --weight-path=runtime/rococo/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 4_039_227, 4_394_160 - /// Average: 4_084_738 - /// Median: 4_077_180 - /// Std-Dev: 44325.29 + /// Min, Max: 5_285_413, 5_582_840 + /// Average: 5_334_883 + /// Median: 5_320_357 + /// Std-Dev: 54133.56 /// /// Percentiles nanoseconds: - /// 99th: 4_189_094 - /// 95th: 4_152_261 - /// 75th: 4_098_529 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_084_738); + /// 99th: 5_495_378 + /// 95th: 5_453_765 + /// 75th: 5_352_587 + pub const BlockExecutionWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_334_883)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -70,12 +68,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/rococo/constants/src/weights/extrinsic_weights.rs b/runtime/rococo/constants/src/weights/extrinsic_weights.rs index 53255ef6e8b0..0993985292d8 100644 --- a/runtime/rococo/constants/src/weights/extrinsic_weights.rs +++ b/runtime/rococo/constants/src/weights/extrinsic_weights.rs @@ -1,27 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-25 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/rococo/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -33,32 +32,32 @@ // --weight-path=runtime/rococo/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 77_945, 79_607 - /// Average: 78_269 - /// Median: 78_211 - /// Std-Dev: 259.27 + /// Min, Max: 86_780, 87_929 + /// Average: 87_092 + /// Median: 87_029 + /// Std-Dev: 244.16 /// /// Percentiles nanoseconds: - /// 99th: 79_591 - /// 95th: 78_730 - /// 75th: 78_272 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(78_269); + /// 99th: 87_916 + /// 95th: 87_727 + /// 75th: 87_112 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(87_092)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -69,12 +68,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/rococo/constants/src/weights/paritydb_weights.rs b/runtime/rococo/constants/src/weights/paritydb_weights.rs index dca7d348310c..4338d928d807 100644 --- a/runtime/rococo/constants/src/weights/paritydb_weights.rs +++ b/runtime/rococo/constants/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/rococo/constants/src/weights/rocksdb_weights.rs b/runtime/rococo/constants/src/weights/rocksdb_weights.rs index 87867ebfe177..1d115d963fac 100644 --- a/runtime/rococo/constants/src/weights/rocksdb_weights.rs +++ b/runtime/rococo/constants/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index b230832b7454..bcf0a03c9456 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -20,6 +20,7 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] +use pallet_nis::WithMaximumOf; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::v2::{ AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, @@ -55,7 +56,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - PrivilegeCmp, WithdrawReasons, + PrivilegeCmp, StorageMapShim, WithdrawReasons, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -65,7 +66,7 @@ use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; -use sp_core::{OpaqueMetadata, H256}; +use sp_core::{ConstU128, OpaqueMetadata, H256}; use sp_mmr_primitives as mmr; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -108,7 +109,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("rococo"), impl_name: create_runtime_str!("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 9310, + spec_version: 9330, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -954,7 +955,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Scheduler(..) | RuntimeCall::Proxy(..) | RuntimeCall::Multisig(..) | - RuntimeCall::Gilt(..) | + RuntimeCall::Nis(..) | RuntimeCall::Registrar(paras_registrar::Call::register {..}) | RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` @@ -1186,33 +1187,57 @@ impl auctions::Config for Runtime { type WeightInfo = weights::runtime_common_auctions::WeightInfo; } +type NisCounterpartInstance = pallet_balances::Instance2; +impl pallet_balances::Config for Runtime { + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ConstU128<10_000_000_000>; // One RTC cent + type AccountStore = StorageMapShim< + pallet_balances::Account, + frame_system::Provider, + AccountId, + pallet_balances::AccountData, + >; + type MaxLocks = ConstU32<4>; + type MaxReserves = ConstU32<4>; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; +} + parameter_types! { pub IgnoredIssuance: Balance = Treasury::pot(); - pub const QueueCount: u32 = 300; - pub const MaxQueueLen: u32 = 1000; - pub const FifoQueueLen: u32 = 250; - pub const GiltPeriod: BlockNumber = 30 * DAYS; - pub const MinFreeze: Balance = 10_000 * CENTS; + pub const NisBasePeriod: BlockNumber = 30 * DAYS; + pub const MinBid: Balance = 100 * UNITS; + pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64); pub const IntakePeriod: BlockNumber = 5 * MINUTES; - pub const MaxIntakeBids: u32 = 100; + pub MaxIntakeWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10; + pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5); + pub storage NisTarget: Perquintill = Perquintill::zero(); + pub const NisPalletId: PalletId = PalletId(*b"py/nis "); } -impl pallet_gilt::Config for Runtime { +impl pallet_nis::Config for Runtime { + type WeightInfo = weights::pallet_nis::WeightInfo; type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; - type AdminOrigin = MoreThanHalfCouncil; + type FundOrigin = frame_system::EnsureSigned; + type Counterpart = NisCounterpartBalances; + type CounterpartAmount = WithMaximumOf>; type Deficit = (); // Mint - type Surplus = (); // Burn type IgnoredIssuance = IgnoredIssuance; - type QueueCount = QueueCount; - type MaxQueueLen = MaxQueueLen; - type FifoQueueLen = FifoQueueLen; - type Period = GiltPeriod; - type MinFreeze = MinFreeze; + type Target = NisTarget; + type PalletId = NisPalletId; + type QueueCount = ConstU32<300>; + type MaxQueueLen = ConstU32<1000>; + type FifoQueueLen = ConstU32<250>; + type BasePeriod = NisBasePeriod; + type MinBid = MinBid; + type MinReceipt = MinReceipt; type IntakePeriod = IntakePeriod; - type MaxIntakeBids = MaxIntakeBids; - type WeightInfo = weights::pallet_gilt::WeightInfo; + type MaxIntakeWeight = MaxIntakeWeight; + type ThawThrottle = ThawThrottle; } impl pallet_beefy::Config for Runtime { @@ -1224,7 +1249,7 @@ impl pallet_beefy::Config for Runtime { type MmrHash = ::Output; impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = b"mmr"; + const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; type Hashing = Keccak256; type Hash = MmrHash; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; @@ -1375,8 +1400,10 @@ construct_runtime! { // Tips module. Tips: pallet_tips::{Pallet, Call, Storage, Event} = 36, - // Gilts pallet. - Gilt: pallet_gilt::{Pallet, Call, Storage, Event, Config} = 38, + // NIS pallet. + Nis: pallet_nis::{Pallet, Call, Storage, Event} = 38, +// pub type NisCounterpartInstance = pallet_balances::Instance2; + NisCounterpartBalances: pallet_balances:: = 45, // Parachains pallets. Start indices at 50 to leave room. ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, @@ -1449,6 +1476,12 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; + +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, +); + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1456,15 +1489,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - // "Bound uses of call" - pallet_preimage::migration::v1::Migration, - pallet_scheduler::migration::v3::MigrateToV4, - pallet_democracy::migrations::v1::Migration, - pallet_multisig::migrations::v1::MigrateToV1, - // "Properly migrate weights to v2" - parachains_configuration::migration::v3::MigrateToV3, - ), + Migrations, >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1518,6 +1543,7 @@ mod benches { [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] + [pallet_balances, NisCounterpartBalances] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] @@ -1525,7 +1551,7 @@ mod benches { [pallet_collective, TechnicalCommittee] [pallet_democracy, Democracy] [pallet_elections_phragmen, PhragmenElection] - [pallet_gilt, Gilt] + [pallet_nis, Nis] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] @@ -1723,6 +1749,10 @@ sp_api::impl_runtime_apis! { Ok(Mmr::mmr_root()) } + fn mmr_leaf_count() -> Result { + Ok(Mmr::mmr_leaves()) + } + fn generate_proof( block_numbers: Vec, best_known_block_number: Option, diff --git a/runtime/rococo/src/validator_manager.rs b/runtime/rococo/src/validator_manager.rs index bb13bc823ca4..55b1878cbc7f 100644 --- a/runtime/rococo/src/validator_manager.rs +++ b/runtime/rococo/src/validator_manager.rs @@ -66,6 +66,7 @@ pub mod pallet { /// Add new validators to the set. /// /// The new validators will be active from current session + 2. + #[pallet::call_index(0)] #[pallet::weight(100_000)] pub fn register_validators( origin: OriginFor, @@ -82,6 +83,7 @@ pub mod pallet { /// Remove validators from the set. /// /// The removed validators will be deactivated from current session + 2. + #[pallet::call_index(1)] #[pallet::weight(100_000)] pub fn deregister_validators( origin: OriginFor, diff --git a/runtime/rococo/src/weights/frame_benchmarking_baseline.rs b/runtime/rococo/src/weights/frame_benchmarking_baseline.rs index 93b1cf101dec..a567ef8e0758 100644 --- a/runtime/rococo/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/rococo/src/weights/frame_benchmarking_baseline.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 @@ -46,46 +46,52 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - (126_000 as Weight) + // Minimum execution time: 104 nanoseconds. + Weight::from_ref_time(136_098 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - (117_000 as Weight) + // Minimum execution time: 101 nanoseconds. + Weight::from_ref_time(141_859 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - (132_000 as Weight) + // Minimum execution time: 106 nanoseconds. + Weight::from_ref_time(142_767 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - (132_000 as Weight) + // Minimum execution time: 107 nanoseconds. + Weight::from_ref_time(145_251 as u64) } /// The range of component `i` is `[0, 100]`. - fn hashing(i: u32, ) -> Weight { - (19_331_786_000 as Weight) - // Standard Error: 113_000 - .saturating_add((410_000 as Weight).saturating_mul(i as Weight)) + fn hashing(_i: u32, ) -> Weight { + // Minimum execution time: 19_899_457 nanoseconds. + Weight::from_ref_time(20_127_184_762 as u64) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 15_000 - .saturating_add((47_597_000 as Weight).saturating_mul(i as Weight)) + // Minimum execution time: 140 nanoseconds. + Weight::from_ref_time(160_000 as u64) + // Standard Error: 8_692 + .saturating_add(Weight::from_ref_time(47_038_394 as u64).saturating_mul(i as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 3_000 - .saturating_add((2_126_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) + // Minimum execution time: 107 nanoseconds. + Weight::from_ref_time(117_000 as u64) + // Standard Error: 4_352 + .saturating_add(Weight::from_ref_time(1_945_080 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 0 - .saturating_add((328_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + // Minimum execution time: 112 nanoseconds. + Weight::from_ref_time(118_000 as u64) + // Standard Error: 835 + .saturating_add(Weight::from_ref_time(321_096 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } } diff --git a/runtime/rococo/src/weights/frame_system.rs b/runtime/rococo/src/weights/frame_system.rs index ec919ac946fc..5eaa7efcc22c 100644 --- a/runtime/rococo/src/weights/frame_system.rs +++ b/runtime/rococo/src/weights/frame_system.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,51 +38,59 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. - fn remark(_b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 4_020 nanoseconds. + Weight::from_ref_time(4_086_000 as u64) + // Standard Error: 0 + .saturating_add(Weight::from_ref_time(409 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + // Minimum execution time: 12_989 nanoseconds. + Weight::from_ref_time(13_133_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(1_758 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(8_025_000 as u64) + // Minimum execution time: 8_329 nanoseconds. + Weight::from_ref_time(8_576_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(602_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 4_069 nanoseconds. + Weight::from_ref_time(4_172_000 as u64) + // Standard Error: 2_158 + .saturating_add(Weight::from_ref_time(598_068 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(456_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 4_023 nanoseconds. + Weight::from_ref_time(4_103_000 as u64) + // Standard Error: 875 + .saturating_add(Weight::from_ref_time(427_793 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_010_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 5_435 nanoseconds. + Weight::from_ref_time(5_565_000 as u64) + // Standard Error: 1_137 + .saturating_add(Weight::from_ref_time(970_252 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/rococo/src/weights/mod.rs b/runtime/rococo/src/weights/mod.rs index 712783bc3e6c..f1657f95aa19 100644 --- a/runtime/rococo/src/weights/mod.rs +++ b/runtime/rococo/src/weights/mod.rs @@ -17,18 +17,19 @@ pub mod frame_system; pub mod pallet_balances; +pub mod pallet_balances_nis_counterpart_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; pub mod pallet_collective_council; pub mod pallet_collective_technical_committee; pub mod pallet_democracy; pub mod pallet_elections_phragmen; -pub mod pallet_gilt; pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; pub mod pallet_multisig; +pub mod pallet_nis; pub mod pallet_preimage; pub mod pallet_proxy; pub mod pallet_scheduler; diff --git a/runtime/rococo/src/weights/pallet_balances.rs b/runtime/rococo/src/weights/pallet_balances.rs index 16c0b483836e..9e6af9772680 100644 --- a/runtime/rococo/src/weights/pallet_balances.rs +++ b/runtime/rococo/src/weights/pallet_balances.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -46,43 +46,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(40_460_000 as u64) + // Minimum execution time: 40_106 nanoseconds. + Weight::from_ref_time(40_750_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(29_508_000 as u64) + // Minimum execution time: 30_737 nanoseconds. + Weight::from_ref_time(31_295_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(22_142_000 as u64) + // Minimum execution time: 23_902 nanoseconds. + Weight::from_ref_time(24_338_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(25_653_000 as u64) + // Minimum execution time: 26_492 nanoseconds. + Weight::from_ref_time(26_866_000 as u64) .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) fn force_transfer() -> Weight { - Weight::from_ref_time(39_913_000 as u64) + // Minimum execution time: 40_384 nanoseconds. + Weight::from_ref_time(41_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(34_497_000 as u64) + // Minimum execution time: 35_115 nanoseconds. + Weight::from_ref_time(35_696_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(19_749_000 as u64) + // Minimum execution time: 20_274 nanoseconds. + Weight::from_ref_time(20_885_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs b/runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs new file mode 100644 index 000000000000..70be4fc4b642 --- /dev/null +++ b/runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs @@ -0,0 +1,105 @@ +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-11-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=rococo-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-balances +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --header=./file_header.txt +// --output=./runtime/rococo/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn transfer() -> Weight { + // Minimum execution time: 41_176 nanoseconds. + Weight::from_ref_time(42_293_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_keep_alive() -> Weight { + // Minimum execution time: 29_743 nanoseconds. + Weight::from_ref_time(30_329_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn set_balance_creating() -> Weight { + // Minimum execution time: 19_825 nanoseconds. + Weight::from_ref_time(20_774_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn set_balance_killing() -> Weight { + // Minimum execution time: 27_783 nanoseconds. + Weight::from_ref_time(28_462_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:2 w:2) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + fn force_transfer() -> Weight { + // Minimum execution time: 40_433 nanoseconds. + Weight::from_ref_time(41_444_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: NisCounterpartBalances Account (r:2 w:2) + // Storage: System Account (r:1 w:1) + fn transfer_all() -> Weight { + // Minimum execution time: 37_439 nanoseconds. + Weight::from_ref_time(38_570_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: NisCounterpartBalances Account (r:1 w:1) + fn force_unreserve() -> Weight { + // Minimum execution time: 18_366 nanoseconds. + Weight::from_ref_time(19_170_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/rococo/src/weights/pallet_bounties.rs b/runtime/rococo/src/weights/pallet_bounties.rs index b8d21b4291ab..d58fbd470a57 100644 --- a/runtime/rococo/src/weights/pallet_bounties.rs +++ b/runtime/rococo/src/weights/pallet_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_bounties.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,43 +50,49 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: Bounties Bounties (r:0 w:1) /// The range of component `d` is `[0, 16384]`. fn propose_bounty(d: u32, ) -> Weight { - Weight::from_ref_time(26_654_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 29_250 nanoseconds. + Weight::from_ref_time(39_490_219 as u64) + // Standard Error: 63 + .saturating_add(Weight::from_ref_time(127 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: Bounties BountyApprovals (r:1 w:1) fn approve_bounty() -> Weight { - Weight::from_ref_time(9_776_000 as u64) + // Minimum execution time: 12_228 nanoseconds. + Weight::from_ref_time(12_490_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn propose_curator() -> Weight { - Weight::from_ref_time(8_350_000 as u64) + // Minimum execution time: 11_809 nanoseconds. + Weight::from_ref_time(12_202_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn unassign_curator() -> Weight { - Weight::from_ref_time(34_804_000 as u64) + // Minimum execution time: 40_307 nanoseconds. + Weight::from_ref_time(41_570_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: System Account (r:1 w:1) fn accept_curator() -> Weight { - Weight::from_ref_time(23_414_000 as u64) + // Minimum execution time: 28_140 nanoseconds. + Weight::from_ref_time(28_829_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:1) // Storage: ChildBounties ParentChildBounties (r:1 w:0) fn award_bounty() -> Weight { - Weight::from_ref_time(20_148_000 as u64) + // Minimum execution time: 24_585 nanoseconds. + Weight::from_ref_time(24_912_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,7 +101,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - Weight::from_ref_time(64_115_000 as u64) + // Minimum execution time: 67_397 nanoseconds. + Weight::from_ref_time(67_955_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -104,7 +111,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - Weight::from_ref_time(39_628_000 as u64) + // Minimum execution time: 44_196 nanoseconds. + Weight::from_ref_time(44_904_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -113,24 +121,27 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - Weight::from_ref_time(47_429_000 as u64) + // Minimum execution time: 52_882 nanoseconds. + Weight::from_ref_time(53_466_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Bounties Bounties (r:1 w:1) fn extend_bounty_expiry() -> Weight { - Weight::from_ref_time(17_322_000 as u64) + // Minimum execution time: 21_567 nanoseconds. + Weight::from_ref_time(21_852_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bounties BountyApprovals (r:1 w:1) - // Storage: Bounties Bounties (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `b` is `[1, 100]`. + // Storage: Bounties Bounties (r:2 w:2) + // Storage: System Account (r:4 w:4) + /// The range of component `b` is `[0, 100]`. fn spend_funds(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 30_000 - .saturating_add(Weight::from_ref_time(30_775_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 7_400 nanoseconds. + Weight::from_ref_time(15_331_778 as u64) + // Standard Error: 18_361 + .saturating_add(Weight::from_ref_time(24_618_020 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) diff --git a/runtime/rococo/src/weights/pallet_child_bounties.rs b/runtime/rococo/src/weights/pallet_child_bounties.rs index dd6dc2b1fd2b..07bb34136d6b 100644 --- a/runtime/rococo/src/weights/pallet_child_bounties.rs +++ b/runtime/rococo/src/weights/pallet_child_bounties.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_child_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_child_bounties.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,9 +52,10 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(48_890_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 51_894 nanoseconds. + Weight::from_ref_time(52_400_296 as u64) + // Standard Error: 9 + .saturating_add(Weight::from_ref_time(776 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,7 +63,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(14_114_000 as u64) + // Minimum execution time: 19_145 nanoseconds. + Weight::from_ref_time(19_689_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,7 +72,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(26_807_000 as u64) + // Minimum execution time: 33_904 nanoseconds. + Weight::from_ref_time(34_574_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,14 +81,16 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(39_640_000 as u64) + // Minimum execution time: 45_501 nanoseconds. + Weight::from_ref_time(46_140_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bounties Bounties (r:1 w:0) // Storage: ChildBounties ChildBounties (r:1 w:1) fn award_child_bounty() -> Weight { - Weight::from_ref_time(21_445_000 as u64) + // Minimum execution time: 27_533 nanoseconds. + Weight::from_ref_time(27_896_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -94,7 +99,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(65_771_000 as u64) + // Minimum execution time: 66_026 nanoseconds. + Weight::from_ref_time(68_035_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -105,7 +111,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(46_230_000 as u64) + // Minimum execution time: 50_711 nanoseconds. + Weight::from_ref_time(51_291_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -116,7 +123,8 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(56_148_000 as u64) + // Minimum execution time: 60_553 nanoseconds. + Weight::from_ref_time(61_323_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_collective_council.rs b/runtime/rococo/src/weights/pallet_collective_council.rs index f50dce94e01f..7b5860d6fbd0 100644 --- a/runtime/rococo/src/weights/pallet_collective_council.rs +++ b/runtime/rococo/src/weights/pallet_collective_council.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2021 Parity Technologies (UK) Ltd. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -16,12 +16,14 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-08-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 128 +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: -// target/release/polkadot +// ./target/production/polkadot // benchmark +// pallet // --chain=rococo-dev // --steps=50 // --repeat=20 @@ -29,11 +31,9 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/ - #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -44,132 +44,184 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - // Storage: Instance1Collective Members (r:1 w:1) - // Storage: Instance1Collective Proposals (r:1 w:0) - // Storage: Instance1Collective Voting (r:100 w:100) - // Storage: Instance1Collective Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(14_448_000 as u64).saturating_mul(m as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(n as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(19_620_000 as u64).saturating_mul(p as u64)) + // Storage: Council Members (r:1 w:1) + // Storage: Council Proposals (r:1 w:0) + // Storage: Council Prime (r:0 w:1) + // Storage: Council Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 16_865 nanoseconds. + Weight::from_ref_time(17_262_000 as u64) + // Standard Error: 47_503 + .saturating_add(Weight::from_ref_time(5_429_751 as u64).saturating_mul(m as u64)) + // Standard Error: 47_503 + .saturating_add(Weight::from_ref_time(7_509_601 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Instance1Collective Members (r:1 w:0) + // Storage: Council Members (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(22_536_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(84_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_387 nanoseconds. + Weight::from_ref_time(19_900_869 as u64) + // Standard Error: 22 + .saturating_add(Weight::from_ref_time(1_697 as u64).saturating_mul(b as u64)) + // Standard Error: 233 + .saturating_add(Weight::from_ref_time(14_085 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective ProposalOf (r:1 w:0) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(27_600_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_560 nanoseconds. + Weight::from_ref_time(21_438_949 as u64) + // Standard Error: 32 + .saturating_add(Weight::from_ref_time(1_831 as u64).saturating_mul(b as u64)) + // Standard Error: 335 + .saturating_add(Weight::from_ref_time(24_328 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective ProposalOf (r:1 w:1) - // Storage: Instance1Collective Proposals (r:1 w:1) - // Storage: Instance1Collective ProposalCount (r:1 w:1) - // Storage: Instance1Collective Voting (r:0 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalCount (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(42_192_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(361_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_735 nanoseconds. + Weight::from_ref_time(28_160_737 as u64) + // Standard Error: 68 + .saturating_add(Weight::from_ref_time(3_381 as u64).saturating_mul(b as u64)) + // Standard Error: 715 + .saturating_add(Weight::from_ref_time(22_793 as u64).saturating_mul(m as u64)) + // Standard Error: 706 + .saturating_add(Weight::from_ref_time(106_054 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(32_307_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(199_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 27_532 nanoseconds. + Weight::from_ref_time(28_330_462 as u64) + // Standard Error: 249 + .saturating_add(Weight::from_ref_time(35_761 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Instance1Collective Voting (r:1 w:1) - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective Proposals (r:1 w:1) - // Storage: Instance1Collective ProposalOf (r:0 w:1) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(41_436_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(170_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(333_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 30_396 nanoseconds. + Weight::from_ref_time(32_911_535 as u64) + // Standard Error: 631 + .saturating_add(Weight::from_ref_time(23_197 as u64).saturating_mul(m as u64)) + // Standard Error: 615 + .saturating_add(Weight::from_ref_time(80_663 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance1Collective Voting (r:1 w:1) - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective ProposalOf (r:1 w:1) - // Storage: Instance1Collective Proposals (r:1 w:1) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(57_836_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(170_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(339_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 40_839 nanoseconds. + Weight::from_ref_time(41_249_633 as u64) + // Standard Error: 59 + .saturating_add(Weight::from_ref_time(1_719 as u64).saturating_mul(b as u64)) + // Standard Error: 634 + .saturating_add(Weight::from_ref_time(26_287 as u64).saturating_mul(m as u64)) + // Standard Error: 618 + .saturating_add(Weight::from_ref_time(98_027 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance1Collective Voting (r:1 w:1) - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective Prime (r:1 w:0) - // Storage: Instance1Collective Proposals (r:1 w:1) - // Storage: Instance1Collective ProposalOf (r:0 w:1) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(45_551_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(172_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(338_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 33_692 nanoseconds. + Weight::from_ref_time(35_151_605 as u64) + // Standard Error: 473 + .saturating_add(Weight::from_ref_time(24_847 as u64).saturating_mul(m as u64)) + // Standard Error: 461 + .saturating_add(Weight::from_ref_time(81_291 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance1Collective Voting (r:1 w:1) - // Storage: Instance1Collective Members (r:1 w:0) - // Storage: Instance1Collective Prime (r:1 w:0) - // Storage: Instance1Collective ProposalOf (r:1 w:1) - // Storage: Instance1Collective Proposals (r:1 w:1) + // Storage: Council Voting (r:1 w:1) + // Storage: Council Members (r:1 w:0) + // Storage: Council Prime (r:1 w:0) + // Storage: Council ProposalOf (r:1 w:1) + // Storage: Council Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(61_497_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(171_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(343_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 42_657 nanoseconds. + Weight::from_ref_time(43_659_226 as u64) + // Standard Error: 63 + .saturating_add(Weight::from_ref_time(1_573 as u64).saturating_mul(b as u64)) + // Standard Error: 667 + .saturating_add(Weight::from_ref_time(25_528 as u64).saturating_mul(m as u64)) + // Standard Error: 651 + .saturating_add(Weight::from_ref_time(98_052 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance1Collective Proposals (r:1 w:1) - // Storage: Instance1Collective Voting (r:0 w:1) - // Storage: Instance1Collective ProposalOf (r:0 w:1) + // Storage: Council Proposals (r:1 w:1) + // Storage: Council Voting (r:0 w:1) + // Storage: Council ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(25_573_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(335_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 19_240 nanoseconds. + Weight::from_ref_time(22_570_186 as u64) + // Standard Error: 753 + .saturating_add(Weight::from_ref_time(89_467 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_collective_technical_committee.rs b/runtime/rococo/src/weights/pallet_collective_technical_committee.rs index acdced982d94..58cc7d2403e6 100644 --- a/runtime/rococo/src/weights/pallet_collective_technical_committee.rs +++ b/runtime/rococo/src/weights/pallet_collective_technical_committee.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2021 Parity Technologies (UK) Ltd. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -16,12 +16,14 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-08-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 128 +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: -// target/release/polkadot +// ./target/production/polkadot // benchmark +// pallet // --chain=rococo-dev // --steps=50 // --repeat=20 @@ -29,11 +31,9 @@ // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 // --header=./file_header.txt // --output=./runtime/rococo/src/weights/ - #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -44,132 +44,184 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - // Storage: Instance2Collective Members (r:1 w:1) - // Storage: Instance2Collective Proposals (r:1 w:0) - // Storage: Instance2Collective Voting (r:100 w:100) - // Storage: Instance2Collective Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(14_473_000 as u64).saturating_mul(m as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(73_000 as u64).saturating_mul(n as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(19_551_000 as u64).saturating_mul(p as u64)) + // Storage: TechnicalCommittee Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalCommittee Prime (r:0 w:1) + // Storage: TechnicalCommittee Voting (r:100 w:100) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Minimum execution time: 17_568 nanoseconds. + Weight::from_ref_time(17_872_000 as u64) + // Standard Error: 46_117 + .saturating_add(Weight::from_ref_time(5_267_225 as u64).saturating_mul(m as u64)) + // Standard Error: 46_117 + .saturating_add(Weight::from_ref_time(7_440_577 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Instance2Collective Members (r:1 w:0) + // Storage: TechnicalCommittee Members (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(22_690_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_712 nanoseconds. + Weight::from_ref_time(20_051_871 as u64) + // Standard Error: 20 + .saturating_add(Weight::from_ref_time(1_652 as u64).saturating_mul(b as u64)) + // Standard Error: 212 + .saturating_add(Weight::from_ref_time(14_513 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective ProposalOf (r:1 w:0) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee ProposalOf (r:1 w:0) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(27_473_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(159_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_790 nanoseconds. + Weight::from_ref_time(21_621_729 as u64) + // Standard Error: 28 + .saturating_add(Weight::from_ref_time(1_891 as u64).saturating_mul(b as u64)) + // Standard Error: 294 + .saturating_add(Weight::from_ref_time(22_852 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective ProposalOf (r:1 w:1) - // Storage: Instance2Collective Proposals (r:1 w:1) - // Storage: Instance2Collective ProposalCount (r:1 w:1) - // Storage: Instance2Collective Voting (r:0 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee ProposalOf (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + // Storage: TechnicalCommittee ProposalCount (r:1 w:1) + // Storage: TechnicalCommittee Voting (r:0 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(42_047_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(360_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_778 nanoseconds. + Weight::from_ref_time(29_237_413 as u64) + // Standard Error: 67 + .saturating_add(Weight::from_ref_time(3_589 as u64).saturating_mul(b as u64)) + // Standard Error: 703 + .saturating_add(Weight::from_ref_time(19_563 as u64).saturating_mul(m as u64)) + // Standard Error: 694 + .saturating_add(Weight::from_ref_time(112_770 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective Voting (r:1 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee Voting (r:1 w:1) + /// The range of component `m` is `[5, 100]`. + /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(32_023_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(199_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 29_080 nanoseconds. + Weight::from_ref_time(29_820_804 as u64) + // Standard Error: 360 + .saturating_add(Weight::from_ref_time(38_547 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Instance2Collective Voting (r:1 w:1) - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective Proposals (r:1 w:1) - // Storage: Instance2Collective ProposalOf (r:0 w:1) + // Storage: TechnicalCommittee Voting (r:1 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(41_107_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(171_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(332_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 31_795 nanoseconds. + Weight::from_ref_time(33_507_633 as u64) + // Standard Error: 577 + .saturating_add(Weight::from_ref_time(23_944 as u64).saturating_mul(m as u64)) + // Standard Error: 563 + .saturating_add(Weight::from_ref_time(80_035 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance2Collective Voting (r:1 w:1) - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective ProposalOf (r:1 w:1) - // Storage: Instance2Collective Proposals (r:1 w:1) + // Storage: TechnicalCommittee Voting (r:1 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee ProposalOf (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(57_783_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(167_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(336_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 41_185 nanoseconds. + Weight::from_ref_time(41_632_745 as u64) + // Standard Error: 58 + .saturating_add(Weight::from_ref_time(1_828 as u64).saturating_mul(b as u64)) + // Standard Error: 619 + .saturating_add(Weight::from_ref_time(27_285 as u64).saturating_mul(m as u64)) + // Standard Error: 604 + .saturating_add(Weight::from_ref_time(98_702 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance2Collective Voting (r:1 w:1) - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective Prime (r:1 w:0) - // Storage: Instance2Collective Proposals (r:1 w:1) - // Storage: Instance2Collective ProposalOf (r:0 w:1) + // Storage: TechnicalCommittee Voting (r:1 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee Prime (r:1 w:0) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(45_646_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(170_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(335_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 34_275 nanoseconds. + Weight::from_ref_time(35_453_782 as u64) + // Standard Error: 514 + .saturating_add(Weight::from_ref_time(27_212 as u64).saturating_mul(m as u64)) + // Standard Error: 501 + .saturating_add(Weight::from_ref_time(82_393 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance2Collective Voting (r:1 w:1) - // Storage: Instance2Collective Members (r:1 w:0) - // Storage: Instance2Collective Prime (r:1 w:0) - // Storage: Instance2Collective ProposalOf (r:1 w:1) - // Storage: Instance2Collective Proposals (r:1 w:1) + // Storage: TechnicalCommittee Voting (r:1 w:1) + // Storage: TechnicalCommittee Members (r:1 w:0) + // Storage: TechnicalCommittee Prime (r:1 w:0) + // Storage: TechnicalCommittee ProposalOf (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + /// The range of component `b` is `[1, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(61_376_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(172_000 as u64).saturating_mul(m as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(339_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 43_080 nanoseconds. + Weight::from_ref_time(43_948_612 as u64) + // Standard Error: 62 + .saturating_add(Weight::from_ref_time(1_753 as u64).saturating_mul(b as u64)) + // Standard Error: 661 + .saturating_add(Weight::from_ref_time(27_314 as u64).saturating_mul(m as u64)) + // Standard Error: 644 + .saturating_add(Weight::from_ref_time(99_583 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Instance2Collective Proposals (r:1 w:1) - // Storage: Instance2Collective Voting (r:0 w:1) - // Storage: Instance2Collective ProposalOf (r:0 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:1) + // Storage: TechnicalCommittee Voting (r:0 w:1) + // Storage: TechnicalCommittee ProposalOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. + /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(25_286_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(336_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 19_363 nanoseconds. + Weight::from_ref_time(22_781_553 as u64) + // Standard Error: 763 + .saturating_add(Weight::from_ref_time(92_537 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_democracy.rs b/runtime/rococo/src/weights/pallet_democracy.rs index 453385b594e7..6af048b15824 100644 --- a/runtime/rococo/src/weights/pallet_democracy.rs +++ b/runtime/rococo/src/weights/pallet_democracy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,13 +49,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - Weight::from_ref_time(41_783_000 as u64) + // Minimum execution time: 41_715 nanoseconds. + Weight::from_ref_time(42_171_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy DepositOf (r:1 w:1) fn second() -> Weight { - Weight::from_ref_time(38_362_000 as u64) + // Minimum execution time: 38_899 nanoseconds. + Weight::from_ref_time(39_822_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -63,7 +65,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - Weight::from_ref_time(48_307_000 as u64) + // Minimum execution time: 50_150 nanoseconds. + Weight::from_ref_time(50_792_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -71,14 +74,16 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - Weight::from_ref_time(48_500_000 as u64) + // Minimum execution time: 50_121 nanoseconds. + Weight::from_ref_time(50_881_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - Weight::from_ref_time(20_294_000 as u64) + // Minimum execution time: 21_124 nanoseconds. + Weight::from_ref_time(21_631_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,39 +94,45 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - Weight::from_ref_time(75_191_000 as u64) + // Minimum execution time: 75_761 nanoseconds. + Weight::from_ref_time(76_872_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose() -> Weight { - Weight::from_ref_time(16_369_000 as u64) + // Minimum execution time: 17_213 nanoseconds. + Weight::from_ref_time(17_695_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - Weight::from_ref_time(4_767_000 as u64) + // Minimum execution time: 4_818 nanoseconds. + Weight::from_ref_time(5_020_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - Weight::from_ref_time(4_866_000 as u64) + // Minimum execution time: 4_924 nanoseconds. + Weight::from_ref_time(5_123_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - Weight::from_ref_time(19_986_000 as u64) + // Minimum execution time: 20_512 nanoseconds. + Weight::from_ref_time(21_249_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external() -> Weight { - Weight::from_ref_time(25_291_000 as u64) + // Minimum execution time: 26_321 nanoseconds. + Weight::from_ref_time(26_795_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -129,13 +140,15 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - Weight::from_ref_time(63_703_000 as u64) + // Minimum execution time: 64_453 nanoseconds. + Weight::from_ref_time(65_189_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - Weight::from_ref_time(13_235_000 as u64) + // Minimum execution time: 13_447 nanoseconds. + Weight::from_ref_time(14_027_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -143,9 +156,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { - Weight::from_ref_time(5_980_000 as u64) - // Standard Error: 2_131 - .saturating_add(Weight::from_ref_time(2_104_197 as u64).saturating_mul(r as u64)) + // Minimum execution time: 6_181 nanoseconds. + Weight::from_ref_time(9_536_223 as u64) + // Standard Error: 5_062 + .saturating_add(Weight::from_ref_time(2_030_538 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -158,9 +172,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:0) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - Weight::from_ref_time(8_351_000 as u64) - // Standard Error: 2_308 - .saturating_add(Weight::from_ref_time(2_117_411 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_512 nanoseconds. + Weight::from_ref_time(11_614_712 as u64) + // Standard Error: 3_782 + .saturating_add(Weight::from_ref_time(2_035_162 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -170,9 +185,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { - Weight::from_ref_time(40_303_000 as u64) - // Standard Error: 3_789 - .saturating_add(Weight::from_ref_time(3_031_594 as u64).saturating_mul(r as u64)) + // Minimum execution time: 41_739 nanoseconds. + Weight::from_ref_time(48_459_085 as u64) + // Standard Error: 5_092 + .saturating_add(Weight::from_ref_time(2_923_424 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -182,9 +198,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:2 w:2) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { - Weight::from_ref_time(24_342_000 as u64) - // Standard Error: 2_624 - .saturating_add(Weight::from_ref_time(2_962_125 as u64).saturating_mul(r as u64)) + // Minimum execution time: 25_176 nanoseconds. + Weight::from_ref_time(28_498_205 as u64) + // Standard Error: 4_594 + .saturating_add(Weight::from_ref_time(2_897_543 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -192,7 +209,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - Weight::from_ref_time(5_811_000 as u64) + // Minimum execution time: 5_512 nanoseconds. + Weight::from_ref_time(5_670_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -200,9 +218,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { - Weight::from_ref_time(22_894_000 as u64) - // Standard Error: 2_967 - .saturating_add(Weight::from_ref_time(142_001 as u64).saturating_mul(r as u64)) + // Minimum execution time: 24_374 nanoseconds. + Weight::from_ref_time(31_924_026 as u64) + // Standard Error: 2_290 + .saturating_add(Weight::from_ref_time(31_545 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -211,9 +230,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { - Weight::from_ref_time(28_227_000 as u64) - // Standard Error: 673 - .saturating_add(Weight::from_ref_time(87_748 as u64).saturating_mul(r as u64)) + // Minimum execution time: 29_650 nanoseconds. + Weight::from_ref_time(31_448_868 as u64) + // Standard Error: 695 + .saturating_add(Weight::from_ref_time(69_392 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -221,9 +241,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_578_000 as u64) - // Standard Error: 1_035 - .saturating_add(Weight::from_ref_time(105_378 as u64).saturating_mul(r as u64)) + // Minimum execution time: 16_232 nanoseconds. + Weight::from_ref_time(18_964_852 as u64) + // Standard Error: 896 + .saturating_add(Weight::from_ref_time(67_310 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -231,9 +252,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { - Weight::from_ref_time(15_542_000 as u64) - // Standard Error: 1_104 - .saturating_add(Weight::from_ref_time(109_552 as u64).saturating_mul(r as u64)) + // Minimum execution time: 15_817 nanoseconds. + Weight::from_ref_time(18_350_237 as u64) + // Standard Error: 936 + .saturating_add(Weight::from_ref_time(76_501 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_elections_phragmen.rs b/runtime/rococo/src/weights/pallet_elections_phragmen.rs index c4c015fe4412..888489e52990 100644 --- a/runtime/rococo/src/weights/pallet_elections_phragmen.rs +++ b/runtime/rococo/src/weights/pallet_elections_phragmen.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_elections_phragmen.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,9 +51,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[1, 16]`. fn vote_equal(v: u32, ) -> Weight { - Weight::from_ref_time(24_107_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(184_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 31_116 nanoseconds. + Weight::from_ref_time(33_939_670 as u64) + // Standard Error: 19_880 + .saturating_add(Weight::from_ref_time(42_818 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -64,9 +65,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_more(v: u32, ) -> Weight { - Weight::from_ref_time(36_869_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(165_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 40_786 nanoseconds. + Weight::from_ref_time(42_128_805 as u64) + // Standard Error: 5_101 + .saturating_add(Weight::from_ref_time(160_966 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,16 +79,18 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:1 w:1) /// The range of component `v` is `[2, 16]`. fn vote_less(v: u32, ) -> Weight { - Weight::from_ref_time(36_445_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(199_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 40_445 nanoseconds. + Weight::from_ref_time(42_057_705 as u64) + // Standard Error: 5_093 + .saturating_add(Weight::from_ref_time(160_580 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PhragmenElection Voting (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn remove_voter() -> Weight { - Weight::from_ref_time(33_035_000 as u64) + // Minimum execution time: 39_806 nanoseconds. + Weight::from_ref_time(40_625_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -95,18 +99,20 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: PhragmenElection RunnersUp (r:1 w:0) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { - Weight::from_ref_time(25_946_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(101_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 36_211 nanoseconds. + Weight::from_ref_time(27_335_577 as u64) + // Standard Error: 999 + .saturating_add(Weight::from_ref_time(91_839 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: PhragmenElection Candidates (r:1 w:1) /// The range of component `c` is `[1, 1000]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { - Weight::from_ref_time(22_945_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 31_700 nanoseconds. + Weight::from_ref_time(22_985_655 as u64) + // Standard Error: 1_045 + .saturating_add(Weight::from_ref_time(72_257 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -116,18 +122,21 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn renounce_candidacy_members() -> Weight { - Weight::from_ref_time(41_502_000 as u64) + // Minimum execution time: 44_808 nanoseconds. + Weight::from_ref_time(45_734_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: PhragmenElection RunnersUp (r:1 w:1) fn renounce_candidacy_runners_up() -> Weight { - Weight::from_ref_time(30_791_000 as u64) + // Minimum execution time: 34_375 nanoseconds. + Weight::from_ref_time(34_942_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn remove_member_without_replacement() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: PhragmenElection Members (r:1 w:1) @@ -137,7 +146,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Council Proposals (r:1 w:0) // Storage: Council Members (r:0 w:1) fn remove_member_with_replacement() -> Weight { - Weight::from_ref_time(57_184_000 as u64) + // Minimum execution time: 58_977 nanoseconds. + Weight::from_ref_time(59_738_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,11 +158,12 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Storage: Balances Locks (r:5000 w:5000) // Storage: System Account (r:5000 w:5000) /// The range of component `v` is `[5000, 10000]`. - /// The range of component `d` is `[1, 5000]`. + /// The range of component `d` is `[0, 5000]`. fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 85_000 - .saturating_add(Weight::from_ref_time(61_507_000 as u64).saturating_mul(v as u64)) + // Minimum execution time: 278_968_823 nanoseconds. + Weight::from_ref_time(279_635_200_000 as u64) + // Standard Error: 242_951 + .saturating_add(Weight::from_ref_time(34_711_662 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64))) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) @@ -170,14 +181,16 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `v` is `[1, 10000]`. /// The range of component `e` is `[10000, 160000]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_864_000 - .saturating_add(Weight::from_ref_time(167_385_000 as u64).saturating_mul(v as u64)) - // Standard Error: 124_000 - .saturating_add(Weight::from_ref_time(9_721_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 28_205_490 nanoseconds. + Weight::from_ref_time(28_372_658_000 as u64) + // Standard Error: 537_591 + .saturating_add(Weight::from_ref_time(45_407_497 as u64).saturating_mul(v as u64)) + // Standard Error: 34_499 + .saturating_add(Weight::from_ref_time(2_313_355 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(265 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) + .saturating_add(T::DbWeight::get().writes(6 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } } diff --git a/runtime/rococo/src/weights/pallet_gilt.rs b/runtime/rococo/src/weights/pallet_gilt.rs deleted file mode 100644 index b873684e2311..000000000000 --- a/runtime/rococo/src/weights/pallet_gilt.rs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . -//! Autogenerated weights for `pallet_gilt` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=rococo-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_gilt -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_gilt.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_gilt`. -pub struct WeightInfo(PhantomData); -impl pallet_gilt::WeightInfo for WeightInfo { - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - /// The range of component `l` is `[0, 999]`. - fn place_bid(l: u32, ) -> Weight { - Weight::from_ref_time(36_767_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - fn place_bid_max() -> Weight { - Weight::from_ref_time(119_333_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - /// The range of component `l` is `[1, 1000]`. - fn retract_bid(l: u32, ) -> Weight { - Weight::from_ref_time(37_108_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - fn set_target() -> Weight { - Weight::from_ref_time(5_188_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Gilt Active (r:1 w:1) - // Storage: Gilt ActiveTotal (r:1 w:1) - fn thaw() -> Weight { - Weight::from_ref_time(43_654_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:0) - fn pursue_target_noop() -> Weight { - Weight::from_ref_time(1_584_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt Active (r:0 w:1) - /// The range of component `b` is `[1, 1000]`. - fn pursue_target_per_item(b: u32, ) -> Weight { - Weight::from_ref_time(21_464_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(4_387_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) - } - // Storage: Gilt ActiveTotal (r:1 w:1) - // Storage: Gilt QueueTotals (r:1 w:1) - // Storage: Gilt Queues (r:1 w:1) - // Storage: Gilt Active (r:0 w:1) - /// The range of component `q` is `[1, 300]`. - fn pursue_target_per_queue(q: u32, ) -> Weight { - Weight::from_ref_time(12_881_000 as u64) - // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(8_285_000 as u64).saturating_mul(q as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(q as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(q as u64))) - } -} diff --git a/runtime/rococo/src/weights/pallet_identity.rs b/runtime/rococo/src/weights/pallet_identity.rs index 57c18f391f4b..56a6b55557fa 100644 --- a/runtime/rococo/src/weights/pallet_identity.rs +++ b/runtime/rococo/src/weights/pallet_identity.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_identity.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,32 +47,35 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(16_146_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(164_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 16_590 nanoseconds. + Weight::from_ref_time(18_060_891 as u64) + // Standard Error: 2_851 + .saturating_add(Weight::from_ref_time(157_547 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(28_556_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(208_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(371_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 35_897 nanoseconds. + Weight::from_ref_time(35_818_211 as u64) + // Standard Error: 4_816 + .saturating_add(Weight::from_ref_time(55_596 as u64).saturating_mul(r as u64)) + // Standard Error: 939 + .saturating_add(Weight::from_ref_time(309_363 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Storage: Identity SuperOf (r:2 w:2) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(25_214_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(3_032_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_669 nanoseconds. + Weight::from_ref_time(28_317_272 as u64) + // Standard Error: 4_823 + .saturating_add(Weight::from_ref_time(2_161_761 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -80,12 +83,13 @@ impl pallet_identity::WeightInfo for WeightInfo { } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Storage: Identity SuperOf (r:0 w:2) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(26_402_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(916_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_805 nanoseconds. + Weight::from_ref_time(29_056_548 as u64) + // Standard Error: 4_259 + .saturating_add(Weight::from_ref_time(918_046 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -94,16 +98,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(32_822_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(74_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(909_000 as u64).saturating_mul(s as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(166_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 50_654 nanoseconds. + Weight::from_ref_time(36_563_794 as u64) + // Standard Error: 4_362 + .saturating_add(Weight::from_ref_time(74_110 as u64).saturating_mul(r as u64)) + // Standard Error: 851 + .saturating_add(Weight::from_ref_time(893_418 as u64).saturating_mul(s as u64)) + // Standard Error: 851 + .saturating_add(Weight::from_ref_time(161_174 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -111,65 +116,71 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(30_696_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(163_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(377_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 38_053 nanoseconds. + Weight::from_ref_time(37_522_807 as u64) + // Standard Error: 5_887 + .saturating_add(Weight::from_ref_time(117_945 as u64).saturating_mul(r as u64)) + // Standard Error: 1_148 + .saturating_add(Weight::from_ref_time(313_445 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(28_144_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(144_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(363_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 33_692 nanoseconds. + Weight::from_ref_time(33_105_581 as u64) + // Standard Error: 3_917 + .saturating_add(Weight::from_ref_time(85_654 as u64).saturating_mul(r as u64)) + // Standard Error: 764 + .saturating_add(Weight::from_ref_time(332_127 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(7_135_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(135_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 8_839 nanoseconds. + Weight::from_ref_time(10_041_842 as u64) + // Standard Error: 2_450 + .saturating_add(Weight::from_ref_time(114_312 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(6_861_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(140_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_063 nanoseconds. + Weight::from_ref_time(10_186_840 as u64) + // Standard Error: 2_347 + .saturating_add(Weight::from_ref_time(121_263 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(7_143_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(133_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_287 nanoseconds. + Weight::from_ref_time(10_084_760 as u64) + // Standard Error: 1_943 + .saturating_add(Weight::from_ref_time(122_485 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(21_902_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(109_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(378_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 27_944 nanoseconds. + Weight::from_ref_time(27_020_698 as u64) + // Standard Error: 5_224 + .saturating_add(Weight::from_ref_time(120_916 as u64).saturating_mul(r as u64)) + // Standard Error: 966 + .saturating_add(Weight::from_ref_time(553_078 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -178,12 +189,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. - fn kill_identity(_r: u32, s: u32, _x: u32, ) -> Weight { - Weight::from_ref_time(48_712_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(903_000 as u64).saturating_mul(s as u64)) + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Minimum execution time: 62_082 nanoseconds. + Weight::from_ref_time(48_030_628 as u64) + // Standard Error: 4_810 + .saturating_add(Weight::from_ref_time(81_688 as u64).saturating_mul(r as u64)) + // Standard Error: 939 + .saturating_add(Weight::from_ref_time(904_592 as u64).saturating_mul(s as u64)) + // Standard Error: 939 + .saturating_add(Weight::from_ref_time(155_277 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -191,11 +207,12 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(33_860_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(97_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_527 nanoseconds. + Weight::from_ref_time(38_498_962 as u64) + // Standard Error: 1_698 + .saturating_add(Weight::from_ref_time(67_955 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -203,9 +220,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(12_063_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 14_044 nanoseconds. + Weight::from_ref_time(16_801_998 as u64) + // Standard Error: 863 + .saturating_add(Weight::from_ref_time(27_046 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -214,19 +232,21 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(34_418_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(84_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 35_695 nanoseconds. + Weight::from_ref_time(39_736_997 as u64) + // Standard Error: 1_366 + .saturating_add(Weight::from_ref_time(65_000 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(24_186_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(77_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 26_079 nanoseconds. + Weight::from_ref_time(29_300_941 as u64) + // Standard Error: 1_147 + .saturating_add(Weight::from_ref_time(67_486 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_im_online.rs b/runtime/rococo/src/weights/pallet_im_online.rs index 7c4a52f28835..5893eab66f3f 100644 --- a/runtime/rococo/src/weights/pallet_im_online.rs +++ b/runtime/rococo/src/weights/pallet_im_online.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. @@ -53,11 +53,12 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(76_995_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(23_000 as u64).saturating_mul(k as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(299_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 97_201 nanoseconds. + Weight::from_ref_time(77_884_363 as u64) + // Standard Error: 218 + .saturating_add(Weight::from_ref_time(23_192 as u64).saturating_mul(k as u64)) + // Standard Error: 2_200 + .saturating_add(Weight::from_ref_time(305_426 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_indices.rs b/runtime/rococo/src/weights/pallet_indices.rs index 18ccdaef5a97..941844189792 100644 --- a/runtime/rococo/src/weights/pallet_indices.rs +++ b/runtime/rococo/src/weights/pallet_indices.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_indices`. @@ -46,33 +46,38 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(24_885_000 as u64) + // Minimum execution time: 26_092 nanoseconds. + Weight::from_ref_time(26_602_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(31_127_000 as u64) + // Minimum execution time: 33_052 nanoseconds. + Weight::from_ref_time(33_482_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - Weight::from_ref_time(26_683_000 as u64) + // Minimum execution time: 27_445 nanoseconds. + Weight::from_ref_time(27_664_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - Weight::from_ref_time(26_689_000 as u64) + // Minimum execution time: 27_087 nanoseconds. + Weight::from_ref_time(27_630_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - Weight::from_ref_time(31_554_000 as u64) + // Minimum execution time: 32_690 nanoseconds. + Weight::from_ref_time(33_186_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_membership.rs b/runtime/rococo/src/weights/pallet_membership.rs index 9e2966caa9ba..5f11f882b063 100644 --- a/runtime/rococo/src/weights/pallet_membership.rs +++ b/runtime/rococo/src/weights/pallet_membership.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,94 +38,101 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalCommittee Members (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - Weight::from_ref_time(19_637_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(32_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 20_803 nanoseconds. + Weight::from_ref_time(27_137_568 as u64) + // Standard Error: 5_594 + .saturating_add(Weight::from_ref_time(769 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalMembership Prime (r:1 w:0) + // Storage: TechnicalCommittee Members (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - Weight::from_ref_time(21_565_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(31_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_937 nanoseconds. + Weight::from_ref_time(23_629_924 as u64) + // Standard Error: 546 + .saturating_add(Weight::from_ref_time(37_220 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalMembership Prime (r:1 w:0) + // Storage: TechnicalCommittee Members (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - Weight::from_ref_time(21_637_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 23_276 nanoseconds. + Weight::from_ref_time(23_973_749 as u64) + // Standard Error: 529 + .saturating_add(Weight::from_ref_time(43_532 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:0) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalMembership Prime (r:1 w:0) + // Storage: TechnicalCommittee Members (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - Weight::from_ref_time(21_551_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(149_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 21_924 nanoseconds. + Weight::from_ref_time(23_794_804 as u64) + // Standard Error: 847 + .saturating_add(Weight::from_ref_time(148_943 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Membership Members (r:1 w:1) - // Storage: Collective Proposals (r:1 w:0) - // Storage: Membership Prime (r:1 w:1) - // Storage: Collective Members (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:1) + // Storage: TechnicalCommittee Proposals (r:1 w:0) + // Storage: TechnicalMembership Prime (r:1 w:1) + // Storage: TechnicalCommittee Members (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - Weight::from_ref_time(22_510_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(41_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 22_826 nanoseconds. + Weight::from_ref_time(24_372_204 as u64) + // Standard Error: 604 + .saturating_add(Weight::from_ref_time(44_003 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Membership Members (r:1 w:0) - // Storage: Membership Prime (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Members (r:1 w:0) + // Storage: TechnicalMembership Prime (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - Weight::from_ref_time(8_828_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(9_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 8_708 nanoseconds. + Weight::from_ref_time(9_108_942 as u64) + // Standard Error: 195 + .saturating_add(Weight::from_ref_time(10_532 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Membership Prime (r:0 w:1) - // Storage: Collective Prime (r:0 w:1) + // Storage: TechnicalMembership Prime (r:0 w:1) + // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - Weight::from_ref_time(5_084_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(m as u64)) + // Minimum execution time: 5_226 nanoseconds. + Weight::from_ref_time(5_596_646 as u64) + // Standard Error: 122 + .saturating_add(Weight::from_ref_time(249 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/rococo/src/weights/pallet_multisig.rs b/runtime/rococo/src/weights/pallet_multisig.rs index 300e4704ef8d..a0a9ad560d39 100644 --- a/runtime/rococo/src/weights/pallet_multisig.rs +++ b/runtime/rococo/src/weights/pallet_multisig.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -28,11 +28,11 @@ // --steps=50 // --repeat=20 // --pallet=pallet_multisig -// --extrinsic= +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,22 +46,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 14_582 nanoseconds. - Weight::from_ref_time(15_014_888 as u64) - // Standard Error: 2 - .saturating_add(Weight::from_ref_time(490 as u64).saturating_mul(z as u64)) + // Minimum execution time: 15_384 nanoseconds. + Weight::from_ref_time(15_683_204 as u64) + // Standard Error: 3 + .saturating_add(Weight::from_ref_time(524 as u64).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 41_651 nanoseconds. - Weight::from_ref_time(34_224_425 as u64) - // Standard Error: 735 - .saturating_add(Weight::from_ref_time(80_357 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_489 as u64).saturating_mul(z as u64)) + // Minimum execution time: 42_834 nanoseconds. + Weight::from_ref_time(35_781_153 as u64) + // Standard Error: 893 + .saturating_add(Weight::from_ref_time(84_835 as u64).saturating_mul(s as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_524 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,12 +69,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 31_520 nanoseconds. - Weight::from_ref_time(24_283_932 as u64) - // Standard Error: 615 - .saturating_add(Weight::from_ref_time(80_034 as u64).saturating_mul(s as u64)) - // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_490 as u64).saturating_mul(z as u64)) + // Minimum execution time: 33_681 nanoseconds. + Weight::from_ref_time(25_962_089 as u64) + // Standard Error: 580 + .saturating_add(Weight::from_ref_time(82_734 as u64).saturating_mul(s as u64)) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(1_524 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,12 +83,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 44_639 nanoseconds. - Weight::from_ref_time(35_788_014 as u64) - // Standard Error: 655 - .saturating_add(Weight::from_ref_time(103_738 as u64).saturating_mul(s as u64)) - // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_480 as u64).saturating_mul(z as u64)) + // Minimum execution time: 46_485 nanoseconds. + Weight::from_ref_time(37_568_729 as u64) + // Standard Error: 581 + .saturating_add(Weight::from_ref_time(95_323 as u64).saturating_mul(s as u64)) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(1_560 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -96,30 +96,30 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 30_092 nanoseconds. - Weight::from_ref_time(32_588_553 as u64) - // Standard Error: 1_203 - .saturating_add(Weight::from_ref_time(88_907 as u64).saturating_mul(s as u64)) + // Minimum execution time: 31_398 nanoseconds. + Weight::from_ref_time(34_097_049 as u64) + // Standard Error: 1_108 + .saturating_add(Weight::from_ref_time(92_698 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 21_743 nanoseconds. - Weight::from_ref_time(23_807_430 as u64) - // Standard Error: 828 - .saturating_add(Weight::from_ref_time(75_548 as u64).saturating_mul(s as u64)) + // Minimum execution time: 22_448 nanoseconds. + Weight::from_ref_time(24_513_833 as u64) + // Standard Error: 869 + .saturating_add(Weight::from_ref_time(83_825 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 29_786 nanoseconds. - Weight::from_ref_time(32_090_251 as u64) - // Standard Error: 904 - .saturating_add(Weight::from_ref_time(84_395 as u64).saturating_mul(s as u64)) + // Minimum execution time: 32_022 nanoseconds. + Weight::from_ref_time(33_953_466 as u64) + // Standard Error: 951 + .saturating_add(Weight::from_ref_time(83_819 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_nis.rs b/runtime/rococo/src/weights/pallet_nis.rs new file mode 100644 index 000000000000..f7126cc77d95 --- /dev/null +++ b/runtime/rococo/src/weights/pallet_nis.rs @@ -0,0 +1,122 @@ +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . +//! Autogenerated weights for `pallet_nis` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=pallet_nis +// --chain=rococo-dev +// --header=./file_header.txt +// --output=./runtime/rococo/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_nis`. +pub struct WeightInfo(PhantomData); +impl pallet_nis::WeightInfo for WeightInfo { + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + /// The range of component `l` is `[0, 999]`. + fn place_bid(l: u32, ) -> Weight { + // Minimum execution time: 32_457 nanoseconds. + Weight::from_ref_time(33_597_943) + // Standard Error: 673 + .saturating_add(Weight::from_ref_time(70_280).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + fn place_bid_max() -> Weight { + // Minimum execution time: 100_314 nanoseconds. + Weight::from_ref_time(102_734_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + // Storage: Nis QueueTotals (r:1 w:1) + /// The range of component `l` is `[1, 1000]`. + fn retract_bid(l: u32, ) -> Weight { + // Minimum execution time: 37_304 nanoseconds. + Weight::from_ref_time(34_619_946) + // Standard Error: 610 + .saturating_add(Weight::from_ref_time(56_607).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Summary (r:1 w:0) + // Storage: System Account (r:1 w:1) + fn fund_deficit() -> Weight { + // Minimum execution time: 40_499 nanoseconds. + Weight::from_ref_time(41_972_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Nis Receipts (r:1 w:1) + // Storage: Nis Summary (r:1 w:1) + // Storage: NisCounterpartBalances Account (r:1 w:1) + // Storage: NisCounterpartBalances TotalIssuance (r:1 w:1) + // Storage: System Account (r:1 w:1) + fn thaw() -> Weight { + // Minimum execution time: 59_864 nanoseconds. + Weight::from_ref_time(60_602_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: Nis Summary (r:1 w:1) + // Storage: System Account (r:1 w:0) + // Storage: Nis QueueTotals (r:1 w:1) + fn process_queues() -> Weight { + // Minimum execution time: 32_098 nanoseconds. + Weight::from_ref_time(33_421_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: Nis Queues (r:1 w:1) + fn process_queue() -> Weight { + // Minimum execution time: 4_011 nanoseconds. + Weight::from_ref_time(4_159_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: System Account (r:1 w:0) + // Storage: Nis Receipts (r:0 w:1) + fn process_bid() -> Weight { + // Minimum execution time: 12_778 nanoseconds. + Weight::from_ref_time(13_083_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/rococo/src/weights/pallet_preimage.rs b/runtime/rococo/src/weights/pallet_preimage.rs index 1755de2b34e6..4d081f470a8e 100644 --- a/runtime/rococo/src/weights/pallet_preimage.rs +++ b/runtime/rococo/src/weights/pallet_preimage.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,9 +48,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(29_017_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_113 as u64).saturating_mul(s as u64)) + // Minimum execution time: 30_460 nanoseconds. + Weight::from_ref_time(30_792_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_316 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -58,9 +59,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(19_793_000 as u64) + // Minimum execution time: 21_455 nanoseconds. + Weight::from_ref_time(21_546_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_319 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,66 +70,76 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(18_854_000 as u64) + // Minimum execution time: 19_753 nanoseconds. + Weight::from_ref_time(20_023_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_316 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(38_886_000 as u64) + // Minimum execution time: 40_762 nanoseconds. + Weight::from_ref_time(41_809_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(27_017_000 as u64) + // Minimum execution time: 28_346 nanoseconds. + Weight::from_ref_time(29_180_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(25_041_000 as u64) + // Minimum execution time: 26_524 nanoseconds. + Weight::from_ref_time(28_080_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(13_933_000 as u64) + // Minimum execution time: 13_976 nanoseconds. + Weight::from_ref_time(14_955_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(17_760_000 as u64) + // Minimum execution time: 18_310 nanoseconds. + Weight::from_ref_time(19_036_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(8_816_000 as u64) + // Minimum execution time: 9_617 nanoseconds. + Weight::from_ref_time(9_815_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(25_068_000 as u64) + // Minimum execution time: 26_975 nanoseconds. + Weight::from_ref_time(28_077_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(8_917_000 as u64) + // Minimum execution time: 9_407 nanoseconds. + Weight::from_ref_time(9_773_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(8_915_000 as u64) + // Minimum execution time: 9_423 nanoseconds. + Weight::from_ref_time(9_784_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_proxy.rs b/runtime/rococo/src/weights/pallet_proxy.rs index b671d154e768..123c7b5ca3c3 100644 --- a/runtime/rococo/src/weights/pallet_proxy.rs +++ b/runtime/rococo/src/weights/pallet_proxy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -47,9 +47,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_ref_time(20_533_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(59_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 20_385 nanoseconds. + Weight::from_ref_time(22_155_487 as u64) + // Standard Error: 3_113 + .saturating_add(Weight::from_ref_time(30_563 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -58,11 +59,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(37_599_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(110_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 39_432 nanoseconds. + Weight::from_ref_time(39_415_733 as u64) + // Standard Error: 1_929 + .saturating_add(Weight::from_ref_time(107_318 as u64).saturating_mul(a as u64)) + // Standard Error: 1_993 + .saturating_add(Weight::from_ref_time(25_511 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -71,11 +73,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_459_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(117_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(9_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_050 nanoseconds. + Weight::from_ref_time(28_070_798 as u64) + // Standard Error: 1_705 + .saturating_add(Weight::from_ref_time(113_162 as u64).saturating_mul(a as u64)) + // Standard Error: 1_762 + .saturating_add(Weight::from_ref_time(12_446 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -83,12 +86,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_557_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(14_000 as u64).saturating_mul(p as u64)) + fn reject_announcement(a: u32, _p: u32, ) -> Weight { + // Minimum execution time: 27_248 nanoseconds. + Weight::from_ref_time(28_158_710 as u64) + // Standard Error: 1_623 + .saturating_add(Weight::from_ref_time(115_623 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,38 +100,42 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(34_189_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(107_000 as u64).saturating_mul(a as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(33_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 35_207 nanoseconds. + Weight::from_ref_time(36_385_483 as u64) + // Standard Error: 1_995 + .saturating_add(Weight::from_ref_time(111_408 as u64).saturating_mul(a as u64)) + // Standard Error: 2_062 + .saturating_add(Weight::from_ref_time(25_567 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_228_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(65_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_888 nanoseconds. + Weight::from_ref_time(30_278_512 as u64) + // Standard Error: 1_804 + .saturating_add(Weight::from_ref_time(67_673 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_161_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(83_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 28_480 nanoseconds. + Weight::from_ref_time(30_044_474 as u64) + // Standard Error: 2_395 + .saturating_add(Weight::from_ref_time(85_827 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_ref_time(24_391_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(61_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 25_720 nanoseconds. + Weight::from_ref_time(26_609_505 as u64) + // Standard Error: 1_628 + .saturating_add(Weight::from_ref_time(35_399 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -137,18 +143,20 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { - Weight::from_ref_time(30_191_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 31_956 nanoseconds. + Weight::from_ref_time(33_261_390 as u64) + // Standard Error: 2_137 + .saturating_add(Weight::from_ref_time(27_969 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_ref_time(25_957_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(51_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_985 nanoseconds. + Weight::from_ref_time(27_622_324 as u64) + // Standard Error: 1_578 + .saturating_add(Weight::from_ref_time(46_357 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_scheduler.rs b/runtime/rococo/src/weights/pallet_scheduler.rs index ae9dc6426622..996bc8bf3e24 100644 --- a/runtime/rococo/src/weights/pallet_scheduler.rs +++ b/runtime/rococo/src/weights/pallet_scheduler.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,55 +46,61 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_700_000 as u64) + // Minimum execution time: 5_124 nanoseconds. + Weight::from_ref_time(5_271_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(3_868_000 as u64) - // Standard Error: 2_747 - .saturating_add(Weight::from_ref_time(629_992 as u64).saturating_mul(s as u64)) + // Minimum execution time: 4_528 nanoseconds. + Weight::from_ref_time(7_937_018 as u64) + // Standard Error: 2_323 + .saturating_add(Weight::from_ref_time(545_673 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - Weight::from_ref_time(12_316_000 as u64) + // Minimum execution time: 9_413 nanoseconds. + Weight::from_ref_time(9_664_000 as u64) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(24_103_000 as u64) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_154 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_974 nanoseconds. + Weight::from_ref_time(22_234_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(1_247 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Scheduler Lookup (r:0 w:1) fn service_task_named() -> Weight { - Weight::from_ref_time(13_408_000 as u64) + // Minimum execution time: 10_371 nanoseconds. + Weight::from_ref_time(10_726_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - Weight::from_ref_time(19_302_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 9_409 nanoseconds. + Weight::from_ref_time(9_630_000 as u64) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(3_885_000 as u64) + // Minimum execution time: 4_306 nanoseconds. + Weight::from_ref_time(4_607_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_037_000 as u64) + // Minimum execution time: 4_322 nanoseconds. + Weight::from_ref_time(4_513_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(16_768_000 as u64) - // Standard Error: 3_650 - .saturating_add(Weight::from_ref_time(667_428 as u64).saturating_mul(s as u64)) + // Minimum execution time: 17_395 nanoseconds. + Weight::from_ref_time(21_512_944 as u64) + // Standard Error: 2_371 + .saturating_add(Weight::from_ref_time(573_170 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -102,9 +108,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(19_239_000 as u64) - // Standard Error: 1_456 - .saturating_add(Weight::from_ref_time(578_125 as u64).saturating_mul(s as u64)) + // Minimum execution time: 19_648 nanoseconds. + Weight::from_ref_time(21_662_022 as u64) + // Standard Error: 2_132 + .saturating_add(Weight::from_ref_time(564_135 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -112,9 +119,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(19_065_000 as u64) - // Standard Error: 4_027 - .saturating_add(Weight::from_ref_time(719_766 as u64).saturating_mul(s as u64)) + // Minimum execution time: 19_791 nanoseconds. + Weight::from_ref_time(25_057_099 as u64) + // Standard Error: 3_443 + .saturating_add(Weight::from_ref_time(593_725 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,9 +130,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(20_039_000 as u64) - // Standard Error: 2_179 - .saturating_add(Weight::from_ref_time(627_335 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_923 nanoseconds. + Weight::from_ref_time(23_562_860 as u64) + // Standard Error: 2_306 + .saturating_add(Weight::from_ref_time(582_170 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_timestamp.rs b/runtime/rococo/src/weights/pallet_timestamp.rs index 943b7d69c83e..8a77164c8646 100644 --- a/runtime/rococo/src/weights/pallet_timestamp.rs +++ b/runtime/rococo/src/weights/pallet_timestamp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -47,11 +47,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - Weight::from_ref_time(9_814_000 as u64) + // Minimum execution time: 9_895 nanoseconds. + Weight::from_ref_time(10_121_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(3_846_000 as u64) + // Minimum execution time: 4_368 nanoseconds. + Weight::from_ref_time(4_472_000 as u64) } } diff --git a/runtime/rococo/src/weights/pallet_tips.rs b/runtime/rococo/src/weights/pallet_tips.rs index 9d737bfa5a1b..dfde0f04d210 100644 --- a/runtime/rococo/src/weights/pallet_tips.rs +++ b/runtime/rococo/src/weights/pallet_tips.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_tips.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,16 +48,18 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `r` is `[0, 16384]`. fn report_awesome(r: u32, ) -> Weight { - Weight::from_ref_time(28_045_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 29_347 nanoseconds. + Weight::from_ref_time(31_426_849 as u64) + // Standard Error: 11 + .saturating_add(Weight::from_ref_time(1_804 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Tips Tips (r:1 w:1) // Storage: Tips Reasons (r:0 w:1) fn retract_tip() -> Weight { - Weight::from_ref_time(26_017_000 as u64) + // Minimum execution time: 29_249 nanoseconds. + Weight::from_ref_time(30_138_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -67,11 +69,12 @@ impl pallet_tips::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 16384]`. /// The range of component `t` is `[1, 19]`. fn tip_new(r: u32, t: u32, ) -> Weight { - Weight::from_ref_time(19_125_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(r as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(41_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 23_208 nanoseconds. + Weight::from_ref_time(21_294_796 as u64) + // Standard Error: 7 + .saturating_add(Weight::from_ref_time(1_694 as u64).saturating_mul(r as u64)) + // Standard Error: 6_779 + .saturating_add(Weight::from_ref_time(186_533 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,9 +82,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Tips (r:1 w:1) /// The range of component `t` is `[1, 19]`. fn tip(t: u32, ) -> Weight { - Weight::from_ref_time(10_895_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(158_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 15_412 nanoseconds. + Weight::from_ref_time(15_839_203 as u64) + // Standard Error: 1_743 + .saturating_add(Weight::from_ref_time(146_279 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -91,9 +95,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 19]`. fn close_tip(t: u32, ) -> Weight { - Weight::from_ref_time(42_301_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(154_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 45_039 nanoseconds. + Weight::from_ref_time(46_836_640 as u64) + // Standard Error: 5_083 + .saturating_add(Weight::from_ref_time(157_368 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +106,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Storage: Tips Reasons (r:0 w:1) /// The range of component `t` is `[1, 19]`. fn slash_tip(t: u32, ) -> Weight { - Weight::from_ref_time(16_548_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(21_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 19_057 nanoseconds. + Weight::from_ref_time(19_894_265 as u64) + // Standard Error: 1_867 + .saturating_add(Weight::from_ref_time(36_854 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/rococo/src/weights/pallet_treasury.rs b/runtime/rococo/src/weights/pallet_treasury.rs index 09a0d3c819cb..ce22b3168c8a 100644 --- a/runtime/rococo/src/weights/pallet_treasury.rs +++ b/runtime/rococo/src/weights/pallet_treasury.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_treasury.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,19 +45,22 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - Weight::from_ref_time(153_000 as u64) + // Minimum execution time: 165 nanoseconds. + Weight::from_ref_time(203_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - Weight::from_ref_time(25_149_000 as u64) + // Minimum execution time: 27_032 nanoseconds. + Weight::from_ref_time(27_706_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - Weight::from_ref_time(35_748_000 as u64) + // Minimum execution time: 38_448 nanoseconds. + Weight::from_ref_time(39_295_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,15 +68,17 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(10_082_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(36_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_432 nanoseconds. + Weight::from_ref_time(14_012_693 as u64) + // Standard Error: 1_132 + .saturating_add(Weight::from_ref_time(39_879 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - Weight::from_ref_time(5_612_000 as u64) + // Minimum execution time: 8_743 nanoseconds. + Weight::from_ref_time(9_030_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,9 +88,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Storage: Treasury Proposals (r:2 w:2) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(36_270_000 as u64) - // Standard Error: 32_000 - .saturating_add(Weight::from_ref_time(30_142_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 49_888 nanoseconds. + Weight::from_ref_time(52_406_081 as u64) + // Standard Error: 17_219 + .saturating_add(Weight::from_ref_time(24_168_774 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/rococo/src/weights/pallet_utility.rs b/runtime/rococo/src/weights/pallet_utility.rs index 63396be46e9c..a6e201a51c5d 100644 --- a/runtime/rococo/src/weights/pallet_utility.rs +++ b/runtime/rococo/src/weights/pallet_utility.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -46,26 +46,31 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(12_812_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(3_415_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_953 nanoseconds. + Weight::from_ref_time(18_308_318 as u64) + // Standard Error: 2_253 + .saturating_add(Weight::from_ref_time(3_495_583 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - Weight::from_ref_time(6_175_000 as u64) + // Minimum execution time: 6_311 nanoseconds. + Weight::from_ref_time(6_502_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(18_462_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_555_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_914 nanoseconds. + Weight::from_ref_time(17_184_352 as u64) + // Standard Error: 2_365 + .saturating_add(Weight::from_ref_time(3_634_964 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(13_444_000 as u64) + // Minimum execution time: 14_094 nanoseconds. + Weight::from_ref_time(14_446_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(18_937_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(3_433_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 11_647 nanoseconds. + Weight::from_ref_time(21_034_042 as u64) + // Standard Error: 2_136 + .saturating_add(Weight::from_ref_time(3_488_991 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/rococo/src/weights/pallet_vesting.rs b/runtime/rococo/src/weights/pallet_vesting.rs index 32f07f0bc98b..7966658038ad 100644 --- a/runtime/rococo/src/weights/pallet_vesting.rs +++ b/runtime/rococo/src/weights/pallet_vesting.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/pallet_vesting.rs +// --output=./runtime/rococo/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,11 +49,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_030_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(75_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(162_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 38_341 nanoseconds. + Weight::from_ref_time(37_801_522 as u64) + // Standard Error: 1_586 + .saturating_add(Weight::from_ref_time(32_423 as u64).saturating_mul(l as u64)) + // Standard Error: 2_823 + .saturating_add(Weight::from_ref_time(69_168 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,11 +63,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_535_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(l as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(113_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_958 nanoseconds. + Weight::from_ref_time(37_872_302 as u64) + // Standard Error: 1_146 + .saturating_add(Weight::from_ref_time(33_653 as u64).saturating_mul(l as u64)) + // Standard Error: 2_040 + .saturating_add(Weight::from_ref_time(47_119 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -76,11 +78,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_237_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(75_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(160_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_559 nanoseconds. + Weight::from_ref_time(36_681_424 as u64) + // Standard Error: 1_195 + .saturating_add(Weight::from_ref_time(44_728 as u64).saturating_mul(l as u64)) + // Standard Error: 2_127 + .saturating_add(Weight::from_ref_time(80_573 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -90,11 +93,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_750_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(84_000 as u64).saturating_mul(l as u64)) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(109_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_544 nanoseconds. + Weight::from_ref_time(37_721_468 as u64) + // Standard Error: 1_095 + .saturating_add(Weight::from_ref_time(32_382 as u64).saturating_mul(l as u64)) + // Standard Error: 1_949 + .saturating_add(Weight::from_ref_time(33_071 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -104,11 +108,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(44_092_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(71_000 as u64).saturating_mul(l as u64)) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(134_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 51_775 nanoseconds. + Weight::from_ref_time(51_992_075 as u64) + // Standard Error: 1_826 + .saturating_add(Weight::from_ref_time(37_262 as u64).saturating_mul(l as u64)) + // Standard Error: 3_249 + .saturating_add(Weight::from_ref_time(37_648 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -118,11 +123,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(44_003_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(72_000 as u64).saturating_mul(l as u64)) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(119_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 50_985 nanoseconds. + Weight::from_ref_time(51_452_925 as u64) + // Standard Error: 1_987 + .saturating_add(Weight::from_ref_time(43_075 as u64).saturating_mul(l as u64)) + // Standard Error: 3_535 + .saturating_add(Weight::from_ref_time(27_901 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -132,11 +138,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_853_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(77_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(153_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_288 nanoseconds. + Weight::from_ref_time(38_933_285 as u64) + // Standard Error: 1_173 + .saturating_add(Weight::from_ref_time(43_260 as u64).saturating_mul(l as u64)) + // Standard Error: 2_167 + .saturating_add(Weight::from_ref_time(54_585 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -146,11 +153,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(29_466_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(81_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(158_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_035 nanoseconds. + Weight::from_ref_time(38_181_254 as u64) + // Standard Error: 1_170 + .saturating_add(Weight::from_ref_time(48_328 as u64).saturating_mul(l as u64)) + // Standard Error: 2_161 + .saturating_add(Weight::from_ref_time(76_489 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_common_auctions.rs b/runtime/rococo/src/weights/runtime_common_auctions.rs index 61dae37398e1..712dd1485ca1 100644 --- a/runtime/rococo/src/weights/runtime_common_auctions.rs +++ b/runtime/rococo/src/weights/runtime_common_auctions.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::auctions`. @@ -47,7 +47,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - Weight::from_ref_time(16_735_000 as u64) + // Minimum execution time: 17_416 nanoseconds. + Weight::from_ref_time(18_096_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,7 +60,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - Weight::from_ref_time(71_032_000 as u64) + // Minimum execution time: 72_229 nanoseconds. + Weight::from_ref_time(73_919_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -67,26 +69,28 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Babe NextRandomness (r:1 w:0) // Storage: Babe EpochStart (r:1 w:0) // Storage: Auctions AuctionCounter (r:1 w:0) - // Storage: Auctions Winning (r:600 w:600) + // Storage: Auctions Winning (r:3600 w:3600) // Storage: Auctions ReservedAmounts (r:37 w:36) // Storage: System Account (r:36 w:36) - // Storage: Slots Leases (r:7 w:7) + // Storage: Slots Leases (r:2 w:2) // Storage: Paras ParaLifecycles (r:1 w:1) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - Weight::from_ref_time(2_877_003_000 as u64) - .saturating_add(T::DbWeight::get().reads(688 as u64)) - .saturating_add(T::DbWeight::get().writes(683 as u64)) + // Minimum execution time: 15_470_596 nanoseconds. + Weight::from_ref_time(15_820_292_000 as u64) + .saturating_add(T::DbWeight::get().reads(3683 as u64)) + .saturating_add(T::DbWeight::get().writes(3678 as u64)) } // Storage: Auctions ReservedAmounts (r:37 w:36) // Storage: System Account (r:36 w:36) - // Storage: Auctions Winning (r:0 w:600) + // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - Weight::from_ref_time(1_167_630_000 as u64) + // Minimum execution time: 4_725_156 nanoseconds. + Weight::from_ref_time(4_776_126_000 as u64) .saturating_add(T::DbWeight::get().reads(73 as u64)) - .saturating_add(T::DbWeight::get().writes(673 as u64)) + .saturating_add(T::DbWeight::get().writes(3673 as u64)) } } diff --git a/runtime/rococo/src/weights/runtime_common_claims.rs b/runtime/rococo/src/weights/runtime_common_claims.rs index 510592b2ed09..57d26efdd819 100644 --- a/runtime/rococo/src/weights/runtime_common_claims.rs +++ b/runtime/rococo/src/weights/runtime_common_claims.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -52,7 +52,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(139_399_000 as u64) + // Minimum execution time: 141_490 nanoseconds. + Weight::from_ref_time(143_346_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - Weight::from_ref_time(9_284_000 as u64) + // Minimum execution time: 11_578 nanoseconds. + Weight::from_ref_time(12_009_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -73,7 +75,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - Weight::from_ref_time(143_329_000 as u64) + // Minimum execution time: 145_783 nanoseconds. + Weight::from_ref_time(147_533_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -86,7 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - Weight::from_ref_time(63_456_000 as u64) + // Minimum execution time: 66_536 nanoseconds. + Weight::from_ref_time(68_172_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -95,7 +99,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - Weight::from_ref_time(19_434_000 as u64) + // Minimum execution time: 21_997 nanoseconds. + Weight::from_ref_time(22_443_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_common_crowdloan.rs b/runtime/rococo/src/weights/runtime_common_crowdloan.rs index 307647658c9b..6483b3f0ff09 100644 --- a/runtime/rococo/src/weights/runtime_common_crowdloan.rs +++ b/runtime/rococo/src/weights/runtime_common_crowdloan.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::crowdloan`. @@ -49,7 +49,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(48_864_000 as u64) + // Minimum execution time: 47_458 nanoseconds. + Weight::from_ref_time(48_284_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - Weight::from_ref_time(117_031_000 as u64) + // Minimum execution time: 115_881 nanoseconds. + Weight::from_ref_time(117_274_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -69,16 +71,18 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(54_273_000 as u64) + // Minimum execution time: 54_993 nanoseconds. + Weight::from_ref_time(56_432_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `k` is `[0, 500]`. + /// The range of component `k` is `[0, 1000]`. fn refund(k: u32, ) -> Weight { - Weight::from_ref_time(6_907_000 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(17_220_000 as u64).saturating_mul(k as u64)) + // Minimum execution time: 48_376 nanoseconds. + Weight::from_ref_time(62_706_000 as u64) + // Standard Error: 13_183 + .saturating_add(Weight::from_ref_time(17_803_069 as u64).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -87,27 +91,31 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - Weight::from_ref_time(35_254_000 as u64) + // Minimum execution time: 36_619 nanoseconds. + Weight::from_ref_time(37_672_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - Weight::from_ref_time(24_432_000 as u64) + // Minimum execution time: 24_847 nanoseconds. + Weight::from_ref_time(25_990_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - Weight::from_ref_time(30_987_000 as u64) + // Minimum execution time: 33_113 nanoseconds. + Weight::from_ref_time(33_692_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - Weight::from_ref_time(25_181_000 as u64) + // Minimum execution time: 25_008 nanoseconds. + Weight::from_ref_time(25_759_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,9 +131,10 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { - Weight::from_ref_time(18_891_000 as u64) - // Standard Error: 36_000 - .saturating_add(Weight::from_ref_time(39_465_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 101_679 nanoseconds. + Weight::from_ref_time(9_820_927 as u64) + // Standard Error: 31_621 + .saturating_add(Weight::from_ref_time(40_221_451 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/rococo/src/weights/runtime_common_paras_registrar.rs b/runtime/rococo/src/weights/runtime_common_paras_registrar.rs index 5afe490ae1ff..24f3d86ec899 100644 --- a/runtime/rococo/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/rococo/src/weights/runtime_common_paras_registrar.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::paras_registrar`. @@ -48,7 +48,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - Weight::from_ref_time(31_235_000 as u64) + // Minimum execution time: 31_954 nanoseconds. + Weight::from_ref_time(32_827_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,7 +64,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - Weight::from_ref_time(8_138_589_000 as u64) + // Minimum execution time: 7_424_164 nanoseconds. + Weight::from_ref_time(7_467_965_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -78,7 +80,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - Weight::from_ref_time(8_105_111_000 as u64) + // Minimum execution time: 7_388_087 nanoseconds. + Weight::from_ref_time(7_440_577_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -89,7 +92,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - Weight::from_ref_time(50_153_000 as u64) + // Minimum execution time: 49_786 nanoseconds. + Weight::from_ref_time(51_246_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -101,11 +105,14 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - Weight::from_ref_time(44_912_000 as u64) + // Minimum execution time: 44_651 nanoseconds. + Weight::from_ref_time(46_029_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) + // Storage: Paras UpgradeRestrictionSignal (r:1 w:1) + // Storage: Configuration ActiveConfig (r:1 w:0) // Storage: Paras CurrentCodeHash (r:1 w:0) // Storage: Paras UpgradeCooldowns (r:1 w:1) // Storage: Paras PvfActiveVoteMap (r:1 w:0) @@ -114,19 +121,22 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: System Digest (r:1 w:1) // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) - // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 41_572 nanoseconds. + Weight::from_ref_time(41_959_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_308 as u64).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `b` is `[1, 1048576]`. fn set_current_head(b: u32, ) -> Weight { - Weight::from_ref_time(5_494_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 13_501 nanoseconds. + Weight::from_ref_time(13_655_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(903 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/rococo/src/weights/runtime_common_slots.rs b/runtime/rococo/src/weights/runtime_common_slots.rs index 53c4a94600ea..ca7c9242366e 100644 --- a/runtime/rococo/src/weights/runtime_common_slots.rs +++ b/runtime/rococo/src/weights/runtime_common_slots.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::slots`. @@ -47,7 +47,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(30_562_000 as u64) + // Minimum execution time: 30_856 nanoseconds. + Weight::from_ref_time(31_310_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,11 +61,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(6_071_000 as u64).saturating_mul(c as u64)) - // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(15_667_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 568_013 nanoseconds. + Weight::from_ref_time(571_084_000 as u64) + // Standard Error: 70_451 + .saturating_add(Weight::from_ref_time(2_049_624 as u64).saturating_mul(c as u64)) + // Standard Error: 70_451 + .saturating_add(Weight::from_ref_time(12_021_692 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(t as u64))) @@ -75,7 +77,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(92_497_000 as u64) + // Minimum execution time: 93_285 nanoseconds. + Weight::from_ref_time(94_547_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(29_439_000 as u64) + // Minimum execution time: 29_974 nanoseconds. + Weight::from_ref_time(30_875_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_configuration.rs b/runtime/rococo/src/weights/runtime_parachains_configuration.rs index 2ff2c3130b04..a530cab551b1 100644 --- a/runtime/rococo/src/weights/runtime_parachains_configuration.rs +++ b/runtime/rococo/src/weights/runtime_parachains_configuration.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::configuration`. @@ -49,7 +49,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - Weight::from_ref_time(12_392_000 as u64) + // Minimum execution time: 12_888 nanoseconds. + Weight::from_ref_time(13_364_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -58,7 +59,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(11_753_000 as u64) + // Minimum execution time: 12_480 nanoseconds. + Weight::from_ref_time(12_877_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -67,7 +69,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - Weight::from_ref_time(11_682_000 as u64) + // Minimum execution time: 12_415 nanoseconds. + Weight::from_ref_time(12_679_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -76,12 +79,14 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(12_019_000 as u64) + // Minimum execution time: 12_662 nanoseconds. + Weight::from_ref_time(12_963_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn set_hrmp_open_request_ttl() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: Configuration PendingConfigs (r:1 w:1) @@ -89,7 +94,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - Weight::from_ref_time(12_097_000 as u64) + // Minimum execution time: 12_757 nanoseconds. + Weight::from_ref_time(13_102_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_disputes.rs b/runtime/rococo/src/weights/runtime_parachains_disputes.rs index 9e1d5b373cf4..8116febf8208 100644 --- a/runtime/rococo/src/weights/runtime_parachains_disputes.rs +++ b/runtime/rococo/src/weights/runtime_parachains_disputes.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::disputes`. @@ -46,7 +46,8 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - Weight::from_ref_time(4_507_000 as u64) + // Minimum execution time: 4_616 nanoseconds. + Weight::from_ref_time(4_769_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/rococo/src/weights/runtime_parachains_hrmp.rs b/runtime/rococo/src/weights/runtime_parachains_hrmp.rs index 04db94e8f76a..9d376464f3bb 100644 --- a/runtime/rococo/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/rococo/src/weights/runtime_parachains_hrmp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::hrmp`. @@ -54,7 +54,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - Weight::from_ref_time(40_520_000 as u64) + // Minimum execution time: 40_837 nanoseconds. + Weight::from_ref_time(41_080_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -66,7 +67,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - Weight::from_ref_time(39_646_000 as u64) + // Minimum execution time: 41_440 nanoseconds. + Weight::from_ref_time(41_921_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -77,7 +79,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - Weight::from_ref_time(36_691_000 as u64) + // Minimum execution time: 37_947 nanoseconds. + Weight::from_ref_time(38_595_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,11 +93,12 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `i` is `[0, 127]`. /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(7_248_000 as u64).saturating_mul(i as u64)) - // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(7_311_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 863_345 nanoseconds. + Weight::from_ref_time(867_570_000 as u64) + // Standard Error: 78_508 + .saturating_add(Weight::from_ref_time(2_631_961 as u64).saturating_mul(i as u64)) + // Standard Error: 78_508 + .saturating_add(Weight::from_ref_time(2_704_438 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(e as u64))) @@ -113,9 +117,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannels (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 19_000 - .saturating_add(Weight::from_ref_time(15_783_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 10_285 nanoseconds. + Weight::from_ref_time(1_111_560 as u64) + // Standard Error: 13_840 + .saturating_add(Weight::from_ref_time(15_680_777 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((7 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -129,9 +134,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannelContents (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(9_624_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 6_692 nanoseconds. + Weight::from_ref_time(856_761 as u64) + // Standard Error: 10_461 + .saturating_add(Weight::from_ref_time(9_555_420 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -142,9 +148,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - Weight::from_ref_time(30_548_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(89_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 25_435 nanoseconds. + Weight::from_ref_time(31_235_891 as u64) + // Standard Error: 1_321 + .saturating_add(Weight::from_ref_time(90_605 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -152,15 +159,17 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { - Weight::from_ref_time(1_732_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_574_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 4_826 nanoseconds. + Weight::from_ref_time(3_062_277 as u64) + // Standard Error: 3_603 + .saturating_add(Weight::from_ref_time(2_569_729 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } // Storage: Paras ParaLifecycles (r:2 w:0) + // Storage: Configuration ActiveConfig (r:1 w:0) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) // Storage: Hrmp HrmpChannels (r:1 w:0) // Storage: Hrmp HrmpEgressChannelsIndex (r:1 w:0) @@ -171,8 +180,9 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1) fn force_open_hrmp_channel() -> Weight { - Weight::from_ref_time(104_771_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) + // Minimum execution time: 51_572 nanoseconds. + Weight::from_ref_time(52_378_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } } diff --git a/runtime/rococo/src/weights/runtime_parachains_initializer.rs b/runtime/rococo/src/weights/runtime_parachains_initializer.rs index 017ebf0c49b8..183a6a88b70c 100644 --- a/runtime/rococo/src/weights/runtime_parachains_initializer.rs +++ b/runtime/rococo/src/weights/runtime_parachains_initializer.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::initializer`. @@ -47,9 +47,10 @@ impl runtime_parachains::initializer::WeightInfo for We // Storage: System Digest (r:1 w:1) /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - Weight::from_ref_time(10_731_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 8_142 nanoseconds. + Weight::from_ref_time(10_136_698 as u64) + // Standard Error: 7 + .saturating_add(Weight::from_ref_time(1_311 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_paras.rs b/runtime/rococo/src/weights/runtime_parachains_paras.rs index ebc8ea4c6909..d11279842694 100644 --- a/runtime/rococo/src/weights/runtime_parachains_paras.rs +++ b/runtime/rococo/src/weights/runtime_parachains_paras.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras`. @@ -52,18 +52,20 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 35_041 nanoseconds. + Weight::from_ref_time(35_497_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_295 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Paras Heads (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 13_370 nanoseconds. + Weight::from_ref_time(13_609_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(903 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Configuration ActiveConfig (r:1 w:0) @@ -79,9 +81,10 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 59_941 nanoseconds. + Weight::from_ref_time(60_494_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_326 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -90,16 +93,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 18_772 nanoseconds. + Weight::from_ref_time(18_957_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(904 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - Weight::from_ref_time(24_187_000 as u64) + // Minimum execution time: 24_940 nanoseconds. + Weight::from_ref_time(25_445_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -107,16 +112,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:1 w:1) /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 8_856 nanoseconds. + Weight::from_ref_time(8_978_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_303 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - Weight::from_ref_time(7_273_000 as u64) + // Minimum execution time: 7_165 nanoseconds. + Weight::from_ref_time(7_398_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -125,7 +132,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - Weight::from_ref_time(96_047_000 as u64) + // Minimum execution time: 93_512 nanoseconds. + Weight::from_ref_time(97_654_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -138,7 +146,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - Weight::from_ref_time(630_640_000 as u64) + // Minimum execution time: 635_584 nanoseconds. + Weight::from_ref_time(644_490_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -152,7 +161,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - Weight::from_ref_time(599_325_000 as u64) + // Minimum execution time: 599_005 nanoseconds. + Weight::from_ref_time(603_141_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -163,7 +173,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - Weight::from_ref_time(505_499_000 as u64) + // Minimum execution time: 501_883 nanoseconds. + Weight::from_ref_time(505_926_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -178,7 +189,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - Weight::from_ref_time(668_669_000 as u64) + // Minimum execution time: 661_757 nanoseconds. + Weight::from_ref_time(669_986_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(304 as u64)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_ump.rs b/runtime/rococo/src/weights/runtime_parachains_ump.rs index ff9b55ec24b2..a82fd5dbee60 100644 --- a/runtime/rococo/src/weights/runtime_parachains_ump.rs +++ b/runtime/rococo/src/weights/runtime_parachains_ump.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. @@ -46,22 +46,25 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - Weight::from_ref_time(4_190_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_433 nanoseconds. + Weight::from_ref_time(6_809_084 as u64) + // Standard Error: 12 + .saturating_add(Weight::from_ref_time(1_973 as u64).saturating_mul(s as u64)) } // Storage: Ump NeedsDispatch (r:1 w:1) // Storage: Ump NextDispatchRoundStartWith (r:1 w:1) // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - Weight::from_ref_time(8_658_000 as u64) + // Minimum execution time: 8_932 nanoseconds. + Weight::from_ref_time(9_171_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - Weight::from_ref_time(24_318_000 as u64) + // Minimum execution time: 25_129 nanoseconds. + Weight::from_ref_time(25_441_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index e05ee85c6250..f8695b07c88f 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "polkadot-test-runtime" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } @@ -17,7 +17,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/test-runtime/constants/Cargo.toml b/runtime/test-runtime/constants/Cargo.toml index 4f6f144c2b61..d96de0a0f9c1 100644 --- a/runtime/test-runtime/constants/Cargo.toml +++ b/runtime/test-runtime/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "test-runtime-constants" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] smallvec = "1.8.0" @@ -10,10 +10,14 @@ smallvec = "1.8.0" frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } [features] default = ["std"] std = [ - "sp-runtime/std" + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] diff --git a/runtime/test-runtime/constants/src/weights/block_weights.rs b/runtime/test-runtime/constants/src/weights/block_weights.rs index c004307336d9..ea8a341b58bb 100644 --- a/runtime/test-runtime/constants/src/weights/block_weights.rs +++ b/runtime/test-runtime/constants/src/weights/block_weights.rs @@ -23,7 +23,8 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(5_000_000); + pub const BlockExecutionWeight: Weight = + Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); } #[cfg(test)] @@ -39,12 +40,12 @@ pub mod constants { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs b/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs index 3ce6b73d5844..0512efb60e2a 100644 --- a/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs +++ b/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs @@ -23,7 +23,8 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(125_000); + pub const ExtrinsicBaseWeight: Weight = + Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); } #[cfg(test)] @@ -39,12 +40,12 @@ pub mod constants { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/test-runtime/constants/src/weights/paritydb_weights.rs b/runtime/test-runtime/constants/src/weights/paritydb_weights.rs index dca7d348310c..4338d928d807 100644 --- a/runtime/test-runtime/constants/src/weights/paritydb_weights.rs +++ b/runtime/test-runtime/constants/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/test-runtime/constants/src/weights/rocksdb_weights.rs b/runtime/test-runtime/constants/src/weights/rocksdb_weights.rs index 87867ebfe177..1d115d963fac 100644 --- a/runtime/test-runtime/constants/src/weights/rocksdb_weights.rs +++ b/runtime/test-runtime/constants/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 0210f1ecd8b7..83c0b3b05b53 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -348,8 +348,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - // A majority of the council can cancel the slash. - type SlashCancelOrigin = frame_system::EnsureNever<()>; + type AdminOrigin = frame_system::EnsureNever<()>; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -621,6 +620,7 @@ pub mod pallet_test_notifier { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(1_000_000)] pub fn prepare_new_query(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -635,6 +635,7 @@ pub mod pallet_test_notifier { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(1_000_000)] pub fn prepare_new_notify_query(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -652,6 +653,7 @@ pub mod pallet_test_notifier { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(1_000_000)] pub fn notification_received( origin: OriginFor, @@ -744,6 +746,7 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -930,6 +933,10 @@ sp_api::impl_runtime_apis! { Err(mmr::Error::PalletNotIncluded) } + fn mmr_leaf_count() -> Result { + Err(mmr::Error::PalletNotIncluded) + } + fn generate_proof( _block_numbers: Vec, _best_known_block_number: Option, diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index d5efbb28d5a4..442c69c3cbc0 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "westend-runtime" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } @@ -17,7 +17,7 @@ smallvec = "1.8.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -100,8 +100,8 @@ tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } serde_json = "1.0.81" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } -tokio = { version = "1.19.2", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +tokio = { version = "1.22.0", features = ["macros"] } sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] diff --git a/runtime/westend/constants/Cargo.toml b/runtime/westend/constants/Cargo.toml index d891ea0aa3a3..1de2721b5051 100644 --- a/runtime/westend/constants/Cargo.toml +++ b/runtime/westend/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "westend-runtime-constants" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] smallvec = "1.8.0" @@ -10,10 +10,14 @@ smallvec = "1.8.0" frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } [features] default = ["std"] std = [ - "sp-runtime/std" + "sp-core/std", + "sp-runtime/std", + "sp-weights/std" ] diff --git a/runtime/westend/constants/src/weights/block_weights.rs b/runtime/westend/constants/src/weights/block_weights.rs index a1bcebc89654..dd2e447a409a 100644 --- a/runtime/westend/constants/src/weights/block_weights.rs +++ b/runtime/westend/constants/src/weights/block_weights.rs @@ -1,28 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-19 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) //! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/westend/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -34,32 +32,32 @@ // --weight-path=runtime/westend/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 4_929_970, 5_140_248 - /// Average: 4_970_728 - /// Median: 4_964_665 - /// Std-Dev: 37170.72 + /// Min, Max: 5_165_500, 5_422_922 + /// Average: 5_208_926 + /// Median: 5_196_288 + /// Std-Dev: 52022.65 /// /// Percentiles nanoseconds: - /// 99th: 5_084_427 - /// 95th: 5_039_369 - /// 75th: 4_991_020 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_970_728); + /// 99th: 5_381_058 + /// 95th: 5_313_959 + /// 75th: 5_227_090 + pub const BlockExecutionWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_208_926)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -70,12 +68,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } diff --git a/runtime/westend/constants/src/weights/extrinsic_weights.rs b/runtime/westend/constants/src/weights/extrinsic_weights.rs index 9feca5255c82..c077d17a73c9 100644 --- a/runtime/westend/constants/src/weights/extrinsic_weights.rs +++ b/runtime/westend/constants/src/weights/extrinsic_weights.rs @@ -1,27 +1,26 @@ -// This file is part of Substrate. +// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -// 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. +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-26 (Y/M/D) +//! DATE: 2022-11-16 (Y/M/D) +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/westend/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -33,32 +32,32 @@ // --weight-path=runtime/westend/constants/src/weights/ // --warmup=10 // --repeat=100 +// --header=./file_header.txt -use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, -}; +use sp_core::parameter_types; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 78_822, 82_445 - /// Average: 79_088 - /// Median: 79_012 - /// Std-Dev: 422.84 + /// Min, Max: 86_956, 88_275 + /// Average: 87_248 + /// Median: 87_179 + /// Std-Dev: 239.45 /// /// Percentiles nanoseconds: - /// 99th: 80_770 - /// 95th: 79_394 - /// 75th: 79_071 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(79_088); + /// 99th: 87_990 + /// 95th: 87_768 + /// 75th: 87_312 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(87_248)); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use sp_weights::constants; /// Checks that the weight exists and is sane. // NOTE: If this test fails but you are sure that the generated values are fine, @@ -69,12 +68,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 1 ms." ); } diff --git a/runtime/westend/constants/src/weights/paritydb_weights.rs b/runtime/westend/constants/src/weights/paritydb_weights.rs index dca7d348310c..4338d928d807 100644 --- a/runtime/westend/constants/src/weights/paritydb_weights.rs +++ b/runtime/westend/constants/src/weights/paritydb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights /// are available for brave runtime engineers who may want to try this out as default. pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/westend/constants/src/weights/rocksdb_weights.rs b/runtime/westend/constants/src/weights/rocksdb_weights.rs index 87867ebfe177..1d115d963fac 100644 --- a/runtime/westend/constants/src/weights/rocksdb_weights.rs +++ b/runtime/westend/constants/src/weights/rocksdb_weights.rs @@ -25,8 +25,8 @@ pub mod constants { /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout /// the runtime. pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), - write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, "Write weight should be at most 1 ms." ); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index a7930ff06ea6..7118ad1e780b 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -109,13 +109,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("westend"), impl_name: create_runtime_str!("parity-westend"), authoring_version: 2, - spec_version: 9310, + spec_version: 9330, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] apis: sp_version::create_apis_vec![[]], - transaction_version: 14, + transaction_version: 15, state_version: 0, }; @@ -509,8 +509,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - // A majority of the council can cancel the slash. - type SlashCancelOrigin = EnsureRoot; + type AdminOrigin = EnsureRoot; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -1212,6 +1211,11 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1222,16 +1226,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - ( - // "Bound uses of call" - pallet_preimage::migration::v1::Migration, - pallet_scheduler::migration::v3::MigrateToV4, - pallet_multisig::migrations::v1::MigrateToV1, - // "Properly migrate weights to v2" - parachains_configuration::migration::v3::MigrateToV3, - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - pallet_fast_unstake::migrations::v1::MigrateToV1, - ), + Migrations, >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1459,7 +1454,10 @@ sp_api::impl_runtime_apis! { impl mmr::MmrApi for Runtime { fn mmr_root() -> Result { + Err(mmr::Error::PalletNotIncluded) + } + fn mmr_leaf_count() -> Result { Err(mmr::Error::PalletNotIncluded) } @@ -1631,21 +1629,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { + fn on_runtime_upgrade(checks: bool) -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade westend."); - let weight = Executive::try_runtime_upgrade().unwrap(); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { - log::info!( - target: "runtime::westend", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", - block.header.number, - block.header.hash(), - state_root_check, - select, - ); - Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() } } @@ -1833,6 +1831,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade()); + ext.execute_with(|| Runtime::on_runtime_upgrade(true)); } } diff --git a/runtime/westend/src/weights/frame_election_provider_support.rs b/runtime/westend/src/weights/frame_election_provider_support.rs index 9725bac63a4a..6b498f069353 100644 --- a/runtime/westend/src/weights/frame_election_provider_support.rs +++ b/runtime/westend/src/weights/frame_election_provider_support.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_election_provider_support`. @@ -48,20 +48,22 @@ impl frame_election_provider_support::WeightInfo for We /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 58_000 - .saturating_add(Weight::from_ref_time(14_001_000 as u64).saturating_mul(v as u64)) - // Standard Error: 5_013_000 - .saturating_add(Weight::from_ref_time(2_245_454_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 5_567_929 nanoseconds. + Weight::from_ref_time(5_602_140_000 as u64) + // Standard Error: 137_492 + .saturating_add(Weight::from_ref_time(5_547_397 as u64).saturating_mul(v as u64)) + // Standard Error: 14_056_706 + .saturating_add(Weight::from_ref_time(1_525_731_692 as u64).saturating_mul(d as u64)) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `d` is `[5, 16]`. fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 84_000 - .saturating_add(Weight::from_ref_time(15_041_000 as u64).saturating_mul(v as u64)) - // Standard Error: 7_315_000 - .saturating_add(Weight::from_ref_time(2_619_056_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 4_305_735 nanoseconds. + Weight::from_ref_time(4_328_820_000 as u64) + // Standard Error: 145_214 + .saturating_add(Weight::from_ref_time(5_450_622 as u64).saturating_mul(v as u64)) + // Standard Error: 14_846_234 + .saturating_add(Weight::from_ref_time(1_754_617_474 as u64).saturating_mul(d as u64)) } } diff --git a/runtime/westend/src/weights/frame_system.rs b/runtime/westend/src/weights/frame_system.rs index fd6b7ee31748..2d42b9df80ab 100644 --- a/runtime/westend/src/weights/frame_system.rs +++ b/runtime/westend/src/weights/frame_system.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,51 +38,59 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. - fn remark(_b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + fn remark(b: u32, ) -> Weight { + // Minimum execution time: 3_736 nanoseconds. + Weight::from_ref_time(3_841_000 as u64) + // Standard Error: 0 + .saturating_add(Weight::from_ref_time(409 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) + // Minimum execution time: 12_934 nanoseconds. + Weight::from_ref_time(13_170_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(1_758 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(7_880_000 as u64) + // Minimum execution time: 8_550 nanoseconds. + Weight::from_ref_time(8_837_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(611_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_914 nanoseconds. + Weight::from_ref_time(4_037_000 as u64) + // Standard Error: 2_058 + .saturating_add(Weight::from_ref_time(594_863 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(459_000 as u64).saturating_mul(i as u64)) + // Minimum execution time: 3_693 nanoseconds. + Weight::from_ref_time(3_817_000 as u64) + // Standard Error: 922 + .saturating_add(Weight::from_ref_time(429_424 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(970_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 5_446 nanoseconds. + Weight::from_ref_time(5_531_000 as u64) + // Standard Error: 1_121 + .saturating_add(Weight::from_ref_time(966_414 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/westend/src/weights/pallet_bags_list.rs b/runtime/westend/src/weights/pallet_bags_list.rs index 29653d3f7b9d..3888392da0e3 100644 --- a/runtime/westend/src/weights/pallet_bags_list.rs +++ b/runtime/westend/src/weights/pallet_bags_list.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_bags_list`. @@ -49,7 +49,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:4 w:4) // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(60_419_000 as u64) + // Minimum execution time: 64_437 nanoseconds. + Weight::from_ref_time(65_304_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -58,7 +59,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - Weight::from_ref_time(59_082_000 as u64) + // Minimum execution time: 63_586 nanoseconds. + Weight::from_ref_time(64_301_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -68,7 +70,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - Weight::from_ref_time(59_623_000 as u64) + // Minimum execution time: 63_247 nanoseconds. + Weight::from_ref_time(64_507_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } diff --git a/runtime/westend/src/weights/pallet_balances.rs b/runtime/westend/src/weights/pallet_balances.rs index c91b0c4c540a..5192faad0141 100644 --- a/runtime/westend/src/weights/pallet_balances.rs +++ b/runtime/westend/src/weights/pallet_balances.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. @@ -46,43 +46,50 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(39_143_000 as u64) + // Minimum execution time: 42_147 nanoseconds. + Weight::from_ref_time(42_914_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(30_428_000 as u64) + // Minimum execution time: 31_276 nanoseconds. + Weight::from_ref_time(31_701_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(22_859_000 as u64) + // Minimum execution time: 24_241 nanoseconds. + Weight::from_ref_time(24_686_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(25_454_000 as u64) + // Minimum execution time: 26_470 nanoseconds. + Weight::from_ref_time(27_095_000 as u64) .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) fn force_transfer() -> Weight { - Weight::from_ref_time(40_355_000 as u64) + // Minimum execution time: 41_420 nanoseconds. + Weight::from_ref_time(42_067_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(34_280_000 as u64) + // Minimum execution time: 35_961 nanoseconds. + Weight::from_ref_time(36_373_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(19_325_000 as u64) + // Minimum execution time: 20_742 nanoseconds. + Weight::from_ref_time(21_132_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs index 01e0f1363280..6a444f269836 100644 --- a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. @@ -53,33 +53,38 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(14_647_000 as u64) + // Minimum execution time: 15_062 nanoseconds. + Weight::from_ref_time(15_395_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(12_864_000 as u64) + // Minimum execution time: 14_243 nanoseconds. + Weight::from_ref_time(14_487_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(12_700_000 as u64) + // Minimum execution time: 13_434 nanoseconds. + Weight::from_ref_time(13_686_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(27_641_000 as u64) + // Minimum execution time: 29_144 nanoseconds. + Weight::from_ref_time(29_867_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(21_520_000 as u64) + // Minimum execution time: 23_284 nanoseconds. + Weight::from_ref_time(23_541_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,12 +93,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. - fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(420_000 as u64).saturating_mul(v as u64)) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(127_000 as u64).saturating_mul(t as u64)) + fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { + // Minimum execution time: 433_743 nanoseconds. + Weight::from_ref_time(437_885_000 as u64) + // Standard Error: 2_375 + .saturating_add(Weight::from_ref_time(267_405 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -109,11 +113,12 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(456_000 as u64).saturating_mul(a as u64)) - // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(172_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 277_991 nanoseconds. + Weight::from_ref_time(86_081_787 as u64) + // Standard Error: 2_745 + .saturating_add(Weight::from_ref_time(342_302 as u64).saturating_mul(a as u64)) + // Standard Error: 4_115 + .saturating_add(Weight::from_ref_time(95_861 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -124,7 +129,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(55_478_000 as u64) + // Minimum execution time: 57_338 nanoseconds. + Weight::from_ref_time(58_651_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -139,16 +145,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(762_000 as u64).saturating_mul(v as u64)) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(42_000 as u64).saturating_mul(t as u64)) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(7_387_000 as u64).saturating_mul(a as u64)) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(1_810_000 as u64).saturating_mul(d as u64)) + fn submit_unsigned(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 4_733_437 nanoseconds. + Weight::from_ref_time(4_752_271_000 as u64) + // Standard Error: 14_871 + .saturating_add(Weight::from_ref_time(120_136 as u64).saturating_mul(v as u64)) + // Standard Error: 44_069 + .saturating_add(Weight::from_ref_time(4_506_557 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -160,16 +163,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(782_000 as u64).saturating_mul(v as u64)) - // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(57_000 as u64).saturating_mul(t as u64)) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(5_868_000 as u64).saturating_mul(a as u64)) - // Standard Error: 33_000 - .saturating_add(Weight::from_ref_time(1_483_000 as u64).saturating_mul(d as u64)) + fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { + // Minimum execution time: 3_897_457 nanoseconds. + Weight::from_ref_time(3_923_058_000 as u64) + // Standard Error: 12_141 + .saturating_add(Weight::from_ref_time(212_441 as u64).saturating_mul(v as u64)) + // Standard Error: 35_981 + .saturating_add(Weight::from_ref_time(3_207_505 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) } } diff --git a/runtime/westend/src/weights/pallet_fast_unstake.rs b/runtime/westend/src/weights/pallet_fast_unstake.rs index 1fc7a2580978..521ea577c18e 100644 --- a/runtime/westend/src/weights/pallet_fast_unstake.rs +++ b/runtime/westend/src/weights/pallet_fast_unstake.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=westend-dev // --steps=50 // --repeat=20 +// --pallet=pallet_fast_unstake // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=pallet_fast_unstake -// --chain=westend-dev // --header=./file_header.txt // --output=./runtime/westend/src/weights/ @@ -50,53 +49,57 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Ledger (r:0 w:1) - // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SlashingSpans (r:64 w:0) + // Storage: Staking Bonded (r:64 w:64) + // Storage: Staking Validators (r:64 w:0) + // Storage: Staking Nominators (r:64 w:0) + // Storage: System Account (r:64 w:64) + // Storage: Balances Locks (r:64 w:64) + // Storage: Staking Ledger (r:0 w:64) + // Storage: Staking Payee (r:0 w:64) fn on_idle_unstake() -> Weight { - Weight::from_ref_time(71_751_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 2_151_083 nanoseconds. + Weight::from_ref_time(2_165_150_000 as u64) + .saturating_add(T::DbWeight::get().reads(389 as u64)) + .saturating_add(T::DbWeight::get().writes(321 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking ValidatorCount (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) // Storage: FastUnstake Head (r:1 w:1) - // Storage: FastUnstake Queue (r:2 w:1) + // Storage: FastUnstake Queue (r:65 w:64) // Storage: FastUnstake CounterForQueue (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking ErasStakers (r:4 w:0) /// The range of component `x` is `[2, 256]`. fn on_idle_check(x: u32, ) -> Weight { - Weight::from_ref_time(68_336_000 as u64) - // Standard Error: 9_399 - .saturating_add(Weight::from_ref_time(13_544_336 as u64).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) + // Minimum execution time: 2_339_481 nanoseconds. + Weight::from_ref_time(2_362_834_000 as u64) + // Standard Error: 472_765 + .saturating_add(Weight::from_ref_time(804_985_586 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(72 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(66 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: FastUnstake Queue (r:1 w:1) // Storage: FastUnstake Head (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:1 w:1) + // Storage: VoterList ListNodes (r:2 w:2) // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn register_fast_unstake() -> Weight { - Weight::from_ref_time(93_252_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + // Minimum execution time: 125_665 nanoseconds. + Weight::from_ref_time(128_301_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) @@ -104,13 +107,15 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Storage: FastUnstake Head (r:1 w:0) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn deregister() -> Weight { - Weight::from_ref_time(40_994_000 as u64) + // Minimum execution time: 50_138 nanoseconds. + Weight::from_ref_time(51_813_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) fn control() -> Weight { - Weight::from_ref_time(4_420_000 as u64) + // Minimum execution time: 4_661 nanoseconds. + Weight::from_ref_time(4_778_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/westend/src/weights/pallet_identity.rs b/runtime/westend/src/weights/pallet_identity.rs index 0fdbe3edc23c..90d07dc99e2e 100644 --- a/runtime/westend/src/weights/pallet_identity.rs +++ b/runtime/westend/src/weights/pallet_identity.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_identity`. @@ -47,32 +47,35 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - Weight::from_ref_time(17_318_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(159_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 17_404 nanoseconds. + Weight::from_ref_time(18_656_367 as u64) + // Standard Error: 2_570 + .saturating_add(Weight::from_ref_time(181_443 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(32_608_000 as u64) - // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(123_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(298_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 36_708 nanoseconds. + Weight::from_ref_time(35_850_708 as u64) + // Standard Error: 3_462 + .saturating_add(Weight::from_ref_time(93_826 as u64).saturating_mul(r as u64)) + // Standard Error: 675 + .saturating_add(Weight::from_ref_time(330_646 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - /// The range of component `s` is `[1, 100]`. + // Storage: Identity SuperOf (r:2 w:2) + /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { - Weight::from_ref_time(29_011_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_061_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_740 nanoseconds. + Weight::from_ref_time(30_187_558 as u64) + // Standard Error: 5_092 + .saturating_add(Weight::from_ref_time(2_129_883 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -80,12 +83,13 @@ impl pallet_identity::WeightInfo for WeightInfo { } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - /// The range of component `p` is `[1, 100]`. + // Storage: Identity SuperOf (r:0 w:2) + /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { - Weight::from_ref_time(29_082_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(881_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 10_968 nanoseconds. + Weight::from_ref_time(29_634_655 as u64) + // Standard Error: 4_331 + .saturating_add(Weight::from_ref_time(924_855 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -94,16 +98,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_ref_time(36_503_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(27_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(873_000 as u64).saturating_mul(s as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(149_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 51_903 nanoseconds. + Weight::from_ref_time(36_302_297 as u64) + // Standard Error: 4_837 + .saturating_add(Weight::from_ref_time(129_708 as u64).saturating_mul(r as u64)) + // Standard Error: 944 + .saturating_add(Weight::from_ref_time(899_485 as u64).saturating_mul(s as u64)) + // Standard Error: 944 + .saturating_add(Weight::from_ref_time(170_186 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -111,65 +116,71 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(34_025_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(159_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(312_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 39_215 nanoseconds. + Weight::from_ref_time(35_871_187 as u64) + // Standard Error: 4_586 + .saturating_add(Weight::from_ref_time(160_077 as u64).saturating_mul(r as u64)) + // Standard Error: 895 + .saturating_add(Weight::from_ref_time(352_424 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(31_767_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(107_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(307_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 34_568 nanoseconds. + Weight::from_ref_time(32_340_656 as u64) + // Standard Error: 4_471 + .saturating_add(Weight::from_ref_time(150_594 as u64).saturating_mul(r as u64)) + // Standard Error: 872 + .saturating_add(Weight::from_ref_time(351_058 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - Weight::from_ref_time(9_456_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(137_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_145 nanoseconds. + Weight::from_ref_time(10_004_747 as u64) + // Standard Error: 2_519 + .saturating_add(Weight::from_ref_time(144_599 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - Weight::from_ref_time(9_695_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(131_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_478 nanoseconds. + Weight::from_ref_time(10_280_264 as u64) + // Standard Error: 2_157 + .saturating_add(Weight::from_ref_time(137_027 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - Weight::from_ref_time(9_441_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(132_000 as u64).saturating_mul(r as u64)) + // Minimum execution time: 9_364 nanoseconds. + Weight::from_ref_time(10_048_693 as u64) + // Standard Error: 2_168 + .saturating_add(Weight::from_ref_time(138_246 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[1, 100]`. + /// The range of component `x` is `[0, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_ref_time(24_671_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(97_000 as u64).saturating_mul(r as u64)) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(306_000 as u64).saturating_mul(x as u64)) + // Minimum execution time: 29_237 nanoseconds. + Weight::from_ref_time(27_101_513 as u64) + // Standard Error: 6_451 + .saturating_add(Weight::from_ref_time(151_316 as u64).saturating_mul(r as u64)) + // Standard Error: 1_193 + .saturating_add(Weight::from_ref_time(584_669 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -178,12 +189,17 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Identity SuperOf (r:0 w:100) /// The range of component `r` is `[1, 20]`. - /// The range of component `s` is `[1, 100]`. - /// The range of component `x` is `[1, 100]`. - fn kill_identity(_r: u32, s: u32, _x: u32, ) -> Weight { - Weight::from_ref_time(42_491_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(878_000 as u64).saturating_mul(s as u64)) + /// The range of component `s` is `[0, 100]`. + /// The range of component `x` is `[0, 100]`. + fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + // Minimum execution time: 57_804 nanoseconds. + Weight::from_ref_time(41_385_856 as u64) + // Standard Error: 3_892 + .saturating_add(Weight::from_ref_time(127_211 as u64).saturating_mul(r as u64)) + // Standard Error: 760 + .saturating_add(Weight::from_ref_time(905_485 as u64).saturating_mul(s as u64)) + // Standard Error: 760 + .saturating_add(Weight::from_ref_time(167_074 as u64).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -191,11 +207,12 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { - Weight::from_ref_time(36_480_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(70_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 33_707 nanoseconds. + Weight::from_ref_time(38_599_750 as u64) + // Standard Error: 1_484 + .saturating_add(Weight::from_ref_time(78_528 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -203,9 +220,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - Weight::from_ref_time(15_798_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(30_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 14_349 nanoseconds. + Weight::from_ref_time(16_709_884 as u64) + // Standard Error: 797 + .saturating_add(Weight::from_ref_time(31_371 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -214,19 +232,21 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - Weight::from_ref_time(37_872_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(64_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 37_260 nanoseconds. + Weight::from_ref_time(40_182_898 as u64) + // Standard Error: 1_255 + .saturating_add(Weight::from_ref_time(70_354 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) - /// The range of component `s` is `[1, 99]`. + /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { - Weight::from_ref_time(28_241_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(59_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 26_859 nanoseconds. + Weight::from_ref_time(29_852_260 as u64) + // Standard Error: 1_197 + .saturating_add(Weight::from_ref_time(68_170 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/westend/src/weights/pallet_im_online.rs b/runtime/westend/src/weights/pallet_im_online.rs index 7d83ee69c824..aa800c3832fd 100644 --- a/runtime/westend/src/weights/pallet_im_online.rs +++ b/runtime/westend/src/weights/pallet_im_online.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. @@ -52,11 +52,12 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(75_894_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(23_000 as u64).saturating_mul(k as u64)) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(301_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 97_442 nanoseconds. + Weight::from_ref_time(78_300_860 as u64) + // Standard Error: 266 + .saturating_add(Weight::from_ref_time(23_605 as u64).saturating_mul(k as u64)) + // Standard Error: 2_682 + .saturating_add(Weight::from_ref_time(306_554 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_indices.rs b/runtime/westend/src/weights/pallet_indices.rs index 48dcf2d0c1ea..9194fd0e9d92 100644 --- a/runtime/westend/src/weights/pallet_indices.rs +++ b/runtime/westend/src/weights/pallet_indices.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_indices`. @@ -46,33 +46,38 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - Weight::from_ref_time(25_477_000 as u64) + // Minimum execution time: 27_006 nanoseconds. + Weight::from_ref_time(27_436_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(32_237_000 as u64) + // Minimum execution time: 32_199 nanoseconds. + Weight::from_ref_time(32_827_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn free() -> Weight { - Weight::from_ref_time(27_019_000 as u64) + // Minimum execution time: 27_961 nanoseconds. + Weight::from_ref_time(28_227_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Indices Accounts (r:1 w:1) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - Weight::from_ref_time(26_805_000 as u64) + // Minimum execution time: 27_795 nanoseconds. + Weight::from_ref_time(28_425_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Indices Accounts (r:1 w:1) fn freeze() -> Weight { - Weight::from_ref_time(32_450_000 as u64) + // Minimum execution time: 33_395 nanoseconds. + Weight::from_ref_time(33_824_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_multisig.rs b/runtime/westend/src/weights/pallet_multisig.rs index e15f0973adae..d4ee0291febd 100644 --- a/runtime/westend/src/weights/pallet_multisig.rs +++ b/runtime/westend/src/weights/pallet_multisig.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -28,11 +28,11 @@ // --steps=50 // --repeat=20 // --pallet=pallet_multisig -// --extrinsic= +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=runtime/westend/src/weights/ +// --output=./runtime/westend/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,22 +46,22 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 14_417 nanoseconds. - Weight::from_ref_time(14_932_092 as u64) + // Minimum execution time: 15_271 nanoseconds. + Weight::from_ref_time(15_773_573 as u64) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(482 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(579 as u64).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 41_482 nanoseconds. - Weight::from_ref_time(34_353_792 as u64) - // Standard Error: 791 - .saturating_add(Weight::from_ref_time(81_017 as u64).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_468 as u64).saturating_mul(z as u64)) + // Minimum execution time: 42_809 nanoseconds. + Weight::from_ref_time(35_419_390 as u64) + // Standard Error: 591 + .saturating_add(Weight::from_ref_time(82_370 as u64).saturating_mul(s as u64)) + // Standard Error: 5 + .saturating_add(Weight::from_ref_time(1_638 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,12 +69,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 32_410 nanoseconds. - Weight::from_ref_time(25_806_543 as u64) - // Standard Error: 602 - .saturating_add(Weight::from_ref_time(74_253 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_463 as u64).saturating_mul(z as u64)) + // Minimum execution time: 34_162 nanoseconds. + Weight::from_ref_time(28_110_900 as u64) + // Standard Error: 825 + .saturating_add(Weight::from_ref_time(76_710 as u64).saturating_mul(s as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_516 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,12 +83,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 46_059 nanoseconds. - Weight::from_ref_time(37_295_248 as u64) - // Standard Error: 604 - .saturating_add(Weight::from_ref_time(104_164 as u64).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_ref_time(1_489 as u64).saturating_mul(z as u64)) + // Minimum execution time: 49_116 nanoseconds. + Weight::from_ref_time(39_420_656 as u64) + // Standard Error: 700 + .saturating_add(Weight::from_ref_time(109_061 as u64).saturating_mul(s as u64)) + // Standard Error: 6 + .saturating_add(Weight::from_ref_time(1_628 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -96,30 +96,30 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 29_952 nanoseconds. - Weight::from_ref_time(32_697_678 as u64) - // Standard Error: 857 - .saturating_add(Weight::from_ref_time(86_644 as u64).saturating_mul(s as u64)) + // Minimum execution time: 31_803 nanoseconds. + Weight::from_ref_time(33_935_512 as u64) + // Standard Error: 843 + .saturating_add(Weight::from_ref_time(92_536 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 22_298 nanoseconds. - Weight::from_ref_time(23_997_404 as u64) - // Standard Error: 855 - .saturating_add(Weight::from_ref_time(82_455 as u64).saturating_mul(s as u64)) + // Minimum execution time: 24_026 nanoseconds. + Weight::from_ref_time(25_381_198 as u64) + // Standard Error: 688 + .saturating_add(Weight::from_ref_time(86_761 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 31_615 nanoseconds. - Weight::from_ref_time(33_932_527 as u64) - // Standard Error: 823 - .saturating_add(Weight::from_ref_time(87_873 as u64).saturating_mul(s as u64)) + // Minimum execution time: 34_044 nanoseconds. + Weight::from_ref_time(36_091_489 as u64) + // Standard Error: 917 + .saturating_add(Weight::from_ref_time(88_975 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_nomination_pools.rs b/runtime/westend/src/weights/pallet_nomination_pools.rs index aee227af0e1c..a8ac042edc76 100644 --- a/runtime/westend/src/weights/pallet_nomination_pools.rs +++ b/runtime/westend/src/weights/pallet_nomination_pools.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_nomination_pools`. @@ -47,18 +47,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) - // Storage: Staking Bonded (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn join() -> Weight { - Weight::from_ref_time(138_670_000 as u64) + // Minimum execution time: 142_360 nanoseconds. + Weight::from_ref_time(143_773_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -66,13 +67,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_transfer() -> Weight { - Weight::from_ref_time(138_922_000 as u64) + // Minimum execution time: 140_103 nanoseconds. + Weight::from_ref_time(141_199_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -80,13 +82,14 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:3 w:3) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:2 w:2) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra_reward() -> Weight { - Weight::from_ref_time(139_673_000 as u64) + // Minimum execution time: 142_664 nanoseconds. + Weight::from_ref_time(145_348_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -95,13 +98,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools RewardPools (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim_payout() -> Weight { - Weight::from_ref_time(55_421_000 as u64) + // Minimum execution time: 54_355 nanoseconds. + Weight::from_ref_time(54_950_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: System Account (r:2 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,49 +114,53 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: VoterList ListNodes (r:3 w:3) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) // Storage: NominationPools SubPoolsStorage (r:1 w:1) // Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1) fn unbond() -> Weight { - Weight::from_ref_time(140_347_000 as u64) + // Minimum execution time: 142_734 nanoseconds. + Weight::from_ref_time(143_730_000 as u64) .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: Balances Locks (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { - Weight::from_ref_time(52_101_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(16_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + // Minimum execution time: 58_816 nanoseconds. + Weight::from_ref_time(60_454_017 as u64) + // Standard Error: 964 + .saturating_add(Weight::from_ref_time(13_805 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(93_331_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(16_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 97_677 nanoseconds. + Weight::from_ref_time(99_885_437 as u64) + // Standard Error: 1_438 + .saturating_add(Weight::from_ref_time(23_450 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: NominationPools PoolMembers (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) // Storage: NominationPools BondedPools (r:1 w:1) // Storage: NominationPools SubPoolsStorage (r:1 w:1) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) @@ -167,28 +176,26 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(s: u32, ) -> Weight { - Weight::from_ref_time(145_331_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { + // Minimum execution time: 146_514 nanoseconds. + Weight::from_ref_time(150_150_119 as u64) .saturating_add(T::DbWeight::get().reads(20 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } + // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: NominationPools MinCreateBond (r:1 w:0) // Storage: NominationPools MinJoinBond (r:1 w:0) // Storage: NominationPools MaxPools (r:1 w:0) // Storage: NominationPools CounterForBondedPools (r:1 w:1) // Storage: NominationPools PoolMembers (r:1 w:1) - // Storage: NominationPools LastPoolId (r:1 w:1) // Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0) // Storage: NominationPools MaxPoolMembers (r:1 w:0) // Storage: NominationPools CounterForPoolMembers (r:1 w:1) // Storage: System Account (r:2 w:2) - // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: NominationPools RewardPools (r:1 w:1) // Storage: NominationPools CounterForRewardPools (r:1 w:1) @@ -197,36 +204,40 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - Weight::from_ref_time(131_800_000 as u64) - .saturating_add(T::DbWeight::get().reads(22 as u64)) + // Minimum execution time: 129_468 nanoseconds. + Weight::from_ref_time(130_634_000 as u64) + .saturating_add(T::DbWeight::get().reads(21 as u64)) .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) // Storage: Staking MaxNominatorsCount (r:1 w:0) // Storage: Staking Validators (r:2 w:0) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(61_633_000 as u64) - // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(1_008_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 64_123 nanoseconds. + Weight::from_ref_time(64_974_242 as u64) + // Standard Error: 6_814 + .saturating_add(Weight::from_ref_time(983_177 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) fn set_state() -> Weight { - Weight::from_ref_time(35_755_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Minimum execution time: 39_824 nanoseconds. + Weight::from_ref_time(40_580_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -234,9 +245,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools CounterForMetadata (r:1 w:1) /// The range of component `n` is `[1, 256]`. fn set_metadata(n: u32, ) -> Weight { - Weight::from_ref_time(17_011_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 16_059 nanoseconds. + Weight::from_ref_time(16_653_229 as u64) + // Standard Error: 122 + .saturating_add(Weight::from_ref_time(825 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -246,16 +258,19 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools MinCreateBond (r:0 w:1) // Storage: NominationPools MaxPools (r:0 w:1) fn set_configs() -> Weight { - Weight::from_ref_time(7_744_000 as u64) + // Minimum execution time: 6_763 nanoseconds. + Weight::from_ref_time(7_029_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - Weight::from_ref_time(26_398_000 as u64) + // Minimum execution time: 25_305 nanoseconds. + Weight::from_ref_time(26_044_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -264,8 +279,9 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(61_574_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 66_812 nanoseconds. + Weight::from_ref_time(67_339_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } } diff --git a/runtime/westend/src/weights/pallet_preimage.rs b/runtime/westend/src/weights/pallet_preimage.rs index 97f066d7d40b..7327bfd49255 100644 --- a/runtime/westend/src/weights/pallet_preimage.rs +++ b/runtime/westend/src/weights/pallet_preimage.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/westend/src/weights +// --output=./runtime/westend/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,9 +48,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(28_888_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_116 as u64).saturating_mul(s as u64)) + // Minimum execution time: 30_695 nanoseconds. + Weight::from_ref_time(31_212_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_377 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -58,9 +59,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(20_640_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_433 nanoseconds. + Weight::from_ref_time(21_653_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_370 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,66 +70,76 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(19_203_000 as u64) + // Minimum execution time: 20_420 nanoseconds. + Weight::from_ref_time(20_617_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_368 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(41_563_000 as u64) + // Minimum execution time: 40_628 nanoseconds. + Weight::from_ref_time(42_418_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(28_606_000 as u64) + // Minimum execution time: 27_950 nanoseconds. + Weight::from_ref_time(28_924_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(27_447_000 as u64) + // Minimum execution time: 26_777 nanoseconds. + Weight::from_ref_time(28_552_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(14_862_000 as u64) + // Minimum execution time: 14_306 nanoseconds. + Weight::from_ref_time(15_302_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(18_337_000 as u64) + // Minimum execution time: 18_820 nanoseconds. + Weight::from_ref_time(19_834_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(9_074_000 as u64) + // Minimum execution time: 9_887 nanoseconds. + Weight::from_ref_time(10_209_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(28_192_000 as u64) + // Minimum execution time: 26_855 nanoseconds. + Weight::from_ref_time(28_503_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(9_012_000 as u64) + // Minimum execution time: 9_450 nanoseconds. + Weight::from_ref_time(9_924_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(8_961_000 as u64) + // Minimum execution time: 9_420 nanoseconds. + Weight::from_ref_time(9_972_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_proxy.rs b/runtime/westend/src/weights/pallet_proxy.rs index 5713094eb5c5..8a1fa3eeba47 100644 --- a/runtime/westend/src/weights/pallet_proxy.rs +++ b/runtime/westend/src/weights/pallet_proxy.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. @@ -47,9 +47,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_ref_time(20_519_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(53_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 20_847 nanoseconds. + Weight::from_ref_time(21_941_679 as u64) + // Standard Error: 1_366 + .saturating_add(Weight::from_ref_time(48_868 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -58,11 +59,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(37_277_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(125_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(44_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 39_435 nanoseconds. + Weight::from_ref_time(39_978_786 as u64) + // Standard Error: 1_917 + .saturating_add(Weight::from_ref_time(102_832 as u64).saturating_mul(a as u64)) + // Standard Error: 1_981 + .saturating_add(Weight::from_ref_time(27_934 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -71,11 +73,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_615_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(121_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_820 nanoseconds. + Weight::from_ref_time(28_184_500 as u64) + // Standard Error: 1_574 + .saturating_add(Weight::from_ref_time(125_329 as u64).saturating_mul(a as u64)) + // Standard Error: 1_626 + .saturating_add(Weight::from_ref_time(1_294 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -84,11 +87,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(26_769_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(16_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 27_473 nanoseconds. + Weight::from_ref_time(28_278_833 as u64) + // Standard Error: 1_680 + .saturating_add(Weight::from_ref_time(117_703 as u64).saturating_mul(a as u64)) + // Standard Error: 1_735 + .saturating_add(Weight::from_ref_time(479 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,38 +102,42 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(34_494_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(111_000 as u64).saturating_mul(a as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 35_104 nanoseconds. + Weight::from_ref_time(36_127_124 as u64) + // Standard Error: 1_989 + .saturating_add(Weight::from_ref_time(120_599 as u64).saturating_mul(a as u64)) + // Standard Error: 2_055 + .saturating_add(Weight::from_ref_time(40_753 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_462_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 29_166 nanoseconds. + Weight::from_ref_time(30_090_935 as u64) + // Standard Error: 2_399 + .saturating_add(Weight::from_ref_time(84_394 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(28_641_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(85_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 29_053 nanoseconds. + Weight::from_ref_time(30_966_271 as u64) + // Standard Error: 2_380 + .saturating_add(Weight::from_ref_time(41_109 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_ref_time(24_918_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(60_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 25_087 nanoseconds. + Weight::from_ref_time(26_233_387 as u64) + // Standard Error: 1_784 + .saturating_add(Weight::from_ref_time(51_604 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -137,18 +145,20 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { - Weight::from_ref_time(30_510_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(29_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 31_112 nanoseconds. + Weight::from_ref_time(32_658_370 as u64) + // Standard Error: 2_825 + .saturating_add(Weight::from_ref_time(10_687 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_ref_time(26_338_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(p as u64)) + // Minimum execution time: 26_655 nanoseconds. + Weight::from_ref_time(27_520_903 as u64) + // Standard Error: 3_755 + .saturating_add(Weight::from_ref_time(65_727 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/pallet_scheduler.rs b/runtime/westend/src/weights/pallet_scheduler.rs index f325f2311093..571f925d8aba 100644 --- a/runtime/westend/src/weights/pallet_scheduler.rs +++ b/runtime/westend/src/weights/pallet_scheduler.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/westend/src/weights +// --output=./runtime/westend/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -46,55 +46,61 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_399_000 as u64) + // Minimum execution time: 4_854 nanoseconds. + Weight::from_ref_time(5_006_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(3_771_000 as u64) - // Standard Error: 2_641 - .saturating_add(Weight::from_ref_time(610_848 as u64).saturating_mul(s as u64)) + // Minimum execution time: 4_121 nanoseconds. + Weight::from_ref_time(7_183_321 as u64) + // Standard Error: 1_950 + .saturating_add(Weight::from_ref_time(652_691 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - Weight::from_ref_time(12_651_000 as u64) + // Minimum execution time: 10_249 nanoseconds. + Weight::from_ref_time(10_443_000 as u64) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(24_280_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_126 as u64).saturating_mul(s as u64)) + // Minimum execution time: 22_224 nanoseconds. + Weight::from_ref_time(23_076_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(1_244 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Scheduler Lookup (r:0 w:1) fn service_task_named() -> Weight { - Weight::from_ref_time(13_929_000 as u64) + // Minimum execution time: 11_503 nanoseconds. + Weight::from_ref_time(11_763_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - Weight::from_ref_time(19_285_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 10_001 nanoseconds. + Weight::from_ref_time(10_201_000 as u64) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(4_026_000 as u64) + // Minimum execution time: 4_582 nanoseconds. + Weight::from_ref_time(4_733_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_078_000 as u64) + // Minimum execution time: 4_671 nanoseconds. + Weight::from_ref_time(4_762_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(17_176_000 as u64) - // Standard Error: 3_203 - .saturating_add(Weight::from_ref_time(645_757 as u64).saturating_mul(s as u64)) + // Minimum execution time: 18_756 nanoseconds. + Weight::from_ref_time(22_264_134 as u64) + // Standard Error: 2_104 + .saturating_add(Weight::from_ref_time(674_215 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -102,9 +108,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(19_408_000 as u64) - // Standard Error: 1_645 - .saturating_add(Weight::from_ref_time(575_558 as u64).saturating_mul(s as u64)) + // Minimum execution time: 21_264 nanoseconds. + Weight::from_ref_time(22_300_303 as u64) + // Standard Error: 1_716 + .saturating_add(Weight::from_ref_time(665_239 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -112,9 +119,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(20_173_000 as u64) - // Standard Error: 3_998 - .saturating_add(Weight::from_ref_time(684_714 as u64).saturating_mul(s as u64)) + // Minimum execution time: 20_880 nanoseconds. + Weight::from_ref_time(25_963_207 as u64) + // Standard Error: 3_338 + .saturating_add(Weight::from_ref_time(689_950 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,9 +130,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(20_330_000 as u64) - // Standard Error: 2_310 - .saturating_add(Weight::from_ref_time(621_196 as u64).saturating_mul(s as u64)) + // Minimum execution time: 22_691 nanoseconds. + Weight::from_ref_time(24_309_908 as u64) + // Standard Error: 2_267 + .saturating_add(Weight::from_ref_time(687_241 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/westend/src/weights/pallet_session.rs b/runtime/westend/src/weights/pallet_session.rs index 4349e1aecd06..46e42d078c10 100644 --- a/runtime/westend/src/weights/pallet_session.rs +++ b/runtime/westend/src/weights/pallet_session.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_session`. @@ -48,7 +48,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - Weight::from_ref_time(50_037_000 as u64) + // Minimum execution time: 51_716 nanoseconds. + Weight::from_ref_time(52_472_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -56,7 +57,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - Weight::from_ref_time(38_037_000 as u64) + // Minimum execution time: 39_736 nanoseconds. + Weight::from_ref_time(41_579_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } diff --git a/runtime/westend/src/weights/pallet_staking.rs b/runtime/westend/src/weights/pallet_staking.rs index 86f33610fafb..7fe992e49ce3 100644 --- a/runtime/westend/src/weights/pallet_staking.rs +++ b/runtime/westend/src/weights/pallet_staking.rs @@ -16,21 +16,23 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// /home/benchbot/cargo_target_dir/production/polkadot // benchmark // pallet -// --chain=westend-dev // --steps=50 // --repeat=20 -// --pallet=pallet_staking // --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=pallet_staking +// --chain=westend-dev // --header=./file_header.txt // --output=./runtime/westend/src/weights/ @@ -38,7 +40,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_staking`. @@ -47,13 +49,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - Weight::from_ref_time(46_604_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Minimum execution time: 47_938 nanoseconds. + Weight::from_ref_time(48_766_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -61,9 +63,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - Weight::from_ref_time(82_033_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Minimum execution time: 83_008 nanoseconds. + Weight::from_ref_time(84_097_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -75,9 +78,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - Weight::from_ref_time(85_478_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 89_429 nanoseconds. + Weight::from_ref_time(90_577_000) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -85,11 +89,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(39_507_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(26_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 40_837 nanoseconds. + Weight::from_ref_time(42_187_130) + // Standard Error: 894 + .saturating_add(Weight::from_ref_time(19_689).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -104,11 +109,16 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) + // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_kill(_s: u32, ) -> Weight { - Weight::from_ref_time(74_901_000 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) + fn withdraw_unbonded_kill(s: u32, ) -> Weight { + // Minimum execution time: 79_648 nanoseconds. + Weight::from_ref_time(83_017_096) + // Standard Error: 2_010 + .saturating_add(Weight::from_ref_time(922_930).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -122,20 +132,22 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - Weight::from_ref_time(58_380_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 60_320 nanoseconds. + Weight::from_ref_time(61_086_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - Weight::from_ref_time(28_781_000 as u64) - // Standard Error: 9_000 - .saturating_add(Weight::from_ref_time(6_295_000 as u64).saturating_mul(k as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(k as u64))) + // Minimum execution time: 33_877 nanoseconds. + Weight::from_ref_time(30_158_812) + // Standard Error: 9_093 + .saturating_add(Weight::from_ref_time(6_467_073).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -150,12 +162,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(60_248_000 as u64) - // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(2_332_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 64_372 nanoseconds. + Weight::from_ref_time(64_284_684) + // Standard Error: 8_143 + .saturating_add(Weight::from_ref_time(2_395_175).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -165,51 +178,59 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(55_912_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 58_793 nanoseconds. + Weight::from_ref_time(59_523_000) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - Weight::from_ref_time(15_735_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 16_281 nanoseconds. + Weight::from_ref_time(16_747_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(22_455_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 23_145 nanoseconds. + Weight::from_ref_time(23_556_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - Weight::from_ref_time(4_350_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_658 nanoseconds. + Weight::from_ref_time(4_781_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - Weight::from_ref_time(4_465_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_881 nanoseconds. + Weight::from_ref_time(5_148_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - Weight::from_ref_time(4_503_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_713 nanoseconds. + Weight::from_ref_time(4_874_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - Weight::from_ref_time(4_480_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 4_864 nanoseconds. + Weight::from_ref_time(5_081_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - Weight::from_ref_time(4_819_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_060 nanoseconds. + Weight::from_ref_time(5_422_382) + // Standard Error: 29 + .saturating_add(Weight::from_ref_time(11_331).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -226,62 +247,64 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - Weight::from_ref_time(71_683_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(876_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 71_417 nanoseconds. + Weight::from_ref_time(76_800_091) + // Standard Error: 2_434 + .saturating_add(Weight::from_ref_time(923_979).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - Weight::from_ref_time(860_469_000 as u64) - // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(4_820_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 113_334 nanoseconds. + Weight::from_ref_time(924_450_107) + // Standard Error: 58_953 + .saturating_add(Weight::from_ref_time(4_923_031).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - /// The range of component `n` is `[1, 64]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + /// The range of component `n` is `[0, 64]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - Weight::from_ref_time(89_749_000 as u64) - // Standard Error: 28_000 - .saturating_add(Weight::from_ref_time(19_776_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64))) + // Minimum execution time: 77_615 nanoseconds. + Weight::from_ref_time(91_849_000) + // Standard Error: 29_974 + .saturating_add(Weight::from_ref_time(20_052_379).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:2) + // Storage: Staking Bonded (r:1 w:0) + // Storage: Staking Ledger (r:1 w:1) // Storage: Staking ErasStakersClipped (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:0) // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Balances Locks (r:2 w:2) - /// The range of component `n` is `[1, 64]`. + // Storage: Staking Payee (r:1 w:0) + // Storage: System Account (r:1 w:1) + // Storage: Balances Locks (r:1 w:1) + /// The range of component `n` is `[0, 64]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - Weight::from_ref_time(111_065_000 as u64) - // Standard Error: 32_000 - .saturating_add(Weight::from_ref_time(26_426_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(n as u64))) + // Minimum execution time: 90_513 nanoseconds. + Weight::from_ref_time(115_255_437) + // Standard Error: 29_960 + .saturating_add(Weight::from_ref_time(27_135_740).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -291,11 +314,12 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - Weight::from_ref_time(80_083_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(13_000 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 82_630 nanoseconds. + Weight::from_ref_time(83_204_882) + // Standard Error: 22_390 + .saturating_add(Weight::from_ref_time(122_845).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -312,15 +336,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - Weight::from_ref_time(81_279_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(843_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 82_488 nanoseconds. + Weight::from_ref_time(84_514_448) + // Standard Error: 2_464 + .saturating_add(Weight::from_ref_time(922_810).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) // Storage: VoterList ListBags (r:178 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) @@ -332,28 +356,28 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking ValidatorCount (r:1 w:0) // Storage: Staking MinimumValidatorCount (r:1 w:0) // Storage: Staking CurrentEra (r:1 w:1) - // Storage: Staking HistoryDepth (r:1 w:0) // Storage: Staking ErasStakersClipped (r:0 w:1) // Storage: Staking ErasValidatorPrefs (r:0 w:1) // Storage: Staking ErasStakers (r:0 w:1) // Storage: Staking ErasTotalStake (r:0 w:1) // Storage: Staking ErasStartSessionIndex (r:0 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[1, 10]`. - /// The range of component `n` is `[1, 100]`. + /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 709_000 - .saturating_add(Weight::from_ref_time(178_570_000 as u64).saturating_mul(v as u64)) - // Standard Error: 68_000 - .saturating_add(Weight::from_ref_time(24_156_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(187 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Minimum execution time: 441_729 nanoseconds. + Weight::from_ref_time(443_065_000) + // Standard Error: 1_706_307 + .saturating_add(Weight::from_ref_time(56_054_739).saturating_mul(v.into())) + // Standard Error: 170_024 + .saturating_add(Weight::from_ref_time(12_968_442).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(185)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:21 w:0) // Storage: VoterList ListBags (r:178 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) @@ -361,33 +385,33 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) + // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. - /// The range of component `s` is `[1, 20]`. - fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 378_000 - .saturating_add(Weight::from_ref_time(36_021_000 as u64).saturating_mul(v as u64)) - // Standard Error: 378_000 - .saturating_add(Weight::from_ref_time(34_834_000 as u64).saturating_mul(n as u64)) - // Standard Error: 9_659_000 - .saturating_add(Weight::from_ref_time(52_904_000 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(181 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Minimum execution time: 25_152_628 nanoseconds. + Weight::from_ref_time(25_317_200_000) + // Standard Error: 594_512 + .saturating_add(Weight::from_ref_time(6_190_157).saturating_mul(v.into())) + // Standard Error: 594_512 + .saturating_add(Weight::from_ref_time(3_302_412).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(180)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) } + // Storage: Staking CounterForValidators (r:1 w:0) // Storage: Staking Validators (r:501 w:0) // Storage: System BlockWeight (r:1 w:1) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(6_515_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 3_621_768 nanoseconds. + Weight::from_ref_time(3_647_367_000) + // Standard Error: 42_035 + .saturating_add(Weight::from_ref_time(2_772_156).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -396,8 +420,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - Weight::from_ref_time(7_514_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 8_259 nanoseconds. + Weight::from_ref_time(8_629_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -406,8 +431,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - Weight::from_ref_time(7_012_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 7_335 nanoseconds. + Weight::from_ref_time(7_594_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -420,15 +446,23 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - Weight::from_ref_time(67_858_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 69_559 nanoseconds. + Weight::from_ref_time(70_363_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - Weight::from_ref_time(15_301_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 15_447 nanoseconds. + Weight::from_ref_time(15_760_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: Staking MinCommission (r:0 w:1) + fn set_min_commission() -> Weight { + // Minimum execution time: 4_793 nanoseconds. + Weight::from_ref_time(4_929_000) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/westend/src/weights/pallet_timestamp.rs b/runtime/westend/src/weights/pallet_timestamp.rs index ba2cce1c5981..141e2f3d924b 100644 --- a/runtime/westend/src/weights/pallet_timestamp.rs +++ b/runtime/westend/src/weights/pallet_timestamp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_timestamp`. @@ -47,11 +47,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - Weight::from_ref_time(9_508_000 as u64) + // Minimum execution time: 10_153 nanoseconds. + Weight::from_ref_time(10_579_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(3_854_000 as u64) + // Minimum execution time: 4_289 nanoseconds. + Weight::from_ref_time(4_440_000 as u64) } } diff --git a/runtime/westend/src/weights/pallet_utility.rs b/runtime/westend/src/weights/pallet_utility.rs index 5c89f6ccf59d..205e762f1957 100644 --- a/runtime/westend/src/weights/pallet_utility.rs +++ b/runtime/westend/src/weights/pallet_utility.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_utility`. @@ -46,26 +46,31 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(17_234_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_441_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 12_032 nanoseconds. + Weight::from_ref_time(19_173_385 as u64) + // Standard Error: 2_090 + .saturating_add(Weight::from_ref_time(3_609_818 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - Weight::from_ref_time(5_955_000 as u64) + // Minimum execution time: 6_100 nanoseconds. + Weight::from_ref_time(6_336_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(19_475_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(3_560_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 12_371 nanoseconds. + Weight::from_ref_time(21_670_546 as u64) + // Standard Error: 2_316 + .saturating_add(Weight::from_ref_time(3_762_013 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(13_475_000 as u64) + // Minimum execution time: 14_279 nanoseconds. + Weight::from_ref_time(14_621_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(22_544_000 as u64) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(3_402_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 12_028 nanoseconds. + Weight::from_ref_time(16_767_678 as u64) + // Standard Error: 2_024 + .saturating_add(Weight::from_ref_time(3_599_663 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index bf003d9799fb..378870a875be 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_vesting`. @@ -49,11 +49,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_233_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(49_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_501 nanoseconds. + Weight::from_ref_time(38_586_050 as u64) + // Standard Error: 1_079 + .saturating_add(Weight::from_ref_time(45_077 as u64).saturating_mul(l as u64)) + // Standard Error: 1_921 + .saturating_add(Weight::from_ref_time(80_116 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,11 +63,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_218_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(36_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(75_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_157 nanoseconds. + Weight::from_ref_time(38_714_147 as u64) + // Standard Error: 1_129 + .saturating_add(Weight::from_ref_time(40_680 as u64).saturating_mul(l as u64)) + // Standard Error: 2_009 + .saturating_add(Weight::from_ref_time(49_307 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -76,11 +78,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_094_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(44_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(88_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_619 nanoseconds. + Weight::from_ref_time(38_312_074 as u64) + // Standard Error: 1_578 + .saturating_add(Weight::from_ref_time(52_122 as u64).saturating_mul(l as u64)) + // Standard Error: 2_808 + .saturating_add(Weight::from_ref_time(84_812 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -90,11 +93,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(34_979_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(48_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 39_176 nanoseconds. + Weight::from_ref_time(39_030_642 as u64) + // Standard Error: 1_123 + .saturating_add(Weight::from_ref_time(27_844 as u64).saturating_mul(l as u64)) + // Standard Error: 1_999 + .saturating_add(Weight::from_ref_time(52_163 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -104,11 +108,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(49_327_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(37_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(70_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 53_466 nanoseconds. + Weight::from_ref_time(53_598_494 as u64) + // Standard Error: 2_075 + .saturating_add(Weight::from_ref_time(36_845 as u64).saturating_mul(l as u64)) + // Standard Error: 3_693 + .saturating_add(Weight::from_ref_time(54_899 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -118,11 +123,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(48_465_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(42_000 as u64).saturating_mul(l as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(86_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 52_321 nanoseconds. + Weight::from_ref_time(52_787_334 as u64) + // Standard Error: 2_039 + .saturating_add(Weight::from_ref_time(40_228 as u64).saturating_mul(l as u64)) + // Standard Error: 3_628 + .saturating_add(Weight::from_ref_time(47_740 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -132,11 +138,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_787_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(49_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 40_321 nanoseconds. + Weight::from_ref_time(39_633_306 as u64) + // Standard Error: 1_202 + .saturating_add(Weight::from_ref_time(47_105 as u64).saturating_mul(l as u64)) + // Standard Error: 2_220 + .saturating_add(Weight::from_ref_time(79_753 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -146,11 +153,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - Weight::from_ref_time(35_807_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(47_000 as u64).saturating_mul(l as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 40_633 nanoseconds. + Weight::from_ref_time(39_553_977 as u64) + // Standard Error: 1_166 + .saturating_add(Weight::from_ref_time(49_075 as u64).saturating_mul(l as u64)) + // Standard Error: 2_153 + .saturating_add(Weight::from_ref_time(74_630 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/westend/src/weights/runtime_common_auctions.rs b/runtime/westend/src/weights/runtime_common_auctions.rs index 30fe377312d9..088f365e7986 100644 --- a/runtime/westend/src/weights/runtime_common_auctions.rs +++ b/runtime/westend/src/weights/runtime_common_auctions.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::auctions`. @@ -47,7 +47,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - Weight::from_ref_time(17_108_000 as u64) + // Minimum execution time: 17_288 nanoseconds. + Weight::from_ref_time(17_985_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,7 +60,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - Weight::from_ref_time(70_333_000 as u64) + // Minimum execution time: 73_535 nanoseconds. + Weight::from_ref_time(75_064_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -76,7 +78,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - Weight::from_ref_time(15_569_290_000 as u64) + // Minimum execution time: 15_672_246 nanoseconds. + Weight::from_ref_time(16_047_763_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - Weight::from_ref_time(4_675_785_000 as u64) + // Minimum execution time: 4_654_031 nanoseconds. + Weight::from_ref_time(4_736_028_000 as u64) .saturating_add(T::DbWeight::get().reads(73 as u64)) .saturating_add(T::DbWeight::get().writes(3673 as u64)) } diff --git a/runtime/westend/src/weights/runtime_common_crowdloan.rs b/runtime/westend/src/weights/runtime_common_crowdloan.rs index d569e9696e91..7ff12034a1f0 100644 --- a/runtime/westend/src/weights/runtime_common_crowdloan.rs +++ b/runtime/westend/src/weights/runtime_common_crowdloan.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::crowdloan`. @@ -49,7 +49,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(46_894_000 as u64) + // Minimum execution time: 49_547 nanoseconds. + Weight::from_ref_time(51_304_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -61,7 +62,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - Weight::from_ref_time(113_396_000 as u64) + // Minimum execution time: 115_314 nanoseconds. + Weight::from_ref_time(116_381_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -69,16 +71,18 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(52_598_000 as u64) + // Minimum execution time: 55_447 nanoseconds. + Weight::from_ref_time(56_653_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `k` is `[0, 500]`. fn refund(k: u32, ) -> Weight { - Weight::from_ref_time(19_773_000 as u64) - // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(17_083_000 as u64).saturating_mul(k as u64)) + // Minimum execution time: 47_461 nanoseconds. + Weight::from_ref_time(12_852_340 as u64) + // Standard Error: 11_221 + .saturating_add(Weight::from_ref_time(17_750_477 as u64).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -87,27 +91,31 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - Weight::from_ref_time(36_019_000 as u64) + // Minimum execution time: 37_208 nanoseconds. + Weight::from_ref_time(38_133_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloan Funds (r:1 w:1) fn edit() -> Weight { - Weight::from_ref_time(24_837_000 as u64) + // Minimum execution time: 26_446 nanoseconds. + Weight::from_ref_time(27_193_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn add_memo() -> Weight { - Weight::from_ref_time(31_340_000 as u64) + // Minimum execution time: 33_570 nanoseconds. + Weight::from_ref_time(34_862_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Funds (r:1 w:0) // Storage: Crowdloan NewRaise (r:1 w:1) fn poke() -> Weight { - Weight::from_ref_time(25_223_000 as u64) + // Minimum execution time: 26_059 nanoseconds. + Weight::from_ref_time(27_073_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,9 +131,10 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) /// The range of component `n` is `[2, 100]`. fn on_initialize(n: u32, ) -> Weight { - Weight::from_ref_time(18_538_000 as u64) - // Standard Error: 36_000 - .saturating_add(Weight::from_ref_time(39_321_000 as u64).saturating_mul(n as u64)) + // Minimum execution time: 103_883 nanoseconds. + Weight::from_ref_time(14_102_173 as u64) + // Standard Error: 25_076 + .saturating_add(Weight::from_ref_time(40_977_126 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/westend/src/weights/runtime_common_paras_registrar.rs b/runtime/westend/src/weights/runtime_common_paras_registrar.rs index e52924381cd7..990173341004 100644 --- a/runtime/westend/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/westend/src/weights/runtime_common_paras_registrar.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::paras_registrar`. @@ -48,7 +48,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - Weight::from_ref_time(30_965_000 as u64) + // Minimum execution time: 33_216 nanoseconds. + Weight::from_ref_time(33_774_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,7 +63,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - Weight::from_ref_time(7_411_024_000 as u64) + // Minimum execution time: 7_610_660 nanoseconds. + Weight::from_ref_time(7_680_278_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -76,7 +78,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - Weight::from_ref_time(7_355_259_000 as u64) + // Minimum execution time: 7_576_126 nanoseconds. + Weight::from_ref_time(7_632_431_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -87,7 +90,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - Weight::from_ref_time(48_776_000 as u64) + // Minimum execution time: 49_734 nanoseconds. + Weight::from_ref_time(50_945_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -99,11 +103,13 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Crowdloan Funds (r:2 w:2) // Storage: Slots Leases (r:2 w:2) fn swap() -> Weight { - Weight::from_ref_time(42_830_000 as u64) + // Minimum execution time: 44_434 nanoseconds. + Weight::from_ref_time(45_553_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) + // Storage: Paras UpgradeRestrictionSignal (r:1 w:1) // Storage: Paras CurrentCodeHash (r:1 w:0) // Storage: Paras UpgradeCooldowns (r:1 w:1) // Storage: Paras PvfActiveVoteMap (r:1 w:0) @@ -112,19 +118,22 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: System Digest (r:1 w:1) // Storage: Paras CodeByHashRefs (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:1) - // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) + /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Minimum execution time: 42_971 nanoseconds. + Weight::from_ref_time(43_456_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_366 as u64).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Paras Heads (r:0 w:1) + /// The range of component `b` is `[1, 1048576]`. fn set_current_head(b: u32, ) -> Weight { - Weight::from_ref_time(5_494_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) + // Minimum execution time: 13_894 nanoseconds. + Weight::from_ref_time(14_187_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(958 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/westend/src/weights/runtime_common_slots.rs b/runtime/westend/src/weights/runtime_common_slots.rs index bd2cf35258bb..6f13925773f1 100644 --- a/runtime/westend/src/weights/runtime_common_slots.rs +++ b/runtime/westend/src/weights/runtime_common_slots.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_common::slots`. @@ -47,7 +47,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(30_227_000 as u64) + // Minimum execution time: 31_957 nanoseconds. + Weight::from_ref_time(32_370_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,11 +61,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(5_902_000 as u64).saturating_mul(c as u64)) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(15_585_000 as u64).saturating_mul(t as u64)) + // Minimum execution time: 555_630 nanoseconds. + Weight::from_ref_time(559_259_000 as u64) + // Standard Error: 69_842 + .saturating_add(Weight::from_ref_time(2_031_472 as u64).saturating_mul(c as u64)) + // Standard Error: 69_842 + .saturating_add(Weight::from_ref_time(11_996_760 as u64).saturating_mul(t as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(t as u64))) @@ -75,7 +77,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(91_801_000 as u64) + // Minimum execution time: 94_359 nanoseconds. + Weight::from_ref_time(95_058_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -85,7 +88,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - Weight::from_ref_time(28_756_000 as u64) + // Minimum execution time: 29_605 nanoseconds. + Weight::from_ref_time(31_180_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/westend/src/weights/runtime_parachains_configuration.rs b/runtime/westend/src/weights/runtime_parachains_configuration.rs index 3d7021f73da9..21ffcbe3ab3e 100644 --- a/runtime/westend/src/weights/runtime_parachains_configuration.rs +++ b/runtime/westend/src/weights/runtime_parachains_configuration.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::configuration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::configuration`. @@ -48,7 +48,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - Weight::from_ref_time(11_077_000 as u64) + // Minimum execution time: 12_337 nanoseconds. + Weight::from_ref_time(12_771_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -56,7 +57,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - Weight::from_ref_time(11_628_000 as u64) + // Minimum execution time: 12_317 nanoseconds. + Weight::from_ref_time(13_005_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -64,7 +66,8 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - Weight::from_ref_time(11_476_000 as u64) + // Minimum execution time: 12_566 nanoseconds. + Weight::from_ref_time(13_063_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -72,19 +75,22 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_weight() -> Weight { - Weight::from_ref_time(11_361_000 as u64) + // Minimum execution time: 12_626 nanoseconds. + Weight::from_ref_time(12_946_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Benchmark Override (r:0 w:0) fn set_hrmp_open_request_ttl() -> Weight { + // Minimum execution time: 2_000_000_000 nanoseconds. Weight::from_ref_time(2_000_000_000_000 as u64) } // Storage: Configuration PendingConfigs (r:1 w:1) // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - Weight::from_ref_time(11_601_000 as u64) + // Minimum execution time: 12_697 nanoseconds. + Weight::from_ref_time(13_051_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/runtime_parachains_disputes.rs b/runtime/westend/src/weights/runtime_parachains_disputes.rs index 85090f4ed620..fe983117b01b 100644 --- a/runtime/westend/src/weights/runtime_parachains_disputes.rs +++ b/runtime/westend/src/weights/runtime_parachains_disputes.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::disputes` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::disputes`. @@ -46,7 +46,8 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - Weight::from_ref_time(4_357_000 as u64) + // Minimum execution time: 4_805 nanoseconds. + Weight::from_ref_time(5_035_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs b/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs index 868be3969728..97780dd04c88 100644 --- a/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs +++ b/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs @@ -16,22 +16,21 @@ //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/production/polkadot // benchmark // pallet +// --chain=westend-dev // --steps=50 // --repeat=20 +// --pallet=runtime_parachains::disputes::slashing // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --pallet=runtime_parachains::disputes::slashing -// --chain=westend-dev // --header=./file_header.txt // --output=./runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs @@ -49,8 +48,6 @@ impl runtime_parachains::disputes::slashing::WeightInfo // Storage: Historical HistoricalSessions (r:1 w:0) // Storage: ParaSessionInfo Sessions (r:1 w:0) // Storage: ParasSlashing UnappliedSlashes (r:1 w:1) - // Storage: Authorship Author (r:1 w:0) - // Storage: System Digest (r:1 w:0) // Storage: Offences ReportsByKindIndex (r:1 w:1) // Storage: Offences ConcurrentReportsIndex (r:1 w:1) // Storage: Offences Reports (r:1 w:1) @@ -61,10 +58,11 @@ impl runtime_parachains::disputes::slashing::WeightInfo // Storage: Staking ValidatorSlashInEra (r:1 w:0) /// The range of component `n` is `[4, 300]`. fn report_dispute_lost(n: u32, ) -> Weight { - Weight::from_ref_time(97_366_000 as u64) - // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(467_000 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + // Minimum execution time: 86_641 nanoseconds. + Weight::from_ref_time(100_448_901 as u64) + // Standard Error: 2_909 + .saturating_add(Weight::from_ref_time(237_873 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/westend/src/weights/runtime_parachains_hrmp.rs b/runtime/westend/src/weights/runtime_parachains_hrmp.rs index 5cb4754daa02..b0104b86148a 100644 --- a/runtime/westend/src/weights/runtime_parachains_hrmp.rs +++ b/runtime/westend/src/weights/runtime_parachains_hrmp.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::hrmp`. @@ -53,7 +53,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - Weight::from_ref_time(38_897_000 as u64) + // Minimum execution time: 42_236 nanoseconds. + Weight::from_ref_time(42_643_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -64,7 +65,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - Weight::from_ref_time(38_657_000 as u64) + // Minimum execution time: 42_348 nanoseconds. + Weight::from_ref_time(45_358_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -74,7 +76,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - Weight::from_ref_time(35_977_000 as u64) + // Minimum execution time: 44_696 nanoseconds. + Weight::from_ref_time(46_077_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -87,11 +90,12 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `i` is `[0, 127]`. /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(7_277_000 as u64).saturating_mul(i as u64)) - // Standard Error: 15_000 - .saturating_add(Weight::from_ref_time(7_283_000 as u64).saturating_mul(e as u64)) + // Minimum execution time: 867_905 nanoseconds. + Weight::from_ref_time(871_643_000 as u64) + // Standard Error: 80_060 + .saturating_add(Weight::from_ref_time(2_666_207 as u64).saturating_mul(i as u64)) + // Standard Error: 80_060 + .saturating_add(Weight::from_ref_time(2_737_378 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(e as u64))) @@ -109,9 +113,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannels (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { - Weight::from_ref_time(4_112_000 as u64) - // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(15_678_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 10_127 nanoseconds. + Weight::from_ref_time(465_403 as u64) + // Standard Error: 13_887 + .saturating_add(Weight::from_ref_time(15_736_845 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((7 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -125,9 +130,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpChannelContents (r:0 w:2) /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(9_674_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 6_473 nanoseconds. + Weight::from_ref_time(335_647 as u64) + // Standard Error: 11_098 + .saturating_add(Weight::from_ref_time(9_684_287 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -138,9 +144,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1) /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { - Weight::from_ref_time(29_660_000 as u64) - // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(89_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 25_408 nanoseconds. + Weight::from_ref_time(31_410_214 as u64) + // Standard Error: 1_341 + .saturating_add(Weight::from_ref_time(97_088 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,9 +155,10 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2) /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { - Weight::from_ref_time(843_000 as u64) - // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_591_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 4_587 nanoseconds. + Weight::from_ref_time(3_141_418 as u64) + // Standard Error: 4_136 + .saturating_add(Weight::from_ref_time(2_571_806 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -167,7 +175,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0) // Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1) fn force_open_hrmp_channel() -> Weight { - Weight::from_ref_time(104_771_000 as u64) + // Minimum execution time: 52_246 nanoseconds. + Weight::from_ref_time(52_759_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } diff --git a/runtime/westend/src/weights/runtime_parachains_initializer.rs b/runtime/westend/src/weights/runtime_parachains_initializer.rs index a7d569364b07..be7737424cbf 100644 --- a/runtime/westend/src/weights/runtime_parachains_initializer.rs +++ b/runtime/westend/src/weights/runtime_parachains_initializer.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::initializer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::initializer`. @@ -47,9 +47,10 @@ impl runtime_parachains::initializer::WeightInfo for We // Storage: System Digest (r:1 w:1) /// The range of component `d` is `[0, 65536]`. fn force_approve(d: u32, ) -> Weight { - Weight::from_ref_time(10_816_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(d as u64)) + // Minimum execution time: 8_409 nanoseconds. + Weight::from_ref_time(11_270_686 as u64) + // Standard Error: 4 + .saturating_add(Weight::from_ref_time(1_294 as u64).saturating_mul(d as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/westend/src/weights/runtime_parachains_paras.rs b/runtime/westend/src/weights/runtime_parachains_paras.rs index 62de4f872ba9..58336118c946 100644 --- a/runtime/westend/src/weights/runtime_parachains_paras.rs +++ b/runtime/westend/src/weights/runtime_parachains_paras.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras`. @@ -52,18 +52,20 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_set_current_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 38_715 nanoseconds. + Weight::from_ref_time(38_929_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_347 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Paras Heads (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_set_current_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 13_799 nanoseconds. + Weight::from_ref_time(14_046_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(957 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) @@ -78,9 +80,10 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 64_410 nanoseconds. + Weight::from_ref_time(64_726_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_381 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -89,16 +92,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `s` is `[1, 1048576]`. fn force_note_new_head(s: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 19_973 nanoseconds. + Weight::from_ref_time(20_282_000 as u64) + // Standard Error: 2 + .saturating_add(Weight::from_ref_time(959 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras ActionsQueue (r:1 w:1) fn force_queue_action() -> Weight { - Weight::from_ref_time(23_089_000 as u64) + // Minimum execution time: 24_774 nanoseconds. + Weight::from_ref_time(25_196_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -106,16 +111,18 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CodeByHash (r:1 w:1) /// The range of component `c` is `[1, 3145728]`. fn add_trusted_validation_code(c: u32, ) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(c as u64)) + // Minimum execution time: 9_323 nanoseconds. + Weight::from_ref_time(9_449_000 as u64) + // Standard Error: 1 + .saturating_add(Weight::from_ref_time(2_358 as u64).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras CodeByHashRefs (r:1 w:0) // Storage: Paras CodeByHash (r:0 w:1) fn poke_unused_validation_code() -> Weight { - Weight::from_ref_time(6_855_000 as u64) + // Minimum execution time: 7_298 nanoseconds. + Weight::from_ref_time(7_449_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,7 +130,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - Weight::from_ref_time(92_275_000 as u64) + // Minimum execution time: 93_045 nanoseconds. + Weight::from_ref_time(94_976_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -135,7 +143,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - Weight::from_ref_time(637_301_000 as u64) + // Minimum execution time: 642_157 nanoseconds. + Weight::from_ref_time(646_001_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -148,7 +157,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - Weight::from_ref_time(602_283_000 as u64) + // Minimum execution time: 590_509 nanoseconds. + Weight::from_ref_time(593_930_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -158,7 +168,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - Weight::from_ref_time(509_697_000 as u64) + // Minimum execution time: 494_553 nanoseconds. + Weight::from_ref_time(499_464_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -172,7 +183,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - Weight::from_ref_time(678_895_000 as u64) + // Minimum execution time: 657_723 nanoseconds. + Weight::from_ref_time(664_673_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(304 as u64)) } diff --git a/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs b/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs index 176213574750..f48eac260b0e 100644 --- a/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs +++ b/runtime/westend/src/weights/runtime_parachains_paras_inherent.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::paras_inherent` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::paras_inherent`. @@ -53,14 +53,15 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParasDisputes Included (r:1 w:1) // Storage: ParasDisputes SpamSlots (r:1 w:1) // Storage: ParaScheduler AvailabilityCores (r:1 w:1) + // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) + // Storage: Staking ActiveEra (r:1 w:0) + // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: ParasDisputes Frozen (r:1 w:0) // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParasShared ActiveValidatorKeys (r:1 w:0) // Storage: Paras Parachains (r:1 w:0) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) - // Storage: ParaSessionInfo AccountKeys (r:1 w:0) - // Storage: Staking ActiveEra (r:1 w:0) - // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) // Storage: Hrmp HrmpChannelDigests (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:1 w:0) @@ -74,12 +75,15 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) + // Storage: Session CurrentIndex (r:1 w:0) + // Storage: ParasSlashing UnappliedSlashes (r:0 w:1) /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { - Weight::from_ref_time(324_637_000 as u64) - // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(48_505_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(28 as u64)) + // Minimum execution time: 821_332 nanoseconds. + Weight::from_ref_time(359_810_525 as u64) + // Standard Error: 18_715 + .saturating_add(Weight::from_ref_time(47_648_405 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -93,6 +97,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -112,8 +117,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - Weight::from_ref_time(319_428_000 as u64) - .saturating_add(T::DbWeight::get().reads(25 as u64)) + // Minimum execution time: 339_897 nanoseconds. + Weight::from_ref_time(345_687_000 as u64) + .saturating_add(T::DbWeight::get().reads(26 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -127,6 +133,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -148,10 +155,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { - Weight::from_ref_time(873_724_000 as u64) - // Standard Error: 49_000 - .saturating_add(Weight::from_ref_time(47_930_000 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(28 as u64)) + // Minimum execution time: 5_636_363 nanoseconds. + Weight::from_ref_time(904_039_610 as u64) + // Standard Error: 47_739 + .saturating_add(Weight::from_ref_time(47_290_716 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -165,6 +173,7 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: ParaInclusion PendingAvailability (r:2 w:1) // Storage: ParaInclusion PendingAvailabilityCommitments (r:1 w:1) // Storage: ParaSessionInfo AccountKeys (r:1 w:0) + // Storage: Session Validators (r:1 w:0) // Storage: Staking ActiveEra (r:1 w:0) // Storage: Staking ErasRewardPoints (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) @@ -187,8 +196,9 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - Weight::from_ref_time(37_417_873_000 as u64) - .saturating_add(T::DbWeight::get().reads(30 as u64)) + // Minimum execution time: 39_347_863 nanoseconds. + Weight::from_ref_time(39_581_368_000 as u64) + .saturating_add(T::DbWeight::get().reads(31 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } } diff --git a/runtime/westend/src/weights/runtime_parachains_ump.rs b/runtime/westend/src/weights/runtime_parachains_ump.rs index 887be07dd4b8..6afe1a8685dc 100644 --- a/runtime/westend/src/weights/runtime_parachains_ump.rs +++ b/runtime/westend/src/weights/runtime_parachains_ump.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for `runtime_parachains::ump` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `runtime_parachains::ump`. @@ -46,22 +46,25 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::ump::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 51200]`. fn process_upward_message(s: u32, ) -> Weight { - Weight::from_ref_time(4_124_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + // Minimum execution time: 10_921 nanoseconds. + Weight::from_ref_time(5_417_303 as u64) + // Standard Error: 13 + .saturating_add(Weight::from_ref_time(1_939 as u64).saturating_mul(s as u64)) } // Storage: Ump NeedsDispatch (r:1 w:1) // Storage: Ump NextDispatchRoundStartWith (r:1 w:1) // Storage: Ump RelayDispatchQueues (r:0 w:1) // Storage: Ump RelayDispatchQueueSize (r:0 w:1) fn clean_ump_after_outgoing() -> Weight { - Weight::from_ref_time(8_684_000 as u64) + // Minimum execution time: 9_499 nanoseconds. + Weight::from_ref_time(9_800_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Ump Overweight (r:1 w:1) fn service_overweight() -> Weight { - Weight::from_ref_time(23_672_000 as u64) + // Minimum execution time: 26_656 nanoseconds. + Weight::from_ref_time(27_122_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/scripts/ci/gitlab/lingua.dic b/scripts/ci/gitlab/lingua.dic index 3a19233a8fb9..a2f64af1cbd6 100644 --- a/scripts/ci/gitlab/lingua.dic +++ b/scripts/ci/gitlab/lingua.dic @@ -209,6 +209,7 @@ preconfigured preimage/MS preopen prepend/G +prevalidating prevalidation preverify/G programmatically diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index c6fe5916c3b6..c1ec964e96b2 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -22,7 +22,6 @@ build-linux-stable: RUN_UI_TESTS: 1 script: - time cargo build --profile testnet --features pyroscope --verbose --bin polkadot - - sccache -s # pack artifacts - mkdir -p ./artifacts - VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name @@ -54,9 +53,11 @@ check-transaction-versions: - npm install --ignore-scripts -g @polkadot/metadata-cmp # Set git config - git config remote.origin.url "https://github.com/paritytech/polkadot.git" - - git fetch origin release + # - git fetch origin release script: - ./scripts/ci/gitlab/check_extrinsics_ordering.sh + # TODO: fixme, more info https://github.com/paritytech/polkadot/issues/6422 + allow_failure: true build-test-collators: stage: build @@ -73,7 +74,6 @@ build-test-collators: script: - time cargo build --profile testnet --verbose -p test-parachain-adder-collator - time cargo build --profile testnet --verbose -p test-parachain-undying-collator - - sccache -s # pack artifacts - mkdir -p ./artifacts - mv ./target/testnet/adder-collator ./artifacts/. @@ -98,7 +98,6 @@ build-malus: - .collect-artifacts script: - time cargo build --profile testnet --verbose -p polkadot-test-malus - - sccache -s # pack artifacts - mkdir -p ./artifacts - mv ./target/testnet/malus ./artifacts/. @@ -165,17 +164,18 @@ build-implementers-guide: - job: test-deterministic-wasm artifacts: false extends: - - .docker-env + - .kubernetes-env - .test-refs - .collect-artifacts-short + # git depth is set on purpose: https://github.com/paritytech/polkadot/issues/6284 + variables: + GIT_STRATEGY: clone + GIT_DEPTH: 0 + CI_IMAGE: paritytech/mdbook-utils:e14aae4a-20221123 script: - - apt-get -y update; apt-get install -y graphviz - - cargo install mdbook mdbook-mermaid mdbook-linkcheck mdbook-graphviz mdbook-last-changed - mdbook build ./roadmap/implementers-guide - mkdir -p artifacts - mv roadmap/implementers-guide/book artifacts/ - # FIXME: remove me after CI image gets nonroot - - chown -R nonroot:nonroot artifacts/ build-short-benchmark: stage: build diff --git a/scripts/ci/gitlab/pipeline/check.yml b/scripts/ci/gitlab/pipeline/check.yml index 0e435d604821..19d4bfcededf 100644 --- a/scripts/ci/gitlab/pipeline/check.yml +++ b/scripts/ci/gitlab/pipeline/check.yml @@ -51,8 +51,8 @@ check-try-runtime: - cargo check --features try-runtime --all # More info can be found here: https://github.com/paritytech/polkadot/pull/5865 -# Works only in PRs -check-runtime-migration: +# Works only in PRs with E1 label +.check-runtime-migration: stage: check extends: - .docker-env @@ -62,15 +62,51 @@ check-runtime-migration: - | export has_runtimemigration_label=$(curl -sS -H "Accept: application/vnd.github+json" \ -H "Authorization: token $GITHUB_PR_TOKEN" \ - https://api.github.com/repos/paritytech/polkadot/issues/$CI_COMMIT_REF_NAME/labels | grep "E1" | wc -l) + https://api.github.com/repos/paritytech/polkadot/issues/$CI_COMMIT_REF_NAME/labels | grep "E0-runtime_migration" | wc -l) - | if [[ $has_runtimemigration_label != 0 ]]; then - echo "Found label runtimemigration. Running tests" + echo "Found label runtime_migration. Running tests" export RUST_LOG=remote-ext=debug,runtime=debug - time cargo test --release -p westend-runtime -p polkadot-runtime -p kusama-runtime --features try-runtime + echo "---------- Running try-runtime for ${NETWORK} ----------" + time cargo build --release -p "$NETWORK"-runtime + time cargo run --release --features try-runtime try-runtime \ + --runtime ./target/release/wbuild/"$NETWORK"-runtime/target/wasm32-unknown-unknown/release/"$NETWORK"_runtime.wasm \ + -lruntime=debug \ + --chain=${NETWORK}-dev \ + on-runtime-upgrade live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443 else - echo "runtimemigration label not found. Skipping" + echo "runtime_migration label not found. Skipping" fi + +check-runtime-migration-polkadot: + stage: check + extends: + - .docker-env + - .test-pr-refs + - .compiler-info + - .check-runtime-migration + variables: + NETWORK: "polkadot" + +check-runtime-migration-kusama: + stage: check + extends: + - .docker-env + - .test-pr-refs + - .compiler-info + - .check-runtime-migration + variables: + NETWORK: "kusama" + +check-runtime-migration-westend: + stage: check + extends: + - .docker-env + - .test-pr-refs + - .compiler-info + - .check-runtime-migration + variables: + NETWORK: "westend" allow_failure: true # is broken, need to fix diff --git a/scripts/ci/gitlab/pipeline/publish.yml b/scripts/ci/gitlab/pipeline/publish.yml index 12e087e188d1..3484fcae336e 100644 --- a/scripts/ci/gitlab/pipeline/publish.yml +++ b/scripts/ci/gitlab/pipeline/publish.yml @@ -7,6 +7,7 @@ publish-polkadot-debug-image: stage: publish extends: + - .kubernetes-env - .build-push-image rules: # Don't run when triggered from another pipeline @@ -18,6 +19,7 @@ publish-polkadot-debug-image: - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 variables: + CI_IMAGE: ${BUILDAH_IMAGE} GIT_STRATEGY: none DOCKER_USER: ${PARITYPR_USER} DOCKER_PASS: ${PARITYPR_PASS} @@ -42,9 +44,11 @@ publish-test-collators-image: # service image for Simnet stage: publish extends: + - .kubernetes-env - .build-push-image - .zombienet-refs variables: + CI_IMAGE: ${BUILDAH_IMAGE} GIT_STRATEGY: none DOCKER_USER: ${PARITYPR_USER} DOCKER_PASS: ${PARITYPR_PASS} @@ -68,9 +72,11 @@ publish-malus-image: # service image for Simnet stage: publish extends: + - .kubernetes-env - .build-push-image - .zombienet-refs variables: + CI_IMAGE: ${BUILDAH_IMAGE} GIT_STRATEGY: none DOCKER_USER: ${PARITYPR_USER} DOCKER_PASS: ${PARITYPR_PASS} @@ -93,9 +99,11 @@ publish-malus-image: publish-staking-miner-image: stage: publish extends: + - .kubernetes-env - .build-push-image - .publish-refs variables: + CI_IMAGE: ${BUILDAH_IMAGE} # scripts/ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile DOCKERFILE: ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile IMAGE_NAME: docker.io/paritytech/staking-miner @@ -114,8 +122,8 @@ publish-s3-release: needs: - job: build-linux-stable artifacts: true - image: paritytech/awscli:latest variables: + CI_IMAGE: paritytech/awscli:latest GIT_STRATEGY: none PREFIX: "builds/polkadot/${ARCH}-${DOCKER_OS}" rules: @@ -152,9 +160,8 @@ publish-rustdoc: stage: publish extends: - .kubernetes-env - image: paritytech/tools:latest variables: - GIT_DEPTH: 100 + CI_IMAGE: paritytech/tools:latest rules: - if: $CI_PIPELINE_SOURCE == "pipeline" when: never diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 9a3dd0270fbb..3a21a77d90f2 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -72,3 +72,18 @@ test-deterministic-wasm: - .compiler-info script: - ./scripts/ci/gitlab/test_deterministic_wasm.sh + +cargo-clippy: + stage: test + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + # the job can be found in check.yml + needs: + - job: job-starter + artifacts: false + variables: + RUSTY_CACHIER_TOOLCHAIN: nightly + extends: + - .docker-env + - .test-refs + script: + - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets diff --git a/src/main.rs b/src/main.rs index 14d62fbb9ad6..13c17df851f1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,11 @@ use color_eyre::eyre; +/// Global allocator. Changing it to another allocator will require changing +/// `memory_stats::MemoryAllocationTracker`. +#[global_allocator] +pub static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; + fn main() -> eyre::Result<()> { color_eyre::install()?; polkadot_cli::run()?; diff --git a/statement-table/Cargo.toml b/statement-table/Cargo.toml index 81b4be51c8e4..81f2f90e0998 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-statement-table" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } diff --git a/tests/benchmark_block.rs b/tests/benchmark_block.rs index ee68d43b2aa5..dc3b174599a9 100644 --- a/tests/benchmark_block.rs +++ b/tests/benchmark_block.rs @@ -32,7 +32,7 @@ use tempfile::tempdir; pub mod common; -static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; /// `benchmark block` works for all dev runtimes using the wasm executor. #[tokio::test] @@ -54,7 +54,7 @@ async fn build_chain(runtime: &str, base_path: &Path) -> Result<(), String> { let mut cmd = Command::new(cargo_bin("polkadot")) .stdout(process::Stdio::piped()) .stderr(process::Stdio::piped()) - .args(["--chain", &runtime, "--force-authoring", "--alice"]) + .args(["--chain", runtime, "--force-authoring", "--alice"]) .arg("-d") .arg(base_path) .arg("--no-hardware-benchmarks") @@ -77,7 +77,7 @@ async fn build_chain(runtime: &str, base_path: &Path) -> Result<(), String> { fn benchmark_block(runtime: &str, base_path: &Path, block: u32) -> Result<(), String> { // Invoke `benchmark block` with all options to make sure that they are valid. let status = Command::new(cargo_bin("polkadot")) - .args(["benchmark", "block", "--chain", &runtime]) + .args(["benchmark", "block", "--chain", runtime]) .arg("-d") .arg(base_path) .args(["--from", &block.to_string(), "--to", &block.to_string()]) diff --git a/tests/benchmark_extrinsic.rs b/tests/benchmark_extrinsic.rs index c112a8c023f8..79a7d4c45322 100644 --- a/tests/benchmark_extrinsic.rs +++ b/tests/benchmark_extrinsic.rs @@ -17,10 +17,9 @@ use assert_cmd::cargo::cargo_bin; use std::{process::Command, result::Result}; -static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; -static EXTRINSICS: [(&'static str, &'static str); 2] = - [("system", "remark"), ("balances", "transfer_keep_alive")]; +static EXTRINSICS: [(&str, &str); 2] = [("system", "remark"), ("balances", "transfer_keep_alive")]; /// `benchmark extrinsic` works for all dev runtimes and some extrinsics. #[test] @@ -43,8 +42,8 @@ fn benchmark_extrinsic_rejects_non_dev_runtimes() { fn benchmark_extrinsic(runtime: &str, pallet: &str, extrinsic: &str) -> Result<(), String> { let status = Command::new(cargo_bin("polkadot")) - .args(["benchmark", "extrinsic", "--chain", &runtime]) - .args(&["--pallet", pallet, "--extrinsic", extrinsic]) + .args(["benchmark", "extrinsic", "--chain", runtime]) + .args(["--pallet", pallet, "--extrinsic", extrinsic]) // Run with low repeats for faster execution. .args(["--repeat=1", "--warmup=1", "--max-ext-per-block=1"]) .status() diff --git a/tests/benchmark_overhead.rs b/tests/benchmark_overhead.rs index a3b4ed1160ea..10582870168e 100644 --- a/tests/benchmark_overhead.rs +++ b/tests/benchmark_overhead.rs @@ -18,7 +18,7 @@ use assert_cmd::cargo::cargo_bin; use std::{process::Command, result::Result}; use tempfile::tempdir; -static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; /// `benchmark overhead` works for all dev runtimes. #[test] diff --git a/tests/benchmark_storage_works.rs b/tests/benchmark_storage_works.rs index f5e2851f250f..7c9e40b9d0b9 100644 --- a/tests/benchmark_storage_works.rs +++ b/tests/benchmark_storage_works.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +#![cfg(feature = "runtime-benchmarks")] + use assert_cmd::cargo::cargo_bin; use std::{ path::Path, @@ -38,7 +40,7 @@ fn benchmark_storage_works() { /// Invoke the `benchmark storage` sub-command. fn benchmark_storage(db: &str, base_path: &Path) -> ExitStatus { Command::new(cargo_bin("polkadot")) - .args(&["benchmark", "storage", "--dev"]) + .args(["benchmark", "storage", "--dev"]) .arg("--db") .arg(db) .arg("--weight-path") diff --git a/tests/common.rs b/tests/common.rs index 3f040208972c..6a41975f87fa 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -91,11 +91,13 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) { // does the line contain our port (we expect this specific output from substrate). let sock_addr = match line.split_once("Running JSON-RPC WS server: addr=") { None => return None, - Some((_, after)) => after.split_once(",").unwrap().0, + Some((_, after)) => after.split_once(',').unwrap().0, }; Some(format!("ws://{}", sock_addr)) }) - .expect(&format!("Could not find WebSocket address in process output:\n{}", &data)); + .unwrap_or_else(|| { + panic!("Could not find WebSocket address in process output:\n{}", &data) + }); (ws_url, data) } diff --git a/tests/invalid_order_arguments.rs b/tests/invalid_order_arguments.rs index f205e935ab95..f8dc32a82a26 100644 --- a/tests/invalid_order_arguments.rs +++ b/tests/invalid_order_arguments.rs @@ -24,7 +24,7 @@ fn invalid_order_arguments() { let tmpdir = tempdir().expect("could not create temp dir"); let status = Command::new(cargo_bin("polkadot")) - .args(&["--dev", "invalid_order_arguments", "-d"]) + .args(["--dev", "invalid_order_arguments", "-d"]) .arg(tmpdir.path()) .arg("-y") .status() diff --git a/tests/purge_chain_works.rs b/tests/purge_chain_works.rs index c69d8cc4a81a..ab3ee506b60a 100644 --- a/tests/purge_chain_works.rs +++ b/tests/purge_chain_works.rs @@ -36,7 +36,7 @@ async fn purge_chain_rocksdb_works() { let mut cmd = Command::new(cargo_bin("polkadot")) .stdout(process::Stdio::piped()) .stderr(process::Stdio::piped()) - .args(&["--dev", "-d"]) + .args(["--dev", "-d"]) .arg(tmpdir.path()) .arg("--port") .arg("33034") @@ -61,7 +61,7 @@ async fn purge_chain_rocksdb_works() { // Purge chain let status = Command::new(cargo_bin("polkadot")) - .args(&["purge-chain", "--dev", "-d"]) + .args(["purge-chain", "--dev", "-d"]) .arg(tmpdir.path()) .arg("-y") .status() @@ -86,7 +86,7 @@ async fn purge_chain_paritydb_works() { let mut cmd = Command::new(cargo_bin("polkadot")) .stdout(process::Stdio::piped()) .stderr(process::Stdio::piped()) - .args(&["--dev", "-d"]) + .args(["--dev", "-d"]) .arg(tmpdir.path()) .arg("--database") .arg("paritydb-experimental") @@ -111,7 +111,7 @@ async fn purge_chain_paritydb_works() { // Purge chain let status = Command::new(cargo_bin("polkadot")) - .args(&["purge-chain", "--dev", "-d"]) + .args(["purge-chain", "--dev", "-d"]) .arg(tmpdir.path()) .arg("--database") .arg("paritydb-experimental") diff --git a/tests/running_the_node_and_interrupt.rs b/tests/running_the_node_and_interrupt.rs index 895db534bc5c..5b0e6ec8b013 100644 --- a/tests/running_the_node_and_interrupt.rs +++ b/tests/running_the_node_and_interrupt.rs @@ -40,7 +40,7 @@ async fn running_the_node_works_and_can_be_interrupted() { let mut cmd = Command::new(cargo_bin("polkadot")) .stdout(process::Stdio::piped()) .stderr(process::Stdio::piped()) - .args(&["--dev", "-d"]) + .args(["--dev", "-d"]) .arg(tmpdir.path()) .arg("--no-hardware-benchmarks") .spawn() diff --git a/utils/generate-bags/Cargo.toml b/utils/generate-bags/Cargo.toml index 8f2d8e79e1e5..2038dc94a1ea 100644 --- a/utils/generate-bags/Cargo.toml +++ b/utils/generate-bags/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-voter-bags" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] clap = { version = "4.0.9", features = ["derive"] } diff --git a/utils/remote-ext-tests/bags-list/Cargo.toml b/utils/remote-ext-tests/bags-list/Cargo.toml index 20dc36fd5385..d77d2017aab3 100644 --- a/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/utils/remote-ext-tests/bags-list/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "remote-ext-tests-bags-list" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] polkadot-runtime = { path = "../../../runtime/polkadot" } @@ -19,4 +19,4 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } clap = { version = "4.0.9", features = ["derive"] } log = "0.4.17" -tokio = { version = "1.19.2", features = ["macros"] } +tokio = { version = "1.22.0", features = ["macros"] } diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 45cb5fec6d1a..63810aaa2fd6 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -1,21 +1,21 @@ [package] name = "staking-miner" -version = "0.9.31" -authors = ["Parity Technologies "] -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } clap = { version = "4.0.9", features = ["derive", "env"] } tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } -jsonrpsee = { version = "0.15.1", features = ["ws-client", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["ws-client", "macros"] } log = "0.4.17" paste = "1.0.7" serde = "1.0.137" serde_json = "1.0" thiserror = "1.0.31" -tokio = { version = "1.19.2", features = ["macros", "rt-multi-thread", "sync"] } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } +tokio = { version = "1.22.0", features = ["macros", "rt-multi-thread", "sync"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 8c134874f297..84c57bc6d2e8 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -302,7 +302,7 @@ async fn create_election_ext( ) -> Result> where T: EPM::Config, - B: BlockT, + B: BlockT + DeserializeOwned, B::Header: DeserializeOwned, { use frame_support::{storage::generator::StorageMap, traits::PalletInfo}; @@ -317,13 +317,14 @@ where transport: client.into_inner().into(), at, pallets, + hashed_prefixes: vec![>::prefix_hash()], + hashed_keys: vec![[twox_128(b"System"), twox_128(b"Number")].concat()], ..Default::default() })) - .inject_hashed_prefix(&>::prefix_hash()) - .inject_hashed_key(&[twox_128(b"System"), twox_128(b"Number")].concat()) .build() .await .map_err(|why| Error::RemoteExternalities(why)) + .map(|rx| rx.inner_ext) } /// Compute the election. It expects to NOT be `Phase::Off`. In other words, the snapshot must diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 5a2e6813b0b4..4b653131b77b 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "xcm" -version = "0.9.31" -authors = ["Parity Technologies "] description = "The basic XCM datastructures." -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/xcm/pallet-xcm-benchmarks/Cargo.toml b/xcm/pallet-xcm-benchmarks/Cargo.toml index a4fd91004e66..0cbcba63bf43 100644 --- a/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "pallet-xcm-benchmarks" -authors = ["Parity Technologies "] -edition = "2021" -version = "0.9.31" +authors.workspace = true +edition.workspace = true +version.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/xcm/pallet-xcm/Cargo.toml b/xcm/pallet-xcm/Cargo.toml index a5b6ad7de395..4eb1c558b8ce 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -1,8 +1,9 @@ [package] -authors = ["Parity Technologies "] -edition = "2021" name = "pallet-xcm" -version = "0.9.31" +authors.workspace = true +edition.workspace = true +version.workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 78dc5087d960..3502c79b5d25 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -458,6 +458,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(100_000_000)] pub fn send( origin: OriginFor, @@ -493,6 +494,7 @@ pub mod pallet { /// `dest` side. May not be empty. /// - `fee_asset_item`: The index into `assets` of the item which should be used to pay /// fees. + #[pallet::call_index(1)] #[pallet::weight({ let maybe_assets: Result = (*assets.clone()).try_into(); let maybe_dest: Result = (*dest.clone()).try_into(); @@ -534,6 +536,7 @@ pub mod pallet { /// `dest` side. /// - `fee_asset_item`: The index into `assets` of the item which should be used to pay /// fees. + #[pallet::call_index(2)] #[pallet::weight({ match ((*assets.clone()).try_into(), (*dest.clone()).try_into()) { (Ok(assets), Ok(dest)) => { @@ -574,6 +577,7 @@ pub mod pallet { /// /// NOTE: A successful return to this does *not* imply that the `msg` was executed successfully /// to completion; only that *some* of it was executed. + #[pallet::call_index(3)] #[pallet::weight(Weight::from_ref_time(max_weight.saturating_add(100_000_000u64)))] pub fn execute( origin: OriginFor, @@ -602,6 +606,7 @@ pub mod pallet { /// - `origin`: Must be Root. /// - `location`: The destination that is being described. /// - `xcm_version`: The latest version of XCM that `location` supports. + #[pallet::call_index(4)] #[pallet::weight(100_000_000u64)] pub fn force_xcm_version( origin: OriginFor, @@ -624,6 +629,7 @@ pub mod pallet { /// /// - `origin`: Must be Root. /// - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + #[pallet::call_index(5)] #[pallet::weight(100_000_000u64)] pub fn force_default_xcm_version( origin: OriginFor, @@ -638,6 +644,7 @@ pub mod pallet { /// /// - `origin`: Must be Root. /// - `location`: The location to which we should subscribe for XCM version notifications. + #[pallet::call_index(6)] #[pallet::weight(100_000_000u64)] pub fn force_subscribe_version_notify( origin: OriginFor, @@ -661,6 +668,7 @@ pub mod pallet { /// - `origin`: Must be Root. /// - `location`: The location to which we are currently subscribed for XCM version /// notifications which we no longer desire. + #[pallet::call_index(7)] #[pallet::weight(100_000_000u64)] pub fn force_unsubscribe_version_notify( origin: OriginFor, @@ -696,6 +704,7 @@ pub mod pallet { /// - `fee_asset_item`: The index into `assets` of the item which should be used to pay /// fees. /// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + #[pallet::call_index(8)] #[pallet::weight({ match ((*assets.clone()).try_into(), (*dest.clone()).try_into()) { (Ok(assets), Ok(dest)) => { @@ -743,6 +752,7 @@ pub mod pallet { /// - `fee_asset_item`: The index into `assets` of the item which should be used to pay /// fees. /// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + #[pallet::call_index(9)] #[pallet::weight({ let maybe_assets: Result = (*assets.clone()).try_into(); let maybe_dest: Result = (*dest.clone()).try_into(); @@ -1517,6 +1527,19 @@ impl, Body: Get> Contains } } +/// Filter for `MultiLocation` to find those which represent a voice of an identified plurality. +/// +/// May reasonably be used with `EnsureXcm`. +pub struct IsVoiceOfBody(PhantomData<(Prefix, Body)>); +impl, Body: Get> Contains + for IsVoiceOfBody +{ + fn contains(l: &MultiLocation) -> bool { + let maybe_suffix = l.match_and_split(&Prefix::get()); + matches!(maybe_suffix, Some(Plurality { id, part }) if id == &Body::get() && part == &BodyPart::Voice) + } +} + /// `EnsureOrigin` implementation succeeding with a `MultiLocation` value to recognize and filter the /// `Origin::Xcm` item. pub struct EnsureXcm(PhantomData); diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index 7652a395b47b..10a04034862b 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -73,6 +73,7 @@ pub mod pallet_test_notifier { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(1_000_000)] pub fn prepare_new_query(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -87,6 +88,7 @@ pub mod pallet_test_notifier { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(1_000_000)] pub fn prepare_new_notify_query(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -104,6 +106,7 @@ pub mod pallet_test_notifier { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(1_000_000)] pub fn notification_received( origin: OriginFor, diff --git a/xcm/procedural/Cargo.toml b/xcm/procedural/Cargo.toml index 14a7d068db68..22ec39077c97 100644 --- a/xcm/procedural/Cargo.toml +++ b/xcm/procedural/Cargo.toml @@ -1,8 +1,8 @@ [package] -authors = ["Parity Technologies "] name = "xcm-procedural" -version = "0.9.31" -edition = "2021" +authors.workspace = true +edition.workspace = true +version.workspace = true [lib] proc-macro = true diff --git a/xcm/src/v0/junction.rs b/xcm/src/v0/junction.rs index 67f17f464a37..450e882ac3e8 100644 --- a/xcm/src/v0/junction.rs +++ b/xcm/src/v0/junction.rs @@ -52,6 +52,15 @@ pub enum BodyId { /// The unambiguous judicial body (this doesn't exist on Polkadot, but if it were to get a "grand oracle", it /// may be considered as that). Judicial, + /// The unambiguous defense body (for Polkadot, an opinion on the topic given via a public referendum + /// on the `staking_admin` track). + Defense, + /// The unambiguous administration body (for Polkadot, an opinion on the topic given via a public referendum + /// on the `general_admin` track). + Administration, + /// The unambiguous treasury body (for Polkadot, an opinion on the topic given via a public referendum + /// on the `treasurer` track). + Treasury, } /// A part of a pluralistic body. diff --git a/xcm/src/v0/multi_location.rs b/xcm/src/v0/multi_location.rs index 0491e27d644f..1bf49ad841a6 100644 --- a/xcm/src/v0/multi_location.rs +++ b/xcm/src/v0/multi_location.rs @@ -356,17 +356,30 @@ impl MultiLocation { /// # } /// ``` pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { - if prefix.len() + 1 != self.len() { + if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { return None } - for i in 0..prefix.len() { - if prefix.at(i) != self.at(i) { - return None - } - } return self.at(prefix.len()) } + /// Returns whether `self` begins with or is equal to `prefix`. + /// + /// # Example + /// ```rust + /// # use xcm::v0::{Junction::*, MultiLocation::*}; + /// let m = X4(Parent, PalletInstance(3), OnlyChild, OnlyChild); + /// assert!(m.starts_with(&X2(Parent, PalletInstance(3)))); + /// assert!(m.starts_with(&m)); + /// assert!(!m.starts_with(&X2(Parent, GeneralIndex(99)))); + /// assert!(!m.starts_with(&X1(PalletInstance(3)))); + /// ``` + pub fn starts_with(&self, prefix: &MultiLocation) -> bool { + if self.len() < prefix.len() { + return false + } + prefix.iter().zip(self.iter()).all(|(l, r)| l == r) + } + /// Mutates `self`, suffixing it with `new`. Returns `Err` in case of overflow. pub fn push(&mut self, new: Junction) -> result::Result<(), ()> { let mut n = MultiLocation::Null; @@ -601,6 +614,24 @@ mod tests { assert_eq!(m.match_and_split(&m), None); } + #[test] + fn starts_with_works() { + let full = X3(Parent, Parachain(1000), AccountIndex64 { network: Any, index: 23 }); + let identity = full.clone(); + let prefix = X2(Parent, Parachain(1000)); + let wrong_parachain = X2(Parent, Parachain(1001)); + let wrong_account = X3(Parent, Parachain(1000), AccountIndex64 { network: Any, index: 24 }); + let no_parents = X1(Parachain(1000)); + let too_many_parents = X3(Parent, Parent, Parachain(1000)); + + assert!(full.starts_with(&identity)); + assert!(full.starts_with(&prefix)); + assert!(!full.starts_with(&wrong_parachain)); + assert!(!full.starts_with(&wrong_account)); + assert!(!full.starts_with(&no_parents)); + assert!(!full.starts_with(&too_many_parents)); + } + #[test] fn append_with_works() { let acc = AccountIndex64 { network: Any, index: 23 }; diff --git a/xcm/src/v1/multilocation.rs b/xcm/src/v1/multilocation.rs index 0c2b2da31698..83cf0095c3b8 100644 --- a/xcm/src/v1/multilocation.rs +++ b/xcm/src/v1/multilocation.rs @@ -253,6 +253,24 @@ impl MultiLocation { self.interior.match_and_split(&prefix.interior) } + /// Returns whether `self` has the same number of parents as `prefix` and its junctions begins + /// with the junctions of `prefix`. + /// + /// # Example + /// ```rust + /// # use xcm::v1::{Junctions::*, Junction::*, MultiLocation}; + /// let m = MultiLocation::new(1, X3(PalletInstance(3), OnlyChild, OnlyChild)); + /// assert!(m.starts_with(&MultiLocation::new(1, X1(PalletInstance(3))))); + /// assert!(!m.starts_with(&MultiLocation::new(1, X1(GeneralIndex(99))))); + /// assert!(!m.starts_with(&MultiLocation::new(0, X1(PalletInstance(3))))); + /// ``` + pub fn starts_with(&self, prefix: &MultiLocation) -> bool { + if self.parents != prefix.parents { + return false + } + self.interior.starts_with(&prefix.interior) + } + /// Mutate `self` so that it is suffixed with `suffix`. /// /// Does not modify `self` and returns `Err` with `suffix` in case of overflow. @@ -801,15 +819,29 @@ impl Junctions { /// # } /// ``` pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { - if prefix.len() + 1 != self.len() { + if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { return None } - for i in 0..prefix.len() { - if prefix.at(i) != self.at(i) { - return None - } + self.at(prefix.len()) + } + + /// Returns whether `self` begins with or is equal to `prefix`. + /// + /// # Example + /// ```rust + /// # use xcm::v1::{Junctions::*, Junction::*}; + /// let mut j = X3(Parachain(2), PalletInstance(3), OnlyChild); + /// assert!(j.starts_with(&X2(Parachain(2), PalletInstance(3)))); + /// assert!(j.starts_with(&j)); + /// assert!(j.starts_with(&X1(Parachain(2)))); + /// assert!(!j.starts_with(&X1(Parachain(999)))); + /// assert!(!j.starts_with(&X4(Parachain(2), PalletInstance(3), OnlyChild, OnlyChild))); + /// ``` + pub fn starts_with(&self, prefix: &Junctions) -> bool { + if self.len() < prefix.len() { + return false } - return self.at(prefix.len()) + prefix.iter().zip(self.iter()).all(|(l, r)| l == r) } } @@ -929,6 +961,26 @@ mod tests { assert_eq!(m.match_and_split(&m), None); } + #[test] + fn starts_with_works() { + let full: MultiLocation = + (Parent, Parachain(1000), AccountId32 { network: Any, id: [0; 32] }).into(); + let identity: MultiLocation = full.clone(); + let prefix: MultiLocation = (Parent, Parachain(1000)).into(); + let wrong_parachain: MultiLocation = (Parent, Parachain(1001)).into(); + let wrong_account: MultiLocation = + (Parent, Parachain(1000), AccountId32 { network: Any, id: [1; 32] }).into(); + let no_parents: MultiLocation = (Parachain(1000)).into(); + let too_many_parents: MultiLocation = (Parent, Parent, Parachain(1000)).into(); + + assert!(full.starts_with(&identity)); + assert!(full.starts_with(&prefix)); + assert!(!full.starts_with(&wrong_parachain)); + assert!(!full.starts_with(&wrong_account)); + assert!(!full.starts_with(&no_parents)); + assert!(!full.starts_with(&too_many_parents)); + } + #[test] fn append_with_works() { let acc = AccountIndex64 { network: Any, index: 23 }; diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index 3b3f97fd823c..d3a3b0fda4fd 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -1,9 +1,9 @@ [package] -authors = ["Parity Technologies "] -edition = "2021" name = "xcm-builder" description = "Tools & types for building with XCM and its executor." -version = "0.9.31" +authors.workspace = true +edition.workspace = true +version.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } diff --git a/xcm/xcm-builder/src/currency_adapter.rs b/xcm/xcm-builder/src/currency_adapter.rs index 5e259195c4a0..f231bf1094b4 100644 --- a/xcm/xcm-builder/src/currency_adapter.rs +++ b/xcm/xcm-builder/src/currency_adapter.rs @@ -125,6 +125,9 @@ impl< AllowDeath, ) .is_ok(); + if ok { + Currency::reactivate(amount); + } debug_assert!( ok, "`can_check_in` must have returned `true` immediately prior; qed" @@ -138,6 +141,7 @@ impl< if let Some(amount) = Matcher::matches_fungible(what) { if let Some(checked_account) = CheckedAccount::get() { Currency::deposit_creating(&checked_account, amount); + Currency::deactivate(amount); } } } diff --git a/xcm/xcm-builder/src/lib.rs b/xcm/xcm-builder/src/lib.rs index e3473d55d5eb..aa55c56d2cd7 100644 --- a/xcm/xcm-builder/src/lib.rs +++ b/xcm/xcm-builder/src/lib.rs @@ -37,7 +37,7 @@ pub use location_conversion::{ mod origin_conversion; pub use origin_conversion::{ BackingToPlurality, ChildParachainAsNative, ChildSystemParachainAsSuperuser, EnsureXcmOrigin, - ParentAsSuperuser, RelayChainAsNative, SiblingParachainAsNative, + OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative, SiblingParachainAsNative, SiblingSystemParachainAsSuperuser, SignedAccountId32AsNative, SignedAccountKey20AsNative, SignedToAccountId32, SovereignSignedViaLocation, }; diff --git a/xcm/xcm-builder/src/origin_conversion.rs b/xcm/xcm-builder/src/origin_conversion.rs index 9fe50eaf9c3f..4d024a9d12c2 100644 --- a/xcm/xcm-builder/src/origin_conversion.rs +++ b/xcm/xcm-builder/src/origin_conversion.rs @@ -321,3 +321,20 @@ where }) } } + +/// `Convert` implementation to convert from an origin which passes the check of an `EnsureOrigin` +/// into a voice of a given pluralistic `Body`. +pub struct OriginToPluralityVoice( + PhantomData<(RuntimeOrigin, EnsureBodyOrigin, Body)>, +); +impl, Body: Get> + Convert + for OriginToPluralityVoice +{ + fn convert(o: RuntimeOrigin) -> Result { + match EnsureBodyOrigin::try_origin(o) { + Ok(_) => Ok(Junction::Plurality { id: Body::get(), part: BodyPart::Voice }.into()), + Err(o) => Err(o), + } + } +} diff --git a/xcm/xcm-builder/src/tests.rs b/xcm/xcm-builder/src/tests.rs index fe3f144e95c9..d26a2f008884 100644 --- a/xcm/xcm-builder/src/tests.rs +++ b/xcm/xcm-builder/src/tests.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::{mock::*, test_utils::*, *}; -use frame_support::{assert_err, weights::constants::WEIGHT_PER_SECOND}; +use frame_support::{assert_err, weights::constants::WEIGHT_REF_TIME_PER_SECOND}; use xcm::latest::prelude::*; use xcm_executor::{traits::*, Config, XcmExecutor}; @@ -676,8 +676,8 @@ fn weight_trader_tuple_should_work() { pub const PARA_2: MultiLocation = X1(Parachain(2)).into(); parameter_types! { - pub static HereWeightPrice: (AssetId, u128) = (Here.into().into(), WEIGHT_PER_SECOND.ref_time().into()); - pub static PARA1WeightPrice: (AssetId, u128) = (PARA_1.into(), WEIGHT_PER_SECOND.ref_time().into()); + pub static HereWeightPrice: (AssetId, u128) = (Here.into().into(), WEIGHT_REF_TIME_PER_SECOND.into()); + pub static PARA1WeightPrice: (AssetId, u128) = (PARA_1.into(), WEIGHT_REF_TIME_PER_SECOND.into()); } type Traders = ( diff --git a/xcm/xcm-builder/src/weight.rs b/xcm/xcm-builder/src/weight.rs index 2a86f30d632b..2ab8afde2da5 100644 --- a/xcm/xcm-builder/src/weight.rs +++ b/xcm/xcm-builder/src/weight.rs @@ -17,7 +17,7 @@ use frame_support::{ dispatch::GetDispatchInfo, traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT}, - weights::{constants::WEIGHT_PER_SECOND, WeightToFee as WeightToFeeT}, + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, WeightToFee as WeightToFeeT}, }; use parity_scale_codec::Decode; use sp_runtime::traits::{SaturatedConversion, Saturating, Zero}; @@ -153,7 +153,7 @@ impl, R: TakeRevenue> WeightTrader weight, payment, ); let (id, units_per_second) = T::get(); - let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); let unused = payment.checked_sub((id, amount).into()).map_err(|_| XcmError::TooExpensive)?; self.0 = self.0.saturating_add(weight); @@ -165,7 +165,7 @@ impl, R: TakeRevenue> WeightTrader log::trace!(target: "xcm::weight", "FixedRateOfConcreteFungible::refund_weight weight: {:?}", weight); let (id, units_per_second) = T::get(); let weight = weight.min(self.0); - let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); self.0 -= weight; self.1 = self.1.saturating_sub(amount); if amount > 0 { @@ -205,7 +205,7 @@ impl, R: TakeRevenue> WeightTrader for FixedRateOfFungib weight, payment, ); let (id, units_per_second) = T::get(); - let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); if amount == 0 { return Ok(payment) } @@ -220,7 +220,7 @@ impl, R: TakeRevenue> WeightTrader for FixedRateOfFungib log::trace!(target: "xcm::weight", "FixedRateOfFungible::refund_weight weight: {:?}", weight); let (id, units_per_second) = T::get(); let weight = weight.min(self.0); - let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); self.0 -= weight; self.1 = self.1.saturating_sub(amount); if amount > 0 { diff --git a/xcm/xcm-executor/Cargo.toml b/xcm/xcm-executor/Cargo.toml index 1f9842887eae..a87bb02283f3 100644 --- a/xcm/xcm-executor/Cargo.toml +++ b/xcm/xcm-executor/Cargo.toml @@ -1,9 +1,9 @@ [package] -authors = ["Parity Technologies "] -edition = "2021" name = "xcm-executor" description = "An abstract and configurable XCM message executor." -version = "0.9.31" +authors.workspace = true +edition.workspace = true +version.workspace = true [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/xcm/xcm-executor/integration-tests/Cargo.toml b/xcm/xcm-executor/integration-tests/Cargo.toml index 9e5adab26286..4fff3952a05d 100644 --- a/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/xcm/xcm-executor/integration-tests/Cargo.toml @@ -1,9 +1,9 @@ [package] -authors = ["Parity Technologies "] -edition = "2021" name = "xcm-executor-integration-tests" description = "Integration tests for the XCM Executor" -version = "0.9.31" +authors.workspace = true +edition.workspace = true +version.workspace = true [dependencies] frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/xcm/xcm-executor/src/assets.rs b/xcm/xcm-executor/src/assets.rs index 324e92dce9ff..6ecbf0e0cf44 100644 --- a/xcm/xcm-executor/src/assets.rs +++ b/xcm/xcm-executor/src/assets.rs @@ -100,14 +100,14 @@ impl Assets { } /// A borrowing iterator over the fungible assets. - pub fn fungible_assets_iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn fungible_assets_iter(&self) -> impl Iterator + '_ { self.fungible .iter() .map(|(id, &amount)| MultiAsset { fun: Fungible(amount), id: id.clone() }) } /// A borrowing iterator over the non-fungible assets. - pub fn non_fungible_assets_iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn non_fungible_assets_iter(&self) -> impl Iterator + '_ { self.non_fungible .iter() .map(|(id, instance)| MultiAsset { fun: NonFungible(instance.clone()), id: id.clone() }) @@ -126,7 +126,7 @@ impl Assets { } /// A borrowing iterator over all assets. - pub fn assets_iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn assets_iter(&self) -> impl Iterator + '_ { self.fungible_assets_iter().chain(self.non_fungible_assets_iter()) } diff --git a/xcm/xcm-simulator/Cargo.toml b/xcm/xcm-simulator/Cargo.toml index 4c3c45c404b7..b18b709dbbf3 100644 --- a/xcm/xcm-simulator/Cargo.toml +++ b/xcm/xcm-simulator/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "xcm-simulator" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Test kit to simulate cross-chain message passing and XCM execution" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 7fa6ade69fc5..bdc7ea9eb138 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "xcm-simulator-example" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." -edition = "2021" +authors.workspace = true +edition.workspace = true +version.workspace = true [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } diff --git a/xcm/xcm-simulator/example/src/parachain.rs b/xcm/xcm-simulator/example/src/parachain.rs index ff435a9238fd..d638867c281f 100644 --- a/xcm/xcm-simulator/example/src/parachain.rs +++ b/xcm/xcm-simulator/example/src/parachain.rs @@ -20,7 +20,7 @@ use codec::{Decode, Encode}; use frame_support::{ construct_runtime, parameter_types, traits::{Everything, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use sp_core::H256; use sp_runtime::{ @@ -97,8 +97,8 @@ impl pallet_balances::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedXcmpWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4)); + pub const ReservedDmpWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4)); } parameter_types! { diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 7ecff2f8c021..5a24c34f2b30 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "xcm-simulator-fuzzer" -version = "0.9.31" -authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } diff --git a/xcm/xcm-simulator/fuzzer/src/parachain.rs b/xcm/xcm-simulator/fuzzer/src/parachain.rs index b8b51e57e853..ce2a2698d00c 100644 --- a/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -20,7 +20,7 @@ use codec::{Decode, Encode}; use frame_support::{ construct_runtime, parameter_types, traits::{Everything, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use sp_core::H256; use sp_runtime::{ @@ -97,8 +97,8 @@ impl pallet_balances::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedXcmpWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4)); + pub const ReservedDmpWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4)); } parameter_types! {